OSDN Git Service

PR c++/10956
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2003-05-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2
3         PR c++/10956
4         * pt.c (instantiate_decl): Don't use full template arguments if
5         we are dealing with specializations.
6
7 2003-05-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
8
9         * decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS.
10         (binding_depth): Unconditionally define.
11         (is_class_level): Likewise.
12         (indent): Likewise.  Take an indenting parameter.
13         (push_binding_level): Remove conditional definittion. 
14         (pop_binding_level): Likewise.
15         (suspend_binding_level): Likewise.
16         (resume_binding_level): Likewise.
17         (pushlevel): Likewise.
18         (pushlevel_class): Likewise.
19         (poplevel_class): Likewise.
20         (pop_everything): Likewise.
21
22 2003-05-27  Gabriel Dos Reis <gdr@integrable-solutions.net>
23
24         * name-lookup.h (global_scope_p): New macro.
25         * decl.c (pop_binding_level): Use it.  Don't refer directly to
26         global_binding_level. 
27         (suspend_binding_level): Likewise.
28         (global_bindings_p): Likewise.
29         (print_other_binding_stack): Likewise.
30         (print_binding_stack): Likewise.
31         (maybe_push_to_top_level): Likewise.
32         (pushdecl_namespace_level): Likewise.
33         (cxx_init_decl_processing): Likewise.
34         (start_decl): Likewise.
35         (cp_finish_decl): Likewise.
36         (start_function): Likewise.
37         (global_binding_level): Remove.
38
39 2003-05-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
40
41         * parser.c (cp_parser_explicit_instantiation): Restore old
42         access before template instantiation.
43
44 2003-05-23  Geoffrey Keating  <geoffk@apple.com>
45
46         * lang-specs.h: Use -o to specify preprocessor's output file.
47         Make -no-integrated-cpp work when building PCH files.
48
49 2003-05-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
50
51         PR c++/10682
52         * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
53         check for implicitly created typedef to an enum.
54
55 2003-05-21  Jason Merrill  <jason@redhat.com>
56
57         * init.c (build_vec_delete): Copy the address into a temporary
58         variable before calling build_vec_delete_1.
59         * decl2.c (delete_sanity): Don't call stabilize_reference.
60
61 2003-05-21  Nathan Sidwell  <nathan@codesourcery.com>
62
63         * pt.c (register_specialization): Update the decl's location,
64         if necessary.
65         (check_explicit_specialization): Likewise.
66
67 2003-05-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
68
69         * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX.
70
71 2003-05-21  Danny Smith  <dannysmith@users.sourceforge.net>
72
73         PR c++/9738
74         * decl.c (duplicate_decls): Re-invoke make_decl_rtl
75         if the old decl had instantiated DECL_RTL.
76         (Base on Richard Henderson 2003-05-13 patch to c-decl.c).
77
78 2003-05-19  Matt Austern  <austern@apple.com>
79
80         * lang-options.h: Document -Wno-invalid-offsetof
81         * typeck.c (build_class_member_access_expr): Don't complain about
82         (Foo *)p->x for non-POD Foo if warn_invalid_offset is zero.
83         
84 2003-05-18 Andrew Pinski <pinskia@physics.uc.edu>
85
86         * name-lookup.c (free_binding_entry): fix where the GTY markers are.
87         (binding_entry_make): Make entry->chain NULL after getting an entry.
88         fix the spelling of chain in a comment.
89         (binding_table_free): speed up by having temporary variable.
90         (binding_table_new): set table->chain to be NULL after allocating
91         a table. 
92         (cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set
93         binding->previous to NULL after getting an binding for speed.
94         
95 2003-05-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
96
97         * cp-tree.h (struct lang_type_class): Replace data member tags
98         with hash-table nested_udts.
99         (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS.
100         * class.c (unreverse_member_declarations): Don't touch
101         CLASSTYPE_TAGS. 
102         (pushclass): Use cxx_remember_type_decls.
103         * decl.c (struct cp_binding_level): Replace data member tags with
104         hash-table type_decls.
105         (pop_binding_level): Handle level->type_decls.
106         (kept_level_p): Adjust.
107         (poplevel): Remove unused local variable.
108         (bt_print_entry): New function.
109         (print_binding_level): Use it.
110         (push_namespace): Build current_binding_level->type_decls.
111         (maybe_process_template_type_declaration): Adjust.
112         (pushtag): Likewise.
113         (clear_anon_tags): Use binding_table_remove_anonymous_types.
114         (gettags): Remove.
115         (cxx_remember_type_decls):  Rename from storetags.  Adjust.
116         (lookup_tag): Use binding_table_find_anon_type.  Tidy.
117         (lookup_tag_reverse): Use binding_table_reverse_maybe_remap.
118         (cxx_init_decl_processing): Build global_binding_level->type_decls.
119         (store_parm_decls): Remove pointless code.
120         * name-lookup.c (free_binding_entry): New variable.
121         (ENTRY_INDEX): New macro.
122         (struct binding_table_s): New datatype.
123         (binding_entry_make): New function.
124         (binding_entry_free): Likewise.
125         (binding_table_construct): Likewise.
126         (binding_table_free): Likewise.
127         (binding_table_new): Likewise.
128         (binding_table_expand): Likewise.
129         (binding_table_insert): Likewise.
130         (binding_table_find): Likewise.
131         (binding_table_find_anon_type): Likewise.
132         (binding_table_reverse_maybe_remap): Likewise.
133         (binding_table_remove_anonymous_types): Likewise.
134         (binding_table_foreach): Likewise.
135         * name-lookup.h (binding_table): New type.
136         (binding_entry): Likewise.
137         (bt_foreach_proc): Likewise.
138         (struct binding_entry_s): New datatype.
139         (SCOPE_DEFAULT_HT_SIZE): New macro.
140         (CLASS_SCOPE_HT_SIZE): Likewise.
141         (NAMESPACE_ORDINARY_HT_SIZE): Likewise.
142         (NAMESPACE_STD_HT_SIZE): Likewise.
143         (GLOBAL_SCOPE_HT_SIZE): Likewise.
144         (binding_table_new): Declare.
145         (binding_table_free): Likewise.
146         (binding_table_insert): Likewise.
147         (binding_table_find_anon_type): Likewise.
148         (binding_table_reverse_maybe_remap): Likewise.
149         (binding_table_remove_anonymous_types): Likewise.
150         (binding_table_foreach): Likewise.
151         (binding_table_find): Likewise.
152         (cxx_remember_type_decls): Likewise.
153         * pt.c (bt_instantiate_type_proc): New function.
154         (do_type_instantiation): Use it.
155         * search.c (lookup_field_r): Use binding_table_find.
156
157 2003-05-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
158
159         * semantics.c (perform_deferred_access_checks): Don't discard
160         checked access.
161
162 2003-05-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
163
164         * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
165         libiberty VA_ macros, always use stdarg.
166         * rtti.c (create_pseudo_type_info): Likewise.
167         * tree.c (build_min_nt, build_min): Likewise.
168
169 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
170
171         * ptree.c (cxx_print_type, cxx_print_xnode): Use string
172         concatentation on HOST_WIDE_INT_PRINT_* format specifier to
173         collapse multiple function calls into one.
174         * tree.c (debug_binfo): Likewise.       
175
176 2003-05-15  Jason Merrill  <jason@redhat.com>
177
178         PR c++/5388
179         * call.c (conditional_conversion): Don't consider implicit
180         conversions if T2 is a base of T1. 
181         * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
182         (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
183
184         * parser.c (cp_parser_primary_expression): Convert a static data
185         member from reference.
186
187 2003-05-15  Mark Mitchell  <mark@codesourcery.com>
188
189         * call.c (build_op_delete_call): Avoid creating unnecessary types.
190         * class.c (instantiate_type): Remove tests for tf_no_attributes.
191         * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
192         (COMPARE_NO_ATTRIBUTES): Remove.
193         * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
194
195         PR c++/8385
196         * semantics.c (finish_typeof): Refine type-dependency check.
197
198 2003-05-13  Jason Merrill  <jason@redhat.com>
199
200         * typeck.c (build_modify_expr): Don't always stabilize the lhs and
201         rhs.  Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
202
203 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
204
205         * method.c (synthesize_method): Call push/pop_deferring_access_checks.
206
207 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
208
209         PR c++/10230, c++/10481
210         * semantics.c (finish_non_static_data_member): Handle when the
211         non-static member is not from a base of the current class type.
212
213 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
214
215         PR c++/10552
216         * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
217         template and has dependent context.
218
219 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
220
221         * pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
222
223 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
224
225         PR c++/9252
226         * cp-tree.h (saved_scope): Remove check_access field.
227         (tsubst_flags_t): Remove tf_parsing.
228         * decl.c (maybe_push_to_top_level): Don't initialize
229         scope_chain->check_access.
230         (make_typename_type, make_unbound_class_template): Don't use
231         tf_parsing.
232         (register_dtor_fn): Use push/pop_deferring_access_checks
233         instead of scope_chain->check_access.
234         * method.c (use_thunk): Likewise.
235         * parser.c (cp_parser_explicit_instantiation
236         (cp_parser_constructor_declarator_p): Don't call
237         push/pop_deferring_access_checks here.
238         (cp_parser_template_argument, cp_parser_class_name): Don't use
239         tf_parsing.
240         (yyparse): Check flag_access_control.
241         * pt.c (instantiate_class_template): Call
242         push/pop_deferring_access_checks.
243         * semantics.c (push_deferring_access_checks): Propagate
244         dk_no_check.
245         (perform_or_defer_access_check): Make sure basetype_path is
246         a type before comparison.
247         * call.c (build_op_delete_call, build_over_call): Use
248         perform_or_defer_access_check.
249         * class.c (alter_access): Likewise.
250         * init.c (build_offset_ref): Likewise.
251         * lex.c (do_identifier): Likewise.
252         * method.c (hack_identifier): Likewise.
253         * search.c (lookup_member): Likewise.
254         * semantics.c (finish_non_static_data_member): Likewise.
255         (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
256         instead of flag_access_control.
257
258 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
259
260         PR c++/9554
261         * parser.c (cp_parser_class_name): Remove check_access parameter.
262         All caller adjusted.  Update declaration.
263         (cp_parser_lookup_name): Likewise.
264         * semantics.c (push_deferring_access_checks): Change parameter type
265         to enum deferring_kind.  All caller adjusted.
266         (resume_deferring_access_checks): Adjust to use new enum.
267         (stop_deferring_access_checks): Likewise.
268         (perform_or_defer_access_check): Likewise.
269         * cp-tree.h (deferring_kind): New enum.
270         (deferred_access): Adjust field type.
271         (push_deferring_access_checks): Update declaration.
272
273 2003-05-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
274
275         PR c++/10555, c++/10576
276         * pt.c (lookup_template_class): Handle class template with
277         multiple levels of parameters when one of the levels contain
278         errors.
279
280 2003-05-08  Jason Merrill  <jason@redhat.com>
281
282         * init.c (build_new_1): Don't reuse a TARGET_EXPR in an
283         expression.  Undo some of the recent reorg.
284
285 2003-05-07  Richard Henderson  <rth@redhat.com>
286
287         PR c++/10570
288         * cfns.gperf: Comment out POSIX thread cancellation points,
289         plus abort and raise.
290         * cfns.h: Regenerate.
291
292 2003-05-07  Jason Merrill  <jason@redhat.com>
293
294         * call.c (build_conditional_expr): Don't assume that the folded
295         expression has result_type.
296
297 2003-05-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
298
299         * typeck.c (build_unary_op): Deal with const qualifier in
300         invalid pointer-to-member earlier.
301
302 2003-05-05  Jason Merrill  <jason@redhat.com>
303
304         PR c++/9537
305         * call.c (conditional_conversion): Build an RVALUE_CONV if
306         we're just changing the cv-quals.
307         (build_conditional_expr): Don't call convert to change
308         cv-quals.
309
310 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
311
312         PR c++/10496
313         * typeck.c (build_unary_op): Don't output const qualifier when
314         output invalid pointer-to-member diagnostics.
315
316 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
317
318         * decl.c: Fix typos.
319
320 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
321
322         PR c++/4494
323         * decl.c (start_function): Use same_type_p to check return type
324         of main.
325
326 2003-05-03  Zack Weinberg  <zack@codesourcery.com>
327
328         PR c/10604
329         * cp/typeck.c (build_x_compound_expr): No need to check
330         extra_warnings as well as warn_unused_value.
331
332 2003-05-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
333
334         PR c++/9364, c++/10553, c++/10586
335         * decl.c (make_typename_type): Don't crash on illegal code.
336
337 2003-05-03  Nathan Sidwell  <nathan@codesourcery.com>
338
339         * class.c (finish_struct): Use location_t and input_location
340         directly.
341         * decl.c (make_label_decl): Likewise.
342         (use_label): Likewise.
343         * decl2.c (warn_if_unknown_interface): Likewise.
344         (start_static_initialization_or_destruction): Likewise.
345         (generate_ctor_or_dtor_function): Likewise.
346         (finish_file): Likewise.
347         * error.c (print_instantiation_full_context): Likewise.
348         * init.c (create_temporary_var): Likewise.
349         * method.c (synthesize_method): Likewise.
350         * parser.c (cp_token): Likewise.
351         (cp_lexer_set_source_position_from_token): Likewise.
352         (cp_lexer_get_preprocessor_token): Likewise.
353         (cp_parser_statement): Likewise.
354         * pt.c (tsubst_friend_function): Likewise.
355         (instantiate_class_template): Likewise.
356         (tsubst_decl): Likewise.
357         (tsubst): Likewise.
358         (instantiate_decl): Likewise.
359         * semantics.c (begin_class_definition): Likewise.
360         (expand_body): Likewise.
361
362 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
363
364         * class.c (finish_struct): Rename lineno to input_line.
365         * decl.c (push_binding_level, pop_binding_level,
366         suspend_binding_level, resume_binding_level, make_label_decl,
367         use_label, start_function): Likewise.
368         * decl2.c (warn_if_unknown_interface,
369         start_static_initialization_or_destruction,
370         generate_ctor_or_dtor_function, finish_file): Likewise.
371         * error.c (cp_line_of, print_instantiation_full_context,
372         print_instantiation_context): Likewise.
373         * except.c (check_handlers_1, check_handlers): Likewise.
374         * init.c (create_temporary_var): Likewise.
375         * method.c (use_thunk, synthesize_method): Likewise.
376         * parser.c (cp_lexer_set_source_position_from_token,
377         cp_lexer_get_preprocessor_token): Likewise.
378         * pt.c (push_tinst_level, pop_tinst_level,
379         tsubst_friend_function, instantiate_class_template, tsubst_decl,
380         tsubst, tsubst_expr, instantiate_decl): Likewise.
381         * semantics.c (genrtl_try_block, finish_label_stmt,
382         begin_class_definition, expand_body,
383         genrtl_finish_function): Likewise.
384         * tree.c (build_min_nt, build_min): Likewise.
385
386 2003-05-01  Mark Mitchell  <mark@codesourcery.com>
387
388         * decl2.c (comdat_linkage): Don't externalize explicit
389         instantiations.
390
391 2003-05-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
392
393         PR c++/10554
394         * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
395         is not NULL.
396
397 2003-05-01  Steven Bosscher  <steven@gcc.gnu.org>
398
399         * cp-tree.h (struct lang_id2): Remove.  Move fields from here...
400         (struct lang_identifier): ... to here.
401         (LANG_ID_FIELD): Remove.
402         (SET_LANG_ID): Remove.
403         (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
404         (SET_IDENTIFIER_LABEL_VALUE): Likewise.
405         (IDENTIFIER_IMPLICIT_DECL): Likewise.
406         (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
407         (IDENTIFIER_ERROR_LOCUS): Likewise.
408         (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
409
410 2003-05-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
411
412         PR c++/8772
413         * pt.c (convert_template_argument): Correct diagnostic.
414
415 2003-04-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
416
417         PR c++/9432, c++/9528
418         * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
419
420 2003-04-30  Garbiel Dos Reis  <gcc@integrable-solutions.net>
421
422         * decl.c (check_previous_goto_1): Adjust prototype.
423         (check_previous_goto): Adjust use.
424         (check_switch_goto): Likewise.
425         (use_label): Adjust.
426         (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
427         (struct named_label_use_list): Use location_t datatype.
428
429 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
430
431         PR c++/10551
432         * pt.c (mark_decl_instantiated): Defer all explicit instantiations
433         that have not yet been written out.
434
435 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
436
437         PR c++/10549
438         * class.c (layout_class_type): Mark overlong bitfields as having
439         the maximum size permitted by their type, after layout.
440
441         PR c++/10527
442         * error.c (dump_expr): Correctly handling of NEW_EXPR.4
443
444 2003-04-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
445
446         * call.c (build_operator_new_call): Fix typo.
447         * lang-options.h: Likewise.
448
449 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
450
451         PR c++/10515
452         * cp-tree.h (lookup_field_1): Declare it.
453         * search.c (lookup_field_1): Make it public.
454         * decl.c (reshape_init): Handle designated initializers.
455
456         * decl.c (maybe_commonize_var): Further tweak support for systems
457         without weak symbols.
458
459 2003-04-27  Mark Mitchell  <mark@codesourcery.com>
460
461         * decl.c (maybe_commonize_var): Fix thinko in last patch.
462
463 2003-04-27  Mark Mitchell  <mark@codesourcery.com>
464
465         PR c++/10506
466         * method.c (use_thunk): Decrement immediate_size_expand.
467
468         PR c++/10503
469         * cp-tree.h (DECL_VAR_MARKED_P): New macro.
470         (DECL_MAYBE_TEMPLATE): Remove.
471         * class.c (fixed_type_or_null): Avoid infinite recursion.
472
473         * decl.c (maybe_commonize_var): Make the code match the comments.
474         * pt.c (instantiate_decl): Move call to import_export_decl.
475
476 2003-04-26  Mark Mitchell  <mark@codesourcery.com>
477
478         * decl2.c (finish_file): Fix merge botch.
479
480 2003-04-25  Mark Mitchell  <mark@codesourcery.com>
481
482         * decl2.c (finish_file): Don't call import_export_decl for
483         functions that are not defined.
484         (handle_class_head): Robustify.
485         * pt.c (instantiate_decl): Do not call cp_finish_decl for
486         variables that are not defined.
487
488 2003-04-24  Sylvain Pion  <Sylvain.Pion@mpi-sb.mpg.de>
489
490         * call.c (print_z_candidates): Fix off by one error.
491
492 2003-04-24  Nathan Sidwell  <nathan@codesourcery.com>
493
494         PR c++/10337
495         * call.c (joust): Don't warn about conversion ops that are exact
496         or cv-conversions. Rearrange to avoid multiple type comparisons.
497
498 2003-04-23  Mark Mitchell  <mark@codesourcery.com>
499
500         PR c++/10471
501         * call.c (build_cxx_call): Robustify.
502
503 2003-04-23  Neil Booth  <neil@daikokuya.co.uk>
504
505         * Make-lang.in (lex.o): Remove mbchar.h.
506         * lex.c (MULTIBYTE_CHARS): Lose.
507         * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
508         in c-lex.c.
509
510 2003-04-23  Mark Mitchell  <mark@codesourcery.com>
511
512         PR c++/9847
513         * cp-tree.h (duplicate_tag_error): Remove.
514         * class.c (duplicate_tag_error): Remove.
515         * semantics.c (begin_class_definition): Return immediately for a
516         duplicate class definition.
517
518         PR c++/10451
519         * decl.c (grokdeclarator): Correct logic for "mutable" errors.
520
521 2003-04-22  Mark Mitchell  <mark@codesourcery.com>
522
523         PR c++/10446
524         * search.c (lookup_fnfields_1): Handle empty slots in the method
525         vector.
526
527         PR c++/10428
528         * decl.c (check_elaborated_type_specifier): New function, split
529         out from ...
530         (xref_tag): ... here.  Use the new function in more places.
531
532         * rtti.c (throw_bad_typeid): Use build_cxx_call.
533
534 2003-04-21  Mark Mitchell  <mark@codesourcery.com>
535
536         * call.c (build_over_call): Use build_cxx_call.
537         (build_cxx_call): New method, split out of build_over_call.
538         * cp-tree.h (language_function): Add can_throw.
539         (build_cxx_call): Declare it.
540         * decl.c (finish_function): If a function does not contain any
541         calls to functions that can throw an exception, indicate that
542         fact.
543         * decl2.c (mark_used): Do not defer the instantiation of
544         functions, if the current function does not throw.
545         * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
546         * pt.c (instantiate_decl): Make sure import_export_decl is called
547         before emitting things.
548         * rtti.c (throw_bad_cast): Use build_cxx_call.
549         (build_dynamic_cast_1): Likewise.
550         * typeck.c (build_function_call): Likewise.
551
552 2003-04-21  Nathan Sidwell  <nathan@codesourcery.com>
553
554         PR c++/9881
555         * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
556         expressions. Reverts my 2002-08-08 patch.
557
558         * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
559         cheaper early exit.
560
561 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
562
563         * cp/decl2.c (start_static_storage_duration_function): Take count
564         arg, don't check if it wraps round.
565         (generate_ctor_or_dtor_function): Add locus arg, use it.
566         (generate_ctor_and_dtor_functions_for_priority): Data arg is a
567         locus.
568         (finish_file): Set line numbers to past EOF for synthesized
569         functions.
570
571 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
572
573         PR c++/10405
574         * search.c (lookup_field_1): Final scan goes backwards for
575         types, forwards for non-types.
576
577 2003-04-17  Roger Sayle  <roger@eyesopen.com>
578
579         PR c/10375
580         * decl.c (duplicate_decls): Preserve "const", "noreturn" and
581         "nothrow" function attributes.
582
583 2003-04-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
584
585         PR c++/10347
586         * pt.c (type_dependent_expression_p): Handle array new.
587
588 2003-04-15  Mark Mitchell  <mark@codesourcery.com>
589
590         PR c++/10381
591         * parser.c (cp_parser_primary_expression): Reorganize logic for
592         dealing with name lookup failures.
593
594 2003-04-15  Jason Merrill  <jason@redhat.com>
595
596         * decl2.c (mark_used): Don't instantiate anything if
597         skip_evaluation.
598
599 2003-04-14  Ziemowit Laski  <zlaski@apple.com>
600
601         * tree.c (build_cplus_array_type_1): Do not call
602         uses_template_parms() on a NULL index_type.
603
604 2003-04-13  Roger Sayle  <roger@eyesopen.com>
605
606         * decl.c (duplicate_decls): Preserve pure and malloc attributes.
607
608 2003-04-12  Mark Mitchell  <mark@codesourcery.com>
609
610         PR c++/10300
611         * init.c (build_new_1): Reorganize.
612
613 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
614
615         * class.c (initialize_array)
616         * decl.c (reshape_init)
617         * decl2.c (build_expr_from_tree)
618         * init.c (build_zero_init)
619         * pt.c (tsubst_copy, tsubst_copy_and_build)
620         * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
621         (ptm_initializer, class_initializer, get_pseudo_ti_init)
622         * semantics.c (finish_compound_literal)
623         * typeck.c (build_ptrmemfunc1)
624         * typeck2.c (store_init_value, process_init_constructor)
625         (build_functional_cast): Use build_constructor.
626
627 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
628
629         * call.c (print_z_candidates): Use gcc_gettext_width, not
630         strlen, to determine how much padding to use.
631
632 2003-04-10  Zack Weinberg  <zack@codesourcery.com>
633
634         * decl.c: Update all calls to shadow_warning.
635
636 2003-04-10  Mark Mitchell  <mark@codesourcery.com>
637
638         * class.c (layout_class_type): Correct handling for overlong
639         bit-fields whose width is the same as an integer type.
640
641 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
642
643         * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
644         * cp-lang.c (cp_tree_size): New function.
645         (LANG_HOOKS_TREE_SIZE): Override.
646
647         * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
648         tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
649         (union lang_tree_node): Remove common and srcloc members.
650         (build_srcloc_here): Don't prototype.
651         * decl.c (cp_tree_node_structure): Kill SRCLOC case.
652         * pt.c (pending_templates): Correct comment.
653         * tree.c (build_srcloc, build_srcloc_here): Kill.
654
655 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
656
657         * call.c: Include intl.h.
658         (print_z_candidate): Always use inform; get rid of errfn
659         argument. Reorganize so that all the strings get picked up
660         by xgettext.  Note obligation of caller to pass first argument
661         through gettext.
662         (print_z_candidates): Update to match.  Indent second and
663         successive candidates by strlen() of translated message.
664         (joust): Restructure ambiguous-conversion pedwarn so that
665         translators see a complete sentence.  Update calls to
666         print_z_candidate.
667
668         * Make-lang.in (cp/call.o): Update dependencies.
669
670 2003-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
671
672         * decl.c (set_current_binding_level): Delete, revert last change.
673         (current_binding_level): Modify to allow it as as lvalue.
674
675 2003-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
676
677         * name-lookup.c (find_binding): Pass appropriate pointer type to
678         POP_TIMEVAR_AND_RETURN.
679
680 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
681
682         * Make-lang.in (cp-warn): Add $(STRICT_WARN).
683         * cp-tree.h: Don't insist on having GNUC.
684
685 2003-04-03  Jason Merrill  <jason@redhat.com>
686
687         * cvt.c (ocp_convert): Only abort if we try to convert an object
688         of TREE_ADDRESSABLE type.
689
690         * class.c (build_vtable): Set DECL_ALIGN here.
691         (get_vtable_decl): Not here.
692         (layout_vtable_decl): Or here.
693         (create_vtable_ptr): Or here.
694         (layout_class_type): Or here.
695         (check_bitfield_decl): Don't mess with field alignment.
696
697 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
698
699         * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
700         DEF_ASSN_OPERATOR): Delete spurious semi-colon.
701         * rtti.c (dfs_class_hint_mark): Likewise.
702
703         * decl.c (push_local_name, push_class_level_binding,
704         maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
705         functions returning void.
706         * decl2.c (add_using_namespace): Likewise.
707
708         * decl.c (print_binding_level, print_other_binding_stack,
709         print_binding_stack): Cast argument of %p specifier to void*.
710         * ptree.c (cxx_print_decl): Likewise.
711
712         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
713         VAR_FUNCTION_OR_PARM_DECL_CHECK,
714         VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
715         BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
716         LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
717
718         * decl.c (set_current_binding_level): New macro.  Use throughout
719         when setting the current binding level.
720
721         * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
722         in enum.
723         * method.c (mangling_flags): Likewise.
724
725         * cp-tree.h (lang_type_header): Add __extension__ and use
726         CHAR_BITFIELD for members.
727
728 2003-04-02  Geoffrey Keating  <geoffk@apple.com>
729
730         PR other/9274
731         * mangle.c: Include gt-cp-mangle.h.
732         (subst_identifiers): Mark with GTY.
733         * config-lang.in (gtfiles): Add cp/mangle.c.
734         * Make-lang.in: (gt-cp-mangle.h): New rule.
735         (cp/mangle.o): Depends on gt-cp-mangle.h.
736
737 2003-04-01  Andrew Pinski  <pinskia@physics.uc.edu>
738
739         * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
740         after \$(srcdir)/cp/name-lookup.h.
741         * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
742         of ggc_alloc.  Include gt-cp-name-lookup.h at the end of the file.
743         * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
744         (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
745
746 2003-03-31  Jason Merrill  <jason@redhat.com>
747
748         PR java/10145
749         * class.c (check_field_decl): Don't set DECL_ALIGN.
750
751 2003-03-30  Mark Mitchell  <mark@codesourcery.com>
752
753         PR c++/7647
754         * decl.c (grokdeclarator): Tidy, slightly.
755         * search.c (lookup_field_1): Add want_type parameter.
756         (lookup_field_r): Adjust call to lookup_field_1.
757
758 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
759
760         * Make-lang.in (cp/name-lookup.o): Add more dependencies.
761
762 2003-03-30  Gabriel Dos Reis <gdr@integrable-solutions.net>
763
764         * cp-tree.h (binding_for_name: Move to name-lookup.h  Adjust
765         prototype.
766         (cxx_scope_find_binding_for_name): Likewise.
767         * decl.c (find_binding: Move to name-lookup.c.
768         (binding_for_name): Likewise.
769         (cxx_scope_find_binding_for_name): Likewise.
770         (BINDING_LEVEL):  Remove.
771         (push_binding): Tidy.
772         (push_class_binding): Likewise.
773         (pop_binding): Likewise.
774         (poplevel): Likewise.
775         (poplevel_class): Likewise.
776         (set_identifier_type_value_with_scope): Likewise.
777         (push_overloaded_decl): Likewise.
778         (lookup_tag): Likewise.
779         (unqualified_namespace_lookup): Likewise.
780         (lookup_name_current_level): Likewise.
781         (maybe_inject_for_scope_var): Likewise.
782         (namespace_binding): Move to name-lookup.c.
783         (set_namespace_binding): Likewise.
784         * decl2.c (lookup_using_namespace): Tidy.
785         (qualified_lookup_using_namespace): Likewise.
786         (do_toplevel_using_decl): Likewise.
787         * name-lookup.c: Include "timevar.h"
788         * name-lookup.h (cxx_scope):  Declare.
789         (struct cxx_binding): Lose member "has_level".  Adjust "scope"
790         member declaration.
791         (BINDING_SCOPE): Adjust definition.
792         (BINDING_HAS_LEVEL_P): Remove.
793
794 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
795
796         * name-lookup.c: New file.
797         * name-lookup.h: Likewise..
798         * decl.c (push_binding): Adjust use cxx_binding_make.
799         (free_bindings): Move to name-lookup.c
800         (pop_binding): Use cxx_binding_free.
801         (binding_for_name): Tidy.
802         * cp-tree.h: Include "name-lookup.h"
803         (cxx_binding_make): Move to name-lookup.h
804         (cxx_binding_clear): Likewise.
805         (struct cxx_binding): Likewise.
806         (LOCAL_BINDING_P): Likewise.
807         (INHERITED_VALUE_BINDING_P): Likewise.
808         (BINDING_SCOPE): Likewise.
809         (BINDING_HAS_LEVEL_P): Likewise.
810         (BINDING_VALUE): Likewise.
811         (BINDING_TYPE): Likewise.
812         * config-lang.in (gtfiles): Add cp/name-lookup.h
813         * Make-lang.in (cp/name-lookup.o): New rule.
814         (CXX_OBJS): Add cp/name-lookup.o
815         (CXX_TREE_H): Add cp/name-lookup.h
816
817 2003-03-28  Jason Merrill  <jason@redhat.com>
818
819         PR c++/10245
820         * cvt.c (force_rvalue): New fn.
821         * call.c (build_conditional_expr): Use it.
822         * cp-tree.h: Declare it.
823
824 2003-03-28  Mike Stump  <mrs@apple.com>
825
826         * error.c (dump_expr): Add 0x to printed hex numbers to make
827         output match source code better.
828
829 2003-03-28  Mark Mitchell  <mark@codesourcery.com>
830
831         PR c++/10218
832         * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
833         definitions.
834
835         * decl2.c (generate_ctor_or_dtor_function): Tolerate a
836         non-existant ssdf_decls array.
837         (finish_file): Call generator_ctor_or_dtor_function when there are
838         static constructors or destructors and no other static
839         initializations.
840
841 2003-03-28  Nathan Sidwell  <nathan@codesourcery.com>
842
843         PR c++/10047
844         * decl2.c (finish_file): Don't warn about explicitly instantiated
845         inline decls.
846
847 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
848
849         PR c++/10224
850         * pt.c (lookup_template_class): Only check instantiated args if
851         they do not contain template parameters.
852
853 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
854
855         PR c++/10158
856         * parser.c (cp_parser_function_definition): Set
857         DECL_INITIALIZED_IN_CLASS for members.
858         * pt.c (instantiate_decl): Only reduce the template args for
859         friends that are not defined in class.
860
861 2003-03-25  Jason Merrill  <jason@redhat.com>
862
863         * call.c (print_z_candidate): Change name of first arg to msgid.
864         (joust): Add comment for translators.
865
866 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
867
868         PR c++/9898, PR c++/383, DR 322
869         * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
870         through reference types on both PARM and ARG.
871
872 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
873
874         PR c++/10119
875         * error.c (dump_expr) <BASELINK>: Use dump_expr.
876         * pt.c (maybe_fold_nontype_args): New function.
877         (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
878         <TEMPLATE_ID_EXPR>: Break out folding code, call it.
879         (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
880         maybe_fold_nontype_args.
881
882 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
883
884         PR c++/10026
885         * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
886
887 2003-03-23  Mark Mitchell  <mark@codesourcery.com>
888
889         PR c++/7086
890         * typeck.c (cxx_mark_addressable):  Adjust call to
891         gen_mem_addressof or put_var_into_stack.
892
893 2003-03-22  Nathan Sidwell  <nathan@codesourcery.com>
894
895         PR c++/9978, c++/9708
896         * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
897         * call.c (add_template_candidate_real): Adjust
898         instantiate_template call.
899         * class.c (resolve_address_of_overloaded_function): Likewise.
900         * decl.c (build_enumerator): Set TREE_CONSTANT.
901         * pt.c (check_instantiated_args): New.
902         (push_inline_template_parms_recursive): Set TREE_CONSTANT,
903         TREE_READONLY.
904         (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
905         (reduce_template_parm_level): Likewise.
906         (process_template_parm): Likewise.
907         (check_explicit_specialization): Adjust instantiate_template call.
908         (convert_template_argument): Don't check non-type argument here.
909         (lookup_template_class): Check them here.
910         (tsubst_friend_function): Adjust instantiate_template call.
911         (instantiate_template): Add tsubst_flags parameter, use it. Check
912         instantiated args.
913
914 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
915
916         * decl.c: Update calls to shadow_warning.
917
918 2003-03-21  Nathan Sidwell  <nathan@codesourcery.com>
919
920         PR c++/9898
921         * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
922         (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
923
924 2003-03-20  Mark Mitchell  <mark@codesourcery.com>
925
926         * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
927         friends.
928         * cp/pt.c (instantiate_class_template): Fix formatting.
929
930 2003-03-14  Matt Austern  <austern@apple.com>
931
932         * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
933         (unemitted_tinfo_decl_p): Remove.
934         (emit_tinfo_decl): Change declaration to remove unused parameter.
935         * decl2.c (finish_file): Change tinfo emission to loop through
936         unemitted_tinfo_decls array instead of looping through all decls.
937         * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
938         unused second parameter.
939         (init_rtti_processing): initialize unemitted_tinfo_decls varray.
940         (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
941         (emit_tinfo_decl): remove unused second parameter, add assertion
942         that decl hasn't already been emitted.
943
944 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
945
946         * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
947         type from 'int' to 'bool'. Replace 0 and 1 with true and false in
948         return statements.
949
950 2003-03-19  Jason Merrill  <jason@redhat.com>
951
952         PR c++/8316, c++/9315, c++/10136
953         * call.c (print_z_candidate): Split out from...
954         (print_z_candidiates): ...here.
955         (joust): Use it.
956
957 2003-03-17  Roger Sayle  <roger@eyesopen.com>
958
959         PR c++/10031
960         * decl.c (duplicate_decls): Use the new type when prototyping
961         anticipated decls, even when the types match.  This defines the
962         exception list for the built-in function.
963
964 2003-03-17  Jason Merrill  <jason@redhat.com>
965
966         PR c++/10091
967         * typeck.c (build_class_member_access_expr): Compare
968         TYPE_MAIN_VARIANTs.
969
970 2003-03-17  Mark Mitchell  <mark@codesourcery.com>
971
972         PR c++/9639
973         * parser.c (cp_parser_declarator_id): Clear parser->scope.
974
975 2003-03-16  Jason Merrill  <jason@redhat.com>
976
977         PR c++/9993
978         * decl.c (finish_function): Only allow the NRVO to use variables
979         declared at function scope.
980
981 2003-03-17  Andreas Jaeger  <aj@suse.de>
982
983         * Make-lang.in (cp/TAGS): Remove.
984
985 2003-03-16  Nathan Sidwell  <nathan@codesourcery.com>
986
987         PR c++/9629
988         * cp-tree.h (struct language_function): Add in_base_initializer.
989         (in_base_initializer): define it.
990         (expand_member_init): Remove INIT param.
991         * init.c (expand_member_init): Remove INIT param, return the member.
992         (emit_mem_initializers): Set in_base_initializer.
993         * class.c (build_base_path): Check in_base_initializer.
994         * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
995         * pt.c (tsubst_initializer_list): Likewise.
996
997 2003-03-16   Gabriel Dos Reis <gdr@integrable-solutions.net>
998
999         * decl.c (binding_for_name): Fix initialization thinko.
1000
1001 2003-03-15  Gabriel Dos Reis <gdr@integrable-solutions.net>
1002
1003         Compile-time improvement: 2/n.
1004         * cp-tree.h (struct cxx_binding): New datatype;
1005         (struct lang_identifier): Use it.
1006         (LOCAL_BINDING_P): Adjust definition.
1007         (INHERITED_VALUE_BINDING_P): Likewise.
1008         (BINDING_SCOPE): Likewise.
1009         (BINDING_HAS_LEVEL_P): Likewise.
1010         (BINDING_VALUE): Likewise.
1011         (BINDING_TYPE): Likewise.
1012         (IDENTIFIER_VALUE): Likewise.
1013         (struct tree_binding): Remove.
1014         (TS_CP_BINDING): Likewise.
1015         ((union lang_tree_node): Remove field "binding".
1016         (cxx_binding_clear): New macro.
1017         (binding_for_name): Adjust return type.
1018         (qualified_lookup_using_namespace): Adjust prototype.
1019         (lookup_using_namespace): Adjust prototype.
1020         (cxx_scope_find_binding_for_name): Declare.
1021         * cp-tree.def: Remove CPLUS_BINDING definition.
1022         * decl.c (push_binding): Adjust local variable type.
1023         (add_binding): Likewise.
1024         (push_class_binding): Likewise.
1025         (pop_binding): Likewise.
1026         (poplevel): Likewise.
1027         (poplevel_class): Likewise.
1028         (free_bindings):  Adjust type.
1029         (find_binding): Adjust return type, add a third parameter. Remove
1030         non-useful assertion now that we use static typing.
1031         (cxx_scope_find_binding_for_name): New function.
1032         (binding_for_name): Use it.  Adjust local variable type. Simplify.
1033         (namespace_binding):  Simplify.
1034         (set_namespace_binding): Likewise.
1035         (set_identifier_type_value_with_scope): Adjust local variable type.
1036         (lookup_tag): Don't type-abuse of local variable 'old'.
1037         (lookup_namespace_name): Likewise.  Allocate binding on stack.
1038         (select_decl): Adjust prototype.
1039         (unqualified_namespace_lookup):  Allocate binding on stack.
1040         Don't type-abuse of local variable 'val'.
1041         (lookup_name_real): Likewise.
1042         (maybe_inject_for_scope_var): Adjust local variable type.
1043         (cp_tree_node_structure): Remove CPLUS_BINDING case label.
1044         (namespace_binding): Adjust logic, simplify.
1045         (BINDING_LEVEL): Adjust definition.
1046         (push_class_level_binding): Adjust local variable type.
1047         (struct cxx_saved_binding): Adjust field 'binding' type.
1048         * decl2.c (ambiguous_decl): Adjust prototype.
1049         (lookup_using_namespace): Adjust local variable type.
1050         (qualified_lookup_using_namespace): Catch type error and correct
1051         ensueing logic error.
1052         (do_nonmember_using_decl): Adjust local variable type.  Allocate
1053         temporary cxx_binding on stack.
1054         (do_toplevel_using_decl): Adjust local variable type.
1055         * ptree.c (cxx_print_cxx_binding): New function.
1056         (cxx_print_identifier): Use it.
1057         (cxx_print_xnode): Delete CPLUS_BINDING case label.
1058
1059 2003-03-15  Roger Sayle  <roger@eyesopen.com>
1060
1061         * tree.c (count_functions): Fix whitespace.
1062
1063 2003-03-15  Neil Booth  <neil@daikokuya.co.uk>
1064
1065         * Make-lang.in: Update.
1066
1067 2003-03-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1068
1069         PR c++/6440
1070         * pt.c (maybe_process_partial_specialization): Handle
1071         member class template when enclosing class template is
1072         explicit specialized.
1073         (most_general_template): Stop looking when DECL is already
1074         specialized.
1075
1076 2003-03-13  Jason Merrill  <jason@redhat.com>
1077
1078         PR c++/9420
1079         * search.c (lookup_conversions): Call complete_type here.
1080         * call.c (implicit_conversion): Not here.
1081
1082 2003-03-13  Mark Mitchell  <mark@codesourcery.com>
1083
1084         * decl2.c (do_nonmember_using_decl): Correct handling of
1085         simultaneous type/non-type bindings.
1086
1087         * call.c (initialize_reference): Remove bogus assertion.
1088         * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
1089
1090 2003-03-12  Andrew Lewycky  <andrew@mxc.ca>
1091
1092         PR c++/7050
1093         * expr.c (cxx_expand_expr): Return const0_rtx for throw
1094         expressions.
1095
1096 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
1097
1098         PR c++/9474
1099         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
1100         to merge old and new declarations.
1101
1102 2003-03-12  Alexandre Oliva  <aoliva@redhat.com>
1103
1104         * g++.1: Remove.
1105         * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
1106         (cp/g++.1): Build it from scratch in the build tree.
1107         (c++.install-man): Depend on it.  Install it from the build tree.
1108         (c++.mostlyclean): Clean it.
1109
1110 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
1111
1112         PR c++/9474
1113         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
1114         to merge old and new declarations.
1115
1116         PR c++/9924
1117         * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
1118
1119 2003-03-11  Jason Merrill  <jason@redhat.com>
1120
1121         PR c++/9820
1122         * search.c (lookup_member): Fix handling of functions in a class
1123         being defined.
1124
1125 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
1126
1127         PR c++/8700
1128         * call.c (convert_class_to_reference): Adjust usage of
1129         splice_viable.
1130         (any_viable): Remove.
1131         (splice_viable): Combine with any_viable.
1132         (print_z_candidates): Avoid printing duplicates.
1133         (build_user_type_conversion_1): Adjust usage of splice_viable.
1134         (build_new_function_call): Likewise.
1135         (build_operator_new_call): Likewise.
1136         (build_object_call): Likewise.
1137         (build_conditional_expr): Likewise.
1138         (build_new_op): Likewise.
1139         (build_new_method_call): Likewise.
1140         (joust): Remove spurious comment.
1141         * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
1142         * decl2.c (arg_assoc_class): Simplify.
1143         * friend.c (add_friend): Likewise.
1144
1145 2003-03-11  Jason Merrill  <jason@redhat.com>
1146
1147         PR c++/8660
1148         * decl2.c (check_classfn): A member template only matches a
1149         member template.
1150
1151 2003-03-11  Neil Booth  <neil@daikokuya.co.uk>
1152
1153         * Make-lang.in (CXX_C_OBJS): Update.
1154         * lang-specs.h: Don't define __GNUG__ here.
1155
1156 2003-03-10  Mark Mitchell  <mark@codesourcery.com>
1157
1158         * call.c (perform_overload_resolution): New function.
1159         (build_new_function_call): Use it.
1160         (build_operator_new_call): Likewise.
1161         (add_candidates): Add explicit_targs and template_only parameters.
1162         (build_new_op): Adjust accordingly.
1163         * cp-tree.h (build_operator_new_call): New function.
1164         (build_function_call_real): Remove.
1165         (build_function_call_maybe): Likewise.
1166         * init.c (build_new_1): Use build_operator_new_call.
1167         * typeck.c (build_function_call_real): Rename to ...
1168         (build_function_call): ... this.
1169
1170 2003-03-10  Devang Patel  <dpatel@apple.com>
1171
1172         PR c++/9394
1173         * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
1174
1175 2003-03-10  Jason Merrill  <jason@redhat.com>
1176
1177         PR c++/9798
1178         * decl.c (push_using_directive): Push before recursing.
1179
1180         PR c++/9868, c++/9524
1181         * call.c (resolve_scoped_fn_name): Handle the case of a function
1182         pointer member.
1183
1184         * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
1185         argument in the pointer-to-member case.
1186
1187 2003-03-09  Mark Mitchell  <mark@codesourcery.com>
1188
1189         PR c++/9373
1190         * cp-lang.c (cxx_get_alias_set): Use alias set zero for
1191         pointers to member functions.
1192
1193         PR c++/8534
1194         * decl.c (build_ptrmemfunc_type): Do not allow default arugments
1195         in pointer-to-member-function types.
1196
1197 2003-03-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1198
1199         * expr.c (cplus_expand_constant): Use C90 prototype style.
1200         (cxx_expand_expr): Likewise.
1201
1202 2003-03-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1203
1204         PR c++/9970
1205         * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
1206         functions.
1207
1208 2003-03-08  Geoffrey Keating  <geoffk@apple.com>
1209
1210         * lang-specs.h (c++-header): Change .pch to .gch.
1211
1212 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
1213
1214         * cp-tree.h (cxx_init): Update prototype.
1215         * lex.c (cxx_init): Similarly.
1216
1217 2003-03-08  Mark Mitchell  <mark@codesourcery.com>
1218
1219         PR c++/9823
1220         * cp-tree.h (begin_mem_initializers): Remove.
1221         * parser.c (cp_parser_mem_initializer_list): Inline it here.
1222         Do not call finish_mem_initializers if not in a constructor.
1223         (cp_parser_class_head): Fix typo in error message.
1224         * semantics.c (begin_mem_initializers): Remove.
1225         * testsuite/g++.dg/parser/constructor1.C: New test.
1226
1227         PR c++/9809
1228         * call.c (add_function_candidate): Skip builtin fuctions that have
1229         not yet been declared.
1230
1231         PR c++/9982
1232         * init.c (build_new_1): Correct logic for determining whether or
1233         not to use an array cookie.
1234
1235         PR c++/9524
1236         * parser.c (cp_parser_postfix_expression): Call
1237         finish_non_static_data_member, even when processing_template_decl.
1238
1239         PR c++/9912
1240         * cp-tree.h (is_ancestor): New function.
1241         (handle_class_head): Change prototype.
1242         * decl2.c (is_namespace_ancestor): Rename to ...
1243         (namespace_anecestor): ... this.
1244         (set_decl_namespace): Adjust accordingly.
1245         (handle_class_head): Remove unncessary parameters.
1246         * parser.c (cp_parser_class_head): Check that
1247         nested-name-specifiers are used appropriately.
1248
1249 2003-03-07  Mark Mitchell  <mark@codesourcery.com>
1250
1251         * call.c (reference_binding): Remove REF_IS_VAR parameter.
1252         (implicit_conversion): Adjust call to reference_binding.
1253         (make_temporary_var_for_ref_to_type): Add TYPE parameter.
1254         (initialize_reference): Adjust handling for references bound to
1255         rvalues.
1256         * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
1257         prototype.
1258         (real_non_cast_lvalue_p): New method.
1259         * cvt.c (build_up_reference): Adjust use of
1260         make_temporary_var_for_ref_to_temp.
1261         * tree.c (real_non_cast_lvalue_p): New method.
1262
1263 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1264
1265         * except.c (init_exception_processing): Use C90 prototype style.
1266         (cp_protect_cleanup_actions): Likewise.
1267         (prepare_eh_type): Likewise.
1268         (build_eh_type_type): Likewise.
1269         (build_exc_ptr): Likewise.
1270         (do_begin_catch): Likewise.
1271         (dtor_nothrow): Likewise.
1272         (do_end_catch): Likewise.
1273         (push_eh_cleanup): Likewise.
1274         (decl_is_java_type): Likewise.
1275         (choose_personality_routine): Likewise.
1276         (initialize_handler_parm): Likewise.
1277         (expand_start_catch_block): Likewise.
1278         (expand_end_catch_block): Likewise.
1279         (begin_eh_spec_block): Likewise.
1280         (finish_eh_spec_block): Likewise.
1281         (do_allocate_exception): Likewise.
1282         (do_free_exception): Likewise.
1283         (wrap_cleanups_r): Likewise.
1284         (stabilize_throw_expr): Likewise.
1285         (build_throw): Likewise.
1286         (complete_ptr_ref_or_void_ptr_p): Likewise.
1287         (is_admissible_throw_operand): Likewise.
1288         (nothrow_libfn_p): Likewise.
1289         (can_convert_eh): Likewise.
1290         (check_handlers_1): Likewise.
1291         (check_handlers): Likewise.
1292
1293 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
1294
1295         * call.c (merge_conversion_sequences): New function.
1296         (build_conv): Set ICS_USER_FLAG for USER_CONVs.
1297         (convert_class_to_reference): Correct handling of second
1298         standard conversion sequence in a user-defined conversion
1299         sequence.
1300         (build_user_type_conversion_1): Use merge_conversion_sequences.
1301         * cp-tree.def: Add comments for CONV nodes.
1302         * rtti.c (get_tinfo_decl): Use build_address/build_nop.
1303
1304 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1305
1306         * error.c (init_error): Use C90 prototype style.
1307         (dump_scope): Likewise.
1308         (dump_qualifiers): Likewise.
1309         (dump_template_argument): Likewise.
1310         (dump_template_argument_list): Likewise.
1311         (dump_template_parameter): Likewise.
1312         (dump_template_bindings): Likewise.
1313         (dump_type): Likewise.
1314         (dump_typename): Likewise.
1315         (class_key_or_enum): Likewise.
1316         (dump_aggr_type): Likewise.
1317         (dump_type_prefix): Likewise.
1318         (dump_type_suffix): Likewise.
1319         (dump_global_iord): Likewise.
1320         (dump_simple_decl): Likewise.
1321         (dump_decl): Likewise.
1322         (dump_template_decl): Likewise.
1323         (dump_function_decl): Likewise.
1324         (dump_parameters): Likewise.
1325         (dump_exception_spec): Likewise.
1326         (dump_function_name): Likewise.
1327         (dump_template_parms): Likewise.
1328         (dump_char): Likewise.
1329         (dump_expr_list): Likewise.
1330         (dump_expr): Likewise.
1331         (dump_binary_op): Likewise.
1332         (dump_unary_op): Likewise.
1333         (type_as_string): Likewise.
1334         (expr_as_string): Likewise.
1335         (decl_as_string): Likewise.
1336         (context_as_string): Likewise.
1337         (lang_decl_name): Likewise.
1338         (cp_file_of): Likewise.
1339         (cp_line_of): Likewise.
1340         (decl_to_string): Likewise.
1341         (expr_to_string): Likewise.
1342         (fndecl_to_string): Likewise.
1343         (code_to_string): Likewise.
1344         (language_to_string): Likewise.
1345         (parm_to_string): Likewise.
1346         (op_to_string): Likewise.
1347         (type_to_string): Likewise.
1348         (assop_to_string): Likewise.
1349         (args_to_string): Likewise.
1350         (cv_to_string): Likewise.
1351         (cxx_print_error_function): Likewise.
1352         (cp_diagnostic_starter): Likewise.
1353         (cp_diagnostic_finalizer): Likewise.
1354         (cp_print_error_function): Likewise.
1355         (function_category): Likewise.
1356         (print_instantiation_full_context): Likewise.
1357         (print_instantiation_partial_context): Likewise.
1358         (maybe_print_instantiation_context): Likewise.
1359         (print_instantiation_context): Likewise.
1360         (cp_printer): Likewise.
1361         (print_integer): Likewise.
1362         (print_non_consecutive_character): Likewise.
1363         (locate_error): Likewise.
1364
1365 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
1366
1367         PR c++/9965
1368         * call.c (reference_binding): Add ref_is_var parameter.
1369         (implicit_conversion): Adjust call to reference_binding.
1370         (initialize_reference): Likewise.
1371
1372         PR c++/9400
1373         * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
1374         PARM_DECLs.
1375
1376         PR c++/9791
1377         * class.c (get_basefndecls): Use lookup_fnfields_1.
1378
1379 2003-03-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1380
1381         PR c++/9188
1382         * parser.c (cp_parser_type_parameter): Remove redundant `expect'
1383         in error message.
1384         (cp_parser_single_declaration): Likewise.
1385
1386 2003-03-05  Jason Merrill  <jason@redhat.com>
1387
1388         PR c++/9440
1389         * call.c (build_conditional_expr): Use convert rather than an
1390         explicit NOP_EXPR.
1391
1392 2003-03-02  Matt Austern  <austern@apple.com>
1393
1394         * decl.c (cp_binding_level): Add static_decls varray member.
1395         (add_decl_to_level): Add static/inline namespace scope
1396         declarations to static_decls array.
1397         (wrapup_global_for_namespace): Pass static_decls only, instead of
1398         all decls, to wrapup_global_declarations/check_global_declarations.
1399         (push_namespace): Initialize static_decls for ordinary namespaces.
1400         (cxx_init_decl_processing): Initialize static_decls for global
1401         namespace.
1402
1403 2003-03-05  Mark Mitchell  <mark@codesourcery.com>
1404
1405         * class.c (end_of_class): Correct thinko.
1406
1407 2003-03-04  Nathanael Nerode  <neroden@gcc.gnu.org>
1408
1409         * config-lang.in: Replace ${libstdcxx_version} by its value.
1410
1411 2003-03-04  Gabriel Dos Reis <gdr@integrable-solutions.net>
1412
1413         * cp-tree.h (cxx_saved_binding): Declare.
1414         (struct saved_scope): Adjust type of field 'old_binding'.
1415         * decl.c (cxx_saved_binding_make): New macro.
1416         (struct cxx_saved_binding): Define.
1417         (store_bindings): Adjust prototype.  Use cxx_saved_binding to save
1418         C++ bindings.
1419         (maybe_push_to_top_level): Adjust local variable type.
1420         (pop_from_top_level): Likewise.
1421
1422 2003-03-04  Tom Tromey  <tromey@redhat.com>
1423
1424         * Make-lang.in (c++.tags): New target.
1425
1426 2003-03-04  Neil Booth  <neil@daikokuya.co.uk>
1427
1428         * Make-lang.in: Update.
1429
1430 2003-03-03  Jason Merrill  <jason@redhat.com>
1431
1432         * decl.c (finish_enum): Do set the type in a template. Simplify.
1433         * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
1434
1435 2003-03-03  Mark Mitchell  <mark@codesourcery.com>
1436
1437         PR c++/9878
1438         * call.c (convert_class_to_reference): Correct conversion
1439         sequences.
1440         (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
1441         (implicit_conversion): Adjust call to reference_binding.
1442         (add_candidate): Change type of candidates parameter.
1443         (add_function_candidate): Likewise.
1444         (add_conv_candidate): Likewise.
1445         (build_builtin_candidate): Likewise.
1446         (add_builtin_candidate): Likewise.
1447         (add_builtin_candidates): Likewise.
1448         (add_template_candidate_real): Likewise.
1449         (add_template_candidate): Likewise.
1450         (add_template_conv_candidate): Likewise.
1451         (build_user_type_conversion_1): Adjust accordingly.
1452         (build_object_call): Likewise.
1453         (build_conditional_expr): Likewise.
1454         (add_candidates): Likewise.
1455         (build_new_op): Likewise.
1456         (convert_like_real): Use USER_CONV_CAND.  Use build_nop.
1457         (build_new_method_call): Adjust calls to add_function_candidate.
1458         (make_temporary_var_for_ref_to_temp): New function.
1459         (initialize_reference): Add decl parameter.
1460         * class.c (build_rtti_vtbl_entries): Use build_address and
1461         build_nop.
1462         * cp-tree.h (initialize_reference): Change prototype.
1463         (make_temporary_var_for_ref_to_temp): New function.
1464         (build_type_conversion): Change prototype.
1465         (build_address): New function.
1466         (build_nop): Likewise.
1467         * cvt.c (cp_convert_to_pointer): Adjust call to
1468         build_type_conversion.  Avoid indicating redundant NOP_EXPRs.
1469         Use build_nop.
1470         (convert_to_pointer_force): Use build_nop.
1471         (build_up_reference): Use make_temporary_var_for_ref_to_temp.
1472         (convert_to_reference): Adjust call to build_type_conversion.
1473         (ocp_convert): Likewise.
1474         (build_type_conversion): Remove for_sure parameter.
1475         * decl.c (grok_reference_init): Use initialize_reference.
1476         * typeck.c (build_address): New function.
1477         (build_nop): Likewise.
1478         (build_unary_op): Use them.
1479         (build_ptrmemfunc): Tidy slightly.
1480         (convert_for_initialization): Adjust call to
1481         initialize_reference.
1482         * typeck2.c (store_init_value): Remove #if 0'd code.
1483
1484 2003-03-03  Jason Merrill  <jason@redhat.com>
1485
1486         * decl.c (start_function): Clear DECL_NUM_STMTS.
1487
1488         * class.c (get_vtable_decl): Use vtbl_type_node.
1489         (build_primary_vtable): Check for it.
1490
1491 2003-03-02  Aldy Hernandez  <aldyh@redhat.com>
1492
1493         * decl.c (check_initializer): Check for vector_opaque_p.
1494
1495 2003-03-02  Ashif Harji  <asharji@uwaterloo.ca>
1496
1497         * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
1498           invoke an external cpp during compilation.
1499
1500 2003-03-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1501
1502         * decl.c (duplicate_decls): Convert use of warning_with_decl() to
1503         that of warning().
1504         (start_decl): Likewise.
1505         (start_function): Likewise.
1506
1507 2003-03-01  Neil Booth  <neil@daikokuya.co.uk>
1508
1509         * Make-lang.in (CXX_C_OBJS): Update.
1510
1511 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
1512
1513         PR c++/9892
1514         * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
1515         instantiating it.
1516
1517 2003-02-28  Aldy Hernandez  <aldyh@redhat.com>
1518
1519         * parser.c (cp_parser_init_declarator): Revert opaque
1520         vector_opaque_p change.
1521         Do not include target.h.
1522
1523 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
1524
1525         PR c++/9879
1526         * cp-tree.h (build_zero_init): Add parameter.
1527         * decl.c (cp_finish_decl): Adjust call.
1528         * init.c (build_zero_init): Add nelts parameter.  Adjust recursive
1529         calls.
1530         (build_default_init): Add nelts parameter.  Adjust calls to
1531         build_zero_init.
1532         (build_new_1): Adjust call to build_default_init.
1533         * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
1534
1535 2003-02-26  Devang Patel  <dpatel@apple.com>
1536
1537         * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
1538         required.  Postpone enum setting for template decls.
1539         (build_enumerator): Delay copying value node until finish_enum
1540         (). Remove #if 0'ed code.
1541         * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
1542         (tsubst_copy): Add check for enum type.
1543
1544 2003-02-25  Mark Mitchell  <mark@codesourcery.com>
1545
1546         PR c++/9683
1547         * decl2.c (prune_vars_needing_no_initialization): Do not throw
1548         away initializations for DECL_EXTERNAL VAR_DECLs.
1549         (finish_file): Adjust accordingly.
1550         * pt.c (instantiate_decl): Do not defer VAR_DECLs.
1551
1552 2003-02-24 Gabriel Dos Reis  <gdr@integrable-solutions.net>
1553
1554         * decl.c (add_binding): Time TV_NAME_LOOKUP.
1555         (push_class_binding): Likewise.
1556         (set_namespace_binding): Likewise.
1557
1558 2003-02-24  Mark Mitchell  <mark@codesourcery.com>
1559
1560         PR c++/9836
1561         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
1562         specializations back to the main template.
1563         * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
1564         * pt.c (resolve_typename_type): Likewise.
1565
1566 2003-02-24  Jeffrey D. Oldham  <oldham@codesourcery.com>
1567
1568         PR c++/9778
1569         * pt.c (tsubst_copy_and_build): For a templated function inside a
1570         scope, process template arguments.
1571
1572 2003-02-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1573
1574         PR c++/9602
1575         * typeck2.c (abstract_virtuals_error): Don't check when
1576         TYPE is still template parameter dependent.
1577
1578 2003-02-23  Mark Mitchell  <mark@codesourcery.com>
1579
1580         PR c++/5333
1581         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
1582         * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
1583         * pt.c (instantiate_class_template): Don't try to instantiate
1584         dependent types.
1585         (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
1586
1587 2003-02-21  Mark Mitchell  <mark@codesourcery.com>
1588
1589         PR c++/9749
1590         * decl.c (grokdeclarator): Do not allow parameters with variably
1591         modified types.
1592
1593 2003-02-21  Nathan Sidwell  <nathan@codesourcery.com>
1594
1595         * search.c (grow_bfs_bases): Remove. Fold into ...
1596         (bfs_walk): ... here, fix fencepost error. Fix merge lossage
1597         in previous patch.
1598
1599 2003-02-20  Mark Mitchell  <mark@codesourcery.com>
1600
1601         PR c++/9729
1602         * mangle.c (mangle_conv_op_name_for_type): Issue an error message
1603         when the G++ 3.2 ABI prevents correct compilation.
1604
1605 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
1606
1607         Change base class access representation. Share virtual base
1608         binfos.
1609         * cp/call.c (build_special_member_call): Remove binfo_for_vbase
1610         call.
1611         * cp/class.c (build_base_path): Likewise.
1612         (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
1613         (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
1614         (make_new_vtable): Adjust.
1615         (force_canonical_binfo_r): Delete.
1616         (force_canonical_binfo): Delete.
1617         (mark_primary_virtual_base): Delete.
1618         (dfs_unshared_virtual_bases): Delete.
1619         (mark_primary_bases): Adjust.
1620         (maybe_warn_about_overly_private_class): Adjust.
1621         (dfs_base_derived_from): Delete.
1622         (base_derived_from): Follow the inheritance chain.
1623         (struct find_final_overrider_data): Add vpath member.
1624         (dfs_find_final_overrider): Adjust.
1625         (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
1626         (find_final_overrider): Adjust.
1627         (update_vtable_entry_for_fn): Adjust.
1628         (modify_all_vtables): Adjust.
1629         (walk_subobject_offsets): Adjust.
1630         (layout_nonempty_base_or_field): Adjust.
1631         (layout_empty_base): Remove last parameter. Adjust.
1632         (build_base_field): Adjust.
1633         (build_base_fields): Adjust.
1634         (propagate_binfo_offsets): Remove last parameter. Adjust.
1635         (dfs_set_offset_for_unshared_vbases): Delete.
1636         (layout_virtual_bases): Adjust.
1637         (finish_struct_1): Adjust.
1638         (init_class_processing): Don't init access nodes.
1639         (dfs_get_primary_binfo): Delete.
1640         (get_primary_binfo): Adjust.
1641         (dump_class_hierarchy_r): Remove most derived arg, add IGO
1642         parameter. Adjust.
1643         (dump_class_hierarchy): Adjust.
1644         (finish_vtbls): Adjust.
1645         (get_original_base): Delete.
1646         (build_vtt_inits): Adjust.
1647         (dfs_build_secondary_vptr_vtt_inits): Adjust.
1648         (dfs_ctor_vtable_bases_queue_p): Adjust.
1649         (build_ctor_vtbl_group): Adjust.
1650         (dfs_accumulate_vtbl_inits): Adjust.
1651         (build_vtbl_initializer): Adjust.
1652         (build_vbase_offset_vtbl_entries): Adjust.
1653         (add_vcall_offset_vtbl_entries_1): Adjust.
1654         * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
1655         (access_*_node): Remove.
1656         (CANONICAL_BINFO): Delete.
1657         (BINFO_UNSHARED_MARKED): Remove.
1658         (BINFO_MARKED): Set LANG_FLAG_0 directly.
1659         (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
1660         (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
1661         (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
1662         Delete.
1663         (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
1664         (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
1665         (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
1666         Delete.
1667         (BINFO_DEPENDENT_BASE_P): New.
1668         (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
1669         index.
1670         (markedp, unmarkedp): Adjust.
1671         (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
1672         dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
1673         find_vbase_instance, binfo_for_vbase): Delete.
1674         (copied_binfo, original_binfo): Declare.
1675         (finish_base_specifier): Add virtual_p arg.
1676         (unshare_base_binfos): Delete.
1677         (copy_base_binfos): Declare.
1678         (reverse_path): Delete.
1679         * cp/decl.c (xref_basetypes): Access and virtuality passed
1680         differently. Don't copy direct base binfos here. Call
1681         copy_base_binfos.
1682         * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
1683         (initialize_vtbl_ptrs): Adjust.
1684         (expand_member_init): Adjust.
1685         * cp/parser.c (cp_parser_base_specifier): Adjust.
1686         * cp/pt.c (instantiate_class_template): Adjust.
1687         (get_template_base_recursive): Adjust.
1688         * cp/rtti.c (get_pseudo_ti_init): Adjust.
1689         (get_pseudo_ti_desc): Adjust.
1690         * cp/tree.c (unshare_base_binfos): Rename to ...
1691         (copy_base_binfos): ... here, reimplement.
1692         (make_binfo): Set BINFO_DEPENDENT_BASE_P.
1693         (reverse_path): Remove.
1694         * cp/typeck.c (get_delta_difference): Adjust error messages.
1695         * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
1696         * cp/search.c (lookup_base_r): Adjust.
1697         (dynamic_cast_base_recurse): Adjust.
1698         (canonical_binfo): Remove.
1699         (dfs_canonical_queue): Remove.
1700         (dfs_assert_unmarked_p): Remove.
1701         (assert_canonical_unmarked): Remove.
1702         (shared_marked_p, shared_unmarked_p): Remove.
1703         (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
1704         (dfs_access_in_type): Adjust.
1705         (access_in_type): Adjust.
1706         (dfs_accessible_queue_p): Adjust.
1707         (dfs_accessible_p): Adjust.
1708         (is_subobject_of_p_1, is_subobject_of_p): Remove.
1709         (struct lookup_field_info): Remove from_dep_base_p field.
1710         (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
1711         (lookup_field_r): Remove dependent base code.
1712         (lookup_member): Likewise.
1713         (dfs_walk, dfs_walk_real): Add access arg to queue fn.
1714         (dfs_unmarked_real_bases_queue_p): Remove.
1715         (dfs_marked_real_bases_queue_p): Remove.
1716         (dfs_skip_vbases): Remove.
1717         (dfs_get_pure_virtuals): Adjust.
1718         (markedp, unmarkedp): Adjust.
1719         (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
1720         (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
1721         (dfs_unmark): Adjust.
1722         (dfs_get_vbase_types):Remove.
1723         (dfs_build_inheritance_graph_order): Remove.
1724         (get_vbase_types): Remove
1725         (dfs_find_vbase_instance): Remove.
1726         (find_vbase_instance): Remove.
1727         (dfs_debug_unmarkedp): Adjust.
1728         (dependent_base_p): Remove.
1729         (dfs_push_type_decls): Adjust.
1730         (dfs_push_decls): Adjust.
1731         (dfs_no_overlap_yet): Adjust.
1732         (copied_binfo): New function.
1733         (original_binfo): New function.
1734         (binfo_for_vbase): Remove.
1735
1736 2003-02-18  Zack Weinberg  <zack@codesourcery.com>
1737
1738         * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
1739         (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
1740         vectors, for speed.
1741
1742 2003-02-18  Mark Mitchell  <mark@codesourcery.com>
1743
1744         PR c++/9704
1745         * class.c (layout_class_type): In the 3.2 ABI, take into account
1746         trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
1747
1748 2003-02-18  Matt Austern <austern@apple.com>
1749
1750         * cp/cp-lang.c: Change lang hooks so that final_write_globals does
1751         nothing for C++.
1752         * cp/decl.c (wrapup_globals_for_namespace): Remove special
1753         handling of global namespace.
1754
1755 2003-02-18  Geoffrey Keating  <geoffk@apple.com>
1756
1757         * cp-tree.h (rid_to_yy): Delete.
1758         (C_RID_YYCODE): Delete.
1759         (finish_file): Delete redundant declaration.
1760
1761 2003-02-18  Jason Merrill  <jason@redhat.com>
1762
1763         PR c++/9623
1764         * decl.c (reshape_init): Don't mess with initializer labels.
1765
1766         PR c++/9485
1767         * parser.c (cp_parser_postfix_expression): Set idk properly for
1768         object->scope::member.
1769
1770 2003-02-18  Ben Elliston  <bje@redhat.com>
1771
1772         PR other/7350
1773         * decl.c (duplicate_decls): Fix typo in comment.
1774
1775 2003-02-17  Michael Elizabeth Chastain <mec@shout.net>
1776
1777         PR debug/9717
1778         * class.c (build_base_field): Mark fields for base classes with
1779         DECL_IGNORED_P.
1780
1781 2003-02-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1782
1783         PR c++/9457
1784         * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
1785         CONSTRUCTOR_ELTS only once.
1786
1787 2003-02-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1788
1789         PR c++/9459
1790         * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
1791         (dump_type_suffix): Likewise.
1792
1793 2003-02-14  Nathan Sidwell  <nathan@codesourcery.com>
1794
1795         * search.c: ANSIfy function declarations and definitions.
1796         * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
1797         * call.c (build_method_call, resolve_scoped_fn_name,
1798         build_java_interface_fn_ref): Adjust lookup_field, lookup_member
1799         calls.
1800         * class.c (handle_using_decl): Likewise.
1801         * decl.c (make_typename_type, make_unmound_class_template,
1802         start_decl, compute_array_index_type): Likewise.
1803         * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
1804         * init.c (expand_member_init, build_member_call): Likewise.
1805         * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
1806         resolve_typename_type): Likewise.
1807         * typeck.c (lookup_destructor, finish_class_member_access_exprm
1808         build_prememfunc_access_expr): Likewise.
1809
1810 2003-02-13  Gabriel Dos Reis <gdr@integrable-solutions.net>
1811
1812         * decl2.c: Include "timevar.h".
1813         (namespace_ancestor): Time name lookup.
1814         (add_using_namespace): Likewise.
1815         (lookup_using_namespace): Likewise.
1816         (qualified_lookup_using_namespace): Likewise.
1817         (decl_namespace): Likewise.
1818         (lookup_arg_dependent): Likewise.
1819         * lex.c (do_identifier): Likewise.
1820         (do_scoped_id): Likewise.
1821         * pt.c (lookup_template_class): Likewise.
1822
1823 2003-02-14   Andrew Pinski <pinskia@physics.uc.edu>
1824
1825         * decl.c: (define_label): Fix warning for return 0 instead of NULL.
1826
1827 2003-02-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1828
1829         * decl.c: Include "timevar.h".
1830         (poplevel): Time name lookup.
1831         (find_binding): Likewise.
1832         (push_namespace): Likewise.
1833         (pop_nested_namespace): Likewise.
1834         (store_bindings): Likewise.
1835         (maybe_push_to_top_level): Likewise.
1836         (pop_from_top_level): Likewise.
1837         (push_local_name): Likewise.
1838         (pushtag): Likewise.
1839         (pushdecl): Likewise.
1840         (pushdecl_with_scope): Likewise.
1841         (pushdecl_namespace_level): Likewise.
1842         (pushdecl_top_level): Likewise.
1843         (pushdecl_class_level): Likewise.
1844         (push_class_level_binding): Likewise.
1845         (push_using_decl): Likewise.
1846         (push_using_directive): Likewise.
1847         (push_overloaded_decl): Likewise.
1848         (lookup_label): Likewise.
1849         (define_label): Likewise.
1850         (lookup_tag): Likewise.
1851         (lookup_tag_reverse): Likewise.
1852         (lookup_namespace_name): Likewise.
1853         (select_decl): Likewise.
1854         (unqualified_namespace_lookup): Likewise.
1855         (lookup_name_real): Likewise.
1856         (lookup_name_current_level): Likewise.
1857         (lookup_type_current_level): Likewise.
1858         (maybe_inject_for_scope_var): Likewise.
1859         (xref_tag): Likewise.
1860
1861         * Make-lang.in (cp/decl.o): Add dependency on timevar.h
1862
1863 2003-02-12  Phil Edwards  <pme@gcc.gnu.org>
1864
1865         * decl.c (build_enumerator):  Remove unneeded test.
1866
1867 2003-02-09  Dan Nicolaescu  <dann@ics.uci.edu>
1868
1869         * cp-tree.h (struct lang_type_header): Make all fields unsigned
1870         char.
1871
1872 2003-02-03  Mark Mitchell  <mark@codesourcery.com>
1873
1874         PR c++/7129
1875         * call.c (z_candidate): Add args.
1876         (convert_class_to_reference): Set it.
1877         (implicit_conversion): Tidy.
1878         (add_candidate): Add args parameter.
1879         (add_function_candidate): Adjust call to add_candidate.
1880         (add_conv_candidate): Likewise.
1881         (build_builtin_candidate): Likewise.
1882         (build_user_type_conversion_1): Eliminate wasteful tree_cons
1883         usage.
1884         (build_new_function_call): Likewise.
1885         (build_object_call): Likewise.
1886         (add_candidates): New function.
1887         (build_new_op): Use it.
1888         (covert_like_real): Adjust call to build_over_call.
1889         (build_over_call): Remove args parameter.
1890         * operators.def: Add <?= and >?=.
1891
1892 2003-02-01  Richard Sandiford  <rsandifo@redhat.com>
1893
1894         * typeck.c (build_indirect_ref): Don't check flag_volatile.
1895
1896 2003-01-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1897
1898         PR c++/8849
1899         * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
1900
1901 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
1902
1903         * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
1904         BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
1905         (BINFO_LANG_ELTS): New #define.
1906         * tree.c (make_binfo): Use BINFO_LANG_ELTS.
1907
1908 2003-01-30  Geoffrey Keating  <geoffk@apple.com>
1909
1910         * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
1911
1912 2003-01-30  Mark Mitchell  <mark@codesourcery.com>
1913
1914         * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
1915         for class types.
1916         * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
1917         rather than TYPE_LANG_FLAG_0.
1918         (TYPE_BUILT_IN): Remove.
1919         (TYPE_DEPENDENT_P): New macro.
1920         (TYPE_DEPENDENT_P_VALID): Likewise.
1921         (lang_type_class): Add fields_readonly.
1922         * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
1923         * pt.c (dependent_type_p_r): New function, split out from ...
1924         (dependent_type_p): ... here.  Memoize results.
1925         * search.c (dependent_base_p): Use dependent_type_p, not
1926         uses_template_parms.
1927         * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
1928         for class types.
1929
1930 2003-01-29  Mark Mitchell  <mark@codesourcery.com>
1931
1932         * call.c (build_field_call): Use build_new_op, not build_opfncall.
1933         (prep_operand): New function.
1934         (build_new_op): Use it.  Remove dead code.
1935         * class.c (pushclass): Change "modify" parameter type from int to
1936         bool.
1937         (currently_open_class): Use same_type_p, not pointer equality.
1938         (push_nested_class): Adjust calls to pushclass, remove modify
1939         parameter.
1940         * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
1941         (pushclass): Change prototype.
1942         (push_nested_class): Likewise.
1943         (grokoptypename): Remove.
1944         (build_opfncall): Remove.
1945         (value_dependent_expression_p): Declare.
1946         (resolve_typename_type): Likewise.
1947         (resolve_typename_type_in_current_instantiation): Likewise.
1948         (enter_scope_of): Remove.
1949         (tsubst): Remove.
1950         (tsubst_expr): Likewise.
1951         (tsubst_copy): Likewise.
1952         (tsubst_copy_and_build): Likewise.
1953         * decl.c (warn_about_implicit_typename_lookup): Remove.
1954         (finish_case_label): Return error_mark_node for erroneous labels.
1955         (start_decl): Adjust calls to push_nested_class.
1956         (grokfndecl): Call push_scope/pop_scope around call to
1957         duplicate_decls.
1958         (grokdeclarator): Do not call tsubst.
1959         (start_function): Adjust calls to push_nested_class.
1960         * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
1961         (check_classfn): Use push_scope/pop_scope around type comparisions.
1962         (grokoptypename): Remove.
1963         (push_sscope): Adjust call to push_nested_class.
1964         * error.c (dump_type): Show cv-qualification of typename types.
1965         * init.c (build_member_call): Use build_new_op, not
1966         build_opfncall.
1967         * method.c (build_opfncall): Remove.
1968         * parser.c (cp_parser): Add allow_non_constant_expression_p and
1969         non_constant_expression_p.
1970         (cp_parser_constant_expression): Adjust prototype.
1971         (cp_parser_resolve_typename_type): Remove.
1972         (cp_parser_non_constant_expression): New function.
1973         (cp_parser_non_constant_id_expression): Likewise.
1974         (cp_parser_new): Set allow_non_constant_expression_p and
1975         non_constant_expression_p.
1976         (cp_parser_primary_expression): Reject `this' and `va_arg' in
1977         constant-expressions.  Note that dependent names aren't really
1978         constant.
1979         (cp_parser_postfix_expression): Reject conversions to non-integral
1980         types in constant-expressions.  Neither are increments or
1981         decrements.
1982         (cp_parser_unary_expression): Reject increments and decrements in
1983         constant-expressions.
1984         (cp_parser_direct_new_declarator): Adjust call to
1985         cp_parser_constant_expression.
1986         (cp_parser_cast_expression): Reject conversions to non-integral
1987         types in constant-expressions.
1988         (cp_parser_assignment_expression): Rejects assignments in
1989         constant-expressions.
1990         (cp_parser_expression): Reject commas in constant-expressions.
1991         (cp_parser_labeled_statement): Adjust call to
1992         cp_parser_constant_expression.
1993         (cp_parser_direct_declarator): Simplify array bounds, even in
1994         templates, when they are non-dependent.  Use
1995         resolve_typename_type, not cp_parser_resolve_typename_type.
1996         (cp_parser_class_head): Use resolve_typename_type, not
1997         cp_parser_resolve_typename_type.
1998         (cp_parser_member_declaration): Adjust call to
1999         cp_parser_constant_expression.
2000         (cp_parser_constant_initializer): Likewise.
2001         (cp_parser_constructor_declarator): Use resolve_typename_type, not
2002         cp_parser_resolve_typename_type.
2003         (cp_parser_late_parsing_default_args): Adjust call to
2004         push_nested_class.
2005         * pt.c (tsubst): Give it internal linkage.
2006         (tsubst_expr): Likewise.
2007         (tsubst_copy): Likewise.
2008         (tsubst_copy_and_build): Likewise.
2009         (push_access_scope_real): Likewise.
2010         (tsubst_friend_class): Likewise.
2011         (instantiate_class_template): Adjust call to pushclass.
2012         (value_dependent_expression_p): Give it external linkage.
2013         Robustify.
2014         (resolve_typename_type): New function.
2015         * semantics.c (finish_call_expr): Use build_new_op, not
2016         build_opfncall.
2017         (begin_constructor_declarator): Remove.
2018         (begin_class_definition): Adjust call to pushclass.
2019         (enter_scope_of): Remove.
2020         * typeck.c (comptypes): Resolve typename types as appropriate.
2021         (build_x_indirect_ref): Use build_new_op, not build_opfncall.
2022         (build_x_compound_expr): Likewise.
2023         (build_modify_expr): Likewise.
2024         (build_x_modify_expr): Likewise.
2025         * typeck2.c (build_x_arrow): Likewise.
2026
2027 2003-01-29  Fariborz Jahanian  <fjahanian@apple.com>
2028
2029         * pt.c (last_pending_template) Declare GTY().
2030
2031 2003-01-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2032
2033         PR c++/8591
2034         * parser.c (cp_parser_elaborated_type_specifier): Convert
2035         TEMPLATE_DECL to TYPE_DECL only when processing template friends.
2036         (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
2037
2038 2003-01-28  Nathan Sidwell  <nathan@codesourcery.com>
2039
2040         PR c++/9437
2041         * pt.c (unify): Don't unify '*T' with 'U C::*'.
2042
2043         PR c++/3902
2044         * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
2045         inside a declarator.
2046
2047 2003-01-27  Nathan Sidwell  <nathan@codesourcery.com>
2048
2049         * class.c (update_vtable_entry_for_fn): Add index parameter.
2050         Generate vcall thunk for covariant overriding from a virtual
2051         primary base.
2052         (dfs_modify_vtables): Adjust.
2053
2054 2003-01-25  Nathan Sidwell  <nathan@codesourcery.com>
2055
2056         PR c++/9403
2057         * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
2058         template keyword.
2059         (cp_parser_base_specifier): Look for and consume a
2060         TEMPLATE keyword. Replace switch with array index.
2061
2062         PR c++/795
2063         * semantics.c (finish_non_static_data_member): Remember the
2064         field's type even in a template.
2065
2066         PR c++/9415
2067         * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
2068         already scoped.
2069
2070         PR c++/8545
2071         * parser.c (cp_parser_cast_expression): Be more tentative.
2072
2073 2003-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2074
2075         * cp-tree.h (flagged_type_tree_s): Remove.
2076         (check_for_new_type): Likewise.
2077         * typeck2.c (check_for_new_type): Likewise.
2078
2079 2003-01-23  Nathanael Nerode  <neroden@gcc.gnu.org>
2080
2081         * dump.c: ANSIfy function declarations and definitions.
2082
2083         * cp-tree.h, decl.h: Get rid of PARAMS.  Again.
2084
2085 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
2086
2087         PR c++/9354
2088         * init.c (build_new): Set the type of the new-expression, even
2089         when processing_templte_decl.
2090
2091         PR c++/9216
2092         * parser.c (cp_parser_primary_expression): Improve error message
2093         for templates used in an expression context.
2094
2095         PR c++/8696
2096         * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
2097         parse when encountering "typedef".
2098
2099 2003-01-22  Nathanael Nerode  <neroden@gcc.gnu.org>
2100
2101         * class.c, parser.c: ANSIfy function definitions and declarations.
2102
2103 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
2104
2105         PR c++/9328
2106         * error.c (dump_decl): For an OVERLOAD, just print the name of the
2107         function; it doesn't make sense to try to print its type.
2108         * semantics.c (finish_typeof): Issue errors about invalid uses.
2109
2110         PR c++/9298
2111         * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
2112         function.
2113         (cp_parser_expression_statement): Use it.
2114         (cp_parser_explicit_instantiation): Likewise.
2115         * pt.c (do_decl_instantiation): Improve error handling logic.
2116
2117 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
2118
2119         PR c++/9384
2120         * parser.c (cp_parser_using_declaration): Issue error messages
2121         about name resolution failures here.
2122
2123         PR c++/9388
2124         * class.c (currently_open_derived_class): Use dependent_type_p.
2125         * cp-tree.h (dependent_type_p): New function.
2126         (dependent_template_arg_p): Likewise.
2127         (dependent_template_p): Likewise.
2128         (type_dependent_expression_p): Likewise.
2129         * parser.c (cp_parser_dependent_type_p): Remove.
2130         (cp_parser_value_dependent_type_p): Likewise.
2131         (cp_parser_type_dependent_expression_p): Likewise.
2132         (cp_parser_dependent_template_arg_p): Likewise.
2133         (cp_parser_dependent_template_id_p): Likewise.
2134         (cp_parser_dependent_template_p): Likewise.
2135         (cp_parser_diagnose_invalid_type_name): Replace
2136         cp_parser_dependent_type_p with dependent_type_p, etc.
2137         (cp_parser_primary_expresion): Likewise.
2138         (cp_parser_nested_name_specifier_opt): Likewise.
2139         (cp_parser_postfix_expression): Likewise.
2140         (cp_parser_unary_expression): Likewise.
2141         (cp_parser_template_name): Likewise.
2142         (cp_parser_class_name): Likewise.
2143         (cp_parser_lookup_name): Likewise.
2144         * pt.c (dependent_type_p): New function.
2145         (value_dependent_expression_p): Likewise.
2146         (type_dependent_expression_p): Likewise.
2147         (dependent_template_arg_p): Likewise.
2148         (dependent_template_id_p): Likewise.
2149         (dependent_template_p): Likewise.
2150
2151         PR c++/9285
2152         PR c++/9294
2153         * parser.c (cp_parser_simple_declaration): Return quickly when
2154         encountering errors.
2155
2156 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2157
2158         Make-lang.in (cp/decl.o-warn): Add -Wno-error.
2159
2160 2003-01-17  Jason Merrill  <jason@redhat.com>
2161
2162         PR c++/9167, c++/9358
2163         * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
2164
2165 2003-01-17  Jason Merrill  <jason@redhat.com>
2166
2167         PR c++/9342
2168         * call.c (build_conditional_expr): Always do lvalue-rvalue
2169         conversion.
2170
2171 2003-01-17  Mark Mitchell  <mark@codesourcery.com>
2172
2173         PR c++/9294
2174         * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
2175         * cp-tree.h (BASELINK_BINFO): Adjust.
2176         (BASELINK_FUNCTIONS): Likewise.
2177         (BASELINK_ACCESS_BINFO): Likewise.
2178         (tree_baselink): New structure.
2179         (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
2180         (lang_tree_node): Add baselink.
2181         * decl.c (cp_tree_node_structure): Add BASELINK case.
2182         * search.c (build_baselink): Adjust.
2183         * tree.c (cp_walk_subtrees): Add BASELINK case.  Remove BASELINK_P
2184         test from TREE_LIST case.
2185
2186         PR c++/9272
2187         * parser.c (cp_parser_constructor_declarator_p): Do not assume
2188         that a constructor cannot be declared outside of its own class.
2189
2190         * parser.c (cp_parser_resolve_typename_type): If the scope cannot
2191         be resolved, neither can the qualified name.
2192
2193         * rtti.c (get_pseudo_ti_desc): Fix thinko.
2194
2195 2003-01-16  Jason Merrill  <jason@redhat.com>
2196
2197         PR c++/8564
2198         * init.c (build_vec_init): Re-add maxindex parm.
2199         (perform_member_init, build_aggr_init): Pass it.
2200         (build_new_1): Pass it. Use an incomplete array type for full_type.
2201         * typeck.c (build_modify_expr): Pass it.
2202         * cp-tree.h: Adjust.
2203
2204 2003-01-16  Jeffrey D. Oldham  <oldham@codesourcery.com>
2205
2206         * cp-tree.h (tsubst_copy_and_build): New declaration.
2207         * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
2208         (tsubst_expr): Use 'tsubst_copy_and_build'.  Update initial comment.
2209         (tsubst_copy_and_build): New function.
2210
2211 2003-01-16  Mark Mitchell  <mark@codesourcery.com>
2212
2213         * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
2214         (PARTIAL_INSTANTIATION_P): Remove.
2215         (IMPLICIT_TYPENAME_P): Likewise.
2216         (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
2217         (build_typename_type): Remove declaration.
2218         (parmlist_is_exprlist): Likewise.
2219         * decl.c (build_typename_type): Make it static, remove third
2220         parameter.
2221         (push_class_binding): Don't do implicit typename stuff.
2222         (make_typename_type): Likewise.
2223         (lookup_name_real): Likewise.
2224         (grokdeclarator): Don't try to convert declarations into
2225         initializations.  Don't do implicit typename stuff.
2226         (parmlist_is_exprlist): Remove.
2227         (xref_basetypes): Simplify.
2228         * decl2.c (grokfield): Don't try to convert declarations into
2229         initializations.
2230         (build_anon_union_vars): Do this while processing templates, too.
2231         (finish_anon_union): Likewise.
2232         * error.c (dump_type): Remove implicit typename handling.
2233         * parser.c (cp_parser_diagnose_invalid_type_name): New method.
2234         (cp_parser_primary_expression): Correct handling of names not
2235         found by unqualified name lookup in templates.
2236         (cp_parser_nested_name_specifier_opt): Avoid checking dependency
2237         of types when possible.
2238         (cp_parser_simple_declaration): Complain intelligently about some
2239         invalid declarations.
2240         (cp_parser_member_declaration): Likewise.
2241         (cp_parser_constructor_declarator_p): Don't check when we're in a
2242         function scope.
2243         * pt.c (instantiate_class_template): Remove
2244         PARTIAL_INSTANTIATION_P gunk.
2245         * search.c (lookup_field_r): Don't build implicit typenames.
2246         (marked_pushdecls_p): Don't enter dependent base types.
2247         (unmarked_pushdecls_p): Likewise.
2248         * semantics.c (begin_class_definition): Remove implicit typename
2249         stuff.
2250
2251 2003-01-16  Nathan Sidwell  <nathan@codesourcery.com>
2252
2253         PR c++/9212
2254         * parser.c (cp_parser_direct_declarator): If accepting either
2255         abstract or named, the name must be an unqualified-id.
2256
2257 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2258
2259         * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
2260
2261 2003-01-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2262
2263         * decl2.c (check_classfn): Fix uninitialized warning.
2264         (build_anon_union_vars): Likewise.
2265         * pt.c (tsubst_copy): Likewise.
2266
2267 2003-01-14  Jeffrey D. Oldham  <oldham@codesourcery.com>
2268
2269         Further conform g++'s __vmi_class_type_info to the C++ ABI
2270         specification.
2271         * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
2272         the specification.
2273         (class_hint_flags): Likewise.
2274
2275 2003-01-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2276
2277         * config-lang.in: Add semantics.c to gtfiles.
2278         * cp-tree.h (flagged_type_tree_s): Remove lookups field.
2279         (saved_scope): Likewise.
2280         (type_lookups): Remove.
2281         (deferred_access): New structure.
2282         (type_access_control): Remove.
2283         (save_type_access_control): Likewise.
2284         (reset_type_access_control): Likewise.
2285         (decl_type_access_control): Likewise.
2286         (push_deferring_access_checks): Declare.
2287         (resume_deferring_access_checks): Likewise.
2288         (stop_deferring_access_checks): Likewise.
2289         (pop_deferring_access_checks): Likewise.
2290         (get_deferred_access_checks): Likewise.
2291         (pop_to_parent_deferring_access_checks): Likewise.
2292         (perform_deferred_access_checks): Likewise.
2293         (perform_or_defer_access_check): Likewise.
2294         * decl.c (make_typename_type): Use perform_or_defer_access_check.
2295         (make_unbound_class_template): Likewise.
2296         (grokdeclarator): Don't call decl_type_access_control.
2297         * parser.c (cp_parser_context): Remove deferred_access_checks
2298         and deferring_access_checks_p fields.
2299         (cp_parser_context_new): Adjust.
2300         (cp_parser): Remove access_checks_lists.
2301         (cp_parser_defer_access_check): Remove.
2302         (cp_parser_start_deferring_access_checks): Remove.
2303         (cp_parser_stop_deferring_access_checks): Remove.
2304         (cp_parser_perform_deferred_access_checks): Remove.
2305         (cp_parser_nested_name_specifier_opt): Use new deferred access
2306         functions.
2307         (cp_parser_simple_declaration): Likewise.
2308         (cp_parser_template_id): Likewise.
2309         (cp_parser_function_definition): Likewise.
2310         (cp_parser_class_specifier): Likewise.
2311         (cp_parser_lookup_name): Likewise.
2312         (cp_parser_single_declaration): Likewise.
2313         (cp_parser_pre_parsed_nested_name_specifier): Likewise.
2314         (cp_parser_parse_tentatively): Likewise.
2315         (cp_parser_parse_definitely): Likewise.
2316         (yyparse): Likewise.
2317         (cp_parser_init_declarator): Remove access_checks parameter.
2318         Use new deferred access functions.
2319         (cp_parser_function_definition_from_specifiers_and_declarator):
2320         Likewise.
2321         (cp_parser_class_head): Remove deferring_access_checks_p and
2322         saved_access_checks parameters.  Use new deferred access functions.
2323         (cp_parser_member_specification_opt): Don't call
2324         reset_type_access_control.
2325         * search.c (type_access_control): Remove.
2326         * semantics.c: Include "gt-cp-semantics.h".
2327         (deferred_type_access_control): Remove.
2328         (deferred_access_stack): New variable.
2329         (deferred_access_free_list): Likewise.
2330         (push_deferring_access_checks): New function.
2331         (resume_deferring_access_checks): Likewise.
2332         (stop_deferring_access_checks): Likewise.
2333         (pop_deferring_access_checks): Likewise.
2334         (get_deferred_access_checks): Likewise.
2335         (pop_to_parent_deferring_access_checks): Likewise.
2336         (perform_deferred_access_checks): New function, adapted from
2337         cp_parser_perform_deferred_access_checks.
2338         (perform_or_defer_access_check): New function, adapted from
2339         cp_parser_defer_access_check.
2340         (current_type_lookups): Remove.
2341         (deferred_type_access_control): Likewise.
2342         (decl_type_access_control): Likewise.
2343         (save_type_access_control): Likewise.
2344         (reset_type_access_control): Likewise.
2345         (begin_function_definition): Adjust.
2346         (begin_class_definiton): Likewise.
2347
2348 2003-01-13  Jason Merrill  <jason@redhat.com>
2349
2350         PR c++/8748
2351         * class.c (build_base_path): Take the address before calling save_expr.
2352
2353         * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
2354         all the ambiguous conversions are bad.
2355
2356         * class.c (maybe_warn_about_overly_private_class): Don't stop
2357         searching when we find a nonprivate method.
2358
2359         * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
2360
2361 2003-01-12  Mark Mitchell  <mark@codesourcery.com>
2362
2363         * cp-tree.h (get_arglist_len_in_bytes): Remove.
2364
2365         PR c++/9264
2366         * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
2367         typeame types more robustly.
2368
2369 2003-01-11  Phil Edwards  <pme@gcc.gnu.org>
2370
2371         * parser.c:  Fix comment typos.
2372
2373 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
2374
2375         PR c++/9099
2376         * parser.c (cp_parser_scope_through_which_access_occurs): Handle
2377         an object_type which is not a class type.
2378
2379 2003-01-10  Geoffrey Keating  <geoffk@apple.com>
2380
2381         * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
2382         (cp_parser_late_parsing_default_args): Likewise.
2383
2384 2003-01-10  Nathanael Nerode  <neroden@gcc.gnu.org>
2385
2386         * cfns.gperf: ANSIfy function declarations.
2387         * cfns.h: Regenerate.
2388         * cp-tree.h: ANSIfy function declarations.
2389
2390 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
2391
2392         * cp-tree.h (reparse_absdcl_as_expr): Remove.
2393         (reparse_absdcl_as_casts): Likewise.
2394         (reparse_decl_as_expr): Likewise.
2395         (finish_decl_parsing): Likewise.
2396         * decl2.c (reparse_absdcl_as_expr): Remove.
2397         (reparse_absdcl_as_casts): Likewise.
2398         (repase_decl_as_expr): Likewise.
2399         (finish_decl_parsing): Likewise.
2400
2401         PR c++/9128
2402         PR c++/9153
2403         PR c++/9171
2404         * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
2405         function.
2406         (cp_parser_nested_name_specifier_opt): Correct the
2407         check_dependency_p false.
2408         (cp_parser_postfix_expression): Fix formatting.
2409         (cp_parser_decl_specifier_seq): Avoid looking for constructor
2410         declarators when possible.
2411         (cp_parser_template_id): Avoid performing name-lookup when
2412         possible.
2413         (cp_parser_class_head): Do not count specializations when counting
2414         levels of templates.
2415         (cp_parser_constructor_declarator_p): Return immediately if
2416         there's no chance that the tokens form a constructor declarator.
2417         * rtti.c (throw_bad_typeid): Add comment.  Do not return an
2418         expression with reference type.
2419         (get_tinfo_decl_dynamic): Do not return an expression with
2420         reference type.
2421         (build_typeid): Add comment.  Do not return an expression with
2422         reference type.
2423         * typeck.c (build_class_member_access_expr): Improve handling of
2424         conditionals and comma-expressions as objects.
2425
2426 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
2427
2428         * cfns.gperf: ANSIfy function declarations.
2429         * cfns.h: Regenerate.
2430         * cp-tree.h: ANSIfy function declarations.
2431         * parser.c: ANSIfy function declarations & definitions.
2432
2433         * decl.c (bad_specifiers): Fix parameter order error I introduced.
2434
2435 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
2436
2437         Merge from pch-branch:
2438
2439         2003-01-09  Geoffrey Keating  <geoffk@apple.com>
2440
2441         Merge to tag pch-merge-20030102:
2442
2443         * semantics.c (finish_translation_unit): Don't call finish_file.
2444         * parser.c: Don't include ggc.h.
2445         (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
2446         read first token here.  Don't allow PCH files after the first
2447         token is read.
2448         (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
2449         (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
2450         (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
2451         (cp_parser_late_parsing_for_member): Don't duplicate call to
2452         cp_lexer_set_source_position_from_token.
2453         (cp_parser_late_parsing_default_args): Likewise.
2454         (yyparse): Call finish_file after clearing the_parser.
2455
2456         2002-12-11  Geoffrey Keating  <geoffk@apple.com>
2457
2458         * Make-lang.in: Remove $(GGC_H) from all dependencies.
2459         (CXX_TREE_H): Add $(GGC_H).
2460         * class.c: Don't include ggc.h.
2461         (field_decl_cmp): Make parameters be 'const void *' to match qsort.
2462         (method_name_cmp): Likewise.
2463         (resort_data): New variable.
2464         (resort_field_decl_cmp): New.
2465         (resort_method_name_cmp): New.
2466         (resort_sorted_fields): New.
2467         (resort_type_method_vec): New.
2468         (finish_struct_methods): Delete cast.
2469         (finish_struct_1): Delete cast.
2470         * cp-tree.h: Include ggc.h.
2471         (struct lang_type_class): Add reorder attribute to field `methods'.
2472         (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
2473         (resort_sorted_fields): New prototype.
2474         (resort_type_method_vec): New prototype.
2475         * call.c: Don't include ggc.h.
2476         * decl.c: Likewise.
2477         * decl2.c: Likewise.
2478         * init.c: Likewise.
2479         * lex.c: Likewise.
2480         * method.c: Likewise.
2481         * optimize.c: Likewise.
2482         * parse.y: Likewise.
2483         * pt.c: Likewise.
2484         * repo.c: Likewise.
2485         * search.c: Likewise.
2486         * semantics.c: Likewise.
2487         * spew.c: Likewise.
2488         * tree.c: Likewise.
2489
2490         * lang-specs.h: Remove comment.
2491
2492         2002-12-03  Geoffrey Keating  <geoffk@apple.com>
2493
2494         * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
2495         (operator_name_info): Mark to be saved for PCH, specify size.
2496         (assignment_operator_name_info): Likewise.
2497
2498         2002-11-19  Geoffrey Keating  <geoffk@apple.com>
2499
2500         * decl.c (anon_cnt): Mark to be saved for PCH.
2501
2502         2002-10-25  Geoffrey Keating  <geoffk@apple.com>
2503
2504         * lex.c  (init_reswords): Delete now-untrue comment.
2505         Allocate ridpointers using GGC.
2506
2507         2002-10-04  Geoffrey Keating  <geoffk@apple.com>
2508
2509         * cp-tree.h (union lang_decl_u2): Add tags to all fields.
2510
2511         * g++spec.c (lang_specific_driver): Don't include standard
2512         libraries in `added'.
2513
2514         2002-08-27  Geoffrey Keating  <geoffk@redhat.com>
2515
2516         * decl2.c (finish_file): Call c_common_write_pch.
2517         * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
2518
2519         2002-08-17  Geoffrey Keating  <geoffk@redhat.com>
2520
2521         * g++spec.c (lang_specific_driver): Treat .h files as C++ header
2522         files when using g++.
2523         * lang-specs.h: Handle compiling C++ header files.
2524
2525 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
2526
2527         * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
2528
2529 2003-01-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2530
2531         * pt.c (push_access_scope_real): Call push_to_top_level for
2532         function in namespace scope.
2533         (pop_access_scope): Call pop_from_top_level for function in
2534         namespace scope.
2535
2536 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
2537
2538         * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
2539
2540 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
2541
2542         * Make-lang.in (c++.install-common, c++.install-man,
2543         c++.uninstall): Prepend $(DESTDIR) to destination paths in
2544         all (un)installation commands.
2545         (c++.install-common): Rewrite $(LN) commands to support
2546         DESTDIR with "ln" as well as with "ln -s".
2547
2548 2003-01-08  Jason Merrill  <jason@redhat.com>
2549
2550         * parser.c (cp_parser_primary_expression): See through explicitly
2551         scoped ALIAS_DECLs, too.
2552
2553 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
2554
2555         * decl.c: Remove some #if 0 code.
2556
2557         * decl.c: ANSIfy function declarations.
2558
2559 2003-01-07  Mark Mitchell  <mark@codesourcery.com>
2560
2561         * parser.c (cp_parser_asm_definition): Correct handling of omitted
2562         operands.
2563
2564 2003-01-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2565
2566         PR c++/9030
2567         * decl.c (make_typename_type): Check access only when tf_error.
2568         (make_unbound_class_template): Likewise.
2569         * pt.c (saved_access_scope): New variable.
2570         (push_access_scope_real): New function.
2571         (push_access_scope): Likewise.
2572         (pop_access_scope): Likewise.
2573         (tsubst_default_argument): Use them.
2574         (instantiate_template): Likewise.
2575         (regenerate_decl_from_template): Likewise.
2576         (instantiate_decl): Likewise.
2577         (get_mostly_instantiated_function_type): Likewise.
2578
2579 2003-01-07  Nathanael Nerode <neroden@gcc.gnu.org>
2580
2581         * tree.c: Delete bogus #if 0 code.
2582
2583 2003-01-07  Andreas Schwab  <schwab@suse.de>
2584
2585         * class.c (layout_class_type): Don't use
2586         PCC_BITFIELD_TYPE_MATTERS if not defined.
2587
2588 2003-01-06  Mark Mitchell  <mark@codesourcery.com>
2589
2590         PR c++/9165
2591         * decl2.c (build_cleanup): Mark the object as used.
2592
2593         * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
2594         (hash_local_specialization): New function.
2595         (register_local_specialization): Revert 2003-01-05 change.
2596         (instantiate_decl): Use hash_local_specialization when creating
2597         the local_specializations table.
2598
2599         * decl2.c (mark_used): Do not synthesize thunks.
2600
2601         * class.c (layout_class_type): Correct handling of unnamed
2602         bitfields wider than their types.
2603
2604         PR c++/9189
2605         * parser.c (cp_parser): Remove default_arg_types.  Update
2606         documentation for unparsed_functions_queues.
2607         (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
2608         parameter.
2609         (cp_parser_new): Don't set parser->default_arg_types.
2610         (cp_parser_function_definition): Adjust usage of
2611         unparsed_funtions_queues.
2612         (cp_parser_class_specifier): Don't mess with
2613         parser->default_arg_types.  Handle default argument processing in
2614         a separate phase from function body processing.
2615         (cp_parser_template_declaration_after_export): Adjust usage of
2616         unparsed_functions_queues.
2617         (cp_parser_late_parsing_for_member): Do not handle default
2618         arguments.
2619
2620 2003-01-06  Nathan Sidwell  <nathan@codesourcery.com>
2621
2622         PR c++/9109
2623         * parser.c (cp_parser_declarator_kind): New enum.
2624         (cp_parser_declarator): Adjust.
2625         (cp_parser_direct_declarator): Adjust. Allow for either named or
2626         abstract declarator. Prefer abstract, if possible. Allow
2627         parenthesized function name.
2628         (cp_parser_condition): Adjust cp_parser_declarator call.
2629         (cp_parser_explicit_instantiation): Likewise.
2630         (cp_parser_init_declarator): Likewise.
2631         (cp_parser_type_id): Likewise.
2632         (cp_parser_function_definition): Likewise.
2633         (cp_parser_member_declaration): Likewise.
2634         (cp_parser_parameter_declaration): Use cp_parser_declarator to do
2635         the tentative parsing.
2636         (cp_parser_exception_declaration): Likewise.
2637
2638 2003-01-05  Mark Mitchell  <mark@codesourcery.com>
2639
2640         * parser.c (cp_parser_template_parameter): Adjust call to
2641         cp_parser_parameter_declaration.
2642         (cp_parser_parameter_declaration_list): Likewise.
2643         (cp_parser_parameter_declaration): Replace
2644         greater_than_is_operator_p with template_parm_p parameter.  Do not
2645         cache tokens for template default arguments.
2646
2647         * pt.c (retrieve_local_specialization): Use htab_find, not
2648         htab_find_with_hash.
2649         (register_local_specialization): Use htab_find_slot, not
2650         htab_find_slot_with_hash.
2651         (instantiate_decl): Pass a hash function to htab_create.
2652
2653 2003-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2654
2655         * parser.c (cp_parser_binary_expression,
2656         cp_parser_multiplicative_expression,
2657         cp_parser_additive_expression, cp_parser_shift_expression,
2658         cp_parser_relational_expression, cp_parser_equality_expression,
2659         cp_parser_and_expression, cp_parser_exclusive_or_expression,
2660         cp_parser_inclusive_or_expression,
2661         cp_parser_logical_and_expression, cp_parser_logical_or_expression,
2662         cp_parser_binary_expression): Const-ify.
2663
2664 2003-01-04  Mark Mitchell  <mark@codesourcery.com>
2665
2666         * method.c (use_thunk): Disable access control while building the
2667         body of the thunk.
2668
2669 2003-01-03  Nathanael Nerode  <neroden@gcc.gnu.org>
2670
2671         * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
2672         front end.
2673
2674 2003-01-03  Matt Austern  <austern@apple.com>
2675
2676         * cp-tree.h (struct lang_type_class): add field for key method
2677         (cp_global_trees): rename dynamic_classes to keyed_classes
2678         (key_method): add definition
2679         * class.c (finish_struct_1): compute class's key method, and add
2680         the class to keyed_classes list if there is no key method.
2681         * decl.c (finish_function): add class to keyed_classes list if we
2682         see a definition of the class's key method.
2683         * pt.c (instantiate_class_template): add template specialization
2684         of a dynamic class to keyed_classes list.
2685         * decl2.c (key_method): remove
2686         (finish_file): iterate only through keyed_classes list when
2687         deciding whether to emit vtables, remove class from its list after
2688         we do the emission.
2689
2690 2003-01-02  Jason Merrill  <jason@redhat.com>
2691
2692         * call.c (build_conditional_expr): Stabilize lvalues properly.
2693         * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
2694         * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
2695         Don't allow CALL_EXPR or VA_ARG_EXPR, either.
2696
2697         * call.c (convert_like_real): Call decl_constant_value for an
2698         IDENTITY_CONV even if there are no more conversions.
2699
2700         * cvt.c (build_up_reference): Don't push unnamed temps.
2701
2702         * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
2703
2704         * dump.c (cp_dump_tree): Don't try to dump class-specific fields
2705         for a backend struct.
2706
2707         * except.c (wrap_cleanups_r, build_throw): Make
2708         MUST_NOT_THROW_EXPRs void.
2709         * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
2710
2711         * init.c (build_vec_delete_1): Pre-evaluate the base address.
2712
2713         * init.c (get_temp_regvar): Simplify logic.
2714
2715         * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
2716         our replacement is a decl.
2717
2718         * decl.c (cp_make_fname_decl): Push the decls inside the
2719         outermost scope.
2720
2721 2003-01-03  Nathan Sidwell  <nathan@codesourcery.com>
2722
2723         PR c++/45, c++/3784
2724         * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
2725         the same too.
2726
2727 2003-01-03  Graham Stott  <graham.stott@btinternet.com>
2728
2729         * parser.c (struct cp_parser): Add access_checks_lists field
2730         (cp_parser_simple_declaration): Use.
2731         (cp_parser_init_declarator): Likewise.
2732
2733 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
2734
2735         * parser.c (cp_parser_declaration): Accept the __extension__
2736         keyword before the declaration.
2737
2738         PR c++/2843
2739         * parser.c (cp_parser_parameter_declaration): Allow attributes to
2740         appear after the declarator.
2741
2742         * call.c (build_new_method_call): Fix typo in message format
2743         string.
2744
2745 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
2746
2747         * parser.c (cp_lexer_next_token_is): Declare it inline.
2748         (cp_lexer_set_source_position_from_token): Likewise.
2749         (cp_lexer_debugging_p): Likewise.
2750         (cp_parser_parsing_tentatively): Likewise.
2751         (cp_parser_nested_name_specifier_opt): Reduce the number of calls
2752         to the cp_lexer_peek_token.
2753
2754         * parser.c (cp_parser_sizeof_operand): Do not evaluate the
2755         expression.
2756
2757 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
2758
2759         * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
2760         cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
2761         cp/repo.c: Fix copyright years.
2762
2763 2003-01-01  Neil Booth  <neil@daikokuya.co.uk>
2764
2765         * lex.c: Remove superfluous include of cpplib.h.
2766         (CONSTRAINT): Define without conditions.
2767         (init_cp_pragma): Use c_register_pragma.
2768
2769 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
2770
2771         * .cvsignore: Remove.
2772
2773 2002-12-31  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2774
2775         * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
2776           except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
2777           lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
2778           pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
2779           typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
2780           copyright header.
2781         * lex.h: parse.y is dead, so don't mention it.  Also replace the
2782           copyright header with the default GNU copyright header.
2783
2784 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
2785
2786         * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
2787         (lookup_name_namespace_only): Likewise.
2788         (begin_only_namespace_names): Likewise.
2789         (end_only_namespace_names): Likewise.
2790         * decl.c (only_namespace_names): Remove.
2791         (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
2792         (lookup_name_real): Do not check only_namespace_names.
2793         (lookup_name_namespace_only): Remove.
2794         (begin_only_namespace_names): Likewise.
2795         (end_only_namespace_names): Likewise.
2796         * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
2797         nested-name-specifiers more gracefully.
2798         (cp_parser_class_or_namespace_name): Avoid looking up namespace
2799         names when they cannot possibly appear.
2800         (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
2801         (cp_parser_elaborated_type_specifier): Likewise.
2802         (cp_parser_namespace_name): Only look for namespace names.
2803         (cp_parser_lookup_name): Add is_namespace parameter.
2804         (cp_parser_lookup_name_simple): Adjust call to
2805         cp_parser_lookup_name.
2806
2807         * parser.c (cp_parser_dependent_type_p): Fix thinko.
2808
2809 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
2810
2811         * .cvsignore: Update.
2812
2813 2002-12-31  Nathan Sidwell  <nathan@codesourcery.com>
2814
2815         * class.c (modify_vtable_entry): Remove unused variable.
2816         (get_vcall_index): Always expect a non-thunk.
2817         (update_vtable_entry_for_fn): Combine covariant adjustments, when
2818         overriding a thunk. Pass get_vcall_index a non-thunk.
2819
2820         * decl2.c (finish_file): Mark undefined inlines as extern.
2821
2822 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
2823
2824         * cp-tree.def (RETURN_INIT): Remove.
2825         * cp-tree.h (DECL_IN_MEMORY_P): Remove.
2826         (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
2827         (note_level_for_for): Remove.
2828         (note_level_for_try): Likewise.
2829         (note_level_for_catch): Likewise.
2830         (finish_named_return_value): Likewise.
2831         (do_pushlevel): Change prototype.
2832         (pending_lang_change): Remove.
2833         * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
2834         sk_for.
2835         (note_level_for_for): Remove.
2836         (note_level_for_try): Likewise.
2837         (note_level_for_catch): Likewise.
2838         (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
2839         * parser.c (cp_parser_context_free_list): Make it "deletable".
2840         (cp_parser_template_argument): Remove misleading comment.
2841         * pt.c (tsubst_expr): Remove RETURN_INIT code.
2842         * semantics.c (genrtl_named_return_value): Remove.
2843         (do_pushlevel): Take a scope kind as an argument.
2844         (begin_if_stmt): Adjust.
2845         (begin_while_stmt): Likewise.
2846         (begin_for_stmt): Likewise.
2847         (finish_for_init_stmt): Likewise.
2848         (begin_switch_stmt): Likewise.
2849         (begin_handler): Likewise.
2850         (begin_compound_stmt): Likewise.
2851         (finish_named_return_value): Remove.
2852         (cp_expand_stmt): Remove RETURN_INIT case.
2853         * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
2854
2855 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
2856
2857         PR c++/9112
2858         * parser.c (cp_parser_direct_declarator): Handle erroneous
2859         parenthesized declarators correctly.
2860
2861 2002-12-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2862
2863         * cp-tree.h (pending_lang_change): Declare.
2864
2865 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
2866
2867         * parser.c (cp_parser_context_free_list): New variable.
2868         (cp_parser_context_new): Use it.
2869         (cp_parser_error): Check return code from
2870         cp_parser_simulate_error.
2871         (cp_parser_simulate_error): Return a value.
2872         (cp_parser_id_expression): Optimize common case.
2873         (cp_parser_class_name): Likewise.
2874         (cp_parser_class_specifier): Adjust call to
2875         cp_parser_late_parsing_default_args.
2876         (cp_parser_lookup_name): Optimize common case.
2877         (cp_parser_late_parsing_for_member): Adjust call to
2878         cp_parser_late_parsing_default_args.
2879         (cp_parser_late_parsing_default_args): Add scope parameter.
2880         (cp_parser_require): Avoid creating the error message unless it's
2881         needed.
2882         (cp_parser_parse_definitely): Place free'd contexts on the free
2883         list.
2884
2885         * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
2886
2887 2002-12-30  David Edelsohn  <edelsohn@gnu.org>
2888
2889         * parser.c (cp_parser_parameter_declaration_clause): Treat system
2890         header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
2891
2892 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
2893
2894         * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
2895         GCC, not GNU CC.
2896
2897 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
2898
2899         * parse.y: Remove.
2900         * spew.c: Likewise.
2901         * Make-lang.in (gt-cp-spew.h): Remove.
2902         * cp-tree.h (do_pending_lang_change): Remove.
2903         (do_identifier): Change prototype.
2904         (finish_id_expr): Remove.
2905         * decl.c (lookup_name_real): Remove yylex variable.
2906         * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
2907         * lex.c (init_cpp_parse): Remove.
2908         (reduce_cmp): Likewise.
2909         (token_cmp): Likewise.
2910         (yychar): Likewise.
2911         (lastiddecl): Likewise.
2912         (token_count): Likewise.
2913         (reduce_count): Likewise.
2914         (yyhook): Likewise.
2915         (print_parse_statistics): Likewise.
2916         (do_pending_lang_change): Likewise.
2917         (do_identifier): Remove parsing parameter.
2918         * lex.h (lastiddecl): Remove.
2919         (looking_for_typename): Remove.
2920         (looking_for_template): Likewise.
2921         (pending_lang_change): Likewise.
2922         (yylex): Likewise.
2923         * semantics.c (finish_id_expr): Remove.
2924
2925         * decl.c (grokdeclarator): Diagnost "extern thread" and "static
2926         thread" correctly.
2927
2928 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
2929
2930         * decl.c, decl2.c, decl.h:  GCC, not GNU CC.  This is the C++ front
2931         end, not the C front end.
2932
2933 2002-12-30  Nathan Sidwell  <nathan@codesourcery.com>
2934
2935         * cp-tree.h (THUNK_TARGET): New macro.
2936         (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
2937         (finish_thunk): Remove offset parms.
2938         * class.c (find_final_overrider): Look through thunks.
2939         (get_vcall_index): Use THUNK_TARGET.
2940         (update_vtable_entry_for_fn): Look through thunks. Set covariant
2941         fixed offset here. Adjust finish_thunk call.
2942         (build_vtbl_initializer): Adjust finish_thunk calls.
2943         * mangle.c (mangle_call_offset): Remove superfluous if.
2944         (mangle_thunk): Adjust.
2945         * method.c (make_thunk): Adjust.
2946         (finish_thunk): Adjust.
2947         (thunk_adjust): Remove assert.
2948         (use_thunk): Use THUNK_TARGET
2949         * dump1.c (cp_dump_tree): Adjust thunk dumping.
2950
2951         PR c++/9054
2952         * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
2953         * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
2954
2955 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2956
2957         Remove traditional C constructs 4/n.
2958         * decl2.c (grok_method_quals, warn_if_unknown_interface,
2959         grok_x_components, cp_build_parm_decl, build_artificial_parm,
2960         maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
2961         delete_sanity, check_member_template, check_java_method,
2962         check_classfn, finish_static_data_member_decl, grokfield,
2963         grokbitfield, grokoptypename, grok_function_init,
2964         cplus_decl_attributes, constructor_name, defer_fn,
2965         build_anon_union_vars, finish_anon_union, coerce_new_type,
2966         coerce_delete_type, comdat_linkage, maybe_make_one_only,
2967         key_method, import_export_vtable, import_export_class,
2968         output_vtable_inherit, import_export_decl, import_export_tinfo,
2969         build_cleanup, get_guard, get_guard_bits, get_guard_cond,
2970         set_guard, start_objects, finish_objects,
2971         start_static_storage_duration_function,
2972         finish_static_storage_duration_function, get_priority_info,
2973         start_static_initialization_or_destruction,
2974         finish_static_initialization_or_destruction,
2975         do_static_initialization, do_static_destruction,
2976         prune_vars_needing_no_initialization, write_out_vars,
2977         reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
2978         add_using_namespace, merge_functions, ambiguous_decl,
2979         lookup_using_namespace, lookup_using_namespace,
2980         qualified_lookup_using_namespace, set_decl_namespace,
2981         decl_namespace, current_decl_namespace, push_decl_namespace,
2982         pop_decl_namespace, push_scope, pop_scope, add_function,
2983         arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
2984         lookup_arg_dependent, do_namespace_alias,
2985         validate_nonmember_using_decl, do_nonmember_using_decl,
2986         do_toplevel_using_decl, do_local_using_decl,
2987         do_class_using_decl, do_using_directive, check_default_args,
2988         mark_used, handle_class_head): Use C90 prototypings.  Use booleans.
2989         * parser.c (cp_parser_class_head): Use booleanss.
2990         * decl.c (walk_globals, walk_vtables): Likewise.
2991         * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
2992         walk_globals): Change return type from 'int' to 'bool'.
2993         * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
2994         throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
2995         build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
2996         get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
2997         qualifier_flags, tinfo_base_init, generic_initializer,
2998         ptr_initializer, dfs_class_hint_mark, ptm_initializer,
2999         dfs_class_hint_unmark, class_hint_flags, class_initializer,
3000         typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
3001         get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
3002         unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
3003         * repo.c (repo_compile_flags, repo_template_declared,
3004         repo_template_defined, repo_class_defined, repo_get_id,
3005         repo_template_used, repo_vtable_used, repo_inline_used,
3006         repo_tinfo_used, repo_template_instantiated, extract_string,
3007         open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
3008         finish_repo): Likewise.
3009         * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
3010         cxx_print_xnode): Likewise..
3011         * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
3012         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
3013         * cxxfilt.c (demangle_it, print_demangler_list, usage,
3014         standard_symbol_characters, hp_symbol_characters, main, fatal):
3015         Likewise.
3016         (strip_underscore):  Change type from 'int' to 'bool'.
3017         (main): Use boolean constants.
3018
3019 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3020
3021         Remove traditional C constructs 3/n.
3022         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
3023         build_up_reference, warn_ref_binding, convert_to_reference,
3024         convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
3025         convert_to_void, convert, convert_force, build_type_conversion,
3026         build_expr_type_conversion, type_promotes_to,
3027         perform_qualification_conversions): Use C90 prototyping style.
3028         * decl2.c (grok_array_decl): Use boolean constant.
3029         (delete_sanity): Likewise.
3030         * typeck.c (build_unary_op): Likewise.
3031         * semantics.c (finish_switch_cond): Likewise.
3032         * parser.c (cp_parser_direct_new_declarator): Likewise.
3033         * init.c (build_new): Likewise.
3034
3035 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
3036
3037         * Make-lang.in (po-generated): Remove parse.c.
3038         (CXX_OBJS): Remove parse.o and spew.o.  Add parser.o.
3039         ($(srcdir)/cp/parse.h): Remove target.
3040         ($(srcdir)/cp/parse.c): Likewise.
3041         (gt-cp-parse.h): Likewise.
3042         (gt-cp-parser.h): New target.
3043         (c++.distclean): Do not remove parse.output.
3044         (c++.maintainer-clean): Do not remove parse.c or parse.h.
3045         (cp/spew.o): Remove target.
3046         (cp/lex.o): Adjust dependencies.
3047         (cp/pt.o): Likewise.
3048         (cp/parse.o): Likewise.
3049         (cp/TAGS): Do not mention parse.c.
3050         (cp/parser.o): New target.
3051         * NEWS: Mention the new parser.
3052         * call.c (build_scoped_method_call): Simplify.
3053         (build_method_call): Likewise.
3054         (build_new_function_call): Adjust calls to add_function_candidate
3055         and add_template_candidate.
3056         (build_new_op): Improve handling of erroroneous operands.
3057         (convert_default_arg): Remove circular argument processing.
3058         (name_as_c_string): New function.
3059         (build_new_method_call): Use it.
3060         (perform_implicit_conversion): Use error_operand_p.
3061         * class.c (finish_struct_anon): Use constructor_name_p.
3062         (check_field_decls): Likewise.
3063         (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
3064         (resolve_address_of_overloaded_function): Likewise.
3065         (instantiate_type): Tweak pointer-to-member handling.
3066         (get_primary_binfo): Remove incorrect assertion.
3067         * config-lang.in (gtfiles): Add parser.c, remove parse.c.
3068         * cp-tree.h (DEFARG_TOKENS): New macro.
3069         (default_arg): New structure.
3070         (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
3071         (lang_tree_node): Add default_arg.
3072         (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
3073         (type_info_ref_type): New macro.
3074         (saved_scope): Make processing_explicit_instantiation a boolean.
3075         (check_access): New field.
3076         (unparsed_text): Remove.
3077         (language_function): Remove unparsed_inlines.
3078         (error_operand_p): New macro.
3079         (lang_decl): Adjust pending_inline_info.
3080         (DEFARG_POINTER): Remove.
3081         (tag_types): Add typenames.
3082         (lookup_ualified_name): Declare.
3083         (lookup_name_real): Likewise.
3084         (shadow_tag): Adjust prototype.
3085         (get_scope_of_declarator): Declare it.
3086         (process_next_inline): Remove it.
3087         (check_for_missing_semicolon): Likewise.
3088         (maybe_get_template_decl_from_type_decl): Declare it.
3089         (finish_label_stmt): Adjust prototype.
3090         (finish_non_static_data_meber): Declare it.
3091         (finish_pseudo_destructor_call_expr): Rename to ...
3092         (finish_pseudo_destructor_expr): ... this.
3093         (finish_compound_literal): Declare it.
3094         (begin_inline_definitions): Remove it.
3095         (init_spew): Remove.
3096         (peekyylex): Likewise.
3097         (arbitrate_lookup): Likewise.
3098         (frob_opname): Likewise.
3099         (maybe_snarf_defarg): Likewise.
3100         (add_defarg_fn): Likewise.
3101         (do_pending_defargs): Likewise.
3102         (done_pending_defargs): Likewise.
3103         (unprocessed_defarg_fn): Likewise.
3104         (replace_defarg): Likewise.
3105         (end_input): Likewise.
3106         (get_overloaded_fn): Likewise.
3107         * cvt.c (convert_to_reference): Improve error handling.
3108         * decl.c (lookup_name_real): Do not declare it static.
3109         (maybe_push_to_top_level): Set check_access.
3110         (identifier_type_value): Adjust call to lookup_name_real.
3111         (lookup_qualified_name): New method.
3112         (lookup_name_real): Remove special-case parsing code.
3113         (lookup_name-nonclass): Adjust call to lookup_name_real.
3114         (lookup_name_namespace_only): Likewise.
3115         (lookup_name): Likewise.
3116         (check_tag_decl): Return the type declared.
3117         (shadow_tag): Likewise.
3118         (register_dtor_fn): Tweak check_access.
3119         (grokfndecl): Use constructor_name_p.
3120         (get_scope_of_declarator): New function.
3121         (grokdeclarator): Obscure tweaks for slightly different declarator
3122         representations.
3123         (start_method): Return error_mark_node to indicate failure.
3124         (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
3125         * decl2.c (constructor_name_full): Simplify.
3126         (constructor_name): Use it.
3127         (build_expr_from_tree): Adjust for changes to do new parser.
3128         (push_scope): Improve robustness.
3129         (validate_nonmember_using_decl): Process declarations, not names.
3130         (do_class_using_decl): Likewise.
3131         (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
3132         here.
3133         * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
3134         * expr.c (cxx_expand_expr): Handle BASELINKs.
3135         * init.c (member_init_ok_or_else): Issue more errors.
3136         (build_offset_ref): Tweak handling of FUNCTION_DECLs.
3137         * lex.c: Do not include parse.h.
3138         (yypring): Do not declare.
3139         (yylval): Likewise.
3140         (make_reference_declarator): Remove error-generating code.
3141         (rid_to_yy): Remove.
3142         (cxx_init): Do not call init_spew.
3143         (yypring): Remove.
3144         (check_for_missing_semicolon): Remove.
3145         * lex.h (got_scope): Remove.
3146         (got_object): Remove.
3147         * method.c (hack_identifier): Use finish_non_static_data_member.
3148         (implicitly_declare_fn): Adjust use of constructor_name.
3149         * parser.c: New file.
3150         * pt.c (parse.h): Do not include it.
3151         (maybe_get_template_decl_from_template): Do not declare it.
3152         (finish_member_template_decl): Tweak.
3153         (begin_explicit_instantiation): Adjust for
3154         processing_explicit_instantiation being boolean.
3155         (end_explicit_instantiation): Likewise.
3156         (maybe_process_partial_specialization): Tighten specialization
3157         test.
3158         (retrieve_local_specialization): Adjust ue of hash table.
3159         (eq_local_specializations): New function.
3160         (register_local_specialization): Likewise.
3161         (push_template_decl_real): Remove unnecessary test.
3162         (maybe_get_template_decl_from_type_decl): Don't make it static.
3163         (for_each_template_parm_r): Handle TYPEOF_TYPE.
3164         (tsubst_copy): Use retrieive_local_specialization to handle
3165         PARM_DECL.  Adjust handling of CONST_DECLs.  Handle BASELINKs.
3166         Handle COMPONENT_REFs with pseudo-destructor-expressions.
3167         Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
3168         (tsubst_expr): Pass decls, not names, to do_local_using_decl.
3169         (unify): Tweak handling of CONST_DECLs.
3170         (regenerate_decl_from_template): Use push_nested_class.
3171         (template_for_substitution): New funciton.
3172         (instantiate_decl): Use it.  Register parameters as local
3173         specializations.
3174         * rtti.c (init_rtti_processing): Set type_info_ref_type.
3175         (build_typeid): Use it.
3176         (get_typeid): Likeise.
3177         * search.c (accessible_p): Use check_access, not
3178         flag_access_control.
3179         (adjust_result_of_qualified_name_lookup): Pay attention to the
3180         context_class.
3181         * semantics.c (finish_asm_stmt): Adjust error handling.
3182         (finish_label_stmt): Return the statement.
3183         (finish_non_static_data_member): New function.
3184         (finish_class_expr): Handle BASELINKs.
3185         (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
3186         (finish_object_call_expr): Simplify handling during templates.
3187         (finish_pseudo_destructor_call_expr): Rename to ...
3188         (finish_pseudo_dtor_expr): ... this.
3189         (finish_compound_literal): New function.
3190         (begin_inline_definitions): Remove.
3191         (finish_sizeof): Remove special template handling.
3192         * spew.c: Do not include parse.h.
3193         * tree.c (get_overloaded_fn): Remove.
3194         * typeck.c (build_class_member_access_expr): Handle
3195         PSEUDO_DTOR_EXPR.  Adjust handling of static member functions.
3196         (lookup_destructor): New function.
3197         (finish_class_member_access_expr): Use it.
3198         (convert_arguments): Simplify.
3199         (build_unary_op): Handle BASELINKs.
3200
3201 2002-12-26  Nathan Sidwell  <nathan@codesourcery.com>
3202
3203         PR c++/4803
3204         * decl2.c (mark_used): Defer inline functions.
3205         (finish_file): Merge deferred_fns loops. Check all used
3206         inline functions have a definition.
3207         * method.c (make_thunk): Thunks are not inline.
3208
3209         PR c++/5116, c++/764
3210         * call.c (build_new_op): Make sure template class operands are
3211         instantiated.
3212
3213 2002-12-24  Nathan Sidwell  <nathan@codesourcery.com>
3214
3215         PR C++/7964
3216         * cp-tree.h (resolve_scoped_fn_name): Prototype.
3217         * call.c (resolve_scoped_fn_name): New function. Deal with
3218         more template expansion. Broken out of ...
3219         * parse.y (parse_finish_call_expr): ... here. Call it.
3220         * decl2.c (build_expr_from_tree, CALL_EXPR): Use
3221         resolve_scoped_fn_name and build_call_from_tree.
3222
3223         PR c++/9053
3224         * decl.c (duplicate_decls): Templates may be disambiguated by
3225         return type.
3226
3227         PR c++/8702
3228         * decl2.c (check_classfn): Use lookup_fnfield_1. List all
3229         conversion operators on failure.
3230
3231 2002-12-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3232
3233         Remove traditional C constructs 2/n.
3234         * call.c (tourney, build_field_call, equal_functions, joust,
3235         compare_ics, build_over_call, build_java_interface_fn_ref,
3236         convert_like_real, op_error, build_object_call, resolve_args,
3237         build_vfield_ref, check_dtor_name, build_scoped_method_call,
3238         build_addr_func, build_call, build_method_call, null_ptr_cst_p,
3239         sufficient_parms_p, build_conv, non_reference, strip_top_quals,
3240         standard_conversion, reference_related_p,
3241         reference_compatible_p, convert_class_to_reference,
3242         direct_reference_binding, reference_binding,
3243         ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
3244         add_template_conv_candidate, any_viable, any_strictly_viable,
3245         build_this, splice_viable, print_z_candidates,
3246         build_user_type_conversion, build_new_function_call,
3247         conditional_conversion, build_conditional_expr, build_new_op,
3248         build_op_delete_call, enforce_access, call_builtin_trap,
3249         convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
3250         convert_default_arg, type_passed_as, convert_for_arg_passing,
3251         in_charge_arg_for_name, is_properly_derived_from,
3252         maybe_handle_implicit_object, maybe_handle_ref_bind,
3253         source_type, add_warning, can_convert, can_convert_arg,
3254         perform_implicit_conversion, can_convert_arg_bad,
3255         initialize_reference, add_conv_candidate,
3256         add_template_candidate_real, add_template_candidate): Ansify.
3257
3258 2002-12-22  Nathan Sidwell  <nathan@codesourcery.com>
3259
3260         PR c++/8572
3261         * cp-tree.h (grokoptypename): Add SCOPE parameter.
3262         * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
3263         if in a template scope.
3264         * parse.y (unoperator): Return the scope.
3265         (operator_name): Adjust grokoptypename call.
3266
3267 2002-12-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3268
3269         * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
3270         * decl.c (make_unbound_class_template): Adjust.  Check for tf_error.
3271         * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
3272
3273 2002-12-20  Kazu Hirata  <kazu@cs.umass.edu>
3274
3275         * ChangeLog: Fix a typo.
3276         * class.c: Fix comment typos.
3277         * cp-tree.h: Likewise.
3278
3279 2002-12-18  Jason Merrill  <jason@redhat.com>
3280
3281         Handle anonymous unions at the tree level.
3282         C++ ABI change: Mangle anonymous unions using the name of their
3283         first named field (by depth-first search).  Should not cause
3284         binary compatibility problems, though, as the compiler previously
3285         didn't emit anything for affected unions.
3286         * cp-tree.def (ALIAS_DECL): New tree code.
3287         * decl2.c (build_anon_union_vars): Build ALIAS_DECLs.  Return the
3288         first field, not the largest.
3289         (finish_anon_union): Don't mess with RTL.  Do set DECL_ASSEMBLER_NAME,
3290         push the decl, and write it out at namespace scope.
3291         * decl.c (lookup_name_real): See through an ALIAS_DECL.
3292         (pushdecl): Add namespace bindings for ALIAS_DECLs.
3293         * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
3294         of a decl which doesn't have one.
3295         * typeck.c (build_class_member_access_expr): Don't recurse if
3296         we already have the type we want.
3297
3298 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3299
3300         PR c++/8099
3301         * friend.c (make_friend_class): Allow partial specialization
3302         when declaration is not a template friend.
3303
3304 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3305
3306         PR c++/3663
3307         * pt.c (lookup_template_class): Copy TREE_PRIVATE and
3308         TREE_PROTECTED to created decl nodes.
3309
3310 2002-12-18  Mark Mitchell  <mark@codesourcery.com>
3311
3312         * class.c (build_base_field): Do not set DECL_PACKED on the
3313         FIELD_DECL.
3314
3315 2002-12-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3316
3317         * cp-tree.h (struct tree_srcloc): Use location_t.
3318         (SOURCE_LOCUS): New.
3319         (SRCLOC_FILE, SRCLOC_LINE): Adjust.
3320
3321 2002-12-17  Jason Merrill  <jason@redhat.com>
3322
3323         * decl.c (finish_function): Also complain about no return in
3324         templates.
3325         * semantics.c (finish_return_stmt): Also call check_return_expr in
3326         templates.
3327         * typeck.c (check_return_expr): In a template, just remember that we
3328         saw a return.
3329
3330 2002-12-16  Jason Merrill  <jason@redhat.com>
3331
3332         * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
3333         of the CALL_EXPR.
3334
3335         * semantics.c (do_pushlevel): Call pushlevel after adding the
3336         SCOPE_STMT.
3337         (do_poplevel): Call poplevel before adding the SCOPE_STMT.
3338         * parse.y (function_body): Go back to using compstmt.
3339         * decl.c (pushdecl): Skip another level to get to the parms level.
3340
3341         * call.c (build_new_method_call): Use is_dummy_object to determine
3342         whether or not to evaluate the object parameter to a static member
3343         function.
3344
3345 2002-12-14  Jason Merrill  <jason@redhat.com>
3346
3347         * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
3348         return slot for normal functions.  Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
3349         * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
3350         don't bother with an AGGR_INIT_EXPR.
3351         (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
3352         just generate a new decl normally.  Take return slot parm.
3353         * cp-tree.h: Adjust prototype.
3354
3355 2002-12-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3356
3357         PR C++/8031
3358         * cvt.c (convert_to_pointer_force): Don't try comparing against
3359         erronous type.
3360
3361 2002-12-13  Geoffrey Keating  <geoffk@apple.com>
3362
3363         * cp-tree.h: Have the multiple-include guards around
3364         the entire file.
3365
3366 2002-12-10  David Edelsohn  <edelsohn@gnu.org>
3367
3368         * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
3369         for SPEW_DEBUG.
3370         (snarf_method): Same.
3371         (snarf_defarg): Same.
3372
3373 2002-12-10  Mark Mitchell  <mark@codesourcery.com>
3374
3375         PR c++/8372
3376         * pt.c (tsubst_copy): Handle destructor names more correctly.
3377
3378 2002-12-10  Matt Austern   <austern@apple.com>
3379
3380         * cp-tree.h: get rid of needs_virtual_reinit bit.
3381
3382 2002-12-09  Mark Mitchell  <mark@codesourcery.com>
3383
3384         * NEWS: Document removal of in-class initialization extension for
3385         static data members of non-arithmetic, non-enumeration type.
3386         * decl.c (check_static_variable_definition): Do not allow that
3387         extension.
3388         * decl2.c (grokfield): Do not call digest_init when processing
3389         templates.
3390
3391 2002-12-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3392
3393         * error.c (dump_expr): Fix format specifier warning.
3394
3395 2002-12-04  Geoffrey Keating  <geoffk@apple.com>
3396
3397         * class.c (finish_struct_1): Correct comment.
3398         * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
3399
3400 2002-12-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3401
3402         PR C++/8799
3403         * error.c (dump_expr): Don't ever try to dump a non-existent
3404         expression.
3405
3406 2002-12-03  Nathan Sidwell  <nathan@codesourcery.com>
3407
3408         Implement covariant returns.
3409         * cp-tree.h (IS_AGGR_TYPE_2): Remove.
3410         (struct lang_decl_flags): Add this_thunk_p flag.
3411         Rename vcall_offset to virtual_offset.
3412         (struct lang_decl): Rename delta to fixed_offset.
3413         (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
3414         (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
3415         (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
3416         (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
3417         (make_thunk): Add this_adjusting arg.
3418         (finish_thunk): Declare.
3419         (mangle_thunk): Add this_adjusting arg.
3420         * class.c (get_vcall_index): Use base function for lookup.
3421         (update_vtable_entry_for_fn): Generate covariant thunk.
3422         (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
3423         (build_vtbl_initializer): Use base function for lookup.
3424         Finish covariant thunk here. Adjust thunk generation.
3425         * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
3426         Adjust thunk dumping.
3427         * mangle.c (mangle_call_offset): New function.
3428         (mangle_thunk): Adjust for covariant thunks.
3429         * method.c (make_thunk): Adjust. Do not set name here.
3430         (finish_thunk): New function. Set name here.
3431         (use_thunk): Generate covariant thunks too.
3432         (thunk_adjust): New function.
3433         * search.c (covariant_return_p): Remove. Fold into ...
3434         (check_final_overrider): ... here. Simplify.
3435         * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
3436
3437 2002-12-03  Jason Merrill  <jason@redhat.com>
3438
3439         PR c++/8674
3440         * call.c (build_over_call): Check specifically for TARGET_EXPR
3441         when eliding.
3442
3443         PR c++/8461, c++/8625
3444         * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
3445         (cp_convert_parm_for_inlining): Remove.
3446         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
3447         Remove.
3448         * cp-tree.h (ADDR_IS_INVISIREF): Remove.
3449         * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
3450
3451         * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
3452         an ambiguous conversion.
3453
3454 2002-12-03  Mark Mitchell  <mark@codesourcery.com>
3455
3456         PR c++/8688
3457         * decl.c (reshape_init): Handle erroneous initializers.
3458
3459 2002-12-02  Mark Mitchell  <mark@codesourcery.com>
3460
3461         PR c++/8720
3462         * spew.c (remove_last_token): Make sure that last_chunk is set
3463         correctly.
3464
3465         PR c++/8615
3466         * error.c (dump_expr): Handle character constants with
3467         TREE_OVERFLOW set.
3468
3469 2002-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3470
3471         DR 180
3472         * decl.c (grokdeclarator): Require class-key for all friend class.
3473         Output the correct type and context in the error message.
3474
3475 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
3476
3477         PR c++/5919
3478         * pt.c (unify): Use variably_modified_type_p to test validity of
3479         template argument types.
3480
3481         PR c++/8727
3482         * cp-tree.h (lang_type_class): Add typeinfo_var.
3483         (CLASSTYPE_TYPEINFO_VAR): New macro.
3484         * rtti.c (get_tinfo_decl): Use it.
3485
3486         PR c++/8663
3487         * init.c (expand_member_init): Always get the main variant of a
3488         base class.
3489
3490 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
3491
3492         PR c++/8332
3493         PR c++/8493
3494         * decl.c (cxx_init_decl_processing): Use size_type_node, not
3495         c_size_type_node.
3496         * decl2.c (coerce_new_type): Likewise.
3497         * except.c (do_allocate_exception): Likewise.
3498
3499 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
3500
3501         * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
3502         dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
3503         lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
3504         repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
3505         typeck2.c: Include coretypes.h and tm.h.
3506         * Make-lang.in: Update dependencies.
3507
3508 2002-11-30  Mark Mitchell  <mark@codesourcery.com>
3509
3510         PR c++/8227
3511         * decl.c (layout_var_decl): Deal gracefully with erroneous types.
3512         (check_initializer): Validate the type of the initialized
3513         variable, even if the initializer is absent.
3514         * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
3515
3516         PR c++/8214
3517         * typeck.c (convert_for_assignment): Do not use
3518         decl_constant_value on the operand.
3519
3520         PR c++/8511
3521         * pt.c (instantiate_decl): Handle template friends defined outside
3522         of the class correctly.
3523
3524 2002-11-29  Joe Buck <jbuck@synopsys.com>
3525
3526         * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
3527         anonymous structs.
3528
3529 2002-11-29  Mark Mitchell  <mark@codesourcery.com>
3530
3531         * class.c (walk_subobject_offsets): Recur on binfos as well as on
3532         types.
3533         (layout_nonempty_base_or_field): Pass it a binfo when processing a
3534         base class.
3535         (layout_empty_base): Likewise.
3536         (build_base_field): Likewise.
3537
3538 2002-11-27  Mark Mitchell  <mark@codesourcery.com>
3539
3540         * class.c (build_base_field): Make sure we get the canonical base
3541         when descending through primary bases.
3542
3543 2002-11-26  Geoffrey Keating  <geoffk@apple.com>
3544
3545         * decl.c (check_initializer): Don't error on initialisation of
3546         a scalar with a brace-enclosed expression.
3547
3548 2002-11-26  Nathan Sidwell  <nathan@codesourcery.com>
3549
3550         * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
3551         (template_parms_equal): Remove prototype.
3552         * typeck.c (buuld_indirect_ref): Reformat.
3553
3554 2002-11-25  Jason Merrill  <jason@redhat.com>
3555
3556         * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
3557         and a DO_STMT.
3558
3559 2002-11-25  Mark Mitchell  <mark@codesourcery.com>
3560
3561         * tree.c (cp_build_qualified_type_real): Correct handling of
3562         array types.
3563         * class.c (walk_subobject_offsets): Fix thinko.
3564         (build_base_field): Record offsets of empty bases in primary
3565         virtual bases.
3566         (layout_class_type): Record offsets of empty bases in fields.
3567
3568         * search.c (is_subobject_of_p_1): Fix thinko.
3569         (lookup_field_queue_p): Likewise.
3570
3571 2002-11-24  Mark Mitchell  <mark@codesourcery.com>
3572
3573         * class.c (layout_class_type): Reuse tail padding when laying out
3574         virtual bases.
3575
3576 2002-11-22  Mark Mitchell  <mark@codesourcery.com>
3577
3578         * rtti.c (qualifier_flags): Fix thinko.
3579
3580 2002-11-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3581
3582         Remove traditional C constructs 1/n.
3583         * cp-tree.h (init_method, set_mangled_name_for_decl,
3584         build_opfncall, hack_identifier, make_thunk, use_thunk,
3585         synthesize_method, implicitly_declare_fn,
3586         skip_artificial_parms_for, optimize_function, calls_setjmp_p,
3587         maybe_clone_body): Remove use of PARAMS.
3588
3589         * method.c (do_build_assign_ref, do_build_copy_constructor,
3590         synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
3591         Likewise.
3592         (synthesize_method): Use 'bool' type and constants instead of
3593         'int'.
3594         (locate_copy): Likewise.
3595         (implicitly_declare_fn): Likewise.
3596
3597         * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
3598         Remove old-style declaration.
3599         (maybe_clone_body): Use 'bool' type and constants.
3600
3601 2002-11-21  Glen Nakamura  <glen@imodulo.com>
3602
3603         PR c++/8342
3604         * typeck.c (get_member_function_from_ptrfunc): Make sure that a
3605         SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
3606         of the branches of a COND_EXPR.
3607
3608 2002-11-19  Mark Mitchell  <mark@codesourcery.com>
3609
3610         * pt.c (for_each_template_parm): Free allocated memory.
3611         * search.c (is_subobject_of_p_1): New function.
3612         (is_subobject_of_p): Avoid walking virtual bases multiple times.
3613
3614 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
3615
3616         * g++spec.c (lang_specific_spec_functions): New.
3617
3618 2002-11-15  Kazu Hirata  <kazu@cs.umass.edu>
3619
3620         * ChangeLog: Follow spelling conventions.
3621         * class.c: Likewise.
3622         * decl2.c: Likewise.
3623
3624 2002-11-14  Zack Weinberg  <zack@codesourcery.com>
3625
3626         * search.c (dfs_push_decls): Do not try to reorder elements
3627         3..n of method_vec if method_vec has only two elements.
3628         Reverse order of two tests to avoid accessing unallocated
3629         memory.
3630
3631 2002-11-14  Mark Mitchell  <mark@codesourcery.com>
3632
3633         * class.c (dfs_find_final_overrider): Adjust so that the most
3634         derived object is a binfo, rather than a class type.
3635         (find_final_overrider): Likewise.
3636         (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
3637         (add_vcall_offset): Likewise.
3638
3639 2002-11-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3640
3641         PR c++/8389
3642         * pt.c (instantiate_template): Push class scope for member
3643         functions.
3644         (get_mostly_instantiated_function_type): Likewise.  Don't call
3645         tsubst on context.  Remove CONTEXTP and TPARMSP parameters.
3646         * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
3647         * mangle.c (write_encoding, write_unqualified_name): Adjust.
3648
3649 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
3650
3651         * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
3652         vcall offfsets.  Split out ...
3653         (add_vcall_offset): ... new function.
3654
3655         PR c++/8338
3656         * pt.c (for_each_template_parm): Add htab parameter.
3657         (process_partial_specialization): Adjust call.
3658         (push_template_decl_real): Likewise.
3659         (pair_fn_data): Add visited.
3660         (for_each_template_parm_r): Avoid walking duplicates more than
3661         once.
3662         (uses_template_parms): Adjust call to for_each_template_parm.
3663
3664 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
3665
3666         * class.c (add_implicitly_declared_members): Put implicitly
3667         declared functions at the end of TYPE_METHODs when -fabi-version
3668         is at least 2.
3669
3670 2002-11-05  Geoffrey Keating  <geoffk@apple.com>
3671
3672         * decl2.c (finish_file): Correct spelling.
3673
3674 2002-11-03  Mark Mitchell  <mark@codesourcery.com>
3675
3676         * call.c (build_special_member_call): Do not try to lookup VTTs by
3677         name.
3678         * class.c (vtbl_init_data): Add generate_vcall_entries.
3679         (get_vtable_decl): Do not look up virtual tables by name.
3680         (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
3681         (set_primary_base): Do not set CLASSTYPE_RTTI.
3682         (determine_primary_base): Likewise.
3683         (get_matching_virtual): Remove.
3684         (get_vcall_index): New function.
3685         (update_vtable_entry_for_fn): Do not try to use virtual thunks
3686         when they are not required.  Assign vcall indices at this point.
3687         (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
3688         Do update dynamic_classes.
3689         (build_vtt): Do not add VTTs to the symbol table.
3690         (build_ctor_vtbl_group): Likewise.
3691         (build_vtbl_initializer): Simplify handling of vcall indices.
3692         (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
3693         for the most derived class.
3694         (add_vcall_offset_vtbl_entries_1): But do not actually add them to
3695         the vtable.
3696         * cp-tree.h (dynamic_classes): New macro.
3697         (lang_type_class): Remove rtti.  Add vtables.  Add vcall_indices.
3698         (CLASSTYPE_RTTI): Remove.
3699         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
3700         (CLASSTYPE_VCALL_INDICES): New macro.
3701         (CLASSTYPE_VTABLES): Likewise.
3702         (BV_USE_VCALL_INDEX_P): Remove.
3703         (build_vtable_path): Remove.
3704         * decl2.c (finish_vtable_vardecl): Remove.
3705         (key_method): Remove #if 0'd code.
3706         (finish_vtable_vardecl): Rename to ...
3707         (maybe_emit_vtables): ... this.
3708         (finish_file): Use it.
3709         * search.c (look_for_overrides_here): Update comment.
3710
3711 2002-11-01  Zack Weinberg  <zack@codesourcery.com>
3712
3713         PR c/7353 redux
3714         * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
3715
3716 2002-10-30  Jason Merrill  <jason@redhat.com>
3717
3718         PR c++/8186
3719         * cp-tree.h (ADDR_IS_INVISIREF): New macro.
3720         * call.c (convert_for_arg_passing): Set it.
3721         * except.c (stabilize_throw_expr): Recurse for such an arg.
3722
3723 2002-10-31  Mark Mitchell  <mark@codesourcery.com>
3724
3725         * cp-tree.h (lang_decl_flags): Remove init_priority.
3726         (lang_decl): Add delta.
3727         (GLOBAL_INIT_PRIORITY): Remove.
3728         (THUNK_DELTA): Revise definition.
3729         * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
3730         * dump.c (cp_dump_tree): Don't dump it.
3731
3732 2002-10-30  Mark Mitchell  <mark@codesourcery.com>
3733
3734         PR c++/8160
3735         * typeck2.c (process_init_constructor): Call complete_array_type.
3736
3737         PR c++/8149
3738         * decl.c (make_typename_type): Issue errors about invalid results.
3739
3740 2002-10-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3741
3742         Core issue 287, PR c++/7639
3743         * cp-tree.h (lang_type_class): Add decl_list field.
3744         (CLASSTYPE_DECL_LIST): New macro.
3745         (maybe_add_class_template_decl_list): Add declaration.
3746         * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
3747         (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
3748         (maybe_add_class_template_decl_list): New function.
3749         (add_implicitly_declared_members): Use it.
3750         * decl.c (maybe_process_template_type_declaration): Likewise.
3751         (pushtag): Likewise.
3752         * friend.c (add_friend): Likewise.
3753         (make_friend_class): Likewise.
3754         * semantics.c (finish_member_declaration): Likewise.
3755         (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
3756         * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
3757         to process members and friends in the order of declaration.
3758
3759 2002-10-29  Mark Mitchell  <mark@codesourcery.com>
3760
3761         PR c++/8287
3762         * decl.c (finish_destructor_body): Create the label to jump to
3763         when returning from a destructor here.
3764         (finish_function_body): Rather than here.
3765
3766 2002-10-25  Zack Weinberg  <zack@codesourcery.com>
3767
3768         PR c++/7266
3769         * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
3770         SCOPE_REF is not null before dereferencing it.
3771
3772 2002-10-25  Mark Mitchell  <mark@codesourcery.com>
3773
3774         * call.c (build_over_call): Use DECL_CONTEXT, not
3775         DECL_VIRTUAL_CONTEXT.
3776         * class.c (modify_vtable_entry): Don't mess with
3777         DECL_VIRTUAL_CONTEXT.
3778         (set_vindex): Remove.
3779         (set_primary_base): Remove vfuns_p parameter.
3780         (determine_primary_base): Likewise.
3781         (modify_all_vtables): Likewise.
3782         (layout_class_type): Likewise.  Adjust calls to other functions
3783         accordingly.
3784         (finish_struct_1): Adjust calls to modified functions.  Set
3785         DECL_VINDEX here.
3786         * cp-tree.h (lang_type_class): Remove vsize.
3787         (CLASSTYPE_VSIZE): Remove.
3788         (lang_decl): Remove thunks.
3789         (DECL_THUNKS): Adjust.
3790         (DECL_VIRTUAL_CONTEXT): Remove.
3791         (duplicate_decls): Don't copy it.
3792         * pt.c (build_template_decl): Don't set it.
3793         (tsubst_decl): Likewise.
3794         * typeck.c (expand_ptrmemfunc_cst): Don't use it.
3795
3796         * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
3797         (build_vtable_entry): Remove.
3798         * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
3799         (lang_decl): Add thunks.
3800         (DECL_THUNKS): New macro.
3801         * decl.c (duplicate_decls): Copy it.
3802         * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
3803         * semantics.c (emit_associated_thunks): Simplify.
3804
3805 2002-10-24  David Edelsohn  <edelsohn@gnu.org>
3806
3807         PR c++/7228
3808         * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
3809         lang_type structure exists before accessing field.
3810         (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
3811         (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
3812         (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
3813         * class.c (check_field_decls): Use new macros.
3814         * typeck2.c (process_init_constructor): Remove redundant check for
3815         existence of lang_type structure.
3816
3817 2002-10-24  Mark Mitchell  <mark@codesourcery.com>
3818
3819         * class.c (end_of_base): New method.
3820         (end_of_class): Use it.  Check indirect virtual bases.
3821
3822         * class.c (check_field_decls): Fix typo.
3823
3824 2002-10-23  Mark Mitchell  <mark@codesourcery.com>
3825
3826         PR c++/8067
3827         * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
3828         related variables.
3829
3830         PR c++/7679
3831         * spew.c (next_token): Do not return an endless stream of
3832         END_OF_SAVED_INPUT tokens.
3833         (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
3834         the cached token stream.
3835         (snarf_defarg): Likewise.
3836
3837 2002-10-23  Zack Weinberg  <zack@codesourcery.com>
3838
3839         * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
3840         variably_modified_type_p.
3841         * cp-tree.h: Remove prototype of variably_modified_type_p.
3842         * tree.c (variably_modified_type_p): Remove; now implemented
3843         in language-independent code.
3844
3845 2002-10-22  Mark Mitchell  <mark@codesourcery.com>
3846
3847         PR c++/6579
3848         * spew.c (snarf_parenthesized_expression): New function.
3849         (snarf_block): Use it.
3850
3851 2002-10-22  Richard Henderson  <rth@redhat.com>
3852
3853         * method.c (use_thunk): Always compute vcall_value; assert that
3854         it is not zero.  Use can_output_mi_thunk; use output_mi_thunk
3855         for vcall thunks as well.
3856
3857 2002-10-21  Mark Mitchell  <mark@codesourcery.com>
3858
3859         * class.c (empty_base_at_nonzero_offset_p): New function.
3860         (layout_nonempty_base_or_field): Do not check for conflicts when
3861         laying out a virtual base using the GCC 3.2 ABI.
3862         (build_base_field): Correct checking for presence of empty classes
3863         at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
3864
3865         * class.c (include_empty_classes): Use normalize_rli.
3866         (layout_class_type): Likewise.
3867
3868         * decl.c (reshape_init): Tweak handling of character arrays.
3869
3870         PR c++/8218
3871         * cp-tree.h (lang_type_class): Add contains_empty_class_p.
3872         (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
3873         * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
3874         (check_field_decls): Likewise.
3875         (layout_class_type): Likewise.
3876         (finish_struct_1): Initialize it.
3877         (walk_subobject_offsets): Use it to prune searches.
3878
3879 2002-10-20  Mark Mitchell  <mark@codesourcery.com>
3880
3881         * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
3882         * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
3883         TARGET_ASM_OUTPUT_MI_THUNK in comments.
3884
3885 2002-10-18  Zack Weinberg  <zack@codesourcery.com>
3886
3887         * decl.c (start_decl): Point users of the old initialized-
3888         typedef extension at __typeof__.
3889
3890 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
3891
3892         * Make-lang.in (method.o): Depend on TARGET_H.
3893         * method.c (target.h): Include it.
3894         (use_thunk): Use target hooks.  Use vcall thunks, if available.
3895
3896 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
3897
3898         * class.c (base_derived_from): Make sure return value is a bool.
3899
3900 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
3901
3902         * class.c (find_final_overrider_data_s): Remove overriding_fn and
3903         overriding_base.
3904         (dfs_base_derived_from): New function.
3905         (base_derived_from): Likewise.
3906         (dfs_find_final_overrider): Use base_derived_from.
3907         (find_final_overrider): Adjust.
3908
3909 2002-10-18  Jason Merrill  <jason@redhat.com>
3910
3911         PR c++/8080
3912         * semantics.c (finish_for_cond, finish_while_cond): Don't mess
3913         with condition decls in a template.
3914
3915 2002-10-17  Nathan Sidwell  <nathan@codesourcery.com>
3916
3917         * class.c (add_method): Compare template parms too.
3918
3919 2002-10-17  Mark Mitchell  <mark@codesourcery.com>
3920
3921         PR c++/7584
3922         * class.c (handle_using_decl): Allow the declaration used to be
3923         from an ambiguous base.
3924
3925         * pt.c (convert_template_argument): Revert this change:
3926                 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
3927                 * pt.c (convert_template_argument): Do not fold non-type
3928                 template rguments when inside a template.
3929
3930         * init.c (expand_default_init): Handle brace-enclosed initializers
3931         correctly.
3932
3933 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
3934
3935         * mangle.c (write_expression): Correct handling of enumeration
3936         constants.
3937         (write_template_arg): Likewise.
3938         * pt.c (convert_template_argument): Do not fold non-type template
3939         arguments when inside a template.
3940
3941         PR c++/7478
3942         * cvt.c (convert_to_reference): Allow references as the incoming
3943         type.
3944
3945 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
3946
3947         PR c++/7524
3948         * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
3949         build_qualified_type.
3950
3951 2002-10-15  Richard Henderson  <rth@redhat.com>
3952
3953         * error.c (dump_expr): Use real_to_decimal directly, and with
3954         the new arguments.
3955
3956 2002-10-15  Mark Mitchell  <mark@codesourcery.com>
3957
3958         * decl.c (reshape_init): Fix typo.
3959
3960         * cp-tree.h (operator_name_info_t): Add arity.
3961         * lex.c (init_operators): Initialize it.
3962         * mangle.c (write_conversion_operator_name): New function.
3963         (write_unqualified_name): Use it.
3964         (write_template_args): Accept template arguments as a TREE_LIST.
3965         (write_expression): Adjust handling of qualified names to match
3966         specification.
3967
3968 2002-10-15  Jason Merrill  <jason@redhat.com>
3969
3970         * call.c (call_builtin_trap): New fn.
3971         (convert_arg_to_ellipsis): Use it.  Downgrade error to warning.
3972         (build_call): Don't set current_function_returns_abnormally outside
3973         a function.
3974
3975 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
3976
3977         * class.c (check_field_decls): Remove empty_p parameter.  Instead,
3978         clear CLASSTYPE_EMPTY_P.
3979         (build_base_field): Likewise.
3980         (build_base_fields): Likewise.
3981         (check_bases_and_members): Likewise.
3982         (create_vtbl_ptr): Likewise.
3983         (layout_class_type): Likewise.  Ensure that empty classes have
3984         size zero when used as base classes in the 3.2 ABI.
3985         (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
3986         CLASSTYPE_NEARLY_EMPTY_P.  Adjust calls to avoid passing empty_p
3987         parameter.
3988         (is_empty_class): Correct definition when using post-3.2 ABI.
3989         * cp-tree.h (lang_type_class): Add empty_p.
3990         (CLASSTYPE_EMPTY_P): New macro.
3991
3992 2002-10-12  Nathan Sidwell  <nathan@codesourcery.com>
3993
3994         * init.c (build_delete): Do not apply save_expr for arrays.
3995         (build_vec_delete): Likewise.
3996
3997 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
3998
3999         * decl.c (layout_var_decl): Call layout_decl even for variables
4000         whose type is an array with unspecified bounds.
4001
4002         PR c++/7176
4003         * lex.c (do_identifier): Add another option for the parsing
4004         parameter.
4005         * parse.y (do_id): Use it.
4006
4007 2002-10-11  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4008
4009         PRs C++/6803, C++/7721 and C++/7803
4010         * decl.c (grokdeclarator): Gracefully handle template-name as
4011         decl-specifier.
4012
4013 2002-10-11  Jason Molenda  <jmolenda@apple.com>
4014
4015         * init.c (build_field_list): Provide uses_unions_p with a default
4016         value.
4017
4018 2002-10-11  Mark Mitchell  <mark@codesourcery.com>
4019
4020         PR c++/5661
4021         * cp-tree.h (variably_modified_type_p): New function.
4022         (grokdeclarator) Tighten check for variably modified types as
4023         fields.
4024         * pt.c (convert_template_argument): Do not allow variably modified
4025         types as template arguments.
4026         * tree.c (variably_modified_type_p): New function.
4027
4028         * NEWS: Document removal of "new X = ..." extension.
4029         * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
4030         brace-enclosed initializers.
4031         * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
4032         (initialize_local_var): Remove declaration.
4033         (expand_static_init): Likewise.
4034         * decl.c (next_initializable_field): New function.
4035         (reshape_init): Likewise.
4036         (check_initializer): Use them.  Build dynamic initializer for
4037         aggregates here too.
4038         (initialize_local_var): Simplify, and incorporate cleanup
4039         insertion code as well.
4040         (destroy_local_var): Remove.
4041         (cp_finish_decl): Tidy.
4042         (expand_static_init): Fold checks for whether or not a variable
4043         needs initialization into this function.  Simplify.
4044         * decl2.c (do_static_initialization): Simplify.
4045         * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
4046         be done for us automatically.
4047         (expand_default_init): Handle brace-enclosed initializers
4048         correctly.
4049         (expand_aggr_init_1): Remove RTL-generation code.
4050         (build_vec_init): Remove "new X = ..." support.
4051         * parse.y (new_initializer): Likewise.
4052         * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
4053         brace-enclosed initializer.
4054         (create_pseudo_type_info): Likewise.
4055         * typeck2.c (store_init_value): Don't try to handle digest_init
4056         being called more than once.
4057         (digest_init): Tidy handling of brace-enclosed initializers.
4058
4059 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4060
4061         * decl.c (typename_hash): Use htab_hash_pointer.
4062
4063 2002-10-10  Jim Wilson  <wilson@redhat.com>
4064
4065         * decl.c (duplicate_decls): Don't call decl_attributes.
4066
4067 2002-10-09  Zack Weinberg  <zack@codesourcery.com>
4068
4069         PR c/7353
4070         * decl.c (start_decl): Unconditionally issue error for
4071         'typedef foo = bar'.
4072         (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
4073         (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
4074
4075 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4076
4077         * decl2.c (prune_vtable_vardecl): Delete unused function.
4078
4079 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
4080
4081         PR c++/7754
4082         * decl2.c (finish_anon_union): Do not expand anonymous unions when
4083         procesing template functions.
4084         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
4085         type. Call layout_decl.
4086         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
4087
4088 2002-10-07  Richard Henderson  <rth@redhat.com>
4089
4090         * decl2.c, pt.c: Revert c++/7754 fix.
4091
4092 2002-10-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4093
4094         PR c++/7804
4095         * error.c (dump_expr) [REAL_CST]: Output in decimal format.
4096
4097 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
4098
4099         PR c++/7931
4100         * pt.c (for_each_template_parm_r): Handle BASELINKs.
4101
4102         PR c++/7754
4103         * decl2.c (finish_anon_union): Do not expand anonymous unions when
4104         procesing template functions.
4105         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
4106         type. Call layout_decl.
4107         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
4108
4109 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
4110
4111         PR c++/8006
4112         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
4113         template parameters.
4114         (globals): Add entity and need_abi_warning.
4115         (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
4116         CLASSTYPE_TEMPLATE_INFO.
4117         (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
4118         TYPE_TI_TEMPLATE.
4119         (write_prefix): Handle typename types correctly.
4120         (write_template_prefix): Handle template template parameters
4121         correctly.
4122         (start_mangling): Add entity parameter.
4123         (finish_mangling): Warn about names whose mangling will change.
4124         (mangle_decl_string): Adjust.
4125         (mangle_type_string): Likewise.
4126         (mangle_special_for_type): Likewise.
4127         (mangle_ctor_vtbl_for_type): Likewise.
4128         (mangle_thunk): Likewise.
4129         (mangle_guard_variable): Likewise.
4130         (mangle_ref_init_variable): Likewise.
4131
4132 2002-10-02  Mark Mitchell  <mark@codesourcery.com>
4133
4134         PR c++/7188.
4135         * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
4136         * cp-tree.h (emit_base_init): Rename to ....
4137         (emit_mem_initializers): ... this.
4138         (expand_member_init): Change prototype.
4139         * init.c (perform_member_init): Compute explicit, rather than
4140         requiring it as a parameter.
4141         (sort_member_init): Rename to ...
4142         (sort_mem_initializers): ... this.  Process bases and data members
4143         together.
4144         (sort_base_init): Remove.
4145         (emit_base_init): Rename to ...
4146         (emit_mem_initializers): ... this.
4147         (expand_aggr_vbase_init_1): Remove.
4148         (construct_virtual_bases): Rename to ...
4149         (construct_virtual_base): ... this.
4150         (expand_member_init): Rework handling of base initializers.
4151         * method.c (do_build_copy_constructor): Use
4152         finish_mem_initializers.
4153         * parse.y (member_init): Adjust calls to expand_member_init.
4154         * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
4155         (tsubst_initializer_list): Use expand_member_init.
4156         * semantics.c (finish_mem_intiailizers): Simplify.
4157
4158 2002-10-02  Matt Austern  <austern@apple.com>
4159         * decl.c (walk_vtables_r): Fixed typo that caused result to
4160         never get a nonzero value.
4161
4162 2002-10-02  Roger Sayle  <roger@eyesopen.com>
4163
4164         PR optimization/6627
4165         * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
4166         from here, and move it to tree.h.
4167         * decl.c (cxx_init_decl_processing): If storing the vbit
4168         in function pointers, ensure that force_align_functions_log
4169         is atleast one.
4170
4171 2002-10-02  Matt Austern  <austern@apple.com>
4172
4173         * class.c (check_field_decls): Changed warning about const member
4174         variables so that it doesn't get issued for a class aggregate.
4175
4176 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
4177
4178         * decl.c (cp_finish_decl): Make sure array types are laid out,
4179         even if the array bounds are unknown.
4180
4181 2002-10-01  Steve Ellcey  <sje@cup.hp.com>
4182
4183         * class.c (build_vtbl_initializer): Change build_c_cast
4184         to build1.
4185
4186 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
4187
4188         * decl.c (cp_finish_decl): Make sure array types are laid out,
4189         even if the array bounds are unknown.
4190
4191         * decl.c (cp_finish_decl): Correct check for dynamic
4192         initialization of thread-local storage.
4193
4194 2002-09-30  Nathan Sidwell  <nathan@codesourcery.com>
4195
4196         * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
4197         overloaded.
4198
4199 2002-09-30  Steve Ellcey  <sje@cup.hp.com>
4200
4201         * class.c (build_vtbl_initializer): Add cast.
4202         (add_vcall_offset_vtbl_entries_1):
4203         Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
4204
4205 2002-09-30  Mark Mitchell  <mark@codesourcery.com>
4206
4207         * class.c (walk_subobject_offsets): Correct the calculation of
4208         offsets for virtual bases.  Correct the counting of array
4209         elements.
4210         (layout_nonempty_base_or_field): Simplify.  Correct the
4211         calculation of offsets to be propagated through the binfo
4212         hierarchy.
4213         (build_base_field): Avoid creating a FIELD_DECL for empty bases.
4214         Add the FIELD_DECL to TYPE_FIELDS.
4215         (build_base_fields): Adjust accordingly.
4216         (layout_virtual_bases): Use build_base_field.
4217         (end_of_class): Return a tree, not an integer.
4218         (warn_about_ambiguous_direct_bases): Rename to ...
4219         (warn_about_ambiguous_bases): ... this.
4220         (include_empty_classes): New function.
4221         (layout_class_type): Create an alternative version of the type to
4222         be used when as a base class type.  Do not call
4223         finish_record_layout until we are done laying out the class.
4224         * cp-tree.h (lang_type_class): Remove size, size_unit.  Add
4225         as_base.
4226         (CLASSTYPE_SIZE): Reimplement.
4227         (CLASSTYPE_SIZE_UNIT): Likewise.
4228         (CLASSTYPE_ALIGN): Likweise.
4229         (CLASSTYPE_USER_ALIGN): Likewise.
4230         (CLASSTYPE_AS_BASE): New macro.
4231         (DECL_INITIALIZED_P): Likewise.
4232         (extract_init): Remove prototype.
4233         (build_forced_zero_init): Rename to ...
4234         (build_zero_init): ... this.
4235         (force_store_init_value): Remove.
4236         * decl.c (obscure_complex_init): Remove.
4237         (duplicate_decls): Copy DECL_INITIALIZED_P.
4238         (check_initializer): Do not leave junk in DECL_INITIAL.
4239         (cp_finish_decl): Handle zero-initialization of entities with
4240         static storage duration.
4241         * expr.c (extract_init): Remove.
4242         * init.c (build_forced_zero_init): Remove.
4243         (build_zero_init): New function.
4244         (build_default_init): Use it.
4245         (build_field_list): Skip FIELD_DECLs for base subobjects.
4246         (push_base_cleanups): Likewise.
4247         * method.c (do_build_assign_ref): Likewise.
4248         (synthesize_exception_spec): Likewise.
4249         * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
4250         (regenerate_decl_from_template): To not set DECL_INITIAL for a
4251         static data member whose initialization took place in its class.
4252         (instantiate_decl): Do not pass an initializer to cp_finish_decl
4253         in that situation.
4254         * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
4255         (dfs_unuse_fields): Likewise.
4256         * tree.c (pod_type_p): Handle error_mark_node.
4257         (zero_init_p): Likewise.
4258         * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
4259         subobjects.
4260         * typeck2.c (store_init_value): Remove #if 0'd code.
4261         (force_store_init_value): Remove.
4262         (process_init_constructor): Use build_zero_init.
4263
4264 2002-09-29  Nathan Sidwell  <nathan@codesourcery.com>
4265
4266         PR c++/7788
4267         * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
4268
4269 2002-09-29  Kazu Hirata  <kazu@cs.umass.edu>
4270
4271         * cp-tree.h: Fix comment typos.
4272         * decl.c: Likewise.
4273         * pt.c: Likewise.
4274
4275 2002-09-25  Mark Mitchell  <mark@codesourcery.com>
4276
4277         * cp/class.c (contains_empty_class_p): New method.
4278         (walk_subobject_offsets): Correct computation of field offset.
4279         (layout_empty_base): Correct placement of emtpy base classes.
4280         (layout_class_type): Warn about ABI changes.
4281
4282 2002-09-23  Mark Mitchell  <mark@codesourcery.com>
4283
4284         * cp/class.c (layout_virtual_bases): Do not round the size of the
4285         type to a multiple of the alignment before laying out virtual bases.
4286         (layout_class_type): Correct handling of bit-fields that are wider
4287         than their type inside unions.  Round the size of the type to a
4288         even number of bytes when computing the size without virtual
4289         bases.
4290         * cp/cp-tree.h (abi_version_at_least): New macro.
4291
4292 2002-09-21  Kazu Hirata  <kazu@cs.umass.edu>
4293
4294         * ChangeLog: Follow spelling conventions.
4295         * ChangeLog.2: Likewise.
4296         * call.c: Likewise.
4297         * class.c: Likewise.
4298         * cp-tree.h: Likewise.
4299         * cvt.c: Likewise.
4300         * decl.c: Likewise.
4301         * decl2.c: Likewise.
4302         * except.c: Likewise.
4303         * friend.c: Likewise.
4304         * g++spec.c: Likewise.
4305         * init.c: Likewise.
4306         * lex.c: Likewise.
4307         * mangle.c: Likewise.
4308         * method.c: Likewise.
4309         * operators.def: Likewise.
4310         * optimize.c: Likewise.
4311         * pt.c: Likewise.
4312         * rtti.c: Likewise.
4313         * search.c: Likewise.
4314         * semantics.c: Likewise.
4315         * spew.c: Likewise.
4316         * tree.c: Likewise.
4317         * typeck.c: Likewise.
4318
4319 2002-09-18  Devang Patel  <dpatel@apple.com>
4320
4321         * cp/cp-tree.h: New prototype for walk_vtabls().
4322         * cp/decl.c (walk_vtables_r): New function.
4323         (struct cp_binding_level): Add new members, namespaces,
4324         names_size and vtables.
4325         (add_decl_to_level): Add decl in namespaces or vtables
4326         chain, if conditions match.
4327         (walk_vtables): New function.
4328         (walk_namespaces_r): Travers separate namespace chain
4329         for namespace decls.
4330         (wrapup_globals_for_namespace): Use names_size instead
4331         of list_length().
4332         * cp/decl2.c (finish_file): Use walk_vtables() instead of
4333         walk_globals() to walk vtable decls.
4334
4335 2002-09-18  Nathan Sidwell  <nathan@codesourcery.com>
4336
4337         * decl.c (grokdeclarator): Use assert, not internal_error. Don't
4338         ICE with invalid pointers & references.
4339
4340 2002-09-17  Zack Weinberg  <zack@codesourcery.com>
4341
4342         * Make-lang.in: Remove all references to the demangler.
4343         * cxxfilt.c: Moved to binutils.
4344
4345 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
4346
4347         PR c++/7718
4348         * pt.c (tsubst_decl): Remove assert.
4349
4350         Remove DR 295 implementation.
4351         * pt.c (check_cv_quals_for_unify): Disable function & method cases.
4352         * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
4353         about ignoring volatile qualifiers.
4354
4355         * search.c (lookup_member): Correct documentation.
4356
4357 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
4358
4359         * cp-tree.h (union lang_tree_node): Add chain_next option.
4360
4361 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
4362
4363         * parse.y (parse_finish_call_expr): Check lookup_member result.
4364
4365         PR c++/7015
4366         * semantic.c (finish_asm_stmt): Fix operand/output_operands
4367         thinko.
4368         * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
4369
4370 2002-09-15  Nathan Sidwell  <nathan@codesourcery.com>
4371
4372         PR c++/7919
4373         * call.c (build_over_call): Convert this pointer for fns found by
4374         using decls.
4375
4376 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
4377
4378         * ChangeLog: Follow spelling conventions.
4379         * ChangeLog.1: Likewise.
4380
4381 2002-09-14  Nathan Sidwell  <nathan@codesourcery.com>
4382
4383         PR c++/7768
4384         * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
4385
4386 2002-09-14  Kazu Hirata  <kazu@cs.umass.edu>
4387
4388         * error.c: Fix comment formatting.
4389         * except.c: Likewise.
4390         * expr.c: Likewise.
4391         * friend.c: Likewise.
4392         * g++spec.c: Likewise.
4393         * init.c: Likewise.
4394         * lex.c: Likewise.
4395         * mangle.c: Likewise.
4396         * method.c: Likewise.
4397         * optimize.c: Likewise.
4398         * pt.c: Likewise.
4399         * rtti.c: Likewise.
4400         * search.c: Likewise.
4401         * semantics.c: Likewise.
4402         * spew.c: Likewise.
4403         * tree.c: Likewise.
4404         * typeck.c: Likewise.
4405         * typeck2.c: Likewise.
4406
4407 2002-09-13  Matt Austern  <austern@apple.com>
4408
4409         PR C++/7828
4410         * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
4411         * cp/call.c: Change call-by-const-reference mechanism to use
4412         non_cast_lvalue_p when deciding whether the create a temporary.
4413         We need a temporary when passing, e.g. (long) x by const ref.
4414
4415 2002-09-13  Nathan Sidwell  <nathan@codesourcery.com>
4416
4417         * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
4418
4419 2002-09-13  Kazu Hirata  <kazu@cs.umass.edu>
4420
4421         * decl.c: Fix comment formatting.
4422         * decl2.c: Likewise.
4423
4424 2002-09-12  Kazu Hirata  <kazu@cs.umass.edu>
4425
4426         * call.c: Fix comment formatting.
4427         * class.c: Likewise.
4428         * cp-lang.c: Likewise.
4429         * cp-tree.h: Likewise.
4430         * cvt.c: Likewise.
4431
4432 2002-09-11  Zack Weinberg  <zack@codesourcery.com>
4433
4434         * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
4435         and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
4436         * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
4437         minor adjustments (use version_string, eliminate yet another
4438         duplicate of xmalloc)
4439
4440 2002-09-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4441
4442         * cp-tree.h (require_complete_eh_spec_types): Add prototype.
4443
4444 2002-09-05  Jason Merrill  <jason@redhat.com>
4445
4446         * typeck2.c (add_exception_specifier): Only pedwarn for an
4447         incomplete type.
4448         (require_complete_eh_spec_types): New fn.
4449         (cxx_incomplete_type_diagnostic): Also support pedwarning.
4450         * typeck.c (complete_type_or_diagnostic): Likewise.
4451         * call.c (build_call): Call require_complete_eh_spec_types.
4452         * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
4453         on an incomplete type.
4454
4455 2002-09-04  Jakub Jelinek  <jakub@redhat.com>
4456
4457         * decl.c (start_cleanup_fn): Clear interface_only before
4458         start_function, restore it afterwards.
4459
4460 2002-09-02  Nathan Sidwell  <nathan@codesourcery.com>
4461
4462         * cp-tree.h (finish_builtin_type): Remove.
4463         * decl2.c (finish_builtin_type): Move to common code.
4464         * decl.c (build_ptrmemfunc_type): Adjust.
4465         * rtti.c (create_pseudo_type_info): Adjust.
4466         (create_tinfo_types): Adjust.
4467
4468 2002-08-31  Jason Merrill  <jason@redhat.com>
4469
4470         * cp-lang.c (cp_expr_size): Allow initialization from a
4471         CONSTRUCTOR.
4472
4473 2002-08-30  Richard Henderson  <rth@redhat.com>
4474
4475         PR opt/7515
4476         * tree.c: Include target.h.
4477         (cp_cannot_inline_tree_fn): Don't auto-inline functions that
4478         don't bind locally.
4479         * Makefile.in (tree.o): Update.
4480
4481 2002-08-27  Mark Mitchell  <mark@codesourcery.com>
4482
4483         * class.c (layout_virtual_bases): Warn about bugs in G++ that
4484         result in incorrect object layouts.
4485         (layout_class_type): Likewise.
4486
4487 2002-08-24  Matt Austern  <austern@apple.com>
4488
4489         * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
4490         are allowable.
4491         (real_lvalue_p): Update caller.
4492         (lvalue_p): Ditto.
4493         (non_cast_lvalue_or_else): New.
4494         * tree.h: Declare it.
4495         * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
4496
4497 2002-08-22  Mark Mitchell  <mark@codesourcery.com>
4498
4499         * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
4500         and COND_EXPR specially; fix error message output.
4501
4502 2002-08-22  Jason Merrill  <jason@redhat.com>
4503
4504         * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
4505         * semantics.c (nullify_returns_r): Likewise.
4506
4507 2002-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4508
4509         Fix PR/7621
4510         * typeck.c (finish_class_member_access_expr): Diagnose cases where
4511         name lookup finds nothing.
4512
4513 2002-08-15  Jason Merrill  <jason@redhat.com>
4514
4515         * semantics.c (finish_then_clause): Remove redundant assignment.
4516         (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
4517         extra binding level outside the if/switch statement.
4518         (finish_while_cond, finish_for_cond): Rewrite complex condition
4519         into the loop body.
4520
4521 2002-08-15  Alexandre Oliva  <aoliva@redhat.com>
4522
4523         * parse.y (sizeof, alignof, typeof): New non-terminals to
4524         increment skip_evaluation.  Replace terminals with them and
4525         decrement skip_evaluation at the end of rules using them.
4526         * decl2.c (mark_used): Don't assemble_external if
4527         skipping evaluation.
4528
4529 2002-08-15  Gabriel Dos Reis  <gdr@nerim.net>
4530
4531         Fix PR/7504
4532         * parse.y (parse_finish_call_expr): Handle incomplete
4533         type used to name a scope.
4534
4535 2002-08-15  Nathan Sidwell  <nathan@codesourcery.com>
4536
4537         PR c++/7598
4538         * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
4539         regression caused by my 2002-08-08 patch.
4540
4541 2002-08-13  Mark Mitchell  <mark@codesourcery.com>
4542
4543         * decl.c (pushdecl_class_level): Honor requests to bind names to
4544         OVERLOADs.
4545
4546 2002-08-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4547
4548         * decl2.c (build_call_from_tree): Fix uninitialized variable.
4549         * parse.y (parse_finish_call_expr): Likewise.
4550         * repo.c (old_args, old_dir, old_main): Const-ify.
4551
4552 2002-08-11  Gabriel Dos Reis  <gdr@nerim.net>
4553
4554         * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
4555         DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
4556         * optimize.c (maybe_clone_body): Likewise.
4557         * pt.c (tsubst_enum): Likewise.
4558         (lookup_template_class): Likewise.
4559         * tree.c (cp_copy_res_decl_for_inlining): Likewise.
4560
4561 2002-08-10  Neil Booth  <neil@daikokuya.co.uk>
4562
4563         * lang-specs.h: Remove -ansi.
4564
4565 2002-08-10  Nathan Sidwell  <nathan@codesourcery.com>
4566
4567         * tree.c (maybe_dummy_object): Replace // with /* */
4568
4569 2002-08-09  Mark Mitchell  <mark@codesourcery.com>
4570
4571         * call.c (standard_conversion): Use build_ptrmem_type.
4572         * cp-tree.h (build_ptrmem_type): New function.
4573         (adjust_result_of_qualified_name_lookup): Likewise.
4574         * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
4575         static data members.
4576         (build_ptrmem_type): New function.
4577         (grokdeclarator): Do not use build_offset_type when encountering a
4578         qualified name.
4579         * parse.y (parse_finish_call_expr): Use
4580         adjust_result_of_qualified_name_lookup.
4581         * search.c (adjust_result_of_qualified_name_lookup): New function.
4582         * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
4583         accessing OFFSET_TYPEs directly.
4584
4585 2002-08-08  Mike Stump  <mrs@apple.com>
4586
4587         * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
4588         (type_decays_to): Likewise.
4589         * class.c (find_final_overrider): Likewise.
4590         (maybe_note_name_used_in_class): Likewise.
4591         * decl.c (current_tmpl_spec_kind): Likewise.
4592         (add_binding): Likewise.
4593         (push_class_binding): Likewise.
4594         (duplicate_decls): Likewise.
4595         (layout_var_decl): Likewise.
4596         (grokfndecl): Likewise.
4597         (grokdeclarator): Likewise.
4598         (check_default_argument): Likewise.
4599         * decl2.c (handle_class_head): Likewise.
4600         * error.c (dump_template_decl): Likewise.
4601         * init.c (build_offset_ref): Likewise.
4602         * pt.c (check_specialization_scope): Likewise.
4603         (determine_specialization): Likewise.
4604         (check_explicit_specialization): Likewise.
4605         (maybe_check_template_type): Likewise.
4606         (process_partial_specialization): Likewise.
4607         (check_default_tmpl_args): Likewise.
4608         (push_template_decl_real): Likewise.
4609         (convert_template_argument): Likewise.
4610         (try_class_unification): Likewise.
4611         (get_bindings_real): Likewise.
4612         (do_decl_instantiation): Likewise.
4613         * semantics.c (begin_function_definition): Likewise.
4614         (finish_member_declaration): Likewise.
4615         (check_multiple_declarators): Likewise.
4616         * typeck.c (comp_array_types): Likewise.
4617         (comptypes): Likewise.
4618         (expr_sizeof): Likewise.
4619         (build_binary_op): Likewise.
4620         (dubious_conversion_warnings): Likewise.
4621         (check_return_expr): Likewise.
4622
4623 2002-08-08  Mark Mitchell  <mark@codesourcery.com>
4624
4625         * typeck.c (build_class_member_access_expr): Do not return
4626         error_mark_node when no error has occurred.
4627
4628 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
4629
4630         * typeck.c (build_component_addr): Remove.
4631         (build_unary_op): Just check it's not a bitfield, and then build
4632         an ADDR_EXPR.
4633
4634 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
4635
4636         * class.c (convert_to_base): Correct check for error_mark_node.
4637         (create_vtable_ptr): Remove unused VFUNS_P parm.
4638
4639 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
4640
4641         * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
4642
4643 2002-08-07  Mark Mitchell  <mark@codesourcery.com>
4644
4645         Rework build_component_ref.
4646         * call.c (build_vfield_ref): Do not go through build_component_ref.
4647         (build_field_call): Use build_class_member_access_expr.
4648         (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
4649         (build_object_call): Likewise.
4650         * class.c (convert_to_base): New function.
4651         (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
4652         (instantiate_type): Handle BASELINKs.
4653         * cp-tree.def (BASELINK): New tree code.
4654         * cp-tree.h (BASELINK_P): Reimplement.
4655         (SET_BASELINK_P): Remove.
4656         (BASELINK_BINFO): Reimplement.
4657         (BASELINK_FUNCTIONS): Likewise.
4658         (BASELINK_ACCESS_BINFO): Likewise.
4659         (BASELINK_OPTYPE): Likewise.
4660         (convert_to_base): New function.
4661         (name_p): Likewise.
4662         (build_object_ref): Remove.
4663         (build_component_ref_1): Likewise.
4664         (build_component_ref): Likewise.
4665         (build_x_component_ref): Likewise.
4666         (build_class_member_access_expr): New function.
4667         (finish_class_member_access_expr): Likewise.
4668         (build_ptrmemfunc_access_expr): Likewise.
4669         * decl.c (grokdeclarator): Handle BASELINKs.
4670         * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
4671         finish_class_member_access_expr.
4672         (arg_assoc): Handle BASELINKs.
4673         (do_class_using_decl): Likewise.
4674         * error.c (dump_decl): Likewise.
4675         (dump_expr): Use build_ptrmemfunc_access_expr.
4676         * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
4677         destructors.
4678         (build_throw): Use BASELINK_FUNCTIONS.
4679         * init.c (perform_member_init): Use
4680         build_class_member_access_expr.
4681         (build_offset_ref): Handle BASELINKs.  Use
4682         build_class_member_access_expr.
4683         * method.c (hack_identifier): Likewise.
4684         * parse.y (do_id): Use BASELINK, not TREE_LIST.
4685         (primary): Remove uses of build_object_ref.
4686         * pt.c (lookup_template_function): Handle BASELINKs.
4687         (resolve_overloaded_unification): Likewise.
4688         * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
4689         (lookup_field): Use BASELINK, not TREE_LIST.
4690         (lookup_fnfiels): Likewise.
4691         (setup_class_bindings): Likewise.
4692         * semantics.c (finish_object_call_expr): Do not use
4693         build_method_call when we already know what function is being
4694         called.
4695         * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
4696         * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
4697         TREE_CHAIN.
4698         (name_p): New function.
4699         * typeck.c (build_object_ref): Remove.
4700         (build_component_ref_1): Likewise.
4701         (build_x_component_ref): Likewise.
4702         (build_class_member_access_expr): New function.
4703         (finish_class_member_access_expr): Likewise.
4704         (build_ptrmemfunc_access_expr): Likewise.
4705         (get_member_function_from_ptrfunc): Use
4706         build_ptrmemfunc_access_expr.
4707         (build_binary_op): Likewise.
4708         (build_unary_op): Likewise.
4709         (build_ptrmemfunc): Likewise.
4710         (pfn_from_ptrmemfunc): Likewise.
4711         * typeck2.c (build_m_component_ref): Adjust comment.
4712
4713 2002-08-07  Neil Booth  <neil@daikokuya.co.uk>
4714
4715         * Make-lang.in (CXX_C_OBJS): Update.
4716         * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
4717         * cp-tree.h (cxx_decode_option): Remove.
4718         * decl2.c (compare_options, lang_f_options, unsupported_options,
4719         cxx_decode_option): Remove.
4720
4721 2002-08-06  Gabriel Dos Reis  <gdr@nerim.net>
4722
4723         * typeck.c (build_x_unary_op): Handle pointer-to-member.
4724
4725 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
4726
4727         * class.c: Don't include obstack.h.
4728         (popclass):
4729         * decl2.c: Delete bogus comment.
4730         * error.c: Don't include obstack.h.
4731         * except.c: Likewise.
4732         (dump_type): Correct comment.
4733         * method.c: Don't include obstack.h.
4734         * tree.c: Likewise.
4735
4736 2002-08-04  Gabriel Dos Reis  <gdr@nerim.net>
4737
4738         Fix PR/2213
4739         * cvt.c (cp_convert_to_pointer): Reject conversions from integral
4740         expressions to pointer-to-data-member of pointer-to-member-functions.
4741
4742 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
4743
4744         * cvt.c (ocp_convert): Delete obsolete code.
4745         * parse.y (permanent_obstack): Delete declaration.
4746         * pt.c (permanent_obstack): Delete declaration.
4747         * repo.c (permanent_obstack): Delete declaration.
4748         (open_repo_file): Use xmalloc instead of permanent_obstack.
4749         (init_repo): Use xstrdup instead of permanent_obstack.
4750
4751 2002-08-04  Nathan Sidwell  <nathan@codesourcery.com>
4752
4753         * cp-tree.h (VF_DERIVED_VALUE): Remove.
4754         * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
4755
4756 2002-08-03  Nathan Sidwell  <nathan@codesourcery.com>
4757
4758         PR 7470.
4759         C++ ABI change - vfunc ordering.
4760         * class.c (add_virtual_function): Remove.
4761         (dfs_modify_all_vtables): Take list of all declared
4762         virtuals. Assign all that are not in primary base.
4763         (check_for_override): Adjust comments.
4764         (create_vtable_ptr): Take single list of virtuals. Build chain
4765         of declared virtuals here.
4766         (layout_class_type): Take single list of virtuals. Adjust.
4767         (finish_struct_1): Keep virtuals on single list. Adjust.
4768
4769 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
4770
4771         * init.c (build_member_call): Use build_new_method_call, not
4772         build_method_call.
4773
4774 2002-08-02  Krister Walfridsson  <cato@df.lth.se>
4775
4776         * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
4777
4778 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
4779
4780         * call.c (build_method_call): Issue a more helpful error message
4781         about ambiguous method names.
4782
4783 2002-08-02  Nathan Sidwell  <nathan@codesourcery.com>
4784
4785         * tree.c (build_shared_int_cst): Make cache file scope, and
4786         GTY it.
4787
4788 2002-08-02  Jason Merrill  <jason@redhat.com>
4789
4790         * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
4791         (cp_expr_size): New fn.
4792         * call.c (build_over_call): Lose empty class hackery.
4793         (convert_arg_to_ellipsis): Promote non-POD warning to error.
4794         * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
4795
4796         * semantics.c (expand_body): Do tree optimization in the function
4797         context, too.
4798
4799 2002-08-01  Neil Booth  <neil@daikokuya.co.uk>
4800
4801         * cp-tree.h: Move all warning and flag declarations to c-common.h.
4802         * decl.c: Move all warning and flag variables to c-common.c.
4803         * decl2.c: Move all warning and flag variables to c-common.c.
4804         * lex.c (flag_digraphs): Remove.
4805         (warn_traditional): Now in c-common.c.
4806
4807 2002-07-31  Mark Mitchell  <mark@codesourcery.com>
4808
4809         * call.c (build_field_call): Do not look up the field by name.
4810         (build_method_call): Simplify.
4811         (struct z_candidate): Add access_path and conversion_path.  Remove
4812         basetype_path.
4813         (convert_class_to_reference): Adjust use of
4814         add_function_candidate.
4815         (add_candidate): Add conversion_path argument.
4816         (add_function_candidate): Use it.
4817         (add_conv_dndidate): Likewise.
4818         (build_builtin_candidate): Likewise.
4819         (add_template_candidate_real): Add conversion_path argument.
4820         (add_template_conv_candidate): Likewise.
4821         (add_template_candidate): Likewise.
4822         (build_user_type_conversion_1): Use it.
4823         (build_new_function_call): Remove name lookup code.  Adjust use of
4824         add_template_candidate and add_function_candidate.
4825         (build_new_op): Likewise.
4826         (convert_like_real): Use build_special_member_call.
4827         (build_over_call): Use cand->conversion_path.
4828         (build_special_member_call): New method.
4829         (build_new_method_call): Remove name lookup code.
4830         * cp-tree.def (OFFSET_REF): Update documentation.
4831         (TEMPLATE_ID_EXPR): Likewise.
4832         * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
4833         (BASELINK_OPTYPE): Likewise.
4834         (build_new_method_call): Adjust prototype.
4835         (build_special_member_call): New method.
4836         (build_baselink): New method.
4837         (build_offset_ref_call_from_tree): Likewise.
4838         (build_call_from_tree): Likewise.
4839         (finish_qualified_call_expr): Remove.
4840         (finish_call_expr): Adjust prototype.
4841         (build_x_function_call): Remove.
4842         * cvt.c (ocp_convert): Use build_special_member_call.
4843         * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
4844         (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
4845         CALL_EXPR.
4846         (build_offset_ref_call_from_tree): New function.
4847         (build_call_from_tree): Likewise.
4848         * init.c (expand_cleanup): Use build_special_member_call.
4849         (expand_default_init): Likewise.
4850         (build_member_call): Use finish_call_expr.
4851         (build_new_1): Use build_special_member_call.
4852         (push_base_cleanups): Likewise.
4853         * method.c (do_build_assign_ref): Likewise.
4854         * parse.y (template_id): Do not pass a COMPONENT_REF to
4855         lookup_template_function.
4856         (primary): Use parse_finish_call_epxr, not finish_call_expr.
4857         (parse_finish_call_expr): New function.
4858         * pt.c (lookup_template_function): Add assertions.
4859         * search.c (lookup_base): Allow T to be a binfo.
4860         (build_baselink): New function.
4861         (lookup_member): Use it.
4862         * semantics.c (finish_call_expr): Do not do name lookup.
4863         (finish_object_call_expr): Remove #if 0'd code.
4864         (finish_qualified_call_expr): Remove.
4865         * typeck.c (build_x_function_call): Remove.
4866         (build_static_case): Use build_special_member_call.
4867         * typeck2.c (build_functional_cast): Likewise.
4868
4869 2002-07-30  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
4870
4871         * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
4872
4873 2002-07-30  Gabriel Dos Reis  <gdr@nerim.net>
4874
4875         * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
4876
4877 2002-07-30  Nathan Sidwell  <nathan@codesourcery.com>
4878
4879         * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
4880         documentation.
4881
4882 2002-07-29  Alan Modra  <amodra@bigpond.net.au>
4883
4884         * cp-tree.h: Comment typo fix.
4885
4886 2002-07-29  Richard Earnshaw  <rearnsha@arm.com>
4887
4888         * spew.c (space_for_token): Allocate zeroed memory for a new token
4889         chunk.
4890
4891 2002-07-27  Roger Sayle  <roger@eyesopen.com>
4892
4893         * decl.c (builtin_function_1): No need to explicitly mark
4894         BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
4895
4896 2002-07-27  Roger Sayle  <roger@eyesopen.com>
4897
4898         * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
4899
4900 2002-07-26  Jason Merrill  <jason@redhat.com>
4901
4902         * call.c (build_over_call): Likewise.
4903         (cp_convert_parm_for_inlining): New fn.
4904         (convert_for_arg_passing): New fn.
4905         (convert_default_arg, build_over_call): Use it.
4906         (type_passed_as): New fn.
4907         * pt.c (tsubst_decl): Use it.
4908         * decl2.c (cp_build_parm_decl): New fn.
4909         (build_artificial_parm): Use it.
4910         (start_static_storage_duration_function): Likewise.
4911         * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
4912         (grokparms): Don't mess with DECL_ARG_TYPE.
4913         * typeck.c (convert_arguments): Use convert_for_arg_passing.
4914         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
4915         Define.
4916         * cp-tree.h: Declare new fns.
4917
4918 2002-07-26  Neil Booth  <neil@daikokuya.co.uk>
4919
4920         * cp-tree.h (flag_operator_names): Remove.
4921         * decl2.c (flag_operator_names): Remove.
4922         (lang_f_options): Remove operator-names.
4923         * lex.c (D_OPNAME): Remove.
4924         (reswords): Remove operator names.
4925         (rid_to_yy): Remove operator names.
4926         (init_reswords): No need to handle D_OPNAME.
4927         * spew.c (read_process_identifier): There are no operator
4928         names.
4929
4930 2002-07-26  Jason Merrill  <jason@redhat.com>
4931
4932         * dump.c (cp_dump_tree): Call c_dump_tree.
4933         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
4934
4935 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
4936
4937         * error.c (print_whitespace): Remove.
4938         * g++spec.c (LIBUNWIND): Move.
4939         * mangle.c (mangled_position, write_signed_number): Remove.
4940
4941 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
4942
4943         * decl2.c (cxx_decode_option): Similarly.
4944
4945 2002-07-25  Gabriel Dos Reis  <gdr@nerim.net>
4946
4947         * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
4948         (cxx_sizeof_or_alignof_type): Take a third argument.
4949         (cxx_sizeof): Adjust definition.
4950         (cxx_alignof): Likewise.
4951         * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
4952         * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
4953         complaining.
4954         (c_sizeof_nowarn): Remove definition.
4955         (build_unary_op): Use cxx_sizeof_nowarn.
4956
4957 2002-07-24  Geoffrey Keating  <geoffk@redhat.com>
4958
4959         * tree.c (cp_build_qualified_type_real): When copying
4960         pointer-to-method types, unshare the record that holds
4961         the cached pointer-to-member-function type.
4962
4963 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
4964
4965         * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
4966
4967 2002-07-23  Gabriel Dos Reis  <gdr@nerim.net>
4968
4969         Fix PR/7363:
4970         * typeck.c (cxx_sizeof_or_alignof_type): New function.
4971         (c_sizeof): Remove definition.
4972         (expr_sizeof): Use cxx_sizeof.
4973         * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
4974         * decl.c (finish_destructor_body): Use cxx_sizeof.
4975         * semantics.c (finish_alignof): Likewise.
4976         (finish_alignof): Use cxx_alignof.
4977         * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
4978         (cxx_sizeof_or_alignof_type): Declare.
4979         (my_friendly_assert): Move to ../c-common.h.
4980
4981 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
4982
4983         * class.c, method.c, pt.c, search.c: Don't define obstack macros.
4984
4985 2002-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4986
4987         PR c++/7347, c++/7348
4988         * cp-tree.h (tsubst_flags_t): Add tf_parsing.
4989         * decl.c (make_typename_type): Use it.
4990         (make_unbound_class_template): Likewise.
4991         (lookup_name_real): Don't call type_access_control if scope is
4992         template parameter dependent.
4993         * parse.y (template_arg): Call make_unbound_class_template with
4994         tf_parsing set.
4995         (nest_name_specifier): Call make_typename_type with tf_parsing set.
4996         (typename_sub0): Likewise.
4997         (typename_sub1): Likewise.
4998         (instantiate_decl): Push class scope.
4999         * pt.c (regenerate_decl_from_template): Call pushclass and popclass
5000         for both static variable and member function template.
5001         (instantiate_decl) Call pushclass and popclass when tsubst'ing type
5002         and arguments.
5003         * search.c (type_access_control): Do type access for TEMPLATE_DECL
5004         too.
5005
5006 2002-07-20  Roger Sayle  <roger@eyesopen.com>
5007
5008         * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
5009         test by using positive_option.  Make whitespace consistent.
5010
5011 2002-07-20  Gabriel Dos Reis  <gdr@nerim.net>
5012
5013         * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
5014         members with 'locus'.  Adjust use throughout.
5015         (struct feed):  Likewise.
5016         (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
5017         Adjust use.
5018         (snarf_defarg): Use error(), not error_with_file_and_line().
5019
5020 2002-07-19  Chris Demetriou  <cgd@broadcom.com>
5021
5022         * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
5023         cpp_options is included.
5024
5025 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5026
5027         PR c++/2862, c++/2863
5028         * pt.c (determine_specialization): Compare the length of
5029         TYPE_ARG_TYPES.  Tidy.
5030
5031 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5032
5033         PR c++/3797
5034         * decl.c (duplicate_decls): Don't propagate inlining parameters from
5035         olddecl to newdecl when newdecl is a specialization of the
5036         instantiation olddecl.
5037
5038 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5039
5040         PR c++/4802, c++/5387
5041         * decl.c (make_typename_type): Use enforce_access.
5042
5043 2002-07-17  Scott Snyder <snyder@fnal.gov>
5044
5045         PR c++/7320
5046         * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
5047
5048 2002-07-12  Mark Mitchell  <mark@codesourcery.com>
5049
5050         * class.c (add_method): Correct handling of conversion operators.
5051
5052 2002-07-11  Mark Mitchell  <mark@codesourcery.com>
5053
5054         PR c++/7224
5055         * class.c (add_method): Simplify.
5056
5057 2002-07-11  Jason Merrill  <jason@redhat.com>
5058
5059         PR c++/7279
5060         * tree.c (cp_copy_res_decl_for_inlining): Also copy
5061         TREE_ADDRESSABLE.
5062
5063 2002-07-10  Graham Stott  <graham.stott@btinternet.com>
5064
5065         * pt.c (template_parm_this_level_p, push_template_decl_real):
5066         Pass depth as int pointer.
5067
5068 2002-07-11  Tim Josling  <tej@melbpc.org.au>
5069
5070         Remove front end hard coding from gengtype.c.
5071
5072         * config-lang.in (gtfiles): Add files needed for this front end.
5073
5074 2002-07-10  Mark Mitchell  <mark@codesourcery.com>
5075
5076         * cp-tree.h (unqualified_name_lookup_error): Declare it.
5077         (begin_function_definition): Adjust prototype.
5078         * lex.c (unqualified_name_lookup_error): New function, split out
5079         from ...
5080         (do_identifier): ... here.
5081         * parse.y (parse_begin_function_definition): New function.
5082         (fn.def1): Use it.
5083         * semantics.c (begin_function_definition): Accept decl-specifiers
5084         and attributes as separate parameters.
5085
5086 2002-07-10  Jason Merrill  <jason@redhat.com>
5087
5088         PR c++/6255
5089         * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
5090         modifying the old one.
5091
5092 2002-07-09  Mark Mitchell  <mark@codesourcery.com>
5093
5094         * cp-tree.h (constructor_name_p): Declare it.
5095         (check_template_template_default_arg): Likewise.
5096         * class.c (handle_using_decl): Use constructor_name_p.
5097         * decl.c (grokdeclarator): Likewise.
5098         * decl2.c (constructor_name_p): Define it.
5099         * init.c (build_member_call): Use constructor_name_p.
5100         * parse.y (template_parm): Use check_template_template_default_arg.
5101         * pt.c (check_explicit_specialization): Use constructor_name_p.
5102         * semantics.c (check_template_template_default_arg): New function.
5103
5104 2002-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5105
5106         * pt.c (can_complete_type_without_circularity): Add static to
5107         function definition.
5108
5109 2002-07-08  Mark Mitchell  <mark@codesourcery.com>
5110
5111         * cp-tree.h (have_extern_spec): Declare it
5112         * decl.c (have_extern_spec): Define it.
5113         (start_decl): Eliminate use of used_extern_spec.
5114         (start_function): Likewise.
5115         * parse.y (have_extern_spec): Remove declaration.
5116         (used_extern_spec): Likewise.
5117         (frob_specs): Eliminate use of used_extern_spec.
5118         (.hush_warning): Likewise.
5119
5120 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
5121
5122         * Make-lang.in (cp/parse.o): Depend on decl.h.
5123         * cp-tree.h (do_decl_instantiation): Change prototype.
5124         * parse.y: Include decl.h.
5125         (parse_decl_instantiation): New function.
5126         (explicit_instantiation): Use it.
5127         * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
5128         and DECLSPECS.
5129
5130 2002-07-07  Roger Sayle  <roger@eyesopen.com>
5131
5132         * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
5133         constructor and destructor tests when passed a TEMPLATE_DECL.
5134
5135 2002-07-05  Jason Merrill  <jason@redhat.com>
5136
5137         * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
5138         pointers.
5139
5140         PR optimization/7145
5141         * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
5142
5143 2002-07-05  Nathan Sidwell  <nathan@codesourcery.com>
5144
5145         Repair damage on weak-impared targets caused by my previous patch.
5146         * cp-tree.h (import_export_tinfo): Add parameter.
5147         * decl2.c (import_export_tinfo): Add parameter, post adjust
5148         DECL_COMDAT.
5149         * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
5150         import_export_tinfo.
5151
5152 2002-07-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5153
5154         PR c++/6944
5155         * init.c (build_aggr_init): Remove qualifiers of init before calling
5156         build_vec_init.
5157         (build_vec_init): Flatten multi-dimensional array during cleanup.
5158         (build_vec_delete_1): Abort if the type of each element is array.
5159
5160 2002-07-03  Graham Stott  <graham.stott@btinternet.com>
5161
5162         * pt.c (instantiate_class_template): Fix typo.
5163
5164 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5165
5166         * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
5167         by CVS conflict in my last patch.
5168
5169 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5170
5171         PR c++/6716
5172         * pt.c (can_complete_type_without_circularity): New function.
5173         (instantiate_class_template): Use it.
5174         * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
5175         message due to incomplete fields.
5176
5177 2002-07-01  Mark Mitchell  <mark@codesourcery.com>
5178
5179         PR c++/7112
5180         * mangle.c (write_expression): Add mangling for sizeof when
5181         applied to a type.
5182         * operators.def: Remove stale comment.
5183
5184 2002-06-30  Nathan Sidwell  <nathan@codesourcery.com>
5185
5186         * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
5187         (CPTI_TYPE_INFO_PTR_TYPE): ... this.
5188         (tinfo_decl_type): Replace with ...
5189         (type_info_ptr_type): ... this.
5190         (import_export_tinfo): Declare.
5191         (tinfo_decl_p): Rename to ...
5192         (unemitted_tinfo_decl_p): ... this.
5193         * decl2.c (import_export_decl): Break out tinfo handling into ...
5194         (import_export_tinfo): ... here. New function.
5195         (finish_file): Adjust.
5196         * rtti.c (TINFO_REAL_NAME): New macro.
5197         (init_rtti_processing): Create the tinfo types.
5198         (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
5199         (get_tinfo_decl): Adjust.
5200         (get_tinfo_ptr): New function.
5201         (get_type_id): Use it.
5202         (tinfo_base_init): Create vtable decl here, if it doesn't exist.
5203         (ptr_initializer): Use get_tinfo_ptr.
5204         (ptm_initializer): Likewise.
5205         (synthesize_tinfo_var): Break into ...
5206         (get_pseudo_ti_init): ... this. Just create the initializer.
5207         (get_pseudo_ti_desc): .. and this.
5208         (create_real_tinfo_var): Remove.
5209         (create_pseudo_type_info): Don't create the vtable decl here.
5210         (get_vmi_pseudo_type_info): Remove.
5211         (create_tinfo_types): Adjust.
5212         (tinfo_decl_p): Rename to ...
5213         (unemitted_tinfo_decl_p): ... here. Adjust.
5214         (emit_tinfo_decl): Adjust. Create the initializer.
5215
5216 2002-06-27  Mark Mitchell  <mark@codesourcery.com>
5217
5218         PR c++/6695
5219         * pt.c (tsubst_friend_class): Substitute into the context of the
5220         friend before using it.
5221
5222 2002-06-26  Mark Mitchell  <mark@codesourcery.com>
5223
5224         * cp-tree.h (xref_tag): Change prototype.
5225         (handle_class_head): Likewise.
5226         (build_x_component_ref): Likewise.
5227         * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
5228         (xref_tag): Take attributes as a separate parameter.
5229         (xref_tag_from_type): Adjust call to xref_tag.
5230         * decl2.c (build_expr_from_tree): Adjust call to
5231         build_x_component_ref.
5232         (handle_class_head): Take attributes as a separate parameter.
5233         * parse.y (parse_xref_tag): New function.
5234         (parse_handle_class_head): Likewise.
5235         (primary): Use parse_xref_tag.
5236         (class_head_decl): Use parse_handle_class_head.
5237         (class_head_defn): Likewise.
5238         * rtti.c (init_rtti_processing): Adjust call to xref_tag.
5239         (build_dynamic_cast_1): Likewise.
5240         (create_pseudo_type_info): Likewise.
5241         (emit_support_tinfos): Likewise.
5242         * typeck.c (build_object_ref): Adjust call to
5243         build_x_component_ref.
5244         (build_x_component_ref): Remove protect parameter.
5245
5246 2002-06-25  Mark Mitchell  <mark@codesourcery.com>
5247
5248         * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
5249         * class.c (handle_using_decl): Likewise.
5250         (instantiate_type): Likewise.
5251         * cp-tree.h (BASELINK_FUNCTIONS): New macro.
5252         (xref_basetypes): Change prototype.
5253         (begin_mem_initializers): New function.
5254         (get_overloaded_fn): Likewise.
5255         * decl.c (xref_basetypes): Simplify.
5256         * error.c (dump_expr): Use BASELINK_FUNCTIONS.
5257         * init.c (build_offset_ref): Likewise.
5258         * parse.y (base_init): Use begin_mem_initializers().
5259         (structsp): Adjust call to xref_basetypes.
5260         * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
5261         (instantiate_class_template): Adjust call to xref_basetypes.
5262         * semantics.c (begin_mem_initializers): New function.
5263         * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
5264         (really_overlaoded_fn): Likewise.
5265         (get_overloaded_fn): New function.'
5266         (get_first_fn): USe BASELINK_FUNCTIONS.
5267
5268 2002-06-24  Mark Mitchell  <mark@codesourcery.com>
5269
5270         * cp-tree.h (SCALAR_TYPE_P): New macro.
5271         (check_for_out_of_scope_variable): New function.
5272         (at_class_scope_p): Likewise.
5273         (finish_fname): Likewise.
5274         * class.c (finish_struct): Use at_function_scope_p.
5275         * decl.c (check_for_out_of_scope_variable): New function, split
5276         out from do_identifier.
5277         (finish_enum): Use at_function_scope_p.
5278         * lex.c (do_identifier): Use check_for_out_of_scope_variable.
5279         * parse.y (VAR_FUNC_NAME): Give it <ttype>.  Use finish_fname.
5280         (primary): Use at_function_scope_p.
5281         * search.c (at_class_scope_p): New function.
5282         * semantics.c (finish_fname): Likewise.
5283         (check_multiple_declarators): Use at_function_scope_p.
5284
5285 2002-06-23  Mark Mitchell  <mark@codesourcery.com>
5286
5287         * parse.y (parse_scoped_id): New function.
5288         (primary): Use it.
5289         * cp-tree.h (do_scoped_id): Adjust declaration.
5290         * lex.c (do_scoped_id): Remove call to yylex.
5291         * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
5292         * typeck2.c (add_exception_specifier): Use tree_cons, rather than
5293         expanding it inline.
5294
5295 2002-06-23  Matt Thomas  <matt@3am-software.com>
5296
5297         * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
5298         "#if VMS_TARGET".
5299
5300 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5301
5302         * mangle.c (integer_type_codes): Const-ify.
5303
5304 2002-06-20  Richard Henderson  <rth@redhat.com>
5305
5306         PR c++/6747
5307         * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
5308         Call put_var_into_stack.
5309
5310 2002-06-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5311
5312         * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
5313         array size calculation.
5314
5315 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5316
5317         PR c++/6892
5318         * pt.c (tsubst_expr): Handle FILE_STMT.
5319
5320 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5321
5322         PR c++/6723
5323         * pt.c (lookup_template_class): Don't build complete argument of
5324         BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
5325         argument.
5326
5327 2002-06-19  Akim Demaille  <akim@epita.fr>
5328
5329         * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
5330         decl.h's TYPENAME.
5331         * spew.c, lex.c: Adjust.
5332         * parse.y (explicit_instantiation): Add empty action to override
5333         the default $$ = $1 where it introduces a type clash.
5334
5335 2002-06-14  Jason Merrill  <jason@redhat.com>
5336
5337         * semantics.c (begin_for_stmt): Push the 'for' scope before
5338         adding the FOR_STMT.
5339
5340         C++ ABI changes.
5341         * class.c (build_base_field): Set DECL_PACKED.
5342         (layout_class_type): Don't use tail padding of PODs.
5343         * mangle.c (write_unqualified_name): Fix template conversion op
5344         mangling.
5345
5346 2002-06-16  Richard Henderson  <rth@redhat.com>
5347
5348         PR opt/6793
5349         * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
5350         after template instantiation.
5351
5352 2002-06-16  Richard Henderson  <rth@redhat.com>
5353
5354         * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
5355
5356 2002-06-15  Gabriel Dos Reis  <gdr@codesourcery.com>
5357
5358         * cp-tree.h (compiler_error): Remove declaration.
5359         * lex.c (compiler_error): Remove definition.
5360
5361 2002-06-14  Steve Ellcey  <sje@cup.hp.com>
5362
5363         * g++spec.c (LIBUNWIND): New.
5364         (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
5365
5366 2002-06-13  Jessica Han  <jessica@cup.hp.com>
5367
5368         * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
5369         (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
5370         (build_vbase_offset_vtbl_entries): Likewise.
5371         * rtti.c (build_headof): Likewise.
5372         (get_tinfo_decl_dynamic): Likewise.
5373         (create_pseudo_type_info): Likewise.
5374
5375 2002-06-12  Stan Shebs  <shebs@apple.com>
5376
5377         * mpw-config.in: Remove file, no longer used.
5378         * mpw-make.sed: Ditto.
5379
5380 2002-06-07  Zack Weinberg  <zack@codesourcery.com>
5381
5382         * decl2.c: Update call to cpp_handle_option.
5383
5384 2002-06-07  H.J. Lu  (hjl@gnu.org)
5385
5386         * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
5387
5388 2002-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
5389
5390         * error.c (cp_error_at): Fix typo.
5391
5392 2002-06-04  Gabriel Dos Reis  <gdr@codesourcery.com>
5393
5394         * error.c (cp_diagnostic_starter): Adjust call.
5395         (maybe_print_instantiation_context): Change prototype to take a
5396         'diagnostic_info *'.
5397         (print_instantiation_full_context): Likewise.
5398         (print_instantiation_partial_context): Likewise.
5399         (cp_diagnostic_starter): Likewise.
5400         (cp_diagnostic_finalizer): Likewise.
5401         (cp_print_error_function): Likewise.
5402         (cp_printer): Take a secondary parameter as a 'text_info *'.
5403         Remove output_state savings.  Adjust calls.
5404
5405 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
5406
5407         * pt.c (inline_parm_levels): Mark for GC.
5408
5409         * mangle.c (start_mangling): Allocate G.substitutions here...
5410         (init_mangle): ... rather than here.
5411         (finish_mangling): Clear the varray pointer when done with it.
5412         * spew.c (yylexstring): Don't use VARRAY_FREE.
5413         * search.c (bfs_walk): Don't use VARRAY_FREE.
5414         * decl2.c (pending_statics): Use gengtype to mark.
5415         (deferred_fns): Likewise.
5416         (ssdf_decls): Likewise.
5417         (init_decl2): Delete.
5418         * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
5419         (cxx_init_decl_processing): Don't call init_decl2.
5420         (cxx_pop_function_context): Don't use VARRAY_FREE.
5421         * cp-tree.h (struct saved_scope): No need for special marking
5422         of varrays.
5423         (struct language_function): Likewise.
5424         (local_classes): Use gengtype to mark.
5425         (init_decl2): Delete prototype.
5426         * class.c (init_class_processing): Don't use
5427         ggc_add_tree_varray_root.
5428         (build_vtbl_initializer): Don't use VARRAY_FREE.
5429
5430         * decl.c (typename_compare): Don't use same_type_p.
5431
5432         * decl.c: Include hashtab.h instead of hash.h.
5433         (typename_hash): Update to use htab_h.
5434         (typename_compare): Likewise.
5435         (typename_htab): Use gengtype to mark.
5436         (build_typename_type): Update to use htab_h.
5437         * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
5438
5439         * Make-lang.in (gt-cp-tree.h): New rule.
5440         (cp/tree.o): Depend on gt-cp-tree.h.
5441         * config-lang.in (gtfiles): Add cp/tree.c.
5442         * tree.c: Include gt-cp-tree.h.
5443         (list_hash_table): Use gengtype to mark.
5444         (init_tree): Use gengtype to mark trees.
5445
5446         * Make-lang.in (cp/decl.o): Add debug.h dependency.
5447         * call.c (struct z_candidate): Use gengtype.
5448         (USER_CONV_CAND): Use WRAPPER_ZC.
5449         (convert_class_to_reference): Use build_zc_wrapper.
5450         (build_type_conversion_1): Likewise.
5451         (build_over_call): Use WRAPPER_ZC.
5452         (add_warning): Use build_zc_wrapper.
5453         * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
5454         * cp-tree.h (struct lang_identifier): Use gengtype.
5455         (struct template_parm_index_s): Likewise.
5456         (struct ptrmem_cst): Likewise.
5457         (struct tree_binding): Likewise.
5458         (struct tree_overload): Likewise.
5459         (struct tree_srcloc): Likewise.
5460         (struct tree_wrapper): Likewise.  Also modify to have a pointer
5461         to struct z_candidate rather than void.
5462         (enum cp_tree_node_structure_enum): New.
5463         (union lang_tree_node): New.
5464         (cxx_mark_tree): Delete prototype.
5465         (cp_tree_node_structure): New prototype.
5466         (build_ptr_wrapper): Delete prototype.
5467         (build_int_wrapper): Delete prototype.
5468         (build_zc_wrapper): New prototype.
5469         * decl.c: Include debug.h
5470         (cxx_mark_tree): Delete.
5471         (cp_tree_node_structure): New.
5472         * tree.c (build_ptr_wrapper): Delete.
5473         (build_int_wrapper): Delete.
5474         (build_zc_wrapper): New.
5475
5476         * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
5477         Correct typo.  Patch from k_fukui@highway.ne.jp.
5478
5479         * semantics.c (current_stmt_tree): Update for change to
5480         struct language_function.
5481         (finish_mem_initializers): Likewise.
5482         * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
5483         * cp-tree.h (struct language_function): Rename from
5484         cp_language_function.  Change all uses.
5485         (cp_function_chain): Don't need to cast.
5486
5487         * class.c (duplicate_tag_error): Reset discriminator.
5488         (check_bases_and_members): Update for data structure changes.
5489         * cp-tree.h (struct lang_id2): Use gengtype.
5490         (flagged_type_tree): Likewise.
5491         (SET_LANG_ID): Use GGC on struct lang_id2.
5492         (struct cp_language_function): Use gengtype.  Remove field
5493         'x_vcalls_possible_p'.
5494         (current_vcalls_possible_p): Delete.
5495         (struct lang_type_header): New.
5496         (struct lang_type_class): Rename from struct lang_type.  Include
5497         struct lang_type_header.
5498         (struct lang_type_ptrmem): New.
5499         (struct lang_type): New.
5500         (LANG_TYPE_CLASS_CHECK): New.  Use it in all the appropriate macros.
5501         (LANG_TYPE_PTRMEM_CHECK): New.  Use it in all the appropriate macros.
5502         (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
5503         (struct lang_decl_flags): Use gengtype.  Add discriminators.
5504         (struct lang_decl): Use gengtype.  Add and use discriminators.
5505         Update the macros that reference moved fields.
5506         (LANG_DECL_U2_CHECK): New function.  Use it when appropriate.
5507         (SET_DECL_THUNK_P): Set discriminator too.
5508         (clear_inline_text_obstack): Delete prototype.
5509         (finish_inline_definitions): Delete prototype.
5510         (mark_pending_inlines): Delete prototype.
5511         (lang_check_failed): New prototype.
5512         * decl.c (struct named_label_use_list): Use gengtype.
5513         (struct named_label_list): Likewise.
5514         (mark_binding_level): Delete.
5515         (mark_named_label_lists): Delete.
5516         (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
5517         (cxx_init_decl_processing): Use generated marker routine.
5518         (begin_destructor_body): Delete dead set to
5519         current_vcalls_possible_p.
5520         (mark_lang_function): Delete.
5521         (mark_cp_function_context): Delete.
5522         (lang_mark_tree): Use generated marker routines.
5523         * decl2.c (start_objects): Set discriminator when setting
5524         GLOBAL_INIT_PRIORITY.
5525         * lex.c (retrofit_lang_decl): Set discriminators.
5526         (copy_lang_type): Update for changes to lang_type structure.
5527         (cp_make_lang_type): Set discriminator.
5528         * parse.y: Use gengtype on YYLVAL.  Don't use dots in identifiers.
5529         * search.c: Include ggc.h.
5530         * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
5531         (finish_inline_definitions): Delete.
5532         * spew.c (struct token): Use gengtype.
5533         (struct token_chunk): New.
5534         (struct unparsed_text): Use gengtype.  Store tokens in chunks.
5535         (struct feed): Use gengtype.
5536         (feed_obstack): Delete.
5537         (feed): Mark as GC root.
5538         (pending_inlines): Mark as GC root.
5539         (pending_inlines_tail): Likewise.
5540         (processing_these_inlines): Likewise.
5541         (token_obstack): Make static.
5542         (first_token): Likewise.
5543         (init_spew): Don't initialize deleted things; use gengtype for roots.
5544         (clear_inline_text_obstack): Delete.
5545         (feed_input): Use GC for struct feed.  Update for changes to
5546         struct unparsed_text.
5547         (mark_pending_inlines): Delete.
5548         (next_token): Rename from add_token.  Change all callers.  Update
5549         for changes to struct unparsed_text.
5550         (space_for_token): New.
5551         (remove_last_token): New.
5552         (alloc_unparsed_text): New.
5553         (snarf_block): Take an unparsed_text.  Update for changes to struct
5554         unparsed_text.
5555         (snarf_method): Update for changes to struct unparsed_text.
5556         (snarf_defarg): Update for changes to struct unparsed_text.
5557         * tree.c (lang_check_failed): New.
5558
5559         * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
5560         gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
5561         (cp/spew.o): Add dependency on gt-<filename>.h.
5562         (cp/decl2.o): Add dependency on gt-<filename>.h.
5563         (cp/call.o): Add dependency on gt-<filename>.h.
5564         (cp/pt.o): Add dependency on gt-<filename>.h.
5565         (cp/repo.o): Add dependency on gt-<filename>.h.
5566         (cp/parse.o): Add dependency on gt-<filename>.h.
5567         * call.c: Use gengtype for roots.
5568         * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
5569         decl2.c parse.y pt.c repo.c spew.c.
5570         * cp-tree.h: Use gengtype for roots.
5571         (struct saved_scope): Use GGC, gengtype.
5572         (cp_parse_init): Delete prototype.
5573         (init_pt): Delete prototype.
5574         * decl.c: Use gengtype for roots.
5575         (mark_saved_scope): Delete.
5576         (cxx_init_decl_processing): Don't call deleted initilisation
5577         routines.
5578         (signed_size_zero_node): Delete, unused.
5579         * decl.h: Use gengtype for roots.
5580         * decl2.c: Use gengtype for roots.
5581         * lex.h: Use gengtype for roots.
5582         * parse.y: Use gengtype for roots.
5583         (cp_parse_init): Delete.
5584         * pt.c: Use gengtype for roots.
5585         (init_pt): Delete.
5586         * repo.c: Use gengtype for roots.
5587         * spew.c: Use gengtype for roots.
5588
5589         * Make-lang.in: Allow for filename changes.  Add gtype-cp.h.
5590         (cp/decl.o): Add dependency on gtype-cp.h.
5591         * decl.c: Remove use of add_deletable_root, use GTY marker instead.
5592         Include gtype-cp.h.  Allow for filename changes.
5593
5594         * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
5595         (cp/decl.o): Add cp/gt-decl.h dependency.
5596         * config-lang.in (gtfiles): New.
5597         * tree.h: Rename struct binding_level to struct cp_binding_level.
5598         * decl.c: Rename struct binding_level to struct cp_binding_level.
5599         Include cp/gt-decl.h.
5600         (struct cp_binding_level): Use gengtype.
5601         (make_binding_level): Use GGC on struct cp_binding_level.
5602         (mark_binding_level): Use gt_ggc_m_cp_binding_level.
5603         (cxx_init_decl_processing): Mark free_binding_level as
5604         deletable.
5605
5606         * decl.c (mark_cp_function_context): Update calling sequence.
5607
5608         * decl.c (start_function): Don't free 'struct
5609         cp_language_function'.
5610         (pop_cp_function_context): Likewise.
5611         (save_function_data): Allocate it using GC.
5612         * semantics.c (genrtl_start_function): Don't free 'struct
5613         cp_language_function'.
5614
5615 2002-05-31  Matthew Woodcraft  <mattheww@chiark.greenend.org.uk>
5616
5617         * lang-specs.h: Use cpp_debug_options.
5618
5619 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
5620
5621         * mangle.c, tree.c: Include real.h.
5622         * Make-lang.in: Update dependency lists.
5623
5624 2002-05-25  Neil Booth  <neil@daikokuya.demon.co.uk>
5625
5626         * lex.c: Don't include c-lex.h.
5627         * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
5628
5629 2002-05-23  Neil Booth  <neil@daikokuya.demon.co.uk>
5630
5631         * spew.c (yyungetc, snarf_block): Remove indent_level handling.
5632
5633 2002-05-22  Richard Henderson  <rth@redhat.com>
5634
5635         * decl.c (obscure_complex_init): Check for VAR_DECL
5636         before using DECL_THREAD_LOCAL.
5637
5638 2002-05-22  Richard Henderson  <rth@redhat.com>
5639
5640         * decl.c (check_tag_decl): Handle RID_THREAD.
5641         (obscure_complex_init): Reject run-time init of tls.
5642         (grokvardecl, grokdeclarator): Handle RID_THREAD.
5643         * lex.c (reswords): Add __thread.
5644         (rid_to_yy): Map RID_THREAD to SCSPEC.
5645
5646 2002-05-22  Neil Booth  <neil@daikokuya.demon.co.uk>
5647
5648         * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
5649         * cp-tree.h (cxx_post_options): Kill.
5650         * cp-lex.c (cxx_post_options): Kill.
5651
5652 2002-05-21  Richard Henderson  <rth@redhat.com>
5653
5654         * lex.c (rid_to_yy): Add RID_THREAD.
5655
5656 2002-05-21  Alexandre Oliva  <aoliva@redhat.com>
5657
5658         * init.c (build_vec_init): Test for trivial copy-assignment when
5659         copy-assigning arrays.
5660
5661 2002-05-20  Andreas Jaeger  <aj@suse.de>
5662
5663         * init.c (build_default_init): Remove unused variable.
5664
5665 2002-05-20  Alexandre Oliva  <aoliva@redhat.com>
5666
5667         * call.c (any_strictly_viable): New.
5668         (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
5669
5670 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5671
5672         * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
5673
5674 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5675
5676         PR c++/186, DR 259
5677         * pt.c (do_decl_instantiation): Don't complain explicit
5678         instantiation after explicit specialization.
5679         (do_type_instantiation): Likewise.
5680
5681 2002-05-19  Alexandre Oliva  <aoliva@redhat.com>
5682
5683         * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
5684         renamed from...
5685         (complete_type_or_else): ... this.  Redefined as macro.
5686         (cxx_incomplete_type_diagnostic): Declare.
5687         (cxx_incomplete_type_error): Define as macro.
5688         * init.c (build_delete): Warn about incomplete types other than
5689         void, and use the built-in operator delete for them.
5690         * typeck.c (complete_type_or_diagnostic): Renamed from
5691         complete_type_or_else.  Added warn_only argument, passed to...
5692         * typeck2.c (cxx_incomplete_type_diagnostic): ... this.  Print
5693         warnings or errors depending on new warn_only argument.  Renamed
5694         from...
5695         (cxx_incomplete_type_error): ... this.  New implementation in
5696         terms of cxx_incomplete_type_diagnostic.
5697
5698 2002-05-18  Jason Merrill  <jason@redhat.com>
5699
5700         PR c++/6611
5701         * decl2.c (import_export_decl): If we clear
5702         DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
5703
5704 2002-05-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5705
5706         PR c++/6620
5707         * pt.c (verify_class_unification): Don't check if PARM is template
5708         parameter dependent.  Simplify.
5709         (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
5710         parameter dependent expression.
5711
5712 2002-05-14  Jason Merrill  <jason@redhat.com>
5713
5714         * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
5715         Do set DECL_COMDAT.
5716         (synthesize_tinfo_var): Take the public decl.
5717         (create_real_tinfo_var): Likewise.  Check DECL_COMDAT.
5718         (emit_tinfo_decl): Adjust.  Call import_export_decl.
5719         * decl2.c (import_export_decl): Simplify tinfo decl handling.
5720
5721 2002-05-14  Alexandre Oliva  <aoliva@redhat.com>
5722
5723         * cp-tree.h (struct lang_type): Added non_zero_init.
5724         (CLASSTYPE_NON_ZERO_INIT_P): New macro.
5725         (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
5726         * class.c (check_field_decls): Test non_zero_init.
5727         * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
5728         zero-to-NULL conversions.
5729         * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
5730         type that needs zero-initialization without zeros.
5731         (check_initializer_decl): Compute zero-initializer for types
5732         that require a non-trivial one.
5733         * init.c (build_forced_zero_init): New function.
5734         (build_default_init): Use it.
5735         * tree.c (zero_init_p): New function.
5736         * typeck2.c (force_store_init_value): New function.
5737         (process_init_constructor): Create non-trivial zero-initializers
5738         for array members and class fields.
5739
5740 2002-05-14  Neil Booth  <neil@daikokuya.demon.co.uk>
5741
5742         * lang-specs.h: Remove redundant -lang-c++.
5743
5744 2002-05-13  Jason Merrill  <jason@redhat.com>
5745
5746         * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
5747         (fixed_type_or_null): See through reference vars.
5748         (build_base_path): Vtable contents are constant.
5749         * typeck.c (get_member_function_from_ptrfunc): Likewise.
5750
5751 2002-05-12  Jason Merrill  <jason@redhat.com>
5752
5753         * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
5754         structs are safe.
5755
5756 2002-05-09  Neil Booth  <neil@daikokuya.demon.co.uk>
5757
5758         * cp-tree.h (flag_ansi): Remove.
5759         * decl2.c (flag_ansi): Remove.
5760         (cxx_decode_option): Set flag_iso and flag_undef.
5761
5762 2002-05-09  Jason Merrill  <jason@redhat.com>
5763
5764         * typeck.c (get_member_function_from_ptrfunc): Reorganize.
5765         Use subtraction rather than a bitmask to get the index.
5766         * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
5767
5768         * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
5769
5770 2002-05-07  Neil Booth  <neil@daikokuya.demon.co.uk>
5771
5772         * Make-lang.in (decl2.o): Update.
5773         * cp-tree.h (warn_multichar): Remove.
5774         * decl2.c: Include c-common.h.
5775         (warn_multichar): Remove.
5776
5777 2002-05-03  Jason Merrill  <jason@redhat.com>
5778
5779         * tree.c (build_cplus_array_type): Only const and volatile get
5780         special handling.
5781
5782         * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
5783
5784 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
5785
5786         ABI change, returning simple classes from functions.
5787         * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
5788         TYPE_HAS_TRIVIAL_INIT_REF is false or
5789         TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
5790
5791 2002-04-30  Jason Merrill  <jason@redhat.com>
5792
5793         PR debug/6436
5794         * decl.c (grokdeclarator): Don't override TYPE_NAME of an
5795         anonymous class with a typedef if there are attributes.
5796
5797 2002-04-29  Paul Eggert  <eggert@twinsun.com>
5798
5799         * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
5800
5801 2002-04-29  Jakub Jelinek  <jakub@redhat.com>
5802
5803         PR c++/6477
5804         * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
5805         non-NULL first.
5806
5807 2002-04-29  Mark Mitchell  <mark@codesourcery.com>
5808
5809         PR c++/6492
5810         * pt.c (tsubst_friend_class): If the friend has an explicit scope,
5811         enter that scope before name lookup.
5812
5813         PR c++/6486
5814         * method.c (do_build_copy_constructor): Avoid building
5815         cv-qualified reference types.
5816
5817 2002-04-29  Nathan Sidwell  <nathan@codesourcery.com>
5818
5819         PR c++/5719
5820         * decl.c (grok_op_properties): Assignment ops don't have to return
5821         by value. operator% should.
5822
5823 2002-04-28  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
5824
5825         PR c/6343
5826         * decl.c (duplicate_decls): Call merge_weak.
5827
5828 2002-04-26  Richard Henderson  <rth@redhat.com>
5829
5830         * parse.y (malloced_yyss, malloced_yyvs): New.
5831         (yyoverflow): Re-add.  Set them.
5832         (free_parser_stacks): New.
5833
5834 2002-04-26  Mark Mitchell  <mark@codesourcery.com>
5835
5836         PR c++/6497
5837         * method.c (do_build_assign_ref): Pass a derivation to
5838         build_method_call when calling base class assignment operators.
5839
5840 2002-04-26  Richard Henderson  <rth@redhat.com>
5841
5842         * parse.y (yyoverflow): Revert.
5843
5844 2002-04-26  Richard Henderson  <rth@redhat.com>
5845
5846         PR c/3581
5847         * parse.y (string): Remove.  Update all uses to use STRING
5848         instead, and not call combine_strings.
5849         * rtti.c (tinfo_name): Use fix_string_type.
5850         * semantics.c (finish_asm_stmt): Don't call combine_strings.
5851         * spew.c (yylexstring): New.
5852         (read_token): Use it.
5853
5854 2002-04-25  Richard Henderson  <rth@redhat.com>
5855
5856         PR c/2161
5857         * parse.y (yyoverflow): New.
5858
5859 2002-04-25  Jason Merrill  <jason@redhat.com>
5860
5861         PR c++/5607
5862         * search.c (check_final_overrider): No longer static.
5863         * class.c (update_vtable_entry_for_fn): Call it.
5864         * cp-tree.h: Adjust.
5865
5866 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
5867
5868         * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
5869         * cp-tree.h (cxx_set_yydebug): Die.
5870         * lex.c (YYDEBUG): Get from c-lex.h.
5871         (cxx_set_yydebug): Remove.
5872         * parse.y: Include c-lex.h.
5873         (YYDEBUG): Get from c-lex.h.
5874
5875 2002-04-24  Mark Mitchell  <mark@codesourcery.com>
5876
5877         PR c++/6438.
5878         * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
5879         void.
5880
5881 2002-04-24  Neil Booth  <neil@daikokuya.demon.co.uk>
5882
5883         * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
5884         LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
5885         Redefine.
5886         * cp-tree.h (cp_attribute_table): Rename.
5887         * decl.c (lang_attribute_table): Remove declaration.
5888         (cxx_init_decl_processing): Don't set it.
5889         * tree.c (cp_attribute_table): Rename.
5890
5891 2002-04-24  Jason Merrill  <jason@redhat.com>
5892
5893         PR c++/6331
5894         * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
5895         * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
5896         The pedwarn for array assignment is now unconditional.
5897         * tree.c (build_cplus_array_type_1): Still process simple array types
5898         normally in templates.
5899
5900         PR c++/6395
5901         * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
5902         stuff for comdats.
5903
5904 2002-04-23  Jakub Jelinek  <jakub@redhat.com>
5905
5906         * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
5907         node with attributes.
5908
5909 2002-2-23  David O'Brien  <obrien@FreeBSD.org>
5910
5911         * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
5912         Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
5913
5914 2002-04-23  Mark Mitchell  <mark@codesourcery.com>
5915
5916         PR c++/6256:
5917         * pt.c (tsubst_friend_class): Handle templates with explicit
5918         nested names.
5919
5920         PR c++/6331:
5921         * typeck.c (merge_types): Remember the cv-qualification of pointer
5922         types when merging them.
5923
5924 2002-04-20  Neil Booth  <neil@daikokuya.demon.co.uk>
5925
5926         * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
5927         LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
5928         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
5929         cxx_mark_function_context): New.
5930         * decl.c (push_cp_function_context, pop_cp_function_context,
5931         mark_cp_function_context): Rename for consistency.
5932         (cxx_init_decl_processing): Don't set old hooks.
5933
5934 2002-04-19  Neil Booth  <neil@daikokuya.demon.co.uk>
5935
5936         * call.c (convert_type_from_ellipsis): Rename, update.
5937         * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
5938         * cp-tree.h (convert_type_from_ellipsis): Rename.
5939         * decl.c (cxx_init_decl_processing): Don't set hook.
5940
5941 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
5942
5943         * call.c (build_new_method_call): Update.
5944         * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
5945         * cp-tree.h (cxx_incomplete_type_error): New.
5946         * decl.c (grokdeclarator, grokparms): Update.
5947         * decl2.c (check_classfn): Update.
5948         * pt.c (tsubst): Update.
5949         * typeck.c (complete_type_or_else, expr_sizeof,
5950         decay_conversion): Update.
5951         * typeck2.c (incomplete_type_error): Rename.
5952         (add_exception_specifier): Update.
5953
5954 2002-04-18  Jason Merrill  <jason@redhat.com>
5955
5956         PR c++/5658
5957         * search.c (setup_class_bindings): A class template qualifies as a
5958         type binding.
5959
5960 2002-04-17  Jakub Jelinek  <jakub@redhat.com>
5961
5962         PR c++/6316
5963         * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
5964         before expanding.
5965
5966 2002-04-16  Mark Mitchell  <mark@codesourcery.com>
5967
5968         * init.c (begin_init_stmts): Remove commented out code.
5969         (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
5970         * semantics.c (begin_gobal_stmt_expr): Adjust call to
5971         expand_start_stmt_expr.
5972
5973 2002-04-15  Mark Mitchell  <mark@codesourcery.com>
5974
5975         * decl.c (register_dtor_fn): Pass the address of dso_handle, not
5976         dso_handle itself, to __cxa_atexit.
5977
5978 2002-04-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
5979
5980         * error.c (cxx_print_error_function): Adjust call to macros.
5981
5982 2002-04-14  Jakub Jelinek  <jakub@redhat.com>
5983
5984         * class.c (layout_virtual_bases): Do all dsize computation on trees.
5985
5986 2002-04-14  Jason Merrill  <jason@redhat.com>
5987
5988         * typeck.c (get_member_function_from_ptrfunc): Don't do
5989         gratuitious division and multiplication on
5990         ptrmemfunc_vbit_in_delta targets.
5991
5992 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
5993
5994         PR c++/5373.
5995         * semantics.c (finish_expr_stmt): Remember the type of the
5996         expression before any conversions are performed.
5997
5998 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
5999
6000         PR c++/5189.
6001         * call.c (add_template_candidate_real): Do not treat member
6002         templates as copy constructors.
6003
6004 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
6005
6006         * decl.c (duplicate_decls): Do not copy the RTL for a variable
6007         declaration if the old variable had an incomplete type and the new
6008         variable does not.
6009         (complete_vars): Do not call layout_decl for completed variables.
6010
6011 2002-04-12  Richard Sandiford  <rsandifo@redhat.com>
6012
6013         * decl.c (duplicate_decls): Don't try to unify an implicit typedef
6014         with an explicit one.
6015         (follow_tag_typedef): New.
6016         (lookup_tag): Use it to extract the tag of an explicit typedef.
6017         (xref_tag): Likewise.
6018
6019 2002-04-11  Andrew Haley  <aph@redhat.com>
6020
6021         * typeck.c (type_after_usual_arithmetic_conversions):
6022         If two types have the same variant, return immediately.
6023         When two floating-point operands are the same precision:
6024           convert to float if one of the operands is float;
6025           if neither operand is one of the standard types, return the type
6026           of the first operand.
6027
6028 2002-04-10  Nathan Sidwell  <nathan@codesourcery.com>
6029
6030         PR c++/5507
6031         * decl.c (make_typename_type): Remove implicit typenameness.
6032
6033 2002-04-09  Jason Merrill  <jason@redhat.com>
6034
6035         PR optimization/6189
6036         * semantics.c (genrtl_start_function): Don't free
6037         DECL_SAVED_FUNCTION_DATA for inline functions.
6038
6039         * init.c (build_member_call): For now, don't convert to
6040         intermediate base if it would cause an error.
6041
6042 2002-04-08  Paolo Carlini  <pcarlini@unitus.it>
6043
6044         * parse.y (namespace_qualifier, maybe_identifier,
6045         begin_explicit_instantiation, end_explicit_instantiation,
6046         apparent_template_type, .finish_template_type,
6047         do_id, maybe_init, defarg_again, component_decl_1):
6048         Add ending ';', in accordance with POSIX.
6049
6050 2002-04-06  Mark Mitchell  <mark@codesourcery.com>
6051
6052         PR c++/5571
6053         * class.c (layout_class_type): Remember incomplete static
6054         variables.
6055         (finish_struct_1): Call complete_vars, not
6056         hack_incomplete_structures.
6057         * cp-tree.h (hack_incomplete_structures): Rename to ...
6058         (complete_vars): ... this.
6059         (struct saved_scope): Remove incomplete.
6060         (namespace_scope_incomplete): Remove.
6061         * decl.c (struct binding_level): Remove incomplete.
6062         (incomplete_vars): New variable.
6063         (mark_binding_level): Don't mark incomplete.
6064         (print_binding_level): Don't print it.
6065         (mark_saved_scope): Don't mark incomplete.
6066         (pushdecl): Use maybe_register_incopmlete_var.
6067         (cxx_init_decl_processing): Register incomplete_vars for GC.
6068         (start_decl_1): Clarify error message.
6069         (hack_incomplete_vars): Remove.
6070         (maybe_register_incomplete_var): New function.
6071         (complete_vars): Likewise.
6072
6073 2002-04-06  Jason Merrill  <jason@redhat.com>
6074
6075         PR c++/4934
6076         * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
6077         set before checking it.
6078
6079         PR c++/525
6080         * init.c (build_member_call): Use build_scoped_ref.
6081         (resolve_offset_ref): Likewise.
6082         * call.c (build_scoped_method_call): Likewise.
6083         * tree.c (maybe_dummy_object): Kludge around current_class_type being
6084         wrong.
6085         * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
6086         * cp-tree.h: Adjust.
6087
6088         * init.c (push_base_cleanups): Just use build_scoped_method_call.
6089
6090         PR c++/6179
6091         * method.c (implicitly_declare_fn): Pass unqualified type to
6092         synthesize_exception_spec.
6093
6094 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
6095
6096         * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
6097         * cvt.c: Update comment.
6098         * init.c (expand_cleanup_for_base): Update.
6099         * semantics.c (finish_parenthesized_expr): Update.
6100         * typeck.c (cp_truthvalue_conversion): Update.
6101
6102 2002-04-04  Jason Merrill  <jason@redhat.com>
6103
6104         * semantics.c (finish_eh_cleanup): New fn.
6105         * cp-tree.h: Add prototype.
6106         * init.c (perform_member_init, expand_cleanup_for_base): Use
6107         finish_eh_cleanup.
6108         * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
6109         * cp-tree.h: Remove references.
6110         * decl.c (begin_constructor_body, end_constructor_body): Likewise.
6111         * dump.c (cp_dump_tree): Likewise.
6112         * pt.c (tsubst_expr): Likewise.
6113         * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
6114         (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
6115         * tree.c (cp_statement_code_p): Likewise.
6116
6117         * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
6118
6119         PR c++/5636
6120         * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
6121         cleanup for nrv.
6122
6123         PR c++/5104
6124         * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
6125         specifiers.
6126         [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
6127
6128 2002-04-03  Richard Henderson  <rth@redhat.com>
6129
6130         * cp-lang.c (cxx_warn_unused_global_decl): New.
6131         (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
6132
6133 2002-04-03  Neil Booth  <neil@daikokuya.demon.co.uk>
6134
6135         * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
6136         * tree.c (init_tree): Don't set hook.
6137
6138 2002-04-03  Roger Sayle  <roger@eyesopen.com>
6139
6140         PR c++/5998:
6141         * decl.c (duplicate_decls): Don't mess with assembler names when
6142         redeclaring builtin functions as static.
6143
6144 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
6145
6146         * call.c (build_addr_func): Update.
6147         * class.c (resolve_address_of_overloaded_function): Update.
6148         * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
6149         * cp-tree.h (cxx_mark_addressable): New.
6150         * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
6151         * decl2.c (build_cleanup): Update.
6152         * except.c (build_throw): Update.
6153         * init.c (resolve_offset_ref): Update.
6154         * pt.c (convert_nontype_argument): Update.
6155         * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
6156         * typeck.c (decay_conversion, build_array_ref, build_unary_op,
6157         unary_complex_lvalue): Update.
6158         (mark_addressable): Rename.
6159
6160 2002-04-01  Roger Sayle  <roger@eyesopen.com>
6161
6162         PR c++/5998:
6163         * decl.c (duplicate_decls):  Overwrite the RTL when (and only
6164         when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
6165         but follow the SET_DECL_RTL idiom used elsewhere in the function.
6166
6167 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
6168
6169         * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
6170         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
6171         * decl.c (grokdeclarator): Update.
6172         * mangle.c (write_integer_cst): Update.
6173         * typeck.c (build_binary_op): Update.
6174
6175 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
6176
6177         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
6178         * lex.c (cxx_init): Don't set hook.
6179
6180 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
6181
6182         * Make-lang.in (error.o): Update.
6183         * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
6184         * cp-tree.h (struct diagnostic_context): Predeclare.
6185         (cxx_print_error_function): New.
6186         * error.c: Include langhooks-def.h.
6187         (lang_print_error_function): Rename.  Update.
6188         (init_error): Don't set hook.
6189
6190 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
6191
6192         * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
6193         Redefine.
6194         * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
6195         * decl.c (finish_enum): Similarly.
6196         * error.c (dump_type): Similarly.
6197         * lex.c (cxx_init): Similarly.
6198         * mangle.c (write_builtin_type): Similarly.
6199         * typeck.c (comptypes): Similarly.
6200
6201 2002-03-28  Roger Sayle  <roger@eyesopen.com>
6202
6203         PR c++/5998:
6204         * decl.c (cxx_init_decl_processing): Re-enable built-in functions
6205         in the g++ front-end.
6206         (duplicate_decl): Allow redefinition of anticipated built-ins.
6207         Fix inlining problem by over-writing the old DECL_RTL.
6208         (lookup_namespace_name): Fail to find an identifier in the
6209         specified namespace if its still anticipated.
6210         (builtin_function_1): New function split out from builtin_function
6211         to create a builtin in the current namespace with given context.
6212         (builtin_function): Call builtin_function_1 to define the
6213         appropriate builtins in both the std and global namespaces.
6214         (select_decl): Don't test for anticipated decls here.
6215         (unqualified_namespace_lookup): Instead ignore them whilst
6216         searching through scopes and namespaces.
6217         * decl2.c (do_nonmember_using_decl): If a using declaration
6218         specifies an anticipated built-in function, mark it as no longer
6219         anticipated in that scope.
6220         (ambiguous_decl):  Avoid resolving to an anticipated decl.
6221         * lex.c (do_scoped_id): Fail to find an identifier in the global
6222         namespace if its still anticipated.
6223
6224 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
6225
6226         * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
6227         * cp-tree.h (cp_make_lang_type): Rename.
6228         * lex.c (cp_make_lang_type): Rename.
6229         (make_aggr_type): Update.
6230         * tree.c (init_tree): Don't set make_lang_type_fn.
6231
6232 2002-03-29  Jakub Jelinek  <jakub@redhat.com>
6233
6234         PR c++/6073
6235         * class.c (finish_struct_1): Update static field's DECL_MODE even
6236         if its type is a variant of t.
6237
6238 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
6239
6240         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
6241         * cp-tree.h (cxx_insert_default_attributes): New.
6242         * decl.c (insert_default_attributes): Rename.
6243
6244 2002-03-27  Mark Mitchell  <mark@codesourcery.com>
6245
6246         PR c++/4884
6247         * call.c (build_op_delete_call): Allow for the fact the placement
6248         may be a COMPOUND_EXPR.
6249
6250 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
6251
6252         * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
6253         * cp-tree.h (init_cplus_expand): Remove.
6254         (cxx_expand_expr): New.
6255         * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
6256         fix prototype.
6257         (init_cplus_expand): Remove.
6258         * lex.c (cxx_init): Don't call init_cplus_expand.
6259
6260 2002-03-26  Mark Mitchell  <mark@codesourcery.com>
6261
6262         PR c++/4884.
6263         * init.c (build_new_1): Allow for the fact the result of
6264         build_function_call may be a COMPOUND_EXPR.
6265
6266 2002-03-26  Nathan Sidwell  <nathan@codesourcery.com>
6267
6268         PR c++/5682
6269         * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
6270         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
6271         (dfs_skip_nonprimary_vbases_markedp): Remove.
6272         * search.c (get_shared_vbase_if_not_primary): Remove.
6273         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
6274         (dfs_skip_nonprimary_vbases_markedp): Remove.
6275         (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
6276         (dfs_marked_real_bases_queue_p): Likewise.
6277
6278 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
6279
6280         * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
6281         * cp-tree.h (cxx_mark_tree): New.
6282         * decl.c (lang_mark_tree): Rename cxx_mark_tree.
6283
6284 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
6285
6286         * cp-tree.h (cxx_maybe_build_cleanup): New.
6287         * decl.c (destroy_local_var, hack_incomplete_structures): Update.
6288         (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
6289         * tree.c (build_target_expr): Update.
6290         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
6291
6292 2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
6293
6294         * decl2.c (cxx_decode_option): Handle -E.
6295         * lang-specs.h (default_compilers): Preprocess with cc1plus.
6296         * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
6297
6298 2002-03-23  Jakub Jelinek  <jakub@redhat.com>
6299
6300         PR c++/6037
6301         * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
6302
6303 2002-03-23  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
6304
6305         * error.c (dump_type): Be careful about implicit typenames.
6306
6307 2002-03-21  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
6308
6309         PR C++/3656
6310         * semantics.c (finish_base_specifier): Handle erronous base
6311         classes.
6312
6313 2002-03-22  Zack Weinberg  <zack@codesourcery.com>
6314
6315         * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
6316         REAL_IS_NOT_DOUBLE.
6317
6318 2002-03-22  Jeff Knaggs  <jknaggs@redhat.com>
6319
6320         * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
6321         an index into the vtable_entry array regardless of
6322         TARGET_PTRMEMFUNC_VBIT_LOCATION.
6323
6324 2002-03-21  Aldy Hernandez  <aldyh@redhat.com>
6325
6326         * tree.c (cp_cannot_inline_tree_fn): Same.
6327
6328 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
6329
6330         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
6331         insert_block, getdecls, global_bindings_p): New.
6332
6333 2002-03-20  Nathan Sidwell  <nathan@codesourcery.com>
6334
6335         PR c++/4361
6336         * mangle.c (struct globals) Add internal_mangling_p member.
6337         (write_template_param): Do internal mangling, if needed.
6338         (mangle_conv_op_name_for_type): Request internal mangling.
6339
6340 2002-03-20  Jason Merrill  <jason@redhat.com>
6341
6342         PR c++/2136
6343         * init.c (build_delete): Check access for a member op delete here.
6344         * decl2.c (delete_sanity): Not here.
6345
6346 2002-03-19  Jason Merrill  <jason@redhat.com>
6347
6348         PR c++/5118
6349         * class.c (get_vfield_name): Use the constructor_name.
6350
6351 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
6352
6353         * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
6354         * cp-tree.h (lang_printable_name): Rename.
6355         * error.c (lang_decl_name): Use new hook.
6356         * lex.c (cxx_init): Remove old hook.
6357         * pt.c (tsubst_decl): Use new hook.
6358         * tree.c (lang_printable_name): Rename.
6359
6360 2002-03-18  Eric Botcazou  <ebotcazou@multimania.com>
6361
6362         PR c++/3882
6363         * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
6364         (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
6365         only after recording the declaration.
6366
6367 2002-03-18  Jason Merrill  <jason@redhat.com>
6368
6369         PR c++/2039
6370         * init.c (resolve_offset_ref): Hand off to build_component_ref.
6371
6372         PR c++/4222, c++/5995
6373         * call.c (build_over_call): Fix empty class logic.
6374
6375         PR c++/3870
6376         * cp-tree.h (struct saved_scope): Add last_parms field.
6377         * decl.c (maybe_push_to_top_level): Save last_function_parms.
6378         (pop_from_top_level): Restore it.
6379
6380         PR c++/4377
6381         * mangle.c (write_expression): Strip NOP_EXPRs sooner.  Also strip
6382         NON_LVALUE_EXPRs.
6383
6384         PR c++/4003
6385         * pt.c (tsubst_friend_function): Use decl_namespace_context.
6386
6387         PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
6388         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
6389         type with a nontrivial destructor.
6390
6391 2002-03-17  Jason Merrill  <jason@redhat.com>
6392
6393         PR c++/4460
6394         * class.c (build_base_path): Virtual base layout is fixed in
6395         in-charge [cd]tors.
6396
6397 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
6398
6399         * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
6400         * parse.y (yyparse): Remove macro.
6401
6402 2002-03-17  Jason Merrill  <jason@redhat.com>
6403
6404         PR c++/5757
6405         * init.c (build_new_1): Pass the right pointer to op delete.
6406
6407 2002-03-16  Nathan Sidwell  <nathan@codesourcery.com>
6408
6409         PR c++/4361
6410         * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
6411         conversion operators go.
6412         (struct lang_decl_flags): Add template_conv_p and unused
6413         bitfields.
6414         (DECL_TEMPLATE_CONV_FN_P): New macro.
6415         * call.c (build_user_type_conversion_1): Don't check second type
6416         conversion of overload set first.
6417         * class.c (add_method): Make sure templated conversion operators
6418         all end up on slot 2.
6419         * lex.c (do_identifier): A conversion operator token might be
6420         satisfied by a templated conversion operator.
6421         * pt.c (check_explicit_specialization): Use
6422         CLASSTYPE_FIRST_CONVERSION_SLOT.
6423         (template_parm_this_level_p): New function.
6424         (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
6425         * search.c (lookup_fnfields_1): Template conversions will be on
6426         the first slot.
6427         * typeck.c (build_component_ref): Preserve the type of an
6428         conversion operator name on the overload type.
6429         (build_x_function_call): Retrieve the conversion operator name.
6430
6431 2002-03-15  Richard Henderson  <rth@redhat.com>
6432
6433         * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
6434
6435 2002-03-15  Mark Mitchell  <mark@codesourcery.com>
6436
6437         * cp-tree.h (CLEANUP_DECL): Remove.
6438         (CLEANUP_EXPR): Likewise.
6439         * decl.c (destroy_local_var): Simplify.
6440         (maybe_build_cleanup): Tidy.
6441         * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
6442         * semantics.c (cp_expand_stmt): Likewise.
6443         * cp/tree.c (cp_statement_code_p): Likewise.
6444
6445 2002-03-15  Jason Merrill  <jason@redhat.com>
6446
6447         PR c++/5857
6448         * decl.c (duplicate_decls): Use merge_types instead of common_type.
6449         * typeck.c (common_type): Just hand off to
6450         type_after_usual_arithmetic_conversions and
6451         composite_pointer_type.
6452         (merge_types): New fn.
6453         (commonparms): Use it instead of common_type.
6454         (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
6455         (composite_pointer_type): Also handle attributes.
6456         * cp-tree.h: Declare merge_types.
6457
6458         * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
6459         variables.
6460         * decl2.c (maybe_make_one_only): Also mark the decl as needed.
6461
6462 2002-03-14  Richard Henderson  <rth@redhat.com>
6463
6464         * decl.c: Include c-pragma.h.
6465         (start_decl, start_function): Invoke maybe_apply_pragma_weak.
6466         * Make-lang.in: Update dependencies.
6467
6468 2002-03-14  Jakub Jelinek  <jakub@redhat.com>
6469
6470         PR c++/5908
6471         * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
6472         * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
6473
6474 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
6475
6476         * mangle.c (write_builtin_type): Handle 128-bit integers even if
6477         they are not a standard integer type.
6478
6479 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
6480
6481         * cp-tree.h (init_init_processing): Remove declaration.
6482         * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
6483         * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
6484
6485 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6486
6487         * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
6488         Define.
6489         * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
6490         tree_code_length.
6491         * lex.c (cplus_tree_code_type, cplus_tree_code_length,
6492         cplus_tree_code_name): Delete.
6493         (cxx_init): Don't call add_c_tree_codes, instead set
6494         lang_unsafe_for_reeval.  Don't try to copy into the various
6495         tree_code arrays.
6496
6497 2002-03-12  Nathan Sidwell  <nathan@codesourcery.com>
6498
6499         PR c++/5659
6500         * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
6501         * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
6502         definitions.
6503
6504 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
6505
6506         Revert 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>,
6507         DR209 is now not a defect.
6508         * cp-tree.h (skip_type_access_control): Remove.
6509         * decl.c (grokdeclarator): Do type access control for friend
6510         declarations.
6511         * semantics.c (decl_type_access_control): Don't reset
6512         current_type_lookups.
6513         (save_type_access_control): Always save the lookups.
6514         (skip_type_access_control): Remove.
6515         (finish_class_definition): Don't change type_lookups.
6516
6517 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
6518
6519         Revert 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>,
6520         It is incorrect.
6521         * typeck.c (build_static_cast): Compare non-qualified types
6522         with pointer to member conversions.
6523
6524 2002-03-11  Dan Nicolaescu  <dann@ics.uci.edu>
6525             Daniel Berlin  <dan@dberlin.org>
6526
6527         * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
6528         (cxx_get_alias_set): Use it.
6529
6530 2002-03-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6531
6532         * cp-tree.h (stabilize_expr): Prototype.
6533
6534 2002-03-08  Craig Rodrigues  <rodrigc@gcc.gnu.org>
6535
6536         * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
6537         conditional return void.
6538
6539 2002-03-08  Neil Booth  <neil@daikokuya.demon.co.uk>
6540
6541         * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
6542         * cp-tree.h (cxx_unsave): New.
6543         * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
6544         (init_tree): Update.
6545
6546 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6547
6548         * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
6549         explicit sizeof/sizeof.
6550         * decl2.c (cxx_decode_option): Likewise.
6551         * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
6552
6553 2002-03-02  Nathan Sidwell  <nathan@codesourcery.com>
6554
6555         PR c++/775
6556         * decl.c (lookup_tag): Only reject enum/class mismatch, not
6557         class/union mismatch.
6558         * parse.y (check_class_key): New function.
6559         (structsp): Call it.
6560
6561 2002-03-01  Michael Matz  <matz@suse.de>
6562
6563         * typeck.c (cp_pointer_int_sum): Complete inner type which is
6564         used later by size_in_bytes().
6565
6566 2002-03-01  Phil Edwards  <pme@gcc.gnu.org>
6567
6568         * cp-tree.h:  Require __GNUC__ to be #defined.
6569         (build_init):  Add missing prototype.
6570
6571 2002-03-01  Jason Merrill  <jason@redhat.com>
6572
6573         * except.c: Don't include decl.h or obstack.h.  Do include
6574         tree-inline.h.
6575         (build_throw): Destroy temporaries from the thrown
6576         expression before calling __cxa_throw.  Construct a thrown
6577         temporary directly into the exception object.
6578         (stabilize_throw_expr): New function.
6579         (wrap_cleanups_r): New function.
6580         * tree.c (stabilize_expr): New function.
6581         * init.c (build_init): New function.
6582         * Make-lang.in (cp/except.o): Adjust .h deps.
6583
6584 2002-02-28  Jason Merrill  <jason@redhat.com>
6585
6586         * search.c (lookup_base_r): Don't clear is_non_public just because
6587         we found a friendly scope.
6588
6589         * decl.c (finish_function): Only warn about missing return
6590         statement with -Wreturn-type.
6591
6592 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
6593
6594         * class.c (build_clone): Update.
6595         * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
6596         * cp-tree.h (cxx_dup_lang_specific_decl): New.
6597         * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
6598         (copy_decl): Update.
6599         * method.c (make_thunk): Update.
6600
6601 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
6602
6603         * decl2.c: Delete traditional-mode-related code copied from
6604         the C front end but not used, or used only to permit the
6605         compiler to link.
6606
6607 2002-02-24 Craig Rodrigues  <rodrigc@gcc.gnu.org>
6608
6609         PR c++/4093
6610         * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
6611         to void.
6612
6613 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
6614
6615         PR other/5746
6616         * semantics.c (finish_switch_cond): Don't call get_unwidened
6617         if error_mark_node.
6618
6619 2002-02-22  Nathan Sidwell  <nathan@codesourcery.com>
6620
6621         PR c++/2645, DR 295
6622         * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
6623         tf_keep_type_decl.
6624         (make_typename_type): Use tsubst_flags_t.
6625         * decl.c (make_typename_type): Adjust. Return non-artificial
6626         TYPE_DECLs, if required.
6627         (grokdeclarator): Simplify CVR qualification handling. Allow bad
6628         qualifiers on typedef types.
6629         * decl2.c (handle_class_head): Adjust make_typename_type call.
6630         * parse.y (nested_name_specifier): Likewise.
6631         (typename_sub0): Likewise.
6632         (typename_sub1): Likewise.
6633         * pt.c (convert_template_argument): Adjust make_typename_type
6634         return value.
6635         (tsubst): Adjust cp_build_qualified_type_real calls.
6636         (check_cv_quals_for_unify): Cope with allowing bad qualifications
6637         on template type parms.
6638         (instantiate_decl): Recheck substitutions to give warnings on bad
6639         qualifications.
6640         * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
6641
6642 2002-02-21  Aldy Hernandez  <aldyh@redhat.com>
6643
6644         * cp/decl.c (duplicate_decls): Merge always_inline attribute.
6645
6646         * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
6647         unless DECL_ALWAYS_INLINE.
6648
6649 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
6650
6651         * typeck.c (cp_pointer_int_sum): Renamed from
6652         pointer_int_sum, call pointer_int_sum.
6653
6654 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
6655
6656         * decl.c (duplicate_decls): Return 0 if issued error about
6657         redeclaration.
6658
6659 2002-02-19  Jason Merrill  <jason@redhat.com>
6660
6661         ABI change: Mangle `void (A::*)() const' as
6662         M1AKFvvE, not MK1AFvvE.
6663         * mangle.c (write_function_type): Write cv-quals for member
6664         function type here.
6665         (write_pointer_to_member_type): Not here.
6666
6667 2002-02-18  Jason Merrill  <jason@redhat.com>
6668
6669         * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
6670         (do_decl_instantiation): Likewise.
6671
6672 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
6673
6674         PR c++/5685
6675         * decl.c (duplicate_decls): Make warning unconditional
6676         if duplicate default argument declarations are present.
6677
6678 2002-02-17  Jakub Jelinek  <jakub@redhat.com>
6679
6680         * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
6681         shortening.
6682
6683 2002-02-15  Nathan Sidwell  <nathan@codesourcery.com>
6684
6685         * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
6686         remove incorrect comment. Move #if 0'd code to common path. Use
6687         IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
6688
6689 2002-02-13  Jason Merrill  <jason@redhat.com>
6690
6691         * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
6692         (finish_function): Don't warn if current_function_returns_null.
6693
6694         * typeck2.c (digest_init): Do handle values of vector type.
6695
6696         * typeck2.c (digest_init, process_init_constructor): Treat vectors
6697         like arrays.
6698
6699 2002-02-11  Jason Merrill  <jason@redhat.com>
6700
6701         * parse.y (reserved_declspecs): Don't handle attributes.
6702         (reserved_typespecquals): Handle them here.
6703         * Make-lang.in (parse.c): Adjust expected conflicts.
6704
6705 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
6706
6707         * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
6708         instead of compstmt.
6709         (compstmt_or_stmtexpr): Renamed from compstmt.
6710         (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
6711
6712 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
6713
6714         Rename instantiate_type_flags to tsubst_flags_t & expand use.
6715         * cp-tree.h (instantiate_type_flags): Rename to ...
6716         (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
6717         add tf_warning flag.
6718         (instantiate_type): Adjust prototype.
6719         (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
6720         do_type_instantiation, cp_build_qualified_type_real): Likewise.
6721         cp_build_qualified_type: Adjust.
6722         * class.c (instantiate_type): Adjust parameter. Rename itf_* to
6723         tf_*.
6724         * call.c (standard_conversion): Rename itf_* to tf_*.
6725         (reference_binding): Likewise.
6726         (convert_like_real): Likewise.
6727         * cvt.c (cp_convert_to_pointer): Likewise.
6728         (convert_to_reference): Likewise.
6729         * decl.c (lookup_namespace_name): Use tf_* flags.
6730         (make_typename_type): Likewise.
6731         (grokdeclarator): Likewise.
6732         * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
6733         (coerce_template_template_parms, convert_template_argument,
6734         coerce_template_parms, maybe_get_template_decl_from_type_decl,
6735         lookup_template_class, tsubst_friend_function, tsubst_friend_class,
6736         instantiate_class_template, tsubst_template_arg_vector,
6737         tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
6738         tsubst_decl, tsubst_arg_types, tsubst_function_type,
6739         tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
6740         instantiate_template, fn_type_unification,
6741         resolve_overloaded_unification, verify_class_unification,
6742         unify, get_bindings_real, do_type_instantiation,
6743         regenerate_decl_from_template, instantiate_decl,
6744         tsubst_initializer_list, tsubst_enum,
6745         get_mostly_instantiated_function_type,
6746         invalid_nontype_parm_type_p): Likewise.
6747         * tree.c (cp_build_qualified_type_real): Likewise.
6748         * typeck.c (build_binary_op): Rename itf_* to tf_*.
6749         (build_ptrmemfunc): Likewise.
6750         (convert_for_assignment): Likewise.
6751
6752 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
6753
6754         PR c++/109
6755         * decl.c (grokdeclarator): Allow friend declarations from
6756         dependent types.
6757         * decl2.c (handle_class_head): Don't push into template parm contexts.
6758         * pt.c (push_template_decl_real): Template parm contexts are never
6759         being defined.
6760
6761 2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
6762
6763         * class.c: Include target.h.
6764         (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
6765         BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
6766         bit-field layout.
6767         * Make-lang.in: Adjust deps.
6768
6769 2002-02-05  Jason Merrill  <jason@redhat.com>
6770
6771         * error.c (dump_type): Be more helpful about VECTOR_TYPE.
6772
6773 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
6774
6775         * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
6776         (finish_switch_cond): Set SWITCH_TYPE.
6777
6778 2002-02-04  Richard Henderson  <rth@redhat.com>
6779
6780         * method.c (use_thunk): Always initialize the block tree.  Reindent.
6781         * semantics.c (expand_body): Emit thunks after function, not before.
6782
6783 2002-02-04  Jason Merrill  <jason@redhat.com>
6784
6785         * decl.c (start_function): Call cplus_decl_attributes immediately
6786         after grokdeclarator.
6787
6788         * decl.c (start_function): Combine DECL_RESULT handling code.
6789
6790 2002-02-03  Jason Merrill  <jason@redhat.com>
6791
6792         * xref.c: Remove.
6793         * Make-lang.in (CXX_OBJS): Remove cp/xref.o
6794         (cp/xref.o): Remove dependencies.
6795         * class.c (finish_struct_1, check_methods): Don't call xref fns.
6796         (finish_struct_1): Likewise.
6797         * friend.c (make_friend_class): Likewise.
6798         * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
6799         * spew.c (read_process_identifier): Likewise.
6800
6801 2002-02-01  Jason Merrill  <jason@redhat.com>
6802
6803         PR c++/4872
6804         * decl.c (finish_function): Warn about a non-void function with
6805         no return statement and no abnormal exit.
6806         * cp-tree.h (struct cp_language_function): Add returns_abnormally.
6807         (current_function_returns_abnormally): New macro.
6808         * call.c (build_call): Set it.
6809
6810         * typeck.c (build_component_ref): Always complain about offsetof
6811         constructs on non-PODs.  Only make it an error for members of
6812         virtual bases.
6813
6814         * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
6815         (dump_function_decl): Always dump parms.
6816
6817         * decl2.c (finish_static_data_member_decl): Complain about a local
6818         class with a static data member.
6819
6820         PR c++/4286
6821         * search.c (lookup_field_1): Don't xref a static data member
6822         just because we looked it up.
6823
6824 2002-01-31  Jason Merrill  <jason@redhat.com>
6825
6826         * Make-lang.in (parse.c): Handle .output file.
6827
6828         PR c++/3395
6829         * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
6830         not TREE_TYPE.
6831         * semantics.c (finish_class_definition): Adjust.
6832
6833         Allow attributes in parms and casts.
6834         * parse.y (named_parm): Don't strip attrs.
6835         (declmods): Remove 'attributes' production.
6836         (nonempty_cv_qualifiers): Accept attributes.
6837         (ATTRIBUTE): Give precedence.
6838         * decl.c (groktypename): Handle attributes.
6839         (grokparms): Likewise.
6840
6841 2002-01-29  Jakub Jelinek  <jakub@redhat.com>
6842
6843         * decl2.c (cxx_decode_option): Pass 0 as last argument to
6844         cpp_handle_option.
6845         * lang-specs.h: Use cpp_unique_options instead of cpp_options
6846         when used together with cc1_options.
6847
6848 2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
6849
6850         PR c++/5132
6851         * typeck2.c (digest_init): Make sure non-array core type is
6852         instantiated.
6853         * decl2.c (reparse_absdcl_as_casts): Just store the type in the
6854         constructor, rather than build a new one.
6855         (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
6856         PURPOSE of constructor elts.
6857
6858 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
6859
6860         * Make-lang.in (parse.c): Adjust expected number of
6861         shift-reduce conflicts.
6862         (decl.o): Depend on diagnostic.h.
6863         * decl.c: Include diagnostic.h.
6864         (grokdeclarator): Check for null pointer.
6865         (finish_function): Don't abort when
6866         current_binding_level->parm_flag != 1, if errors have
6867         occurred; throw away the statement tree and extra binding
6868         levels, and continue.
6869         * lex.c (note_list_got_semicolon): Check for null pointer.
6870         * method.c (hack_identifier): Just return error_mark_node if
6871         value is error_mark_node.
6872         * parse.y (primary: TYPEID(type_id)): No need to use
6873         TYPE_MAIN_VARIANT here.
6874         (handler_seq): Accept an empty list of catch clauses and
6875         generate a fake handler block to avoid later crashes.
6876         (ansi_raise_identifier): Accept the error token too.
6877         * semantics.c (begin_class_definition,
6878         finish_class_definition): Check for error_mark_node.
6879
6880 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
6881
6882         * typeck2.c (friendly_abort): Delete definition.
6883         * cp-tree.h (friendly_abort): Don't prototype.
6884         (my_friendly_assert): Use fancy_abort.
6885
6886 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
6887
6888         * cp-tree.h (my_friendly_abort): Remove.
6889
6890 2002-01-23  Jakub Jelinek  <jakub@redhat.com>
6891
6892         * spew.c (pending_inlines, pending_inlines_tail,
6893         processing_these_inlines): Make static.
6894         (mark_pending_inlines): Remove static.
6895         (begin_parsing_inclass_inline): If in function, save pi
6896         for GC to cp_function_chain->unparsed_inlines instead.
6897         (process_next_inline): Likewise.
6898         * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
6899         (mark_pending_inlines): Add prototype.
6900         * decl.c (spew_debug): Remove unused extern.
6901         (mark_lang_function): Call mark_pending_inlines.
6902
6903 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
6904
6905         * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
6906         init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
6907         semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
6908         Change my_fancy_abort() to abort().
6909
6910 2002-01-23  Jason Merrill  <jason@redhat.com>
6911
6912         PR c++/5453
6913         * class.c (fixed_type_or_null): Fix thinko.
6914
6915         PR c++/3331
6916         * init.c (resolve_offset_ref): Use build_indirect_ref.
6917
6918         * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
6919
6920 2002-01-22  Jason Merrill  <jason@redhat.com>
6921
6922         * parse.y (function_body): Suppress the block for the outermost
6923         curly braces.
6924         * decl.c (pushdecl): Don't try to skip it.
6925         (begin_function_body): Keep the block we create, not the next one.
6926         * init.c (emit_base_init): Don't mess with keep_next_level.
6927
6928         * class.c (build_base_path): Tweak formatting.
6929
6930 2002-01-19  Nathan Sidwell  <nathan@codesourcery.com>
6931
6932         Fix regression introduced with patch for c++/775
6933         * parse.y (class_head_defn): Check for template specializations
6934         with a different class-key.
6935
6936 2002-01-17  Jason Merrill  <jason@redhat.com>
6937
6938         * decl.c (begin_constructor_body, begin_destructor_body): New fns.
6939         (begin_function_body): Call them and keep_next_level.
6940         * init.c (emit_base_init): Call keep_next_level.
6941         * semantics.c (setup_vtbl_ptr): Lose.
6942         * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
6943         (vtbls_set_up_p): Lose.
6944         * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
6945         * method.c (do_build_copy_constructor): Likewise.
6946         (synthesize_method): Call finish_mem_initializers.
6947         * parse.y (nodecls): Likewise.
6948
6949         * error.c (dump_type_suffix): Print the exception specs before
6950         recursing.
6951         (dump_function_decl): Here, too.
6952
6953         * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
6954
6955 2002-01-10  Ira Ruben   <ira@apple.com>
6956
6957         PR c++/907
6958         * decl.c (start_method): Handle attrlist.
6959
6960 2002-01-10  Jakub Jelinek  <jakub@redhat.com>
6961
6962         * decl2.c (max_tinst_depth): Increase default limit to 500.
6963
6964 2002-01-10  Graham Stott  <grahams@redhat.com>
6965
6966         * spew.c (YYCHAR): Uppercase macro parameter and add
6967         parenthesis.
6968         (YYCODE): Likewise.
6969         (NAME): Uppercase macro parameter.
6970
6971 2002-01-09  Graham Stott  <grahams@redhat.com>
6972
6973         * decl.h (grokdeclarator): Wrap long line.
6974
6975         * semantics.c (FINISH_COND): Uppercase macro paramaters and
6976         add parenthesis.
6977
6978 2002-01-08  Graham Stott  <grahams@redhat.com>
6979
6980         * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
6981         (PALLOC): Uppercase macro parameter and whitespace.
6982         (SALLOC): Uppercase macro parameter.
6983         (SFREE): Uppercase macros parameter, add parenthese and
6984         whitespace.
6985         (STREQL): Uppercase macro parameter and whitespace.
6986         (STRNEQ): Likewise.
6987         (STRLSS): Likewise.
6988         (STRLEQ): Likewise.
6989         (STRGTR): Likewise.
6990         (STRGEQ): Likewise.
6991
6992         * call.c (convert_like): Add parenthesis and wrap.
6993         (convert_like_with_context): Likewise.
6994         (ICS_RANK): Whitespace.
6995         (NEED_TEMPORARY_P): Remove parenthesis.
6996
6997         * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
6998         whitespace.
6999         (VTT_MARKED_BINFO_P): Likewise.
7000
7001         * decl.c (BINDING_LEVEL): Add parenthesis.
7002         (DEF_OPERATOR): Likewise.
7003
7004         * mangle.c (MANGLE_TRACE): Add parenthesis.
7005         (MANGLE_TRACE_TREE): Likewise.
7006         (write_signed_number): Likewise.
7007         (write_unsigned_number): Likewise.
7008
7009         * pt.c (ccat): Uppercase macro parameter.
7010         (cat): Likewise
7011
7012         * search.c (SET_BINFO_ACCESS): Add parenthesis.
7013
7014 2002-01-07  Jason Merrill  <jason@redhat.com>
7015
7016         * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
7017         to pedwarn.
7018
7019         PR c++/3536
7020         * method.c (make_thunk): If !flag_weak, give the thunk the
7021         function's linkage.
7022         (use_thunk): Here, too.
7023
7024 2002-01-07  Graham Stott  <grahams@redhat.com>
7025
7026         * error.c: Update copyright date.
7027         (print_scope_operator): Add parenthesis.
7028         (print_left_paren): Likewise.
7029         (print_right_paren): Likewise.
7030         (print_left_bracket): Likewise.
7031         (print_right_bracket): Likewise.
7032         (print_template_argument_list_start): Likewise.
7033         (print_template_argument_list_end): Likewise.
7034         (print_non_consecutive_character): Likewise.
7035         (print_tree_identifier): Likewise.
7036         (print_identifier): Likewise.
7037         (NEXT_CODE): Uppercase macro parameter.
7038         (ident_fndecl): Delete unused.
7039         (GLOBAL_THING): Likewise.
7040
7041 2002-01-06  Graham Stott  <grahams@redhat.com>
7042
7043         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
7044         (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
7045         (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
7046         (RECORD_OR_UNION_TYPE_CHECK): Likewise.
7047         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
7048         (C_IS_RESERVED_WORD): Uppercase macro parameter.
7049         (C_RID_YYCODE) Likewise.
7050         (ptrmem_cst): Use rtx.
7051         (LOCAL_BINDING_P): Add whitespace.
7052         (INHERITED_VALUE_BINDING_P): Likewise.
7053         (BINDING_SCOPE): Wrap long line.
7054         (BINDING_HAS_LEVEL_P): Remove parenthesis.
7055         (BINDING_VALUE): Wrap long line.
7056         (BINDING_TYPE): Whitespace.
7057         (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
7058         (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
7059         (IDENTIFIER_NAMESPACE_VALUE): Likewise.
7060         (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
7061         (same_type_p): Uppercase macro parameters.
7062         (same_type_ignoring_top_level_qualifiers_p): Likewise.
7063         (OVL_FUNCTION): Wrap long line.
7064         (OVL_CHAIN): Whitespace.
7065         (OVL_CURRENT): Add parenthesis and whitespace.
7066         (OVL_NEXT): Whitespace.
7067         (OVL_USED): Likewise.
7068         (IDENTIFIER_TYPE_VALUE): Likewise.
7069         (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
7070         (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
7071         (LANG_ID_FIELD): Whitespace.
7072         (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
7073         (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
7074         (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
7075         (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
7076         (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
7077         (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
7078         (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
7079         (IDENTIFIER_VIRTUAL_P): Likewise.
7080         (IDENTIFIER_OPNAME_P): Likewise.
7081         (IDENTIFIER_TYPENAME_P): Remove parenthesis.
7082         (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
7083         (C_SET_EXP_ORIGINAL_CODE): Likewise.
7084         (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
7085         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
7086         (IS_AGGR_TYPE): Uppercase macro parameter.
7087         (CLASS_TYPE_P): Likewise.
7088         (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
7089         (IS_AGGR_TYPE_2): Whitespace.
7090         (TAGGED_TYPE_P): Uppercase macro parameter.
7091         (TYPE_BUILT_IN): Whitespace.
7092         (TYPE_FOR_JAVA): Likewise.
7093         (FUNCTION_ARG_CHAIN): Remove parenthesis.
7094         (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
7095         (FUNCTION_FIRST_USER_PARAM): Likewise.
7096         (PROMOTES_TO_AGGR_TYPE): Whitespace.
7097         (DERIVED_FROM_P): Add parenthesis and wrap.
7098         (UNIQUELY_DERIVED_FROM_P): Likewise.
7099         (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
7100         (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
7101         (CLASSTYPE_USE_TEMPLATE): Whitespace.
7102         (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
7103         (TYPE_GETS_DELETE): Add parenthesis.
7104         (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
7105         (TYPE_HAS_ASSIGN_REF): Likewise,
7106         (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
7107         (TYPE_HAS_INIT_REF): Likewise.
7108         (TYPE_HAS_CONST_INIT_REF): Likewise.
7109         (TYPE_BEING_DEFINED): Likewise.
7110         (TYPE_LANG_SPECIFIC): Likewise.
7111         (CLASSTYPE_RTTI): Likewise.
7112         (TYPE_OVERLOADS_CALL_EXPR): Likewise.
7113         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
7114         (TYPE_OVERLOADS_ARROW): Likewise.
7115         (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
7116         (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
7117         (CLASSTYPE_METHOD_VEC): Likewise.
7118         (CLASSTYPE_MARKED_N): Likewise.
7119         (CLASSTYPE_MARKED): Likewise.
7120         (CLASSTYPE_MARKED2): Likewise.
7121         (CLASSTYPE_MARKED3): Likewise.
7122         (CLASSTYPE_MARKED4): Likewise.
7123         (CLASSTYPE_MARKED5): Likewise.
7124         (CLASSTYPE_MARKED6): Likewise.
7125         (SET_CLASSTYPE_MARKED): Whitespace.
7126         (CLEAR_CLASSTYPE_MARKED): Likewise.
7127         (SET_CLASSTYPE_MARKED2): Likewise.
7128         (CLEAR_CLASSTYPE_MARKED2): Likewise.
7129         (SET_CLASSTYPE_MARKED3): Likewise.
7130         (CLEAR_CLASSTYPE_MARKED3): Likewise.
7131         (SET_CLASSTYPE_MARKED4): Likewise.
7132         (CLEAR_CLASSTYPE_MARKED4): Likewise.
7133         (SET_CLASSTYPE_MARKED5): Likewise.
7134         (CLEAR_CLASSTYPE_MARKED5): Likewise.
7135         (SET_CLASSTYPE_MARKED6): Likewise.
7136         (CLEAR_CLASSTYPE_MARKED6): Likewise.
7137         (CLASSTYPE_TAGS): Likewise.
7138         (CLASSTYPE_VSIZE): Likewise.
7139         (CLASSTYPE_VBASECLASSES): Likewise.
7140         (CANONICAL_BINFO): Add parenthesis.
7141         (CLASSTYPE_SIZE(NODE): Likewise.
7142         (CLASSTYPE_SIZE_UNIT): Likewise.
7143         (CLASSTYPE_ALIGN(NODE): Likewise.
7144         (CLASSTYPE_USER_ALIGN): Likewise.
7145         (TYPE_JAVA_INTERFACE): Likewise.
7146         (CLASSTYPE_PURE_VIRTUALS): Likewise.
7147         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
7148         (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
7149         (CLASSTYPE_HAS_MUTABLE): Likewise.
7150         (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
7151         (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
7152         (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
7153         (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
7154         (CLASSTYPE_INTERFACE_ONLY): Likewise.
7155         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
7156         (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
7157         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
7158         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
7159         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
7160         (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
7161         (BINFO_UNSHARED_MARKED): Whitespace.
7162         (BINFO_MARKED): Whitespace and wrap.
7163         (SET_BINFO_MARKED): Likewise.
7164         (CLEAR_BINFO_MARKED): Likewise.
7165         (BINFO_VTABLE_PATH_MARKED): Likewise.
7166         (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
7167         (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
7168         (BINFO_SUBVTT_INDEX): Remove parenthesis.
7169         (BINFO_VPTR_INDEX): Likewise.
7170         (BINFO_PRIMARY_BASE_OF): Likewise,
7171         (CLASSTYPE_VFIELDS): Whitespace.
7172         (VF_DERIVED_VALUE): Wrap long line.
7173         (NAMESPACE_LEVEL): Whitespace.
7174         (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
7175         (DEFARG_POINTER): Whitespace.
7176         (DECL_NEEDED_P): Remove parenthesis.
7177         (DECL_LANGUAGE): Whitespace.
7178         (SET_DECL_LANGUAGE): Add parenthesis.
7179         (DECL_CONSTRUCTOR_P): Whitespace and wrap.
7180         (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
7181         (DECL_IN_AGGR_P): Whitespace.
7182         (DECL_FRIEND_P): Likewise.
7183         (DECL_BEFRIENDING_CLASSES): Likewise.
7184         (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
7185         (DECL_NONCONVERTING_P): Whitespace.
7186         (DECL_PURE_VIRTUAL_P): Likewise.
7187         (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
7188         (DECL_PENDING_INLINE_INFO): Whitespace.
7189         (DECL_SORTED_FIELDS): Likewise.
7190         (DECL_DEFERRED_FN): Likewise.
7191         (DECL_TEMPLATE_INFO): Likewise.
7192         (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
7193         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
7194         (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
7195         (TMPL_ARGS_LEVEL): Likewise.
7196         (SET_TMPL_ARGS_LEVEL): Likewise.
7197         (INNERMOST_TEMPLATE_PARMS): Whitespace.
7198         (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
7199         (INTEGRAL_CODE_P(CODE): Add parenthesis.
7200         (CP_INTEGRAL_TYPE_P): Remove parenthesis.
7201         (TYPE_HAS_CONSTRUCTOR): Whitespace.
7202         (TREE_HAS_CONSTRUCTOR): Likewise.
7203         (TYPE_HAS_DESTRUCTOR): Likewise.
7204         (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
7205         (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
7206         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
7207         (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
7208         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
7209         (TYPE_PTRMEMFUNC_P): Likewise.
7210         (TYPE_PTRMEMFUNC_FLAG): Likewise.
7211         (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
7212         (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
7213         (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
7214         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
7215         (DECL_ACCESS): Whitespace.
7216         (DECL_GLOBAL_CTOR_P): Remove parenthesis.
7217         (DECL_GLOBAL_DTOR_P): Likewise.
7218         (GLOBAL_INIT_PRIORITY): Likewise.
7219         (DECL_TEMPLATE_PARMS): Likewise.
7220         (DECL_TEMPLATE_RESULT): Likewise.
7221         (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
7222         (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
7223         (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
7224         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
7225         (PRIMARY_TEMPLATE_P): Add parenthesis.
7226         (DECL_USE_TEMPLATE): Whitespace.
7227         (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
7228         (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
7229         (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
7230         (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
7231         (CALL_DECLARATOR_PARMS): Remove parenthesis.
7232         (CALL_DECLARATOR_QUALS): Likewise.
7233         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
7234         (TEMP_NAME_P): Wrap.
7235         (VFIELD_NAME_P): Likewise.
7236         (B_SET): Uppercase macro parameters and add parenthesis.
7237         (B_CLR): Likewise.
7238         (B_TST): Likewise.
7239         (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
7240         (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
7241         (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
7242         (same_or_base_type_p): Likewise.
7243         (cp_deprecated): Likewise.
7244
7245 2002-01-05  Richard Henderson  <rth@redhat.com>
7246
7247         * semantics.c (expand_body): Revert last change.
7248
7249 2002-01-04  Jason Merrill  <jason@redhat.com>
7250
7251         PR c++/4122
7252         * class.c (update_vtable_entry_for_fn): Set delta to zero for a
7253         lost primary.
7254
7255         * class.c (build_vtbl_initializer): Check for a lost primary
7256         before calculating the vtable entry to throw away.
7257
7258 2002-01-02  Jason Merrill  <jason@redhat.com>
7259
7260         * semantics.c (expand_body): Call outlining_inline_function when
7261         emitting an inline function out of line.
7262
7263 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
7264
7265         PR c++/5116, c++/764 reversion
7266         * call.c (build_new_op): Revert the instantiations. They are
7267         incorrect.
7268
7269 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
7270
7271         PR c++/5089
7272         * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
7273
7274 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
7275
7276         PR c++/3716
7277         * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
7278         (tsubst, case POINTER_TYPE): Handle pmfs here.
7279         (tsubst, case OFFSET_TYPE): Check it is not an offset to
7280         reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
7281
7282 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
7283
7284         PR c++/35
7285         * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
7286         (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
7287         * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
7288         PARM_DECL.
7289         (tsubst_template_parms): Break up loop statements.
7290         (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
7291         parm PARM_DECLs don't get promoted.
7292
7293 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
7294
7295         PR c++/5123
7296         * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
7297         (build_x_function_call): Cope with a COMPONENT_REF containing a
7298         TEMPLATE_ID_EXPR.
7299
7300 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
7301
7302         PR c++/5213
7303         * pt.c (convert_template_argument): Be more careful determining
7304         when RECORD_TYPE templates are or are not templates.
7305
7306 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
7307
7308         PR c++/775
7309         * cp-tree.h (handle_class_head): Adjust prototype.
7310         * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
7311         parameters. Use for all class heads.
7312         * parse.y (named_class_head_sans_basetype, named_class_head,
7313         named_complex_class_head_sans_basetype,
7314         named_class_head_sans_basetype_defn,
7315         unnamed_class_head): Remove.
7316         (class_head, class_head_apparent_template): Recognize class heads
7317         (class_head_decl, class_head_defn): New reductions. Process class
7318         heads.
7319         (structsp): Adjust class definition and class declaration
7320         reductions.
7321         (maybe_base_class_list): Give diagnostic on empty list.
7322
7323 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
7324
7325         PR c++/4379
7326         * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
7327         single non-static member.
7328         (unary_complex_lvalue): If it cannot be a pointer to member, don't
7329         make it so. Check it is not pointer to reference.
7330
7331 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
7332
7333         PR c++/5132
7334         * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
7335         are processing a template decl.
7336
7337 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
7338
7339         PR c++/5116, c++/764
7340         * call.c (build_new_op): Make sure template class operands are
7341         instantiated. Simplify arglist construction.
7342
7343 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
7344
7345         * call.c (build_user_type_conversion_1): Use my_friendly_assert
7346         rather than if ... abort.
7347         * cvt.c (convert_to_reference): Likewise.
7348         * semantics.c (setup_vtbl_ptr): Likewise.
7349         * pt.c (lookup_template_class): Comment typo.
7350
7351 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
7352
7353         PR c++/5125
7354         * pt.c (push_template_decl_real): Make sure DECL has
7355         DECL_LANG_SPECIFIC.
7356
7357 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
7358
7359         PR c++/335
7360         * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
7361         for non-reference fields.
7362         * typeck.c (require_complete_type): Use resolve_offset_ref).
7363
7364 2001-12-26  Nathan Sidwell  <nathan@codesourcery.com>
7365
7366         PR c++/196
7367         * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
7368
7369 2001-12-24  Nathan Sidwell  <nathan@codesourcery.com>
7370
7371         PR c++/160
7372         * typeck.c (build_modify_expr): Remove old unreachable code & tidy
7373         up. Don't stabilize_references when initializing a reference.
7374
7375 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7376
7377         * decl2.c (lang_f_options): Const-ify.
7378
7379 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
7380
7381         * config-lang.in (diff_excludes): Remove.
7382
7383 2001-12-19  Nathan Sidwell  <nathan@codesourcery.com>
7384
7385         PR c++/90
7386         * typeck.c (build_function_call_real): Use original function
7387         expression for errors.
7388
7389 2001-12-18  Jason Merrill  <jason@redhat.com>
7390
7391         PR c++/3242
7392         * class.c (add_method): Do compare 'this' quals when trying to match a
7393         used function.  Don't defer to another used function.
7394
7395 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
7396
7397         * pt.c (instantiate_clone): Remove, fold into ...
7398         (instantiate_template): ... here. Simplify by removing mutual
7399         recursion.
7400         * typeck2.c (build_m_component_ref): Don't cv qualify the function
7401         pointed to by a pointer to function.
7402         * class.c (delete_duplicate_fields_1): Typo.
7403
7404 2001-12-18  Jason Merrill  <jason@redhat.com>
7405
7406         C++ ABI change: destroy value arguments in caller.
7407         * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
7408         create an extra binding level for the parameters.
7409         * decl.c (store_parm_decls): Don't do parameter cleanups.
7410
7411 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
7412
7413         * call.c (build_new_method_call): Use '%#V'.
7414         * error.c (cv_to_string): Use V parameter to determine padding.
7415
7416 2001-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
7417
7418         * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
7419         spellings in messages.
7420
7421 2001-12-17  Zack Weinberg  <zack@codesourcery.com>
7422
7423         * cp-tree.h: Delete #defines for cp_error, cp_warning,
7424         cp_pedwarn, and cp_compiler_error.
7425         * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
7426         except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
7427         rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
7428         typeck2.c: Change calls to the above macros to use their
7429         language-independent equivalents: error, warning, pedwarn, and
7430         internal_error respectively.
7431
7432 2001-12-16  Neil Booth  <neil@daikokuya.demon.co.uk>
7433
7434         * decl2.c (finish_file): Remove back_end_hook.
7435
7436 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
7437
7438         * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
7439         cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
7440         pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
7441
7442 2001-12-15  Joseph S. Myers  <jsm28@cam.ac.uk>
7443
7444         * lang-options.h: Use American spelling in messages.
7445
7446 2001-12-13  Jason Merrill  <jason@redhat.com>
7447
7448         * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
7449
7450         Use cleanups to run base and member destructors.
7451         * init.c (push_base_cleanups): New function, split out from...
7452         (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
7453         * decl.c (finish_destructor_body): Move vbase destruction code to
7454         push_base_cleanups.
7455         (begin_function_body, finish_function_body): New fns.
7456         (finish_function): Move [cd]tor handling and call_poplevel to
7457         finish_function_body.
7458         (pushdecl): Skip the new level.
7459         * semantics.c (genrtl_try_block): Don't call end_protect_partials.
7460         (setup_vtbl_ptr): Call push_base_cleanups.
7461         * method.c (synthesize_method): Call {begin,end}_function_body.
7462         * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
7463         * cp-tree.h: Declare new fns.
7464         * parse.y (function_body, .begin_function_body): New nonterminals.
7465         (fndef, pending_inline, function_try_block): Use function_body.
7466         (ctor_initializer_opt, function_try_block): No longer has a value.
7467         (base_init): Remove .set_base_init token.
7468         (.set_base_init, compstmt_or_error): Remove.
7469         * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
7470
7471         * optimize.c (maybe_clone_body): Fix parameter updating.
7472
7473 2001-12-12  Jason Merrill  <jason@redhat.com>
7474
7475         * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
7476         * semantics.c (genrtl_start_function): Don't pass
7477         parms_have_cleanups or push an extra binding level.
7478         (genrtl_finish_function): Lose cleanup_label cruft.
7479
7480         * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
7481         (ctor_label): Remove.
7482         * semantics.c (finish_return_stmt): Lose ctor_label support.
7483         * decl.c (finish_constructor_body, mark_lang_function): Likewise.
7484         * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
7485         dtor_label.
7486
7487         * call.c (build_new_method_call): Let resolves_to_fixed_type_p
7488         check for [cd]tors.
7489         * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
7490
7491         * decl.c (finish_function): Check VMS_TARGET, not VMS.
7492
7493         * decl.c (start_cleanup_fn): Remove redundant pushlevel.
7494         (end_cleanup_fn): And poplevel.
7495
7496         * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
7497         if we're in a template.
7498
7499 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
7500
7501         * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
7502         ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
7503         THIS_NAME_P): Delete.
7504         * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
7505         THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
7506         with internal naming scheme.
7507         * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
7508
7509 2001-12-12  Nathan Sidwell  <nathan@codesourcery.com>
7510
7511         * decl.c (grokdeclarator): Deprecated implicit typename use.
7512
7513 2001-12-11  Nathan Sidwell  <nathan@codesourcery.com>
7514
7515         PR g++/51
7516         * parse.y (frob_specs): Indicate it is a language linkage which
7517         contained the extern.
7518         * decl.c (grokdeclarator): Allow extern language linkage with
7519         other specifiers.
7520
7521 2001-12-10  Nathan Sidwell  <nathan@codesourcery.com>
7522
7523         PR g++/72
7524         * decl.c (add_binding): Don't reject duplicate typedefs involving
7525         template parameters.
7526
7527 2001-12-10  Neil Booth  <neil@daikokuya.demon.co.uk>
7528
7529         * parse.y, semantics.c: Similarly.
7530
7531 2001-12-09  Nathan Sidwell  <nathan@codesourcery.com>
7532
7533         PR g++/87
7534         * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
7535         (copy_args_p): Rename to ...
7536         (copy_fn_p): ... here.
7537         (grok_special_member_properties): New function.
7538         (grok_op_properties): Lose VIRTUALP parameter.
7539         (copy_assignment_arg_p): Remove.
7540         * call.c (build_over_call): Use copy_fn_p.
7541         * decl.c (grokfndecl): Reformat. Adjust call to
7542         grok_op_properties.
7543         (copy_args_p): Rename to ...
7544         (copy_fn_p): ... here. Reject template functions. Check for pass
7545         by value.
7546         (grok_special_member_properties): Remember special functions.
7547         (grok_ctor_properties): Don't remember them here, just check.
7548         (grok_op_properties): Likewise.
7549         (start_method): Call grok_special_member_properties.
7550         * decl2.c (grokfield): Likewise.
7551         (copy_assignment_arg_p): Remove.
7552         (grok_function_init): Don't remember abstract assignment here.
7553         * pt.c (instantiate_class_template): Call
7554         grok_special_member_properties.
7555         (tsubst_decl): Adjust grok_op_properties call.
7556
7557 2001-12-08  Aldy Hernandez  <aldyh@redhat.com>
7558
7559         * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
7560         RID_TYPES_COMPATIBLE_P.
7561
7562 2001-12-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7563
7564         * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
7565         call to build_aggr_init.
7566         * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
7567
7568 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
7569
7570         * parse.y: Replace uses of the string non-terminal with STRING.
7571         Don't perform string concatentaion here.
7572         (string): Remove non-terminal.
7573         * semantics.c (finish_asm_stmt): Don't concatenate strings here.
7574
7575 2001-12-05  Jason Merrill  <jason@redhat.com>
7576
7577         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
7578         (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
7579         * tree.c (cp_start_inlining, cp_end_inlining): New fns.
7580         * pt.c (push_tinst_level): No longer static.
7581         * cp-tree.h: Declare them.
7582
7583         * init.c (resolve_offset_ref): Don't check access for the base
7584         conversion to access a FIELD_DECL.
7585
7586         * cp-tree.h (TYPE_REFFN_P): New macro.
7587         * decl.c (bad_specifiers): Check it, too.
7588
7589         * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
7590         on the __*_type_info type if we haven't seen a definition.
7591
7592 2001-12-05  Neil Booth  <neil@daikokuya.demon.co.uk>
7593
7594         * decl.c: Include c-common.h.
7595         (shadow_warning): Move to c-common.c.
7596
7597 2001-12-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7598
7599         * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
7600
7601 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
7602
7603         * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
7604
7605 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
7606
7607         PR g++/164
7608         * init.c (sort_base_init): Allow binfos to be directly specified.
7609         * method.c (do_build_copy_constructor): Explicitly convert to the
7610         base instance.
7611         (do_build_assign_ref): Likewise.
7612
7613 2001-12-03  Hans-Peter Nilsson  <hp@bitrange.com>
7614
7615         * decl.c (xref_basetypes): Don't use C99 construct in tag_code
7616         declaration and initialization.
7617
7618 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
7619
7620         * typeck2.c: Remove leading capital from diagnostic messages, as
7621         per GNU coding standards.
7622
7623 2001-12-03  Mumit Khan  <khan@nanotech.wisc.edu>
7624
7625         PR c++/3394
7626         * decl.c (xref_basetypes): Handle attributes between
7627         'class' and name.
7628
7629 2001-12-03  Nathan Sidwell  <nathan@codesourcery.com>
7630
7631         PR g++/3381
7632         * parse.y (named_complex_class_head_sans_basetype): Add new
7633         reduction.
7634         * Make-lang.in (parse.c): Adjust expected conflict count.
7635
7636 2001-12-03  Jason Merrill  <jason@redhat.com>
7637
7638         * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
7639         immediate binfos for our virtual bases.
7640
7641 2001-12-02  Neil Booth  <neil@daikokuya.demon.co.uk>
7642
7643         * call.c (build_java_interface_fn_ref): Similarly.
7644         * except.c (is_admissible_throw_operand): Similarly.
7645         * init.c (build_java_class_ref): Similarly.
7646         * xref.c (open_xref_file): Similarly.
7647
7648 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
7649
7650         * class.c (finish_struct): Remove trailing periods from messages.
7651         * decl.c (check_tag_decl): Similarly.
7652         * lex.c (cxx_set_yydebug): Similarly.
7653         * typeck2.c (friendly_abort): Similarly.
7654
7655 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
7656
7657         PR c++/3048
7658         * cp-tree.h (ovl_member): Remove.
7659         * decl2.c (merge_functions): Handle extern "C" functions
7660         specially.
7661         * tree.c (ovl_member): Remove.
7662
7663 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
7664
7665         PR c++/4842
7666         * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
7667         FUNCTION_DECL, as input.
7668         (mark_overriders): Remove.
7669         (warn_hidden): Rework for the new ABI.
7670
7671 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
7672
7673         PR c++/3471
7674         * call.c (convert_like_real): Do not build additional temporaries
7675         for rvalues of class type.
7676
7677 2001-11-28  Nathan Sidwell  <nathan@codesourcery.com>
7678
7679         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
7680         (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
7681         (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
7682         (DERIVED_FROM_P): Likewise.
7683         (enum base_access): Renumber, add ba_quiet bit mask.
7684         (get_binfo): Remove.
7685         (get_base_distance): Remove.
7686         (binfo_value): Remove.
7687         (ACCESSIBLY_DERIVED_FROM_P): Remove.
7688         * call.c (standard_conversion): Use lookup_base.
7689         * class.c (strictly_overrides): Likewise.
7690         (layout_virtual_bases): Likewise.
7691         (warn_about_ambiguous_direct_bases): Likewise.
7692         (is_base_of_enclosing_class): Likewise.
7693         (add_vcall_offset_vtbl_entries_1): Likewise.
7694         * cvt.c (build_up_reference): Adjust comment.
7695         * init.c (build_member_call): Reformat.
7696         * search.c (get_binfo): Remove.
7697         (get_base_distance_recursive): Remove.
7698         (get_base_distance): Remove.
7699         (lookup_base_r): Tweak.
7700         (lookup_base): Add ba_quiet control. Complete the types here.
7701         (covariant_return_p): Use lookup_base.
7702         * tree.c (binfo_value): Remove.
7703         (maybe_dummy_object): Use lookup_base.
7704         * typeck.c (build_static_cast): Use lookup_base.
7705         (get_delta_difference): Likewise.
7706         * typeck2.c (binfo_or_else): Use lookup_base.
7707         (build_scoped_ref): Add back error_mark_check.
7708         (build_m_component_ref): Use lookup_base.
7709
7710 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
7711
7712         * Make-lang.in (c++.generated-manpages): New dummy target.
7713
7714 2001-11-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7715
7716         * Make-lang.in (cp-lang.o): Depends on c-common.h.
7717         * cp-lang.c (c-common.h): Include.
7718         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
7719         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
7720         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
7721
7722 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
7723
7724         * decl2.c (c_language): Move to c-common.c.
7725         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
7726         functions.
7727         (cxx_init): Update.
7728
7729 2001-11-26  Jason Merrill  <jason@redhat.com>
7730
7731         * call.c (joust): Remove COND_EXPR hack.
7732
7733 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
7734
7735         * search.c (lookup_base_r): Declare bk in variable declaration
7736         space.
7737
7738 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
7739
7740         PR g++/3145
7741         * class.c (build_vbase_pointer): Remove.
7742         (build_vbase_path): Remove.
7743         (build_base_path): New function.
7744         * cp-tree.h (base_access, base_kind): New enumerations.
7745         (build_base_path): Declare.
7746         (convert_pointer_to_real): Remove.
7747         (convert_pointer_to): Remove.
7748         (lookup_base): Declare.
7749         (convert_pointer_to_vbase): Remove.
7750         * call.c (build_scoped_method_call): Use lookup_base &
7751         build_base_path instead of convert_pointer_to_real,
7752         get_base_distance & get_binfo.
7753         (build_over_call): Likewise.
7754         * cvt.c (cp_convert_to_pointer): Likewise.
7755         (convert_to_pointer_force): Likewise.
7756         (build_up_reference): Likewise.
7757         (convert_pointer_to_real): Remove.
7758         (convert_pointer_to): Remove.
7759         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
7760         instead of convert_pointer_to_vbase & build_vbase_path.
7761         (emit_base_init): Use build_base_path instead of
7762         convert_pointer_to_real.
7763         (expand_virtual_init): Lose unrequired conversions.
7764         (resolve_offset_ref): Use lookup_base and build_base_path
7765         instead of convert_pointer_to.
7766         * rtti.c (build_dynamic_cast_1): Use lookup_base &
7767         build_base_path instead of get_base_distance & build_vbase_path.
7768         * search.c (get_vbase_1): Remove.
7769         (get_vbase): Remove.
7770         (convert_pointer_to_vbase): Remove.
7771         (lookup_base_r): New function.
7772         (lookup_base): New function.
7773         * typeck.c (require_complete_type): Use lookup_base &
7774         build_base_path instead of convert_pointer_to.
7775         (build_component_ref): Likewise.
7776         (build_x_function_call): Likewise.
7777         (get_member_function_from_ptrfunc): Likewise.
7778         (build_component_addr): Likewise.
7779         * typeck2.c (build_scoped_ref): Likewise.
7780
7781 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7782
7783         * cp-tree.h (CP_TYPE_QUALS): Removed.
7784         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
7785         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
7786         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
7787         * dump.c (cp_dump_tree): Use void* dump_info argument to match
7788         lang-hooks prototype.
7789         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
7790         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
7791         CP_TYPE_QUALS changed to cp_type_quals.
7792         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
7793         (CXX_C_OBJS): Remove c-dump.o.
7794
7795 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
7796
7797         PR c++/3637
7798         * pt.c (lookup_template_class): Ensure that all specializations
7799         are registered on the list corresponding to the most general
7800         template.
7801
7802 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
7803
7804         * call.c (non_reference): Add documentation.
7805         (convert_class_to_reference): Do not strip reference types
7806         from conversion operators.
7807         (maybe_handle_ref_bind): Simplify.
7808         (compare_ics): Correct handling of references.
7809
7810 2001-11-19  John Wilkinson <johnw@research.att.com>
7811
7812         * dump.c (dump_op): New function.
7813         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
7814         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
7815         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
7816
7817 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
7818
7819         PR4629
7820         * semantics.c (finish_sizeof): Make sure that expression created
7821         while processing a template do not have a type.
7822         (finish_alignof): Likewise.
7823         * typeck.c (c_sizeof): Likewise.
7824         (expr_sizeof): Likewise.
7825
7826 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
7827
7828         * lex.c (cxx_finish): Call c_common_finish.
7829         (finish_parse): Remove.
7830
7831 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7832
7833         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
7834         when displaying error message about missing array bounds.
7835
7836 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7837
7838         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
7839         CONST_CAST_EXPR.
7840         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
7841
7842 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
7843
7844         * cp-tree.h (print_class_statistics): Restore.
7845
7846 2001-11-15  Jason Merrill  <jason@redhat.com>
7847
7848         * method.c (use_thunk): Don't emit debugging information for thunks.
7849
7850         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
7851         * decl.c (make_typename_type): Handle getting a class template.
7852         * search.c (lookup_field_r): A class template is good enough for
7853         want_type.
7854
7855         * call.c (convert_like_real): Only use cp_convert for the bad part.
7856         (standard_conversion): Also allow bad int->enum.
7857         * typeck.c (ptr_reasonably_similar): Also allow functions to
7858         interconvert.  Pointers to same-size integers are reasonably
7859         similar.
7860
7861         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
7862         give it void type.
7863
7864 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
7865
7866         PR g++/3154
7867         * init.c (sort_base_init): Remove unreachable code.
7868         (expand_member_init): Adjust comment to reflect reality. Simplify
7869         and remove unreachable code.
7870
7871 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
7872
7873         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
7874         (cxx_init): Update prototype.
7875         * decl.c (init_decl_processing): Rename.  Move null node init
7876         to its creation time.
7877         * lex.c (cxx_init_options): Update.
7878         (cxx_init): Combine with old init_parse; also call
7879         cxx_init_decl_processing.
7880
7881 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
7882
7883         * decl.c (check_initializer): Try to complete the type of an
7884         array element before checking whether it's complete.  Don't
7885         complain about arrays with complete element types but an
7886         unknown size.
7887         (cp_finish_decl): Build the hierarchical constructor before
7888         calling maybe_deduce_size_from_array_init.
7889
7890 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
7891
7892         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
7893
7894 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
7895
7896         PR g++/4206
7897         * parse.y (already_scoped_stmt): Remove.
7898         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
7899
7900 2001-11-12  H.J. Lu <hjl@gnu.org>
7901
7902         * cvt.c (ocp_convert): Don't warn the address of a weak
7903         function is always `true'.
7904
7905 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
7906
7907         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
7908         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
7909         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
7910         * cp-tree.h (print_class_statistics): Remove.
7911         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
7912         cxx_print_identifier, cxx_set_yydebug): New.
7913         * lex.c (set_yydebug): Rename c_set_yydebug.
7914         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
7915         lang_print_xnode): Rename.
7916         * tree.c (print_lang_statistics): Rename.
7917
7918 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7919
7920         * class.c (dump_array): Fix format specifier warning.
7921
7922 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
7923
7924         * cp-lang.c (LANG_HOOKS_NAME): Override.
7925         (struct lang_hooks): Constify.
7926         * lex.c (cxx_init_options): Update.
7927         (lang_identify): Remove.
7928         * parse.y (language_string): Remove.
7929
7930 2001-11-08  Andreas Franck  <afranck@gmx.de>
7931
7932         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
7933         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
7934         suggested by autoconf.
7935         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
7936         (c++.install-common): Use the transformed target alias names.
7937
7938 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
7939
7940         * Make-lang.in: Update.
7941         * cp-lang.c: Include langhooks-def.h.
7942
7943 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7944
7945         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
7946
7947 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7948
7949         * lex.c (copy_lang_type): Add static prototype.
7950
7951 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7952
7953         * pt.c (unify): Handle SCOPE_REF.
7954
7955 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
7956
7957         * tree.c (cp_copy_res_decl_for_inlining): Adjust
7958         DECL_ABSTRACT_ORIGIN for the return variable.
7959
7960 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
7961
7962         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
7963
7964 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
7965
7966         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
7967         semantics.c, spew.c: Fix spelling errors.
7968
7969 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7970
7971         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
7972
7973 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
7974
7975         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
7976         pop_everything.
7977
7978 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7979
7980         * cp-lang.c (cxx_get_alias_set): New function.
7981         Point LANG_HOOKS_GET_ALIAS_SET to it.
7982
7983 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7984
7985         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
7986         * cp-tree.h (make_unbound_class_template): Prototype new function.
7987         * decl.c (make_unbound_class_template): New function.
7988         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
7989         * error.c (dump_type): Likewise.
7990         * mangle.c (write_type): Likewise.
7991         * parse.y (template_parm): Likewise.
7992         (template_argument): Use make_unbound_class_template.
7993         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
7994         (tsubst): Likewise.
7995         (tsubst_copy): Likewise.
7996         (unify): Likewise.
7997         * tree.c (walk_tree): Likewise.
7998         * typeck.c (comptypes): Likewise.
7999
8000 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8001
8002         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
8003         extra calls into fewer ones.
8004
8005 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
8006
8007         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
8008         Warn when merging inline with attribute noinline.
8009         (start_decl, start_function): Warn if inline and attribute
8010         noinline appear in the same declaration.
8011
8012 2001-10-16  H.J. Lu <hjl@gnu.org>
8013
8014         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
8015         for tree checking disabled.
8016
8017 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
8018
8019         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
8020         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
8021
8022 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
8023
8024         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
8025         (unify): Only handle MINUS_EXPR specially if the above flag is set
8026         and the subtracted constant is 1.  Clear the flag on recursive calls.
8027         Set it when unifying the maximum value in an INTEGER_TYPE's range.
8028
8029 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
8030
8031         * decl.c (bad_specifiers): Don't allow exception specifications
8032         on any typedefs.
8033
8034 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
8035
8036         * cp/lex.c (init_cp_pragma): Similarly.
8037
8038 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8039
8040         * pt.c (lookup_template_class): Build complete template arguments
8041         for BOUND_TEMPLATE_TEMPLATE_PARM.
8042
8043 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8044
8045         * cp-tree.h (TYPE_BINFO): Update comment.
8046         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
8047         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
8048         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
8049         (copy_type): Prototype new function.
8050         * lex.c (copy_lang_decl): Gather tree node statistics.
8051         (copy_lang_type): New function.
8052         (copy_type): Likewise.
8053         (cp_make_lang_type): Create lang_type for
8054         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
8055         and BOUND_TEMPLATE_TEMPLATE_PARM.
8056         * pt.c (tsubst): Use copy_type instead of copy_node.
8057         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
8058
8059 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8060
8061         * pt.c (determine_specialization): Ignore functions without
8062         DECL_TEMPLATE_INFO.
8063
8064 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
8065
8066         PR g++/4476
8067         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
8068
8069 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
8070
8071         * typeck2.c (store_init_value): Don't re-digest a bracketed
8072         initializer.
8073
8074         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
8075         ANON_AGGR_TYPE_P.
8076
8077 2001-10-11  Richard Henderson  <rth@redhat.com>
8078
8079         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
8080         of an asm statement.
8081         (build_vtbl_ref_1): Split out from build_vtbl_ref.
8082         (build_vfn_ref): Use it to handle vtable descriptors before
8083         calling build_vtable_entry_ref.
8084         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
8085
8086 2001-10-10  Richard Henderson  <rth@redhat.com>
8087
8088         * parse.y (asm_operand): Allow named operands.
8089         * semantics.c (finish_asm_stmt): Tweek for changed location
8090         of the operand constraint.
8091
8092 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
8093
8094         * call.c (standard_conversion): Add bad conversion between
8095         integers and pointers.
8096         (convert_like_real): Don't use convert_for_initialization for bad
8097         conversions; complain here and use cp_convert.
8098         (build_over_call): Don't handle bad conversions specially.
8099         (perform_implicit_conversion): Allow bad conversions.
8100         (can_convert_arg_bad): New fn.
8101         * cp-tree.h: Declare it.
8102         * typeck.c (convert_for_assignment): Use it.
8103         (ptr_reasonably_similar): Any target type is similar to void.
8104
8105 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
8106
8107         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
8108         (cp/cp-lang.o): New rule.
8109         * cp-tree.h: Declare hooks.
8110         * tree.c: Make hooks non-static.
8111         (init_tree): Don't initialize hooks here.
8112         * lex.c: Likewise.  Move definition of lang_hooks to...
8113         * cp-lang.c: ... new file.
8114
8115 2001-10-08  Richard Henderson  <rth@redhat.com>
8116
8117         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
8118         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
8119
8120 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8121
8122         * class.c (build_vtable_entry_ref): Const-ify.
8123         * decl.c (predefined_identifier,
8124         initialize_predefined_identifiers): Likewise.
8125         * init.c (build_new_1): Likewise.
8126         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
8127         Likewise.
8128
8129 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
8130
8131         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
8132         (INSNS_PER_STMT): Likewise.
8133         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
8134         (copy_body, initialize_inlined_parameters): Likewise.
8135         (declare_return_variable, inlinable_function_p): Likewise.
8136         (expand_call_inline, expand_calls_inline): Likewise.
8137         (optimize_inline_calls, clone_body): Likewise.
8138         * tree.c (walk_tree): Moved to ../tree-inline.c.
8139         (walk_tree_without_duplicates): Likewise.
8140         (copy_tree_r, remap_save_expr): Likewise.
8141
8142 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
8143
8144         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
8145         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
8146         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
8147         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
8148         (flag_inline_trees): Moved declaration to ../tree-inline.h.
8149         (walk_tree): Moved declaration to ../tree-inline.h.
8150         (walk_tree_without_duplicates, copy_tree_r): Likewise.
8151         (remap_save_expr): Likewise.
8152         * decl.c: Include tree-inline.h.
8153         (lang_mark_tree): Don't mark inlined_fns.
8154         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
8155         * optimize.c: Include tree-inline.h.
8156         (optimize_inline_calls): Move declaration to ../tree.h, as
8157         non-static.
8158         (remap_decl): Use language-independent constructs and hooks.
8159         (remap_block, copy_body_r, declare_return_variable): Likewise.
8160         (inlinable_function_p): Likewise.  Don't test for
8161         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
8162         no longer language-specific.
8163         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
8164         call of dump_function to...
8165         (optimize_function): Here...
8166         (clone_body): New function, extracted from...
8167         (maybe_clone_body): ... here.  Build decl_map locally and pass
8168         it on to clone_body.
8169         * pt.c, semantics.c: Include tree-inline.h.
8170         * tree.c: Likewise.
8171         (cp_walk_subtrees): New language-specific hook for tree inlining.
8172         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
8173         cp_is_overload_p, cp_auto_var_in_fn_p,
8174         cp_copy_res_decl_for_inlining): Likewise.
8175         (walk_tree): Move language-specific constructs into...
8176         (cp_walk_subtrees): this new function.
8177         (copy_tree_r): Use language-independent constructs and hooks.
8178         (init_tree): Initialize tree inlining hooks.
8179         (remap_save_expr): Adjust prototype so that the declaration
8180         does not require the definition of splay_tree.
8181
8182 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
8183
8184         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
8185         to build the declaration instead of the declaration itself.
8186
8187 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
8188
8189         * decl2.c (cxx_decode_option): Add 'else'.
8190
8191         * spew.c (end_input): No longer static.
8192         * cp-tree.h: Declare it.
8193         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
8194
8195 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
8196
8197         * call.c (build_over_call), typeck.c (build_function_call_real):
8198         Pass type attributes to check_function_format rather than name or
8199         assembler name.  Don't require there to be a name or assembler
8200         name to check formats.
8201
8202 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
8203
8204         * decl.c (init_decl_processing): Don't call
8205         init_function_format_info.  Initialize lang_attribute_table
8206         earlier.
8207         (builtin_function): Call decl_attributes.
8208         (insert_default_attributes): New.
8209
8210 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
8211
8212         * decl.c (grokdeclarator): Copy array typedef handling from C
8213         frontend.
8214
8215         * decl.c (grokdeclarator): Copy too-large array handling from C
8216         frontend.
8217
8218 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
8219
8220         * config-lang.in (target_libs): Added target-gperf, so that we
8221         don't try to build it if C++ is disabled.
8222
8223 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
8224
8225         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
8226         (cp/errfn.o): Delete rule.
8227         (cp/error.o): Depend on flags.h.
8228         * errfn.c: Delete file.
8229         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
8230         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
8231         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
8232         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
8233         internal_error respectively.  Make cp_deprecated into a macro.
8234         Don't define cp_printer typedef or declare cp_printers.
8235         * error.c: Include flags.h.
8236         Delete: struct tree_formatting_info, print_function_argument_list,
8237         print_declaration, print_expression, print_function_declaration,
8238         print_function_parameter, print_type_id, print_cv_qualifier_seq,
8239         print_type_specifier_seq, print_simple_type_specifier,
8240         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
8241         print_parameter_declaration_clause, print_exception_specification,
8242         print_nested_name_specifier, and definition of cp_printers.
8243         (locate_error): New function.
8244         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
8245         rewritten in terms of locate_error and diagnostic.c.
8246         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
8247         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
8248         (init_error): Adjust to match.
8249
8250 2001-09-22  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8251
8252         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
8253
8254 2001-09-21  Richard Henderson  <rth@redhat.com>
8255
8256         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
8257         (build_vtbl_initializer): Likewise.
8258         (build_vfn_ref): New.
8259         * cp-tree.h: Declare it.
8260         * call.c (build_over_call): Use it.
8261         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
8262         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
8263
8264 2001-09-21  J"orn Rennecke <amylaar@redhat.com>
8265
8266         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
8267
8268 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
8269
8270         Table-driven attributes.
8271         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
8272         * decl2.c (cplus_decl_attributes): Only take one attributes
8273         parameter.
8274         * cp-tree.c (cplus_decl_attributes): Update prototype.
8275         * class.c (finish_struct), decl.c (start_decl, start_function),
8276         decl2.c (grokfield), friend.c (do_friend), parse.y
8277         (parse_bitfield): Update calls to cplus_decl_attributes.
8278         * decl.c (grokdeclarator): Take a pointer to a single ordinary
8279         attribute list.
8280         * decl.h (grokdeclarator): Update prototype.
8281         * decl2.c (grokfield): Take a single ordinary attribute list.
8282         * friend.c (do_friend): Likewise.
8283         * decl.c (shadow_tag, groktypename, start_decl,
8284         start_handler_parms, grokdeclarator, grokparms, start_function,
8285         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
8286         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
8287         (process_template_parm, do_decl_instantiation): Pass single
8288         ordinary attribute lists around.
8289         * decl.c (grokdeclarator): Correct handling of nested attributes.
8290         Revert the patch
8291         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
8292                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
8293                 not the left.
8294         .
8295         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
8296         (cp_attribute_table): Declare.
8297         * decl.c (valid_lang_attribute): Don't define.
8298         (lang_attribute_table): Define.
8299         (init_decl_processing): Initialize lang_attribute_table instead of
8300         valid_lang_attribute.
8301         * tree.c (cp_valid_lang_attribute): Remove.
8302         (handle_java_interface_attribute, handle_com_interface_attribute,
8303         handle_init_priority_attribute): New functions.
8304         (cp_attribute_table): New array.
8305         * decl2.c (import_export_class): Don't use
8306         targetm.valid_type_attribute.
8307
8308 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
8309
8310         * Make-lang.in (cp/error.o): Depend on real.h
8311         * error.c: #include "real.h"
8312
8313 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8314
8315         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
8316         xmalloc/strcpy/strcat.
8317
8318 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8319
8320         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
8321         Const-ification.
8322         * pt.c (tsubst_decl): Likewise.
8323
8324 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8325
8326         * decl2.c (lang_f_options): Const-ification.
8327         * lex.c (cplus_tree_code_name): Likewise.
8328         * spew.c (yyerror): Likewise.
8329
8330 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
8331
8332         PR c++/3986
8333         * class.c (force_canonical_binfo_r): Check & move an indirect
8334         primary base first.
8335         (force_canonical_binfo): Check that it's not already
8336         canonical.
8337         (mark_primary_virtual_base): Remove BINFO parameter.
8338         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
8339
8340 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
8341
8342         Remove TYPE_NONCOPIED_PARTS.
8343         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
8344         CLASSTYPE_PURE_VIRTUALS.
8345         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
8346         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
8347         (layout_class_type): Don't call fixup_inline_methods here ...
8348         (finish_struct_1): ... call it here.
8349
8350 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
8351
8352         * decl.c (duplicate_decls): Remove code deadling with
8353         DECL_SAVED_INSNS.
8354         * decl2.c (finish_file): Likewise.
8355         * pt.c (instantiate_decl): Likewise.
8356         * semantics.c (expand_body): Don't defer local functions if
8357         they wouldn't be deferred for some other reason.  Don't
8358         generate RTL for functions that will not be emitted.
8359         (genrtl_start_function): Remove code deadling with
8360         DECL_SAVED_INSNS.
8361         (genrtl_finish_function): Likewise.
8362
8363 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
8364
8365         PR c++/4203
8366         * call.c (build_over_call): Do not optimize any empty base
8367         construction.
8368
8369 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8370
8371         * error.c (dump_template_decl): Output template parameters
8372         together with their specifiers.
8373         Output `class' prefix for template template parameter.
8374         (dump_decl): Fix formatting.
8375
8376 2001-08-30  Kurt Garloff  <garloff@suse.de>
8377
8378         * optimize.c (inlinable_function_p): Allow only smaller single
8379         functions. Halve inline limit after reaching recursive limit.
8380
8381 2001-08-30  Joern Rennecke <amylaar@redhat.com>
8382             Jason Merrill  <jason_merrill@redhat.com>
8383
8384         * class.c (build_vtable_entry_ref): Subtract in char*, not
8385         ptrdiff_t.
8386
8387 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
8388
8389         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
8390         (build_cplus_array_type): Use cp_build_qualified_type, not
8391         TYPE_MAIN_VARIANT, to get an unqualified version.
8392
8393         * decl2.c (grok_alignof): Lose.
8394         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
8395         * typeck.c (c_alignof): Lose.
8396         * semantics.c (finish_sizeof, finish_alignof): New.
8397         * parse.y: Use them.
8398         * cp-tree.h: Declare them.
8399
8400 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
8401
8402         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
8403         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
8404         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
8405
8406 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
8407
8408         * typeck2.c (add_exception_specifier): Only require complete type if
8409         not in processing template declaration.
8410
8411 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8412
8413         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
8414         GNU_xref_start_scope and GNU_xref_end_scope.
8415
8416         * tree.c (TYPE_HASH): Moved to ../tree.h.
8417
8418 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
8419
8420         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
8421         on COMPOUND_EXPRs.
8422
8423 2001-08-14  Richard Henderson  <rth@redhat.com>
8424
8425         * class.c, cp-tree.h (build_vfn_ref): Remove.
8426         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
8427
8428 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
8429
8430         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
8431         empty class assignment as having side-effects to avoid
8432         spurious warnings.
8433
8434 2001-08-13  Zack Weinberg  <zackw@panix.com>
8435
8436         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
8437         * except.c: Include libfuncs.h.
8438
8439 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
8440
8441         * decl.c (grokdeclarator): Clarify diagnostic message.
8442
8443 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8444
8445         * decl2.c (do_nonmember_using_decl): Replace using directive
8446         with using declaration in the error message.
8447
8448 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8449
8450         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
8451         criterion to avoid rebuilding expression tree instead of
8452         processing_template_decl.
8453
8454 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
8455
8456         Support named return value optimization for inlines, too.
8457         * decl.c (finish_function): Nullify returns here.
8458         * semantics.c (genrtl_start_function): Not here.
8459         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
8460         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
8461         Also nullify the CLEANUP_STMT for the nrv.
8462         * cp-tree.h: Declare it.
8463         * optimize.c (declare_return_variable): Replace the nrv with the
8464         return variable.
8465         * typeck.c (check_return_expr): Be more flexible on alignment check.
8466         Ignore cv-quals when checking for a matching type.
8467
8468 2001-08-09  Richard Henderson  <rth@redhat.com>
8469
8470         * decl2.c (finish_objects): Use target hooks instead of
8471         assemble_constructor and assemble_destructor.
8472
8473 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
8474
8475         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
8476
8477 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
8478
8479         PR c++/3820
8480         Stop using TYPE_NONCOPIED_PARTS.
8481         * call.c (build_over_call): Be careful when copy constructing
8482         or assigning to an empty class.
8483         * class.c (check_bases_and_members): It has a
8484         COMPLEX_ASSIGN_REF if it has a vptr.
8485         (layout_class_type): Don't add empty class padding to
8486         TYPE_NONCOPIED_PARTS.
8487         (finish_struct_1): Don't add the VFIELD either.
8488         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
8489         initialization.
8490
8491 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
8492
8493         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
8494
8495 2001-08-06  Richard Henderson  <rth@redhat.com>
8496
8497         * decl2.c (finish_objects): Pass a symbol_ref and priority to
8498         assemble_{constructor,destructor}.  Remove priority handling.
8499
8500 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
8501
8502         Don't allow template-id in using-declaration.
8503         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
8504         (do_class_using_decl): Likewise.
8505
8506 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
8507
8508         * cp/spew.c (read_token): No need to pop buffers.
8509
8510 2001-08-02  Stan Shebs  <shebs@apple.com>
8511
8512         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
8513         (fnaddr_from_vtable_entry): Remove decl.
8514         * method.c (use_thunk): Update comment.
8515
8516 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
8517
8518         * repo.c (get_base_filename): Change return value to const char
8519         pointer.
8520
8521 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
8522
8523         Kill -fhonor-std.
8524         * NEWS: Document.
8525         * cp-tree.h (flag_honor_std): Remove.
8526         (CPTI_FAKE_STD): Remove.
8527         (std_node): Remove comment about it being NULL.
8528         (fake_std_node): Remove.
8529         * decl.c (in_fake_std): Remove.
8530         (walk_namespaces_r): Remove fake_std_node check.
8531         (push_namespace): Remove in_fake_std code.
8532         (pop_namespace): Likewise.
8533         (lookup_name_real): Remove fake_std_node check.
8534         (init_decl_processing): Always create std_node. Always add
8535         std:: things there.
8536         (builtin_function): Always put non '_' fns in std.
8537         * decl2.c (flag_honor_std): Remove.
8538         (lang_f_options): Remove honor-std.
8539         (unsupported_options): Add honor-std.
8540         (set_decl_namespace): Remove fake_std_node check.
8541         (validate_nonmember_using_decl): Likewise.
8542         (do_using_directive): Likewise.
8543         (handle_class_head): Likewise.
8544         * dump.c (cp_dump_tree): Likewise.
8545         * except.c (init_exception_processing): Adjust.
8546         * init.c (build_member_call): Remove fake_std_node check.
8547         (build_offset_ref): Likewise.
8548         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
8549         * rtti.c (init_rtti_processing): Adjust.
8550
8551 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
8552
8553         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
8554         operand while calling cp_tree_equal.
8555
8556 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
8557
8558         The 3.0 ABI no longer has vbase pointer fields.
8559         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
8560         FORMAT_VBASE_NAME): Remove.
8561         * method.c (do_build_copy_constructor): Adjust.
8562         (do_build_assign_ref): Adjust.
8563         * search.c (lookup_field_r): Adjust.
8564         * typeck.c (build_component_ref): Adjust.
8565
8566         The 3.0 ABI always has a vtable pointer at the start of every
8567         polymorphic class.
8568         * rtti.c (build_headof_sub): Remove.
8569         (build_headof): Adjust.
8570         (get_tinfo_decl_dynamic): No need to check flag_rtti
8571         here. Adjust.
8572         (create_real_tinfo_var): Explain why we need a hidden name.
8573
8574 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
8575
8576         PR c++/3631
8577         * class.c (update_vtable_entry_for_fn): The fixed adjustment
8578         of a virtual thunk should be from declaring base.
8579
8580 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
8581
8582         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
8583         the shared virtual base, so preserving inheritance graph order.
8584
8585 2001-07-30  Andreas Jaeger  <aj@suse.de>
8586
8587         * decl2.c: Remove unused var global_temp_name_counter.
8588
8589 2001-07-28  Richard Henderson  <rth@redhat.com>
8590
8591         * method.c (pending_inlines): Remove.
8592
8593 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
8594
8595         * class.c (mark_primary_virtual_base): Don't adjust base
8596         offsets here.
8597         (dfs_unshared_virtual_bases): Adjust them here.
8598         (mark_primary_bases): Explain why we adjust at the end.
8599
8600 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
8601
8602         * class.c (finish_struct_1): When copying the primary base's
8603         VFIELD, make sure we find it is at offset zero.
8604
8605 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8606
8607         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
8608         tsubst_expr for default template arguments.
8609
8610 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
8611
8612         PR c++/3621
8613         * spew.c (yylex): Only copy the token's lineno, if it is
8614         nonzero.
8615
8616 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
8617
8618         PR c++/3624
8619         * call.c (resolve_args): Simplify, call
8620         convert_from_reference.
8621         (build_new_op): Resolve and convert from reference ARG1
8622         earlier. Adjust ARG2 & ARG3 resolve and conversion.
8623
8624 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
8625
8626         * decl.c (last_function_parm_tags): Remove.
8627         (current_function_parm_tags): Remove.
8628         (init_decl_processing): Adjust.
8629         (start_function): Adjust.
8630         (store_parm_decls): Adjust.
8631
8632         PR c++/3152
8633         * decl.c (grokdeclarator): Detect when a function typedef is
8634         declaring a function, and create last_function_parms correctly.
8635
8636 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
8637
8638         * call.c (joust): Only prefer a non-builtin candidate to a builtin
8639         one if they have the same signature.
8640
8641         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
8642         it rather than toplevel_bindings_p.  Give it a mangled name if static.
8643         (convert_to_reference): Adjust.
8644         * decl2.c (get_temp_name): Lose.
8645         * mangle.c (mangle_ref_init_variable): New fn.
8646         (mangle_guard_variable): Strip the ref-init header.
8647         * cp-tree.h: Adjust.
8648         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
8649         initializer.
8650         (grok_reference_init): Always use DECL_INITIAL.
8651
8652 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
8653
8654         PR c++/3416
8655         * call.c (build_conditional_expr): Recheck args after
8656         conversions.
8657         * cp-tree.h (build_conditional_expr): Move to correct file.
8658         * typeck.c (decay_conversion): Diagnose any unknown types
8659         reaching here.
8660         (build_binary_op): Don't do initial decay or default
8661         conversions on overloaded functions.
8662         (build_static_cast): Don't do a decay conversion here.
8663
8664 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
8665
8666         PR c++/3543
8667         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
8668         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
8669
8670 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
8671
8672         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
8673         (create_vtbl_ptr): ... here.
8674
8675 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
8676
8677         * class.c (build_vbase_offset_vbtl_entries): Look for
8678         non-primary base of which we are a sub vtable.
8679
8680 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
8681
8682         * semantics.c (finish_this_expr):  Remove unused code.
8683
8684 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
8685
8686         Simplify rtti, now we've only one ABI.
8687         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
8688         CPTI_TINFO_VAR_ID.
8689         (tinfo_decl_id, tinfo_var_id): Remove.
8690         (get_typeid_1): Remove.
8691         * rtti.c
8692         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
8693         (typeid_ok_p): New function.
8694         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
8695         (get_tinfo_decl): Remove old abi documentation.
8696         (tinfo_from_decl): Remove.
8697         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
8698         (get_typeid_1): Remove.
8699         (get_base_offset): Remove.
8700         (synthesize_tinfo_var): Absorb get_base_offset.
8701         (create_real_tinfo_var): Don't use tinfo_decl_id.
8702
8703 2001-07-23  Graham Stott  <grahams@redhat.com>
8704
8705         * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
8706         variable has_two_argument_delete_p.
8707
8708 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
8709
8710         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
8711         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
8712         (CPTI_INDEX_IDENTIFIER): Remove.
8713         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
8714         (delta2_identifier): Remove.
8715         (index_identifier): Remove.
8716         (pfn_or_delta2_identifier): Remove.
8717         (flag_vtable_thunks): Remove.
8718         (VTABLE_DELTA2_NAME): Remove.
8719         (VTABLE_INDEX_NAME): Remove.
8720         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
8721         (vfunc_ptr_type_node): Adjust.
8722         (VTABLE_NAME_PREFIX): Adjust.
8723         (build_vfn_ref): Lose first parameter.
8724         (fixup_all_virtual_upcast_offsets): Remove.
8725         * decl.c (initialize_predefined_identifiers): Remove
8726         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
8727         (init_decl_processing): Remove no-vtable-thunk code.
8728         * decl2.c (flag_vtable_thunks): Remove.
8729         (mark_vtable_entries): Remove no-vtable-thunk code.
8730         * error.c (dump_decl): Remove no-vtable-thunk code.
8731         (dump_expr): Adjust ptr to member function code.
8732         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
8733         code.
8734         * rtti.c (build_headof): Remove no-vtable-thunk code.
8735         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
8736         * search.c (get_base_distance): Remove expand_upcast_fixups case.
8737         (virtual_context) Remove.
8738         (expand_upcast_fixups): Remove.
8739         (fixup_virtual_upcast_offsets): Remove.
8740         (fixup_all_virtual_upcast_offsets): Remove.
8741         * typeck.c (get_member_function_from_ptrfunc): Remove
8742         no-vtable-thunk code.
8743         * call.c (build_over_call): Adjust call to build_vfn_ref.
8744         * class.c (build_vfn_ref): Lose first parameter. Remove
8745         no-vtable-thunk code.
8746         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
8747         (build_vtable_entry): Remove no-vtable-thunk code.
8748
8749 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
8750
8751         Remove old-abi remnants. Remove comments about old abi
8752         behavior. Remove references to 'new-abi' in comments.
8753         * cp-tree.h: Adjust comments.
8754         (vbase_offsets_in_vtable_p): Delete.
8755         (vcall_offsets_in_vtable_p): Delete.
8756         (vptrs_present_everywhere_p): Delete.
8757         (all_overridden_vfuns_in_vtables_p): Delete.
8758         (merge_primary_and_secondary_vtables_p): Delete.
8759         (TYPE_CONTAINS_VPTR_P): Adjust.
8760         (VTT_NAME_PREFIX): Remove.
8761         (CTOR_VTBL_NAME_PREFIX): Remove.
8762         (init_vbase_pointers): Remove.
8763         * class.c: Adjust coments.
8764         (build_vbase_pointer_fields): Delete.
8765         (build_vbase_pointer): Remove old-abi code.
8766         (build_secondary_vtable): Likewise.
8767         (modify_all_vtables): Likewise.
8768         (create_vtable_ptr): Likewise.
8769         (layout_class_type): Likewise.
8770         (finish_struct_1): Likewise.
8771         (finish_vtbls): Likewise.
8772         (dfs_finish_vtbls): Delete.
8773         (build_vbase_offset_vtbl_entries): Remove old-abi code.
8774         * cvt.c: Adjust comments.
8775         * decl.c: Adjust comments.
8776         * decl2.c: Adjust comments.
8777         * init.c: Adjust comments.
8778         (construct_virtual_bases): Remove old-abi code.
8779         * lang-specs.h: Remove -fno-new-abi.
8780         * mangle.c: Adjust comments.
8781         * rtti.c: Adjust comments.
8782         (get_base_offset): Remove old-abi-code.
8783         * search.c: Adjust comments.
8784         (dfs_init_vbase_pointers): Remove.
8785         (dfs_vtable_path_unmark): Remove.
8786         (init_vbase_pointers): Remove.
8787         * semantics.c: Adjust comments.
8788         (emit_associated_thunks): Remove old-abi code.
8789         * typeck.c: Adjust comments.
8790
8791 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
8792
8793         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
8794         params.h.
8795
8796 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
8797
8798         * class.c (finish_struct_anon): Forbid nested classes.
8799
8800 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
8801
8802         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
8803         * optimize.c: Include debug.h.
8804         (maybe_clone_body): Use debug hook.
8805         * semantics.c: Include debug.h.
8806         (expand_body): Use debug hook.
8807
8808 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
8809
8810         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
8811
8812 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
8813
8814         * class.c (type_requires_array_cookie): New function.
8815         (check_methods): Don't try to figure out whether the type needs a
8816         cookie here.
8817         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
8818         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
8819         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
8820         * pt.c (instantiate_class_template): Don't set
8821         TYPE_VEC_DELETE_TAKES_SIZE.
8822         * NEWS: Document ABI changes from GCC 3.0.
8823
8824 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
8825             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
8826
8827         * NEWS (Changes in GCC 3.0): Fix typo.
8828
8829 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
8830
8831         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
8832         which attributes are to be attached, and a flags argument.  Update
8833         call to decl_attributes.
8834         (grokfield): Update call to decl_attributes.
8835         * class.c (finish_struct): Update call to cplus_decl_attributes.
8836         * cp-tree.h (cplus_decl_attributes): Update prototype.
8837         * decl.c (start_decl, grokdeclarator, start_function): Update
8838         calls to decl_attributes and cplus_decl_attributes.
8839         * friend.c (do_friend): Update call to cplus_decl_attributes.
8840         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
8841
8842 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
8843
8844         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
8845         for `register' variables with an asm-specification.
8846
8847 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
8848
8849         * semantics.c (finish_asm_stmt): Mark the output operands
8850         to an asm addressable, if necessary.
8851
8852 2001-07-11  Ben Elliston  <bje@redhat.com>
8853
8854         * Revert this change -- there is a subtle bug.
8855
8856         PR c++/80
8857         * decl.c (finish_enum): New "attributes" argument; pass it to
8858         cplus_decl_attributes.  Use a narrower type if the enum is packed.
8859         * cp-tree.h (finish_enum): Adjust prototype.
8860         * parse.y (enum_head): New non-terminal.
8861         (structsp): Use it. Enums now may be preceded or followed by
8862         optional attributes -- pass their chained tree to finish_enum().
8863         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
8864
8865 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
8866
8867         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
8868         variables.
8869
8870 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
8871
8872         * semantics.c (cp_expand_stmt): Fix for null
8873         current_function_return_value.
8874
8875 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
8876
8877         * call.c (build_op_delete_call): Initialize fn.
8878         (convert_like_real): Delete conditional.
8879         (joust): Initialize *w and *l.
8880         * class.c: Add prototype for binfo_ctor_vtable.
8881         (get_primary_binfo): Initialize result.
8882         * init.c (build_java_class_ref): Initialize name.
8883
8884 2001-07-09  Erik Rozendaal  <dlr@acm.org>
8885
8886         * typeck.c (unary_complex_lvalue): Do not duplicate the
8887         argument to modify, pre-, or post-increment when used as an
8888         lvalue and when the argument has side-effects.
8889
8890 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
8891
8892         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
8893         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
8894         cplus_decl_attributes even if attrs is NULL.
8895         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
8896
8897 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
8898
8899         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
8900         calls to decl_attributes.
8901
8902 2001-07-06  Ira Ruben   <ira@apple.com>
8903
8904         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
8905         be DECL_TEMPLATE_RESULT.
8906
8907 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8908
8909         * cp-tree.h (copy_template_template_parm): Rename to ...
8910         (bind_template_template_parm): ... here.
8911         * tree.c (copy_template_template_parm): Rename to ...
8912         (bind_template_template_parm): ... here.  Remove the case when
8913         NEWARGS is NULL_TREE.
8914         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
8915         BOUND_TEMPLATE_TEMPLATE_PARM.
8916         * pt.c (lookup_template_class): Adjust.
8917
8918 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
8919
8920         * cvt.c (convert_lvalue): New fn.
8921         * cp-tree.h: Declare it.
8922         * method.c (do_build_assign_ref): Use it.
8923         (do_build_copy_constructor): Convert parm to base types
8924         before calling base constructors.
8925
8926         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
8927         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
8928         optimize.
8929         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
8930
8931 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
8932
8933         * optimize.c (optimize_inline_calls): New function, broken out
8934         of ...
8935         (optimize_function): ... here. Call it. Don't inline if it is
8936         a thunk.
8937         (dump_function): Print name of dump flag causing this dump.
8938         * semantics.c (expand_body): Move thunk inline check to
8939         optimize_function.
8940
8941 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
8942
8943         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
8944         (comptypes): Use target.comp_type_attributes.
8945
8946 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
8947
8948         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
8949
8950 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
8951
8952         * error.c (lang_print_error_function): Add a `diagnostic_context *'
8953         parameter. Tweak.
8954
8955 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
8956
8957         * decl2.c (import_export_class): Update.
8958
8959 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
8960
8961         * error.c (init_error): Adjust settings.
8962
8963 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
8964
8965         * error.c (init_error): Adjust settings.
8966
8967 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
8968
8969         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
8970         return pointers to data members by reference rather than by value.
8971
8972 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
8973
8974         Implement the Named Return Value optimization.
8975         * cp-tree.h (struct cp_language_function): Add x_return_value.
8976         (current_function_return_value): Now a macro.
8977         * decl.c: Don't define it.
8978         (define_label, finish_case_label): Don't clear it.
8979         (init_decl_processing): Don't register it with GC.
8980         * semantics.c (genrtl_finish_function): Don't check it for
8981         no_return_label.  Copy the RTL from the return value to
8982         current_function_return_value and walk, calling...
8983         (nullify_returns_r): ...this new fn.
8984         * typeck.c (check_return_expr): Set current_function_return_value.
8985
8986 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
8987
8988         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
8989         sharing a ctor vtable with.  Merge code for cases 1 and 2.
8990         (binfo_ctor_vtable): New fn.
8991         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
8992
8993 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
8994
8995         * class.c (dfs_find_final_overrider): Fix logic.
8996
8997         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
8998         virtual thunk instead of non-virtual.
8999         (get_matching_virtual): Uncomment.
9000
9001         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
9002         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
9003         PARM, not ARG.
9004
9005 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
9006
9007         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
9008         we've not emerged from the hierarchy of RTTI_BINFO on reaching
9009         a non-virtual base.
9010
9011 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
9012
9013         * NEWS: Update release number.
9014
9015 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
9016
9017         PR c++/3130, c++/3131, c++/3132
9018         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
9019         * class.c (force_canonical_binfo_r): Move
9020         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
9021         virtual bases unless they're primary and what they're primary
9022         too has been moved.
9023         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
9024         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
9025         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
9026         derived binfo.
9027         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
9028         (layout_nonempty_base_or_field): Add most derived type
9029         parameter. Adjust.
9030         (layout_empty_base): Likewise.
9031         (build_base_field): Likewise.
9032         (build_base_fields): Likewise.
9033         (propagate_binfo_offsets): Add most derived type
9034         parameter. Skip non canonical virtual bases too.
9035         (dfs_set_offset_for_unshared_vbases): Don't skip primary
9036         bases. Do skip canonical bases.
9037         (layout_virtual_bases): Adjust.
9038         (layout_class_type): Adjust.
9039         (dfs_get_primary_binfo): Build list of virtual primary base
9040         candidates.
9041         (get_primary_binfo): Check that the shared virtual primary
9042         base candidate was found first.
9043         (accumulate_vtbl_inits): Don't do anything for non-vptr
9044         containing binfos. For case 1 primary virtual bases, keep
9045         checking that we've not emerged from the hierarchy of RTTI_BINFO.
9046
9047 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
9048
9049         PR c++/3089
9050         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
9051         hierarchy looking for primary bases for a ctor
9052         vtable. Recursively call oneself, if we meet our primary via
9053         this route and haven't met it yet via inheritance graph order.
9054
9055 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
9056
9057         * lang-options.h: Emit documentation for -fno-honor-std, not
9058         -fhonor-std.
9059
9060 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
9061
9062         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
9063         Don't clobber delta.
9064         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
9065
9066 2001-06-10  Mark Mitchell <mark@codesourcery.com>
9067             Gabriel Dos Reis  <gdr@codesourcery.com>
9068
9069         * Make-lang.in (cp/call.o): Depend on diagnostic.h
9070         (cp/typeck.o): Depend on diagnostic.h
9071         (cp/typeck2.o): Depend on diagnostic.h
9072         (cp/repo.o): Depend on dignostic.h
9073         * typeck.c: #include diagnostic.h
9074         (convert_for_initialization): Remove extern declaration for
9075         warningcount and errorcount.
9076
9077         * call.c: #include diagnostic.h
9078         (convert_like_real): Remove extern declaration for warnincount and
9079         errorcount.
9080
9081         * repo.c: #include diagnostic.h
9082         * typeck2.c: #include diagnostic.h
9083
9084 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
9085
9086         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
9087         in previous change.
9088
9089 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
9090
9091         PR c++/2929
9092         * friend.c (do_friend): Use push_decl_namespace for classes at
9093         namespace scope.
9094
9095 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
9096             Jason Merrill <jason_merrill@redhat.com>
9097
9098         PR c++/3061
9099         * class.c (build_secondary_vtable): Use assert, rather than an error
9100         message.
9101         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
9102         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
9103         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
9104         Don't set BINFO_VTABLE for a primary virtual base.
9105
9106 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
9107
9108         * decl.c (duplicate_decls): Update source position information
9109         when a template function is defined.
9110
9111 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
9112
9113         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
9114
9115 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
9116
9117         PR c++/2914
9118         * decl.c (pushtag): Don't push into a complete type's scope.
9119
9120 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
9121
9122         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
9123         (struct lang_decl_flags): Lose generate_with_vtable_p.
9124         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
9125         * class.c (copy_virtuals): Adjust.
9126         * decl2.c (mark_vtable_entries): Adjust.
9127         * method.c (make_thunk, build_vtable_entry): Adjust.
9128         * class.c (update_vtable_entry_for_fn): Only look as far as the
9129         first defining class.
9130         (build_vtbl_initializer): Put nothing in the slot for a function only
9131         defined in a lost primary virtual base.
9132         (add_vcall_offset_vtbl_entries_1): Use the same code for
9133         the lost primary case and the normal case.
9134         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
9135         (get_vfield_offset, get_derived_offset): Lose.
9136         (dfs_find_final_overrider): Use look_for_overrides_here.
9137         (get_matching_virtual): New fn.
9138         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
9139         not BV_VCALL_INDEX.
9140         * search.c (look_for_overrides_here): Split out from...
9141         (look_for_overrides_r): Here.
9142
9143         * class.c (find_final_overrider): Return error_mark_node on error.
9144
9145         * decl2.c (key_method): #if 0 accidental change.
9146
9147 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
9148
9149         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
9150         (build_over_call): Likewise.
9151         * decl.c (grokparms): Likewise.
9152         * pt.c (tsubst_decl): Likewise.
9153         * typeck.c (convert_arguments): Likewise.
9154
9155 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
9156
9157         * semantics.c (begin_class_definition): Robustify.
9158
9159         * pt.c (instantiate_decl): Tell the repository code about the
9160         clones, not the cloned functions.
9161         * repo.c (repo_template_used): Explicitly instantiate the cloned
9162         function, not the clones.
9163
9164 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
9165
9166         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
9167         ICS_BAD_FLAG on created conversion.
9168         (compare_ics): Break out rank.
9169
9170 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
9171
9172         * decl.c (xref_tag): Remove extraneous %s on dependent name
9173         lookup warning.
9174
9175 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
9176
9177         * class.c (layout_vtable_decl): Fix off by one error on
9178         build_index_type.
9179         (build_vtt): Likewise.
9180         (build_ctor_vtbl_group): Likewise.
9181
9182 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
9183
9184         * class.c (maybe_indent_hierarchy): New function.
9185         (dump_class_hierarchy_r): Add flags. Dump extra binfo
9186         information, if enabled. Use maybe_indent_hierarchy. Adjust
9187         output format.
9188         (dump_class_hierarchy): Adjust prototype. Adjust output format.
9189         (dump_array, dump_vtable, dump_vtt): New functions.
9190         (finish_struct_1): Adjust hierarchy dumping.
9191         (initialize_vtable): Call dump_vtable.
9192         (build_vtt): Call dump_vtt.
9193         (build_ctor_vtbl_group): Call dump_vtable.
9194         * decl2.c (flag_dump_class_layout): Remove.
9195         (cxx_decode_option): Remove dump translation unit
9196         and dump class hierarchy check. Call dump_switch_p.
9197         (finish_file): Adjust dumping.
9198         (dump.c): Only dump base classes if not TDF_SLIM.
9199         Only dump namespace members if not TDF_SLIM.
9200         * optimize.c (dump_function): New function.
9201         (optimize_function): Call dump_function.
9202         * semantics.c (expand_body): Use dump_enabled_p.
9203
9204 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
9205
9206         PR g++/2936
9207         Part missed from first commit
9208         * decl2.c (finish_anon_union): Copy context.
9209
9210 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
9211
9212         PR g++/2936
9213         * optimize.c (remap_decl): Remap anonymous aggregate members too.
9214
9215 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
9216
9217         PR g++/2823
9218         * semantics.c (expand_body): Don't optimize thunks.
9219
9220 2001-05-25  Sam TH  <sam@uchicago.edu>
9221
9222         * cp-tree.h lex.h: Fix header include guards.
9223
9224 2001-05-25  Mark Mitchell <mark@codesourcery.com>
9225
9226         * decl.c (init_decl_processing): Tweak.
9227
9228 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
9229
9230         * decl.c (duplicate_decls): Tidy.
9231         (init_decl_processing): Always set flag_no_builtin.
9232
9233 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
9234
9235         PR c++/2184
9236         * decl2.c (do_local_using_decl): Push the decls, even in a
9237         template.
9238
9239 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
9240
9241         * optimize.c (initialize_inlined_parameters): Don't set
9242         TREE_READONLY for a VAR_DECL taking the place of an inlined
9243         PARM_DECL.
9244
9245 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
9246
9247         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
9248         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
9249         attribute.
9250
9251 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
9252
9253         * parse.y: Refer to compound literals as such, not as
9254         constructor-expressions.
9255
9256 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
9257
9258         * call.c (build_op_delete_call): Ignore exception-specifications
9259         when looking for matching delete operators.
9260         * init.c (build_new_1): Compute whether or not the allocation
9261         function used is a placement allocation function or not, and
9262         communicate this information to build_op_delete_call.
9263
9264 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
9265
9266         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
9267         (build_vtbl_ref): Adjust.
9268         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
9269         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
9270         Re-add vtable-gc.
9271         (unsupported_options): Correspondingly.
9272
9273         * decl2.c (maybe_make_one_only): Check flag_weak, not
9274         supports_one_only().
9275
9276         * cp-tree.def (START_CATCH_STMT): Lose.
9277         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
9278         * tree.c (cp_statement_code_p): Don't case it.
9279         * semantics.c (cp_expand_stmt): Likewise.
9280         * cp-tree.h (START_CATCH_TYPE): Lose.
9281         (HANDLER_TYPE): New.
9282         * except.c (expand_start_catch_block): Don't start any blocks.
9283         Return the type.
9284         (expand_end_catch_block): Don't end any blocks.
9285         * parse.y (handler): Don't pass anything from finish_handler_parms
9286         to finish_handler.
9287         * pt.c (tsubst_expr): Likewise.
9288         * semantics.c (begin_handler): Call note_level_for_catch here.
9289         (finish_handler_parms): Don't return anything.
9290         (genrtl_catch_block, begin_catch_block): Lose.
9291         (genrtl_handler): Call expand_start_catch here.
9292
9293 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
9294
9295         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
9296         (get_vtable_decl, build_vtt): Not here.
9297
9298 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
9299
9300         PR c++/2781
9301         * optimize.c (update_cloned_parm): Copy addressability and other
9302         flags.
9303
9304 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9305
9306         * pt.c (determine_specialization): Ignore artificial functions.
9307
9308 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
9309
9310         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
9311         (C_RID_CODE): Remove.
9312         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
9313         (init_parse): Don't do it here.
9314
9315 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
9316
9317         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
9318         function declaration to avoid stripping the symbol's attributes.
9319
9320 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
9321
9322         * decl.c (pushdecl): Adjust error string.
9323         (xref_tag): Adjust friend class injection warning. Remove the
9324         inherited name from the class shadowed scope.
9325
9326 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
9327
9328         * except.c (cp_protect_cleanup_actions): New function.
9329         (init_exception_processing): Don't set protect_cleanup_actions
9330         here.  Do set lang_protect_cleanup_actions.
9331
9332 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
9333
9334         * spew.c (read_token): Call yyerror on all unexpected tokens.
9335
9336 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
9337
9338         * init.c (member_init_ok_or_else): Take a tree rather than
9339         string for name.
9340         (expand_member_init): Adjust.
9341
9342 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
9343
9344         * decl.c (duplicate_decls): Suppress warning about duplicate
9345         decls if the first decl is a friend.
9346
9347 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
9348
9349         * except.c (choose_personality_routine): Export.  Add
9350         explanatory comment.  Take an enum languages, not a boolean.
9351         (initialize_handler_parm): Adjust to match.
9352         * cp-tree.h: Prototype choose_personality_routine.
9353         * lex.c (handle_pragma_java_exceptions): New function.
9354         (init_cp_pragma): Register #pragma GCC java_exceptions.
9355
9356 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
9357
9358         * method.c (build_mangled_C99_name): Remove unused prototype.
9359
9360 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
9361
9362         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
9363         * typeck.c (get_member_function_from_ptrfunc,
9364         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
9365         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
9366
9367         Reverted Geoff Keating's 2001-05-03's patch.
9368
9369 2001-05-11  Ira Ruben   <ira@apple.com>
9370
9371         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
9372
9373 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
9374
9375         * cp-tree.h (finish_label_expr, lookup_label): Delete.
9376         * parse.y: Update for '&&'; don't issue warning here.
9377         * semantics.c (finish_label_expr): Delete.
9378
9379 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
9380
9381         * splay-tree.h (splay_tree_max): New function.
9382         (splay_tree_min): Likewise.
9383
9384 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
9385
9386         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
9387         (pfn_vflag_identifier): Define.
9388         Update comment about layout of pointer functions.
9389         (build_ptrmemfunc1): Update prototype.
9390         (expand_ptrmemfunc_cst): Update prototype.
9391         * decl.c (initialize_predefined_identifiers): Initialize
9392         pfn_vflag_identifier.
9393         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
9394         an extra field to the type.
9395         * expr.c (cplus_expand_constant): Pass 'flag' between
9396         expand_ptrmemfunc_cst and build_ptrmemfunc1.
9397         * typeck.c (get_member_function_from_ptrfunc): When
9398         FUNCTION_BOUNDARY < 16, look at additional field to determine
9399         if a pointer-to-member is a real pointer or a vtable offset.
9400         (build_ptrmemfunc1): Add new parameter to contain extra field.
9401         (build_ptrmemfunc): Pass the extra field around.
9402         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
9403         (pfn_from_ptrmemfunc): Ignore the extra field.
9404
9405 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
9406
9407         * cp-tree.h (flag_inline_trees): Update documentation.
9408         * decl.c (init_decl_processing): Adjust handling of
9409         flag_inline_functions and flag_inline_trees to support -O3.
9410         (grokfndecl): Set DECL_INLINE on all functions if that's what
9411         the user requested.
9412         (save_function_data): Clear DECL_INLINE in
9413         current_function_cannot_inline is non-NULL.
9414         * decl2.c (flag_inline_trees): Update documentation.
9415
9416 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
9417
9418         * dump.c (cp_dump_tree, USING_STMT case): New case.
9419         * tree.c (cp_statement_code_p): Add USING_STMT.
9420         * decl2.c (do_using_directive): Add the using directive statement.
9421
9422         * tree.c (walk_tree): Reformat an if block.
9423
9424 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
9425
9426         * decl.c (compute_array_index_type): Don't try to do anything with
9427         the indices when processing a template.
9428
9429 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9430
9431         * call.c: NULL_PTR -> NULL.
9432         * class.c: Likewise.
9433         * cvt.c: Likewise.
9434         * decl.c: Likewise.
9435         * decl2.c: Likewise.
9436         * except.c: Likewise.
9437         * init.c: Likewise.
9438         * rtti.c: Likewise.
9439         * search.c: Likewise.
9440         * tree.c: Likewise.
9441         * typeck.c: Likewise.
9442         * typeck2.c: Likewise.
9443
9444 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
9445
9446         * decl2.c (do_using_directive): Revert previous patch.
9447
9448 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
9449
9450         * cp-tree.def (USING_STMT): New statement node.
9451         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
9452         * decl2.c (do_using_directive): Add USING_STMT to statement
9453         tree. Don't emit errors when processing template decl.
9454         * pt.c (tsubst_expr, USING_STMT case): New case.
9455         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
9456
9457 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
9458
9459         * call.c (build_new_op): Convert args from reference here.
9460         (build_conditional_expr): Don't convert here.
9461
9462 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
9463
9464         * spew.c (last_token_id): New static variable.
9465         (read_token): Set it here.
9466         (yyerror): Use it here.
9467
9468 2001-04-30  Richard Henderson  <rth@redhat.com>
9469
9470         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
9471         * decl.c: Likewise.
9472
9473 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
9474
9475         * gxxint.texi: Remove.
9476         * Make-lang.in: Remove all traces of gxxint.texi.
9477
9478 2001-04-30  Mark P Mitchell  <mark@codesourcery.com>
9479
9480         * decl2.c (start_static_initialization_or_destruction): Correct
9481         logic to handle the -fno-use-cxa-atexit case.
9482
9483 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
9484
9485         * optimize.c (update_cloned_parm): New function.
9486         (maybe_clone_body): Use it.  Update the `this' parameter too.
9487
9488 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
9489
9490         * decl2.c (unsupported_options): Add new-abi.
9491         * lang-options.h: Remove no longer supported options.
9492
9493 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
9494
9495         * except.c (can_convert_eh): Don't check template parms,
9496         typename types etc.
9497
9498 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
9499
9500         * optimize.c (maybe_clone_body): Copy parameter names and locations.
9501
9502 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
9503
9504         * cp-tree.h (adjust_clone_args): Prototype new function.
9505         * class.c (adjust_clone_args): New function.
9506         * decl.c (start_function): Call it for in charge ctors.
9507
9508 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
9509
9510         * method.c (use_thunk): Make sure that thunks really are emitted
9511         when requested.
9512
9513 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
9514
9515         * mangle.c (write_chars): New macro.
9516         (hwint_to_ascii): New function
9517         (write_number): Use it.
9518         (write_integer_cst): Deal with really big numbers.
9519
9520 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
9521
9522         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
9523         the clone.
9524
9525 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
9526
9527         * decl.c (grokdeclarator): Set context of namespace scope
9528         TYPE_DECLS.
9529
9530 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
9531
9532         * cp/optimize.c: Include hashtab.h.
9533         (struct inline_data): Add tree_pruner.
9534         (expand_call_inline, expand_calls_inline): Use it when calling
9535         walk_tree.
9536         (optimize_function): Initialize and free tree_pruner.
9537
9538 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
9539
9540         Lazy __FUNCTION__ generation.
9541         * cp-tree.def (FUNCTION_NAME): Remove.
9542         * cp-tree.h (function_name_declared_p): Remove.
9543         (cp_fname_init): Prototype.
9544         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
9545         don't call declare_function_name. Call start_fname_decls.
9546         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
9547         clobber the line number.
9548         (cp_fname_init): New function.
9549         (start_function): Call start_fname_decls.
9550         (finish_function): Call finish_fname_decls.
9551         * lex.c (reswords): Add slots for __FUNCTION__ et al.
9552         (rid_to_yy): Add mappings for __FUNCTION__ et al.
9553         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
9554         * parse.y (VAR_FUNC_NAME): New token.
9555         (primary): Add VAR_FUNC_NAME.
9556         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
9557         generation.
9558         (tsubst, FUNCTION_NAME case): Remove.
9559         (tsubst_copy, FUNCTION_NAME case): Remove.
9560         (tsubst_expr, DECL_STMT case): Be careful with a
9561         DECL_PRETTY_FUNCTION_P.
9562         (instantiate_decl): Remove function_name_declared_p.
9563         * semantics.c (begin_compound_statement): Don't call
9564         declare_function_name here.
9565         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
9566         (finish_translation_unit): Call finish_fname_decls.
9567         (expand_body): Remove function_name_declared_p.
9568         * typeck2.c (digest_init): Allow any ERROR_MARK.
9569
9570 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
9571
9572         * pt.c (tsubst_decl): Use VOID_TYPE_P.
9573         * semantics.c: Fix some typos.
9574
9575 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
9576
9577         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
9578
9579 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9580
9581         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
9582
9583 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
9584
9585         * except.c (build_throw): Wrap the initialization of the exception
9586         object in a MUST_NOT_THROW_EXPR.
9587         (do_free_exception): #if 0.
9588
9589 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
9590
9591         * cp-tree.h (finish_enum): Change prototype.
9592         * decl.c (finish_enum): Reorganize.
9593         * parse.y (structsp): Adjust calls to finish_enum.
9594
9595 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
9596
9597         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
9598         't' case.
9599
9600 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
9601
9602         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
9603         (layout_empty_base): Return at end flag.
9604         (build_base_field): Likewise.
9605         (build_base_fields): Likewise.
9606         (layout_virtual_bases): Don't add 1 to eoc value.
9607         (end_of_class): Use full size for empty bases.
9608         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
9609         empty bases. Don't add 1 to eoc value. Only add trailing padding
9610         if we're an empty class with no empty bases.
9611         (dump_class_hierarchy): Dump size and alignment.
9612
9613 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
9614
9615         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
9616         ICS_BAD_FLAG.
9617
9618 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
9619
9620         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
9621         is found, look first if name does not match the structure name.
9622
9623 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
9624
9625         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
9626         set.
9627         (SET_DECL_LANGUAGE): New macro.
9628         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
9629         (pushdecl): Likewise.
9630         (build_library_fn_1): Likewise.
9631         (build_cp_library_fn): Likewise.
9632         (grokfndecl): Likewise.
9633         (grokvardecl): Mark `extern "C"' variables as having C linkage.
9634         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
9635         * lex.c (retrofit_lang_decl): Likewise.
9636         * mangle.c (mangle_decl_string): Don't mangle the names of
9637         variables declared with C language linkage.
9638         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
9639
9640 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
9641
9642         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
9643         flag_access_control from uninitialized storage.
9644
9645 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
9646
9647         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
9648         * mangle.c (write_pointer_to_member_type): Fix mangling of
9649         pointers to cv-qualified member function types.
9650
9651         * init.c (build_delete): Create a SAVE_EXPR for the address if
9652         we're going to use it more than once.
9653
9654 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
9655
9656         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
9657         (expand_ptremfunc_cst): Change prototype.
9658         (delta2_from_ptrmemfunc): Remove.
9659         * expr.c (cplus_expand_constant): Adjust call to
9660         expand_ptrmemfunc_cst.
9661         * typeck.c (build_ptrmemfunc1): Simplify.
9662         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
9663         results in a constant.
9664         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
9665         (delta2_from_ptrmemfunc): Remove.
9666         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
9667
9668 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
9669
9670         * cp-tree.h (decl_namespace_list): New macro.
9671         (struct saved_scope): Add decl_ns_list.
9672         * decl.c (mark_saved_scope): Mark it.
9673         * decl2.c: Lose static decl_namespace_list.
9674         (init_decl2): Don't save it.
9675
9676 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9677
9678         * cp-tree.h (warn_return_type, yylex): Delete redundant
9679         declarations.
9680
9681         * decl.c (current_class_depth, global_namespace): Likewise.
9682
9683         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
9684
9685         * repo.c (flag_use_repository): Likewise.
9686
9687 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9688
9689         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
9690         set_block, pushdecl, getdecls, gettags, init_decl_processing,
9691         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
9692         lvalue_or_else, print_lang_statistics, comp_target_types,
9693         unsigned_type, signed_type, signed_or_unsigned_type,
9694         build_function_call, mark_addressable, incomplete_type_error):
9695         Delete redundant declarations.
9696
9697 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
9698
9699         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
9700         (TYPE_ANONYMOUS_P): New macro.
9701         (TAGGED_TYPE_P): New macro.
9702         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
9703         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
9704         * tree.c (no_linkage_helper): Likewise.
9705         * semantics.c (begin_class_definition): Likewise.
9706         * pt.c (convert_template_argument): Likewise.
9707         * lex.c (check_for_missing_semicolon): Likewise.
9708
9709 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
9710
9711         * class.c (dfs_unshared_virtual_bases): New function.
9712         (mark_primary_bases): Call it.
9713         (check_bases): Ignore virtual bases when determining
9714         nearly-emptiness.
9715
9716 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
9717
9718         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
9719
9720 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
9721
9722         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
9723         cloned function to the clone.
9724
9725 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9726
9727         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
9728
9729         * semantics.c: Include expr.h.
9730
9731 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
9732
9733         * method.c (implicitly_declare_fn): Commonize code for copy ctor
9734         and assignment op. Set TREE_USED for parameter.
9735
9736 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
9737
9738         * class.c (find_final_overrider_data): Add `candidates'.
9739         (dfs_find_final_overrider): Don't issue error messages
9740         prematurely.
9741         (find_final_overrider): Issue error messages here.
9742         (build_base_field): Don't warn about amgibuous direct bases here.
9743         (warn_about_ambiguous_direct_bases): New function.
9744         (layout_class_type): Use it.
9745
9746 2001-04-10  Richard Henderson  <rth@redhat.com>
9747
9748         * typeck.c (build_array_ref): Push the array reference inside
9749         COMPOUND_EXPR and COND_EXPR.
9750
9751 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
9752
9753         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
9754         * decl.c (duplicate_decls): Adjust accordingly.
9755         (maybe_commonize_var): Likewise.
9756         (grokfndecl): Likewise.
9757         (start_function): Likewise.
9758         (start_method): Likewise.
9759         * decl2.c (key_method): Likewise.
9760         (import_export_decl): Likewise.
9761         * method.c (implicitly_declare_fn): Likewise.
9762         * optimize.c (maybe_clone_body): Likewise.
9763
9764 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
9765
9766         * lang-specs.h: Add __DEPRECATED.
9767
9768 2001-04-05  J"orn Rennecke <amylaar@redhat.com>
9769
9770         * search.c (get_dynamic_cast_base_type): When building a new
9771         constant, set its type to ssizetype.
9772
9773 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
9774
9775         * optimize.c (expand_call_inline): Only add newly inlined statements
9776         into inlined_stmts.
9777
9778 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
9779
9780         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
9781         (OPERATOR_FORMAT): Likewise.
9782         (OPERATOR_TYPENAME_FORMAT): Likewise.
9783         * operators.def: Remove old name-mangling information.
9784         * decl.c (grok_op_properties): Adjust accordingly.
9785         * lex.c (init_operators): Likewise.
9786         * rtti.c (get_tinfo_decl): Issue error messages about types that
9787         have variable size.
9788
9789 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
9790
9791         * decl2.c (import_export_decl): Don't call import_export_class
9792         when processing an inline member function.
9793         * semantics.c (expand_body): Call import_export_decl before
9794         emitting inline functions.
9795
9796 2001-03-28  Richard Henderson  <rth@redhat.com>
9797
9798         IA-64 ABI Exception Handling:
9799         * cp-tree.def (EH_SPEC_BLOCK): New.
9800         (MUST_NOT_THROW_EXPR): New.
9801         * cp-tree.h: Update changed function declarations.
9802         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
9803         (CPTI_CALL_UNEXPECTED): New.
9804         (struct cp_language_function): Rename x_eh_spec_try_block
9805         to x_eh_spec_block.
9806         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
9807         * decl.c (current_binding_level): If no current function
9808         bindings, revert to scope_chain.
9809         (initialize_predefined_identifiers): Remove __cp_push_exception.
9810         (store_parm_decls): Use begin_eh_spec_block.
9811         (finish_function): Use finish_eh_spec_block.
9812         (mark_lang_function): Update for name changes.
9813         * decl2.c (finish_file): No mark_all_runtime_matches.
9814         * dump.c (cp_dump_tree): Handle new tree codes.
9815         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
9816         * except.c (catch_language_init, catch_language): Remove.
9817         (init_exception_processing): Don't set language code.
9818         Initialize call_unexpected_node, protect_cleanup_actions,
9819         eh_personality_libfunc, lang_eh_runtime_type.
9820         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
9821         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
9822         (prepare_eh_type): Split out type canonicalizations ...
9823         (build_eh_type_type): ... from here.
9824         (build_eh_type_type_ref): Remove.
9825         (mark_all_runtime_matches): Remove.
9826         (build_exc_ptr): New.
9827         (do_begin_catch, do_end_catch): New.
9828         (do_pop_exception): Remove.
9829         (build_terminate_handler): Remove.
9830         (choose_personality_routine): Split out language choice from ...
9831         (initialize_handler_parm): ... here.
9832         Use MUST_NOT_THROW_EXPR.
9833         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
9834         exception object handling.
9835         (expand_start_eh_spec, expand_end_eh_spec): Remove.
9836         (expand_exception_blocks, alloc_eh_object): Remove.
9837         (begin_eh_spec_block, finish_eh_spec_block): New.
9838         (do_allocate_exception, do_free_exception): New.
9839         (expand_throw): Merge into ...
9840         (build_throw): ... here.  Update for abi.
9841         * expr.c (cplus_expand_expr): No expand_internal_throw.
9842         Handle MUST_NOT_THROW_EXPR.
9843         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
9844         * semantics.c (*) Update for except.h name changes.
9845         (genrtl_try_block): No protect_with_terminate.
9846         (genrtl_eh_spec_block): New.
9847         (genrtl_handler): Don't emit the goto here.
9848         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
9849         (genrtl_finish_function): Don't expand_exception_blocks.
9850         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
9851
9852 2001-03-28  Richard Henderson  <rth@redhat.com>
9853
9854         * decl.c (struct named_label_list): Rename eh_region to
9855         in_try_scope, add in_catch_scope.
9856         (struct binding_level): Rename eh_region to is_try_scope,
9857         add is_catch_scope.
9858         (note_level_for_try): Rename from note_level_for_eh.
9859         (note_level_for_catch): New.
9860         (poplevel): Copy both is_try_scope and is_catch_scope to
9861         the named_label_list struct.
9862         (check_previous_goto_1): Don't check for catch block via
9863         DECL_ARTIFICIAL; use in_try_scope instead.
9864         (check_goto): Likewise.
9865         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
9866         * except.c (expand_start_catch_block): Call note_level_for_catch.
9867         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
9868
9869 2001-03-27  Richard Henderson  <rth@redhat.com>
9870
9871         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
9872         exceptions_via_longjmp.
9873
9874 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
9875
9876         * pt.c (check_default_tmpl_args):  Make error messages clearer.
9877
9878 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
9879
9880         * error.c:  Also undefine 'A' macro used for cp_printers definition.
9881
9882 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9883
9884         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
9885
9886 2001-03-26  Mike Yang <yang@research.att.com>
9887             Mark Mitchell  <mark@codesourcery.com>
9888
9889         * dump.c (dump_access): New function.
9890         (cp_dump_tree): Use it.  Dump basetype information for class
9891         types.
9892
9893 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
9894
9895         * Makefile.in (optimize.o): Depend on params.h.
9896         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
9897         (init_decl_processing): Set flag_no_inline when doing
9898         inlining-on-trees.
9899         * optimize.c: Include params.h.
9900         (struct inline_data): Improve documentation of FNS.  Add
9901         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
9902         (INSNS_PER_STMT): New macro.
9903         (remap_block): Use CLONING_P.
9904         (inlinable_function_p): Don't inline big functions.
9905         (expand_call_inline): Keep track of how much inlining we've done.
9906         (optimize_function): Set FIRST_INLINED_FN.
9907         (maybe_clone_body): Set CLONING_P.
9908         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
9909         tree nodes.
9910         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
9911         rest_of_compilation.  Clear DECL_RTL for local variables
9912         afterwards.
9913         (clear_decl_rtl): New function.
9914
9915 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
9916
9917         Implement DR 209
9918         * cp-tree.h (skip_type_access_control,
9919         reset_type_access_control): Prototype.
9920         * decl.c (grokdeclarator): Access of friends is not checked.
9921         * parse.y (component_decl_list): Reset type access control.
9922         * semantics.c (decl_type_access_control): Clear
9923         current_type_lookups.
9924         (save_type_access_control): Don't save if not deferring.
9925         (skip_type_access_control, reset_type_access_control): New
9926         functions.
9927         (begin_class_definition): Do type access control for basetypes.
9928         Start deferred access control.
9929         (finish_class_definition): Resume immediate access control if
9930         this is a local class.
9931
9932 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9933
9934         * class.c (add_method): Use memcpy/memmove, not bcopy.
9935
9936         * decl.c (duplicate_decls): Likewise.
9937
9938 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
9939
9940         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
9941         not `_'.
9942
9943 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
9944
9945         * decl.c (local_names): Define.
9946         (push_local_name): New.
9947         (grok_reference_init): Return init if initializing static reference
9948         variable with non-constant instead of emitting it.
9949         Move expand_static_init call to cp_finish_decl.
9950         (layout_var_decl): Call push_local_name.
9951         (maybe_commonize_var): Allow inlining functions even if they have
9952         static local variables, use comdat_linkage for them if flag_weak.
9953         (check_initializer): Call obscure_complex_init if
9954         grok_reference_init returned nonzero.
9955         (save_function_data): Clear x_local_names.
9956         (pop_cp_function_context): Free x_local_names.
9957         (mark_inlined_fns): Remove.
9958         (mark_lang_function): Mark x_local_names.
9959         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
9960         Mark inlined_fns as tree, remove call to mark_inlined_fns.
9961         * class.c (alter_access): Ensure DECL_ACCESS is never set if
9962         DECL_DISCRIMINATOR_P.
9963         * cp-tree.h (cp_language_function): Add x_local_names.
9964         (lang_decl_flags): Add discriminator into u2.
9965         (lang_decl_inlined_fns): Remove.
9966         (lang_decl): inlined_fns is now a TREE_VEC.
9967         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
9968         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
9969         TREE_VEC, not a custom structure.
9970         (optimize_function): Likewise.
9971         * mangle.c (discriminator_for_local_entity): Discriminate among
9972         VAR_DECL local entities.
9973         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
9974         is not valid.
9975
9976 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
9977
9978         Add support for Java interface method calls.
9979         * cp-tree.h (struct lang_type): Add java_interface flag.
9980         (TYPE_JAVA_INTERFACE): New macro.
9981         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
9982         by setting TYPE_JAVA_INTERFACE.
9983         * call.c (java_iface_lookup_fn): New static.
9984         (build_over_call): If calling a method declared in a
9985         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
9986         expression which resolves the function address.
9987         (build_java_interface_fn_ref): New function.
9988
9989 2001-03-22  Richard Henderson  <rth@redhat.com>
9990
9991         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
9992         * except.c: Don't include it.
9993
9994 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
9995             based on an idea from Joe Buck <jbuck@synopsys.com>
9996
9997         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
9998         New nonterminals.
9999         (data_def, component_decl): Add reductions to bad_decl.
10000
10001 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
10002
10003         * method.c (do_build_assign_ref): Don't use build_modify_expr for
10004         anonymous aggregates, since they don't have assignment operator
10005         method.
10006         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
10007         assignment operators for anonymous structure fields.
10008
10009 2001-03-21  Jason Merrill  <jason@redhat.com>
10010
10011         * pt.c (instantiate_decl): Abort if we see a member constant
10012         instantiation that doesn't already have its initializer.
10013         Downgrade explicit instantiation without definition to pedwarn.
10014
10015         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
10016         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
10017         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
10018
10019         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
10020         (pending_vtables): Remove.
10021         * decl2.c (pending_vtables): Remove.
10022         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
10023         CLASSTYPE_VTABLE_NEEDS_WRITING.
10024         (import_export_class): Likewise.
10025         (init_decl2): Don't mark pending_vtables.
10026         * lex.c (handle_pragma_vtable): Just sorry.
10027         * pt.c (instantiate_class_template): Don't mess with
10028         CLASSTYPE_VTABLE_NEEDS_WRITING.
10029         (mark_class_instantiated): Likewise.
10030         * ptree.c (print_lang_type): Don't print it.
10031         * semantics.c (begin_class_definition): Don't set it.
10032
10033         * pt.c (template_tail): Replace with last_pending_template.
10034         (maybe_templates, maybe_template_tail): Remove.
10035         (add_pending_template): Adjust.
10036         (instantiate_pending_templates): Adjust.
10037
10038         * cp-tree.h (struct saved_scope): Remove lang_stack field.
10039         (current_lang_stack): Remove.
10040         * decl.c (maybe_push_to_top_level): Don't initialize it.
10041         (duplicate_decls): Use current_lang_depth.
10042         (xref_basetypes): Likewise.
10043         * class.c (current_lang_depth): New fn.
10044         (push_lang_context): Use more varray functionality.
10045         (pop_lang_context): Likewise.
10046
10047         * error.c (GLOBAL_THING): Always use '__'.
10048
10049 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
10050
10051         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
10052
10053         * mangle.c (mangle_decl_string): Mangle the names of overloaded
10054         operators, even when they have `extern "C"' linkage.
10055
10056 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
10057
10058         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
10059         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
10060         where it's not necessary.
10061         (add_method): Remove optimization involving comparison of
10062         DECL_ASSEMBLER_NAME.
10063         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
10064         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
10065         where it's not necessary.
10066         (check_methods): Likewise.
10067         (build_clone): Likewise.
10068         (built_vtt): Likewise.
10069         * cp-tree.h (DECL_NEEDED_P): Likewise.
10070         * decl.c (pushtag): Likewise.
10071         (duplicate_decls): Likewise.
10072         (pushdecl): Likewise.
10073         (builtin_function): Likewise.
10074         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
10075         (build_cp_library_fn): Likewise.
10076         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
10077         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
10078         where it's not necessary.
10079         (make_rtl_for_nonlocal_decl): Likewise.
10080         (cp_finish_decl): Likewise.
10081         (grokfndecl): Likewise.
10082         (grokvardecl): Likewise.
10083         (grokdeclarator): Likewise.
10084         (start_function): Likewise.
10085         (cp_missing_return_ok_p): Likewise.
10086         * decl2.c (grokclassfn): Likewise.
10087         (check_classfn): Likewise.
10088         (finish_static_data_member_decl): Likewise.
10089         (grokfield): Likewise.
10090         * error.c (GLOBAL_IORD_P): Remove.
10091         (dump_global_iord): Improve output.
10092         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
10093         * except.c (nothrow_libfn_p): Summarily reject any function not in
10094         namespace-scope.
10095         * init.c (build_java_class_ref): Don't explicitly set
10096         DECL_ASSEMBLER_NAME after calling mangle_decl.
10097         * mangle.c (mangle_decl_string): Handle extern "C" functions.
10098         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
10099         * method.c (set_mangled_name_for_decl): Don't explicitly set
10100         DECL_ASSEMBLER_NAME after calling mangle_decl.
10101         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
10102         IDENTIFIER_GLOBAL_VALUE for the thunk.
10103         * pt.c (set_mangled_name_for_template_decl): Remove.
10104         (check_explicit_specialization): Don't use it.
10105         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
10106         (tsubst_friend_function): Likewise.
10107         (tsubst_decl): Likewise.
10108         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
10109         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
10110         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
10111         where it's not necessary.
10112         (tinfo_base_init): Likewise.
10113         (create_real_tinfo_var): Likewise.
10114         * search.c (looup_field_1): Likewise.
10115         * semantics.c (finish_named_return_value): Likewise.
10116         * tree.c (init_tree): Set lang_set_decl_assembler_name.
10117
10118 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
10119
10120         Correct semantics restrictions checking in throw-expression.
10121         * except.c (is_admissible_throw_operand): New function.
10122         (build_throw): Use it.
10123
10124 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
10125
10126         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
10127         and its ilk.
10128
10129 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
10130
10131         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
10132         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
10133         * decl.c (duplicate_decls): Likewise.
10134         (builtin_function): Likewise.
10135         (build_library_fn): Likewise.
10136         (build_cp_library_fn): Likewise.
10137         (check_initializer): Likewise.
10138         (cp_finish_decl): Likewise.
10139         * decl2.c (grokfield): Likewise.
10140         (grok_function_init): Remove #if 0'd code.
10141         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
10142         * friend.c (do_friend): Likewise.
10143         * init.c (get_temp_regvar): Likewise.
10144         * method.c (make_thunk): Likewise.
10145         * pt.c (tsubst_friend_function): Likewise.
10146         (tsubst_decl): Likewise.
10147         (regenerate_decl_from_template): Likewise.
10148         * semantics.c (genrtl_named_return_value): Likewise.
10149         (expand_body): Likewise.
10150         (genrtl_finish_function): Likewise.
10151         * tree.c (cp_tree_equal): Likewise.
10152
10153 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
10154
10155         * call.c (convert_like_real): Add extra semantics to INNER
10156         parameter. Don't convert to temporary if a user conversion
10157         gives us an lvalue that we're about to bind to a reference.
10158         Set INNER to indicate pending reference binding on recursive
10159         calls.
10160
10161 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
10162
10163         * cp/lex.c: Delete duplicate pending_lang_change.
10164
10165 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
10166
10167         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
10168         Similarly.
10169         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
10170         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
10171
10172 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
10173
10174         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
10175
10176 2001-03-08  Stan Shebs  <shebs@apple.com>
10177
10178         * cp-tree.h (set_identifier_local_value): Remove unused decl.
10179
10180 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
10181
10182         * spew.c: Remove references to CPP_OSTRING.
10183
10184 2001-03-06  Andrew Haley  <aph@redhat.com>
10185
10186         * typeck.c (convert_arguments): Check that we have an fndecl.
10187
10188 2001-03-05  Andrew Haley  <aph@redhat.com>
10189
10190         * typeck.c (convert_arguments): Don't do ellipsis conversion for
10191         __built_in_constant_p.
10192
10193 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
10194
10195         * typeck.c (build_static_cast): Allow enum to enum conversions
10196         as per DR 128.
10197
10198 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
10199
10200         * class.c (check_field_decls): Pointers to member do not a
10201         non-pod struct make, as per DR 148.
10202
10203 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
10204
10205         * call.c (joust): cp_pedwarn when using gnu extension concerning
10206         worst conversion sequences.
10207
10208 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
10209
10210         * decl.c: Replace all uses of 'boolean' with 'bool'.
10211
10212 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
10213
10214         * lang-specs.h: Add zero initializer for cpp_spec field to
10215         all array elements that need one.  Don't put an #ifdef inside
10216         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
10217         use it.
10218
10219 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
10220
10221         Implement using decls inside template functions.
10222         * decl2.c (validate_nonmember_using_decl): Don't special case
10223         fake_std_node in the global namespace. Don't reject early when
10224         processing a template.
10225         (do_local_using_decl): Add to statement tree. Don't do further
10226         processing when building a template.
10227         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
10228
10229 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
10230
10231         * decl2.c (do_nonmember_using_decl): Don't complain if we find
10232         same function. Do complain about ambiguating extern "C"
10233         declarations.
10234
10235 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
10236
10237         Remove floating point and complex type template constant parms.
10238         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
10239         COMPLEX_TYPE extensions.
10240         (invalid_nontype_parm_type_p): Likewise.
10241
10242 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
10243
10244         * except.c (call_eh_info): Revert "match_function"'s type.
10245
10246 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
10247
10248         Fix ctor vtable vcall offsets.
10249         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
10250         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
10251         (get_matching_base): Remove.
10252         (get_original_base): New function.
10253         (build_vtbl_initializer): Initialize vid.rtti_binfo.
10254         Use a virtual thunk for a ctor vtable with an index
10255         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
10256         primary base within a constructor vtable. Only set
10257         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
10258         when primary base has been lost.
10259         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
10260
10261 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
10262
10263         * call.c (joust): Ensure more_specialized()'s argument length
10264         parameter has correct value for constructors.
10265
10266 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
10267
10268         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
10269
10270         * decl.c (mark_inlined_fns): Prototype.
10271
10272 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
10273
10274         * spew.c (yylex): Correct handling of friends.
10275
10276 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
10277
10278         * mangle.c (write_encoding): Pass write_function_type the
10279         FUNCTION_DECL for the function being encoded.
10280         (write_function_type): Pass it along to write_bare_function_type.
10281         (write_bare_function_type): Pass it along to write_method_parms.
10282         (write_method_parms): Don't mangle the compiler-generated
10283         parameters to a constructor or destructor.
10284
10285 2001-02-22  Andreas Jaeger  <aj@suse.de>
10286
10287         * optimize.c: Include toplev.h for
10288         note_deferral_of_defined_inline_function prototype.
10289
10290 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
10291
10292         * cp-tree.h (struct lang_decl_inlined_fns): New.
10293         (struct lang_decls): Add inlined_fns.
10294         (DECL_INLINED_FNS): New macro.
10295         * optimize.c (struct inline_data): Add inlined_fns.
10296         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
10297         (inlinable_function_p): Likewise, fix typo in comment,
10298         function is not inlinable if it already inlined function currently
10299         being optimized.
10300         (expand_call_inline): Add fn to inlined_fns if necessary.
10301         (optimize_function): Initialize inlined_fns.
10302         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
10303         * decl.c (mark_inlined_fns): New function.
10304         (lang_mark_tree): Call it.
10305
10306 2001-02-21  Jason Merrill  <jason@redhat.com>
10307
10308         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
10309         (DECL_UNINLINABLE): Move to middle-end.
10310
10311         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
10312         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
10313         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
10314         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
10315         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
10316
10317         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
10318         second parm of op=.
10319
10320 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
10321
10322         * decl2.c (set_decl_namespace): Allow explicit instantiations in
10323         any namespace.
10324
10325 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10326
10327         * optimize.c (expand_call_inline): Don't walk subtrees of type
10328         nodes.
10329
10330 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
10331
10332         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
10333         for a destructor.
10334
10335 2001-02-18  Jason Merrill  <jason@redhat.com>
10336
10337         Do put the VTT parameter in DECL_ARGUMENTS.
10338         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
10339         (current_vtt_parm): New macro.
10340         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
10341         (DECL_HAS_VTT_PARM_P): New macro.
10342         (DECL_VTT_PARM): Remove.
10343         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
10344         * decl.c (duplicate_decls): Only copy the operator code if
10345         appropriate.
10346         (start_function): Set current_vtt_parm.
10347         (lang_mark_tree): Don't mark vtt_parm.
10348         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
10349         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
10350         * class.c (build_clone): Maybe remove the VTT parm.
10351         * optimize.c (maybe_clone_body): Set up the VTT parm.
10352         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
10353         * call.c (build_over_call): Just allow the VTT arg.
10354         * method.c (make_thunk): Don't set DECL_VTT_PARM.
10355         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
10356         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
10357         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
10358         * error.c (dump_function_decl): Likewise.
10359         * call.c (build_user_type_conversion_1, convert_like_real): Abort
10360         if we try to call a constructor with in-charge or VTT parms.
10361         * method.c (skip_artificial_parms_for): New fn.
10362         * call.c (add_function_candidate, build_over_call): Call it.
10363         * call.c (build_new_method_call): Use current_vtt_parm.
10364         * init.c (expand_virtual_init): Likewise.
10365         * class.c (same_signature_p): No longer static.
10366         * cp-tree.h: Declare it.
10367         * search.c (look_for_overrides_r): Use it.
10368
10369 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
10370
10371         * cp-tree.h (new_abi_rtti_p): Remove.
10372         (name_mangling_version): Likewise.
10373         (flag_do_squangling): Likewise.
10374         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
10375         * decl.c (grokfndecl): Likewise.
10376         * decl2.c (name_mangling_version): Remove.
10377         (flag_do_squangling): Likewise.
10378         (lang_f_options): Remove `squangle'.
10379         (unsupported_options): Add `squangle'.
10380         (cxx_decode_option): Issue a warning about uses of
10381         -fname-mangling-version.
10382         (finish_file): Remove old ABI support.
10383         * pt.c (check_explicit_specialization): Likewise.
10384         (tsubst_decl): Likewise.
10385         * rtti.c (init_rtti_processing): Likewise.
10386         (build_headof): Likewise.
10387         (get_tinfo_decl_dynamic): Likewise.
10388         (tinfo_from_decl): Likewise.
10389         (build_dynamic_cast_1): Likewise.
10390         (synthesize_tinfo_var): Likewise.
10391         * init.c (build_new): Allow enumeration types for the array-bounds
10392         in a direct-new-declarator.
10393
10394         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
10395
10396         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
10397         TREE_PROTECTED from the template being specialized.
10398
10399 2001-02-17  Jason Merrill  <jason@redhat.com>
10400
10401         * decl2.c (build_artificial_parm): Set TREE_READONLY.
10402
10403         * decl.c (bad_specifiers): Allow throw specs on things with
10404         pointer-to-function or -member-function type.
10405         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
10406         a pmf.
10407
10408 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
10409
10410         * call.c (check_dtor_name): Handle template names correctly.
10411
10412 2001-02-16  Jason Merrill  <jason@redhat.com>
10413
10414         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
10415         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
10416         * optimize.c (maybe_clone_body): Don't substitute it.
10417         * call.c (build_new_method_call): Check in_chrg instead.
10418         * init.c (expand_virtual_init): Likewise.
10419
10420 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
10421
10422         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
10423         class-type introduces at least a type-name.
10424
10425 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
10426
10427         * call.c (convert_like_real): Create a temporary for non-lvalue.
10428
10429 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
10430
10431         * cp-tree.h: Fix typos in comments.
10432
10433 2001-02-16  Jason Merrill  <jason@redhat.com>
10434
10435         * optimize.c (remap_block): If we're compiling a clone, pass the
10436         new block to insert_block.
10437
10438 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
10439
10440         * semantics.c (finish_asm_stmt): Robustify.
10441
10442 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
10443
10444         * pt.c (push_template_decl_real): Don't remangle the name of a
10445         class template.
10446
10447 2001-02-15  Jim Meyering  <meyering@lucent.com>
10448
10449         * Make-lang.in (c++.install-common): Depend on installdirs.
10450         (c++.install-info): Likewise.
10451         (c++.install-man): Likewise.
10452
10453 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
10454
10455         * typeck2.c (build_m_component_ref): Robustify.
10456
10457 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
10458
10459         * friend.c (do_friend): Don't take the nested [template] class
10460         into account when deciding whether to warn about the friend
10461         function not referring to a template function.
10462
10463 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
10464
10465         * typeck.c (build_unary_op): Clarify error message.
10466
10467 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
10468
10469         * parse.y (component_constructor_declarator): allow optional
10470         parentheses around constructor class name.
10471
10472 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
10473
10474         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
10475         section.
10476         * init.c (emit_base_init): Remove incorrect comment about
10477         virtual bases.
10478         * method.c (make_thunk): Fix comment alignment.
10479
10480 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
10481
10482         Kill remnants of this is variable.
10483         * cp-tree.h (flag_this_is_variable): Remove.
10484         * decl2.c (flag_this_is_variable): Remove.
10485         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
10486         (build_vbase_path): The path is non-static, even in a cdtor.
10487         (resolves_to_fixed_type_p): Add additional return value.
10488         * search.c (init_vbase_pointers): Adjust.
10489         * tree.c (lvalue_p_1): Adjust.
10490         * typeck.c (mark_addressable): Adjust.
10491
10492 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
10493
10494         * pt.c (unify): Don't check cv quals of array types.
10495
10496 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
10497
10498         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
10499         check whether we already have the type.
10500
10501 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
10502
10503         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
10504         * call.c (build_op_delete_call): Simplify to remove duplicate
10505         code.
10506         * class.c (clone_function_decl): Don't build the deleting variant
10507         of a non-virtual destructor.
10508         * decl.c (finish_destructor_body): Don't call delete if this is a
10509         non-virtual destructor.
10510         * init.c (build_delete): Explicitly call `operator delete' when
10511         deleting an object with a non-virtual destructor.
10512
10513 2001-02-13  Jason Merrill  <jason@redhat.com>
10514
10515         * lang-specs.h: Add more __EXCEPTIONS.
10516
10517 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
10518
10519         * typeck2.c (process_init_constructor): Check
10520         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
10521
10522 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
10523
10524         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
10525         Remove spurious information in comment. Allow further
10526         adjustments of REFERENCE_TYPE args.
10527
10528 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
10529
10530         * errfn.c (cp_deprecated): Tweak diagnostic text.
10531         * parse.y (new_initializer): Deprecate initializer lists
10532         extension.
10533
10534 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
10535
10536         Remove old ABI support.
10537
10538 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
10539
10540         * decl2.c (flag_vtable_thunks): Always set it to 1.
10541         (flag_new_abi): Likewise.
10542         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
10543
10544         * Makefile.in (g++spec.o): Fix typo.
10545
10546 2001-02-09  Jason Merrill  <jason@redhat.com>
10547
10548         * lang-specs.h: Restore definition of __EXCEPTIONS.
10549
10550 2001-02-08  Jason Merrill  <jason@redhat.com>
10551
10552         * search.c (shared_member_p): New function.
10553         (lookup_field_r): Use it.
10554         * cp-tree.h (SHARED_MEMBER_P): Remove.
10555
10556         * method.c (process_overload_item): Handle template-dependent array
10557         bounds.
10558         * pt.c (type_unification_real): If we end up with undeduced nontype
10559         parms, try again.
10560
10561         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
10562         types.
10563
10564         * typeck2.c (friendly_abort): Don't say anything if we have
10565         earlier errors or sorries.
10566
10567         * decl.c (check_tag_decl): Notice attempts to redefine bool and
10568         wchar_t.  Ignore if in_system_header.
10569
10570         * decl.c (maybe_push_cleanup_level): New fn...
10571         (start_decl_1): ...split out from here.
10572         * cvt.c (build_up_reference): Use it.
10573         * cp-tree.h: Declare it.
10574
10575 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
10576
10577         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
10578         spec.
10579
10580 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
10581
10582         * pt.c (lookup_template_class): Make sure it's a primary
10583         template or template_template_parm when called from the parser.
10584         (instantiate_template_class): Add assertion.
10585
10586 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
10587
10588         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
10589         from error_mark_node.
10590
10591 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
10592
10593         Fix specification and implementation bugs in V3 ABI
10594         construction vtables.
10595         * cp-tree.h (flag_dump_class_layout): New flag.
10596         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
10597         (BINFO_LOST_PRIMARY_P): New flag.
10598         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
10599         (BINFO_PRIMARY_MARKED_P): Rename to ...
10600         (BINFO_PRIMARY_P): ... here.
10601         (binfo_via_virtual): New prototype.
10602         * decl2.c (flag_dump_class_layout): New flag.
10603         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
10604         use `=' as a file name separator.
10605         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
10606         bases.
10607         (build_vtbl_address): If this is a virtual primary base, then
10608         get the vtbl of what it is ultimately primary for.
10609         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
10610         for BINFO_PRIMARY_P.
10611         (dfs_skip_nonprimary_vbases_markedp): Likewise.
10612         (get_shared_vbase_if_not_primary): Likewise.
10613         (dfs_get_pure_virtuals): Likewise.
10614         (expand_upcast_fixups): Likewise.
10615         (fixup_virtual_upcast_offsets): Likewise.
10616         (dfs_find_vbase_instance): Likewise.
10617         (find_vbase_instance): Likewise.
10618         (binfo_from_vbase): Adjust comment to reflect reality.
10619         (binfo_via_virtual): New function.
10620         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
10621         for binfo walking during VTT construction.
10622         (dfs_mark_primary_bases): Remove.
10623         (force_canonical_binfo_r): New function.
10624         (force_canonical_binfo): New function.
10625         (mark_primary_virtual_base): New function.
10626         (mark_primary_bases): Walk in inheritance graph order, use
10627         mark_primary_virtual_base.
10628         (determine_primary_base): Use some more intermediate variables.
10629         (dfs_find_final_overrider): Don't check for overriding along a
10630         virtual path.
10631         (dfs_modify_vtables): Walk into primary virtual bases too.
10632         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
10633         (build_base_fields): Likewise.
10634         (dfs_set_offset_for_unshared_vbases): Likewise.
10635         (layout_virtual_bases): Likewise.
10636         (end_of_class): Likewise.
10637         (finish_struct_1): Call dump_class_hierarchy, if requested.
10638         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
10639         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
10640         (dump_class_hierarchy): Add file parameter. Append to file, if
10641         required.
10642         (finish_vtbls): Adjust accumulate_vtbl_inits call.
10643         Use canonical base for virtual bases.
10644         (build_vtt): Add more comments. Adjust build_vtt_inits call.
10645         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
10646         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
10647         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
10648         virtual VTTs.
10649         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
10650         from DATA.  We want virtual primary bases and all bases via virtual.
10651         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
10652         virtual base when not a construction vtable.
10653         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
10654         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
10655         Use canonical bases when processing virtual bases.
10656         (accumulate_vtbl_inits): We're interested in any base via a
10657         virtual path.
10658         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
10659         within a construction vtable, determine what is being overridden.
10660         (build_vtbl_initializer): Add more comments
10661         (add_vcall_offset_vtbl_entries_1): Adjust comment.
10662         (build_rtti_vtbl_entries): Check if the base has lost its
10663         primary.
10664
10665 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
10666
10667         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
10668
10669 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10670
10671         * decl.c (pushdecl): Call abort instead of fatal.
10672         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
10673         * init.c (build_new_1): Likewise.
10674         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
10675         * decl.c (build_typename_type): hash_table_init now returns void.
10676         decl.c (init_decl_processing): Make an error non-fatal.
10677
10678 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
10679
10680         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
10681         Document.
10682         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
10683         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
10684         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10685         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
10686         * decl.c (maybe_commonize_var): Use the new name-mangling where
10687         appropriate.
10688         * decl2.c (comdat_linkage): Enhance comments.  Make all
10689         compiler-generated things static, if COMDAT is not available.
10690         (get_tinfo_decl): Do not make typeinfo objects that belong in the
10691         library COMDAT.
10692         (tinfo_base_init): Use the correct mangled name for typeinfo
10693         strings, and push them into the global scope.
10694         (typeinfo_in_lib_p): New function.
10695         (synthesize_tinfo_var): Use it.
10696         (create_real_tinfo_var): Likewise.
10697
10698 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
10699
10700         * decl.c (push_class_binding): Use context_for_name_lookup instead
10701         of CP_DECL_CONTEXT.
10702         * search.c (context_for_name_lookup): Remove static.  Check for NULL
10703         context in the loop.
10704         * cp-tree.h (context_for_name_lookup): Add prototype.
10705
10706 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
10707
10708         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
10709         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
10710         Remove.
10711         * call.c (convert_class_to_reference, build_user_type_conversion_1,
10712         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
10713
10714 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
10715
10716         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
10717         of macros used when compiling g++spec.c.
10718         * g++spec.c (lang_specific_driver): Link with the shared
10719         libgcc by default.
10720
10721 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
10722
10723         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
10724         make_reference_declarator, make_call_declarator), method.c
10725         (implicitly_declare_fn), parse.y (namespace_using_decl,
10726         notype_unqualified_id, expr_or_declarator, new_type_id,
10727         after_type_declarator, direct_after_type_declarator,
10728         notype_declarator, complex_notype_declarator,
10729         complex_direct_notype_declarator, qualified_id,
10730         notype_qualified_id, overqualified_id, direct_new_declarator,
10731         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
10732         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
10733         instead of build_parse_node.
10734
10735 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10736
10737         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
10738         (minus_one_node): Moved to top level gcc directory.  Renamed
10739         to integer_minus_one_node.
10740
10741         * init.c (init_init_processing): Don't set minus_one_node.
10742         (build_vec_init): Use integer_minus_one_node.
10743
10744         * rtti.c (get_tinfo_decl_dynamic): Likewise.
10745
10746 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
10747
10748         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
10749         identical and they would be replaced with constant, remove
10750         MODIFY_EXPR from the tree.
10751
10752 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10753
10754         * Make-lang.in: Remove all dependencies on defaults.h.
10755         * call.c: Don't include defaults.h.
10756         * decl.c: Likewise.
10757         * decl2.c: Likewise.
10758         * except.c: Likewise.
10759         * pt.c: Likewise.
10760         * rtti.c: Likewise.
10761         * tree.c: Likewise.
10762         * typeck.c: Likewise.
10763
10764 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
10765
10766         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
10767         operators even in "C" linkage.
10768         * method.c (set_mangled_name_for_decl): Likewise.
10769         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
10770         overloaded operators in "C" linkage.
10771
10772 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
10773
10774         * pt.c (tsubst_decl): Remove IN_DECL parameter.
10775         (tsubst_arg_types): Check parameter is not void.
10776         (tsubst): Adjust tsubst_decl call.
10777
10778 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
10779
10780         * call.c (add_builtin_candidate): Quote std properly, from
10781         previous change.
10782
10783 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10784
10785         * pt.c (check_explicit_specialization): Clone constructors and
10786         destructors.
10787
10788 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
10789
10790         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
10791         indicates anything special about template depth. Make sure we
10792         only count the user visible template classes.
10793
10794 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
10795
10796         * call.c (build_conv): Typo in comment.
10797         (add_builtin_candidate): Add more explanation.
10798         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
10799         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
10800         when we have enumeral types.
10801         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
10802         candidates for relops and eqops.
10803         (joust): Simplify control flow. Allow a non-template user
10804         function to hide a builtin.
10805
10806 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
10807
10808         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
10809         (more_specialized): Add deduction parameter.
10810         * call.c (joust): Adjust more_specialized call.
10811         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
10812         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
10813         (get_bindings_order): Remove.
10814         (get_bindings_real): Add DEDUCE parameter.
10815         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
10816         REFERENCE_TYPE jig for DEDUCE_ORDER.
10817         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
10818         maybe_adjust_types_for_deduction.
10819         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
10820         directly.
10821         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
10822         (check_cv_quals_for_unify): Use new unify qualifier flags.
10823         (unify): Clear new unify qualifier flags.
10824         (get_bindings_real): Add DEDUCE parameter.
10825         (get_bindings): Adjust call to get_bindings_real.
10826         (get_bindings_overload): Likewise.
10827         (most_specialized_instantiation): Adjust call to
10828         more_specialized.
10829
10830 2001-01-19  Jason Merrill  <jason@redhat.com>
10831
10832         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
10833
10834         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
10835         -fnew-abi.
10836
10837 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
10838
10839         * decl2.c (arg_assoc_class): Fix double iteration logic.
10840
10841 2001-01-19  Jason Merrill  <jason@redhat.com>
10842
10843         * init.c (build_delete): Always call convert_force to strip cv-quals.
10844
10845         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
10846         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
10847         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
10848
10849 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
10850
10851         * search.c (get_vbase_1): Count only virtual bases.
10852
10853 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
10854
10855         * class.c (duplicate_tag_error): Robustify flag clearing.
10856
10857 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
10858
10859         * cp-tree.h (lookup_template_class): Add complain parm.
10860         * decl.c (lookup_namespace_name): Adjust call to
10861         lookup_template_class.
10862         (make_typename_type): Likewise.
10863         * semantics.c (finish_template_type): Likewise.
10864         * pt.c (lookup_template_class): Add complain parm. Adjust.
10865         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
10866         (tsubst): Likewise.
10867
10868 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
10869
10870         * pt.c (copy_default_args_to_explicit_spec): Preserve
10871         object's CV quals. Reorganize.
10872
10873 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
10874
10875         * typeck.c (build_modify_expr): Say `initialization' for
10876         INIT_EXPRs.
10877         * init.c (build_default_init): Convert to enumeral type, if
10878         needed.
10879
10880 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
10881
10882         * parse.y (nomods_initdcl0): Properly set things up for
10883         initdcl0_innards.
10884
10885 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
10886
10887         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
10888         (type_unification_real): Set it.
10889         (unify): Use it.
10890
10891 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
10892
10893         * decl.c (finish_destructor_body): Convert to vbase pointer here.
10894
10895 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
10896
10897         * semantics.c (begin_class_definition): Check we're not inside a
10898         template parm list.
10899
10900 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
10901
10902         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
10903         BASELINK_P.
10904
10905 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10906
10907         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
10908         * call.c (build_over_call): Add comment.
10909
10910 2001-01-16 Daniel Berlin <dberlin@redhat.com>
10911
10912         * cvt.c (ocp_convert): Handle vector type conversion
10913         * typeck2.c (digest_init): Handle vector type initializations
10914
10915 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
10916
10917         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
10918           was given.
10919
10920 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
10921
10922         * pt.c (check_nontype_parm): Rename to ...
10923         (invalid_nontype_parm_type_p): ... here.
10924         (process_template_parm): Adjust.
10925         (convert_template_argument): Adjust.
10926
10927 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
10928
10929         * pt.c (check_nontype_parm): New function.
10930         (process_template_parm): Use it.
10931         (convert_template_argument): Use it.
10932         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
10933         member.
10934
10935 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
10936
10937         * tree.c: Add defaults.h
10938         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
10939         * Make-lang.in (cp/tree.o): Add defaults.h.
10940
10941 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
10942
10943         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
10944
10945 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
10946
10947         * g++.1: Change to be ".so man1/gcc.1".
10948
10949 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
10950
10951         * Make-lang.in (c++.info, c++.install-info): Build and install g++
10952         internals info.
10953         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
10954         ($(srcdir)/cp/g++int.info): New target.
10955         * gxxint.texi: Add info directory entry.  Use @@ in email address.
10956         * .cvsignore: Update.
10957
10958 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
10959
10960         * typeck.c (build_c_cast): Do template processing earlier.
10961         Always pedwarn on array casts.
10962
10963 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
10964
10965         * friend.c (make_friend_class): Make sure a templated class is
10966         actually a template.
10967
10968 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
10969
10970         * decl2.c (get_guard): Set linkage from guarded decl.
10971
10972 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
10973
10974         * call.c (convert_default_arg): Check for unprocessed
10975         DEFAULT_ARG.
10976         * cp-tree.h (replace_defarg): Move to spew.c.
10977         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
10978         spew.c, which is where they really are.
10979         (done_pending_defargs): Declare.
10980         (unprocessed_defarg_fn): Declare.
10981         * decl.c (replace_defarg): Move to spew.c
10982         * parse.y (structsp): Call done_pending_defargs.
10983         * spew.c (defarg_fns): Rearrange list structure.
10984         (defarg_fnsdone): New static variable.
10985         (defarg_depfns): New static variable.
10986         (init_spew): Adjust.
10987         (add_defarg_fn): Store the type in TREE_TYPE.
10988         (do_pending_defargs): Detect and deal with ordering constraints
10989         and circularity.
10990         (done_pending_defargs): New function.
10991         (unprocessed_defarg_fn): New function.
10992         (replace_defarg): Moved from decl.c. Robustify. Don't save
10993         if circularity detected.
10994
10995 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
10996
10997         * pt.c (unify): Check array has a domain, before checking
10998         whether it is variable sized.
10999
11000 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
11001
11002         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
11003         parameters with pointers to arrays of unknown bound.
11004
11005 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
11006
11007         * parse.y (template_parm_header, template_spec_header): New
11008         reductions. Split out from ...
11009         (template_header): ... here. Use them.
11010         (template_template_parm): Use template_parm_header.
11011         * semantics.c (finish_template_template_parm): Add assert.
11012
11013 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
11014
11015         * mangle.c (write_builtin_type): Fix thinko.
11016
11017         * pt.c (copy_default_args_to_explicit_spec_1): New function.
11018         (copy_default_args_to_explicit_spec): Likewise.
11019         (check_explicit_specialization): Use it.
11020
11021         * class.c (finish_struct_1):  Remove last argument in call to
11022         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
11023         * decl.c (builtin_function): Likewise.
11024         (build_cp_library_fn): Likewise.
11025         (check_initializer): Likewise.
11026         (make_rtl_for_nonlocal_decl): Likewise.
11027         (cp_finish_decl): Likewise.
11028         (start_function): Likewise.
11029         * decl2.c (finish_anon_union): Likewise.
11030         * friend.c (do_friend): Likewise.
11031         * init.c (build_java_class_ref): Likewise.
11032         * method.c (make_thunk): Likewise.
11033         * pt.c (tsubst_friend_function): Likewise.
11034         * semantics.c (expand_body): Likewise.
11035
11036 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
11037
11038         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
11039         looking at DECL_CLONED_FUNCTION for non-functions.
11040
11041 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
11042
11043         * error.c (dump_template_parameter): Use parm to determine how
11044         to print default value.
11045
11046 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
11047
11048         * class.c (duplicate_tag_error): Clear more flags.
11049
11050 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
11051
11052         * call.c (build_new_method_call): Use binfo_for_vbase.
11053
11054 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
11055
11056         * cp-tree.h (flag_cond_mismatch): Don't declare.
11057         * decl2.c (flag_cond_mismatch): Don't define.
11058         (lang_f_options): Remove cond-mismatch.
11059         (unsupported_options): Add cond-mismatch.
11060
11061 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
11062
11063         * class.c (handle_using_decl): Reject using of constructor name
11064         of sourcing class. Allow injecting of a method with same name as
11065         nested class. Fixup error messages.
11066
11067 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
11068
11069         * decl2.c (lang_decode_option): Handle -Wformat=2.
11070
11071 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
11072
11073         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
11074         initialized_in_class.
11075         (DECL_DEFINED_IN_CLASS_P): Rename to ...
11076         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
11077         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
11078         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
11079         * pt.c (check_default_tmpl_args): Adjust for
11080         DECL_INITIALIZED_IN_CLASS_P.
11081         (instantiate_class_template): Likewise.
11082         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
11083
11084         * class.c (finish_struct): Constify saved_filename.
11085
11086 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
11087
11088         * class.c (duplicate_tag_error): Adjust diagnostic.
11089         (finish_struct): Locally set location to start of struct.
11090         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
11091
11092 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
11093
11094         * decl.c (struct binding_level): Adjust class_shadowed comments
11095         to reflect reality.
11096         (push_class_level_binding): Adjust comments to reflect reality.
11097         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
11098         Don't set TREE_VALUE on the class_shadowed list.
11099
11100 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11101
11102         * decl2.c (acceptable_java_type): Allow references too.
11103         * init.c (build_java_class_ref): When using the new ABI, search
11104         `class$' and have it mangled with `mangle_decl.'
11105         * mangle.c (write_java_integer_type_codes): New function.
11106         (write_builtin_type): Detect and mangle Java integer and real
11107         types.
11108
11109 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
11110
11111         * decl2.c (grokfield): Don't accept `asm' specifiers for
11112         non-static data members.
11113
11114 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11115
11116         * expr.c (cplus_expand_expr): Don't reset `target'.
11117
11118 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
11119
11120         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
11121
11122 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
11123
11124         * parse.y (template_datadef): Check for error_mark_node.
11125
11126 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
11127
11128         * cp-tree.def (DEFAULT_ARG): Make `x' class.
11129
11130 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
11131
11132         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
11133         (record_builtin_type): Make non-static.
11134         (flag_short_double): Don't declare.
11135         (init_decl_processing): Remove the creation of many tree nodes now
11136         in c_common_nodes_and_builtins.
11137         (build_void_list_node): New function.
11138         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
11139         * cp-tree.h (flag_short_wchar): Don't declare.
11140
11141 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
11142
11143         * call.c (build_conv): Don't use build1 for USER_CONV.
11144         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
11145
11146 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
11147
11148         * lex.c (lang_init): Call c_common_lang_init.
11149
11150 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
11151
11152         * search.c (lookup_fnfields_here): Remove.
11153         (look_for_overrides_r): Use lookup_fnfields_1.
11154         Ignore functions from using declarations.
11155
11156 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
11157
11158         Implement exceptions specifiers for implicit member functions.
11159         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
11160         * method.c (synthesize_exception_spec): New function.
11161         (locate_dtor, locate_ctor, locate_copy): New functions.
11162         (implicitly_declare_fn): Generate the exception spec too.
11163         * search.c (check_final_overrider): Check artificial functions
11164         too.
11165         * typeck2.c (merge_exception_specifiers): New function.
11166
11167 2001-01-03  Jason Merrill  <jason@redhat.com>
11168
11169         * init.c (build_default_init): New fn.
11170         (perform_member_init): Split out from here.
11171         (build_new_1): Use it.  Simplify initialization logic.
11172         (build_vec_init): Take an array, rather than a pointer and maxindex.
11173         Speed up simple initializations.  Don't clean up if we're assigning.
11174         * cp-tree.h: Adjust.
11175         * decl2.c (do_static_initialization): Remove TREE_VEC case.
11176         * parse.y (new_initializer): Return void_zero_node for ().
11177         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
11178         * typeck2.c (digest_init): Only complain about user-written
11179         CONSTRUCTORs.
11180
11181 2000-12-22  Mike Stump  <mrs@wrs.com>
11182
11183         * decl2.c: (max_tinst_depth): Increase to 50.
11184
11185 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
11186
11187         * class.c (invalidate_class_lookup_cache): Zero the
11188         previous_class_values.
11189         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
11190         TREE_INT_CST_HIGH.
11191         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
11192         * decl.c (free_bindings): New variable.
11193         (push_binding): Don't create a new binding if we have one on the
11194         free list.
11195         (pop_binding): Put old bindings on the free list.
11196         (init_decl_processing): Use size_int, not build_int_2.
11197         Register free_bindings as a GC root.
11198         (cp_make_fname_decl): Use size_int, not build_int_2.
11199         (push_inline_template_parms_recursive): Likewise.
11200         (end_template_parm_list): Likewise.
11201         (for_each_template_parm): Do not use walk_tree_without_duplicates.
11202         (tsubst_template_parms): Use size_int, not build_int_2.
11203         (tsubst): Likewise.
11204         * rtti.c (get_vmi_pseudo_type_info): Likewise.
11205
11206 2001-01-02  Richard Henderson  <rth@redhat.com>
11207
11208         * parse.y (asm): Set ASM_INPUT_P.
11209
11210 2001-01-02  Jason Merrill  <jason@redhat.com>
11211
11212         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
11213         for v3 ABI.
11214
11215         * typeck.c (cp_truthvalue_conversion): New fn.
11216         * cvt.c (ocp_convert): Use it.
11217
11218         * cp-tree.h: Lose c-common.c decls.
11219
11220         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
11221         * cvt.c (convert_to_void): Use type_unknown_p.
11222
11223         * typeck.c (strip_all_pointer_quals): Also strip quals from
11224         pointer-to-member types.
11225
11226         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
11227         parse.y as C.
11228
11229         * call.c (build_new_method_call): Do evaluate the object parameter
11230         when accessing a static member.
11231         * typeck.c (build_component_ref): Likewise.
11232
11233 2001-01-02  Andreas Jaeger  <aj@suse.de>
11234
11235         * decl.c (cp_missing_noreturn_ok_p): New.
11236         (init_decl_processing): Set lang_missing_noreturn_ok_p.
11237
11238 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
11239
11240         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
11241
11242 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
11243
11244         * class.c (pushclass): Remove #if 0'd code.
11245         * cp-tree.h (overload_template_name): Remove.
11246         * decl.c (store_bindings): Simplify.
11247         (pop_from_top_level): Likewise.
11248         * pt.c (overload_template_name): Remove.
11249         (instantiate_decl): Don't call push_to_top_level if it's not
11250         needed.
11251
11252 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
11253
11254         * pt.c (register_local_specialization): Don't return a value.
11255         (lookup_template_class): Use move-to-front heuristic when looking
11256         up template instantiations.
11257         (instantiate_decl): Only push_to_top_level when we're actually
11258         going to instantiate the template.
11259
11260 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
11261
11262         * search.c (binfo_for_vtable): Return least derived class, not
11263         most.  Handle secondary vtables.
11264
11265 2000-12-22  Jason Merrill  <jason@redhat.com>
11266
11267         * pt.c (more_specialized): Don't optimize len==0.
11268         (fn_type_unification): If we're adding the return type, increase len.
11269
11270         * typeck.c (build_binary_op): Fix pmf comparison logic.
11271
11272         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
11273         DECL_STATIC_FUNCTION_P.
11274
11275         * semantics.c (genrtl_finish_function): Don't try to jump to
11276         return_label unless it exists.
11277
11278         In partial ordering for a call, ignore parms for which we don't have
11279         a real argument.
11280         * call.c (joust): Pass len to more_specialized.
11281         (add_template_candidate_real): Strip 'this', pass len.
11282         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
11283         (get_bindings_order): New fn.  Pass len down.
11284         (get_bindings_real): Strip 'this', pass len.
11285         (fn_type_unification): Likewise.
11286         (type_unification_real): Succeed after checking 'len' args.
11287         (most_specialized_instantiation): Lose explicit_args parm.
11288         * class.c (resolve_address_of_overloaded_function): Strip 'this',
11289         pass len.
11290
11291 2000-12-21  Jason Merrill  <jason@redhat.com>
11292
11293         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
11294         DECL_TEMPLATE_RESULT.
11295
11296         * search.c (lookup_field_r): Call lookup_fnfields_1, not
11297         lookup_fnfields_here.
11298
11299         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
11300
11301         * call.c (build_object_call): Also allow conversions that return
11302         reference to pointer to function.
11303         (add_conv_candidate): Handle totype being ref to ptr to fn.
11304         (build_field_call): Also allow members of type reference to function.
11305         Lose support for calling pointer to METHOD_TYPE fields.
11306
11307         * error.c (dump_expr): Handle *_CAST_EXPR.
11308
11309         * typeck2.c (build_scoped_ref): Always convert to the naming class.
11310
11311         * tree.c (break_out_cleanups): Lose.
11312         * cp-tree.h: Remove prototype.
11313         * typeck.c (build_component_ref): Don't break_out_cleanups.
11314         (build_compound_expr): Likewise.
11315         * semantics.c (finish_expr_stmt): Likewise.
11316
11317 2000-12-20  Richard Henderson  <rth@redhat.com>
11318
11319         * cp-tree.h: Update declarations.
11320         * decl.c (finish_case_label): Return the new stmt node.
11321         * semantics.c (finish_goto_stmt): Likewise.
11322         (finish_expr_stmt, finish_return_stmt): Likewise.
11323         (finish_break_stmt, finish_continue_stmt): Likewise.
11324         (finish_asm_stmt): Likewise.
11325         * parse.y (already_scoped_stmt): Set STMT_LINENO.
11326         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
11327         (simple_if, simple_stmt): Return the new stmt node.
11328         (save_lineno): New.
11329
11330 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
11331
11332         * cp-tree.h: Don't declare warn_long_long.
11333
11334 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11335
11336         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
11337         IS_AGGR_TYPE.
11338
11339 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11340
11341         * pt.c (unify): Handle when both ARG and PARM are
11342         BOUND_TEMPLATE_TEMPLATE_PARM.
11343
11344 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11345
11346         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
11347         DECL_TEMPLATE_PARM_P.
11348
11349 2000-12-15  Jason Merrill  <jason@redhat.com>
11350
11351         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
11352
11353         * init.c (build_new_1): Don't strip quals from type.
11354
11355         * decl.c (pushdecl): Don't check for linkage on a non-decl.
11356
11357         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
11358
11359         * call.c (build_new_function_call): Lose space before paren in
11360         error message.
11361         (build_new_method_call): Likewise.
11362
11363         * typeck2.c (build_m_component_ref): Propagate quals from datum.
11364
11365 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11366
11367         * pt.c (check_explicit_specialization): Propagate default
11368         function arguments to explicit specializations.
11369
11370 2000-12-13  DJ Delorie  <dj@redhat.com>
11371
11372         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
11373         and <? operators.
11374
11375 2000-12-08  Jason Merrill  <jason@redhat.com>
11376
11377         * error.c (dump_function_name): Don't let the user see __comp_ctor.
11378
11379         Clean up copy-initialization in overloading code.
11380         * call.c (build_user_type_conversion_1): Die if we are asked to
11381         convert to the same or a base type.
11382         (implicit_conversion): Avoid doing so.  Lose reference binding code.
11383         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
11384         direct-initialization.  Also do direct-init part of copy-init.
11385         (build_user_type_conversion): Don't provide context to convert_like.
11386         * cvt.c (ocp_convert): build_user_type_conversion will now provide
11387         the constructor call for copy-init.
11388
11389         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
11390         instantiation of a member template.
11391         (do_decl_instantiation): Not here.
11392
11393 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
11394
11395         * class.c (check_field_decls): Don't special case anonymous
11396         fields in error messages.
11397         (note_name_declared_in_class): Use %D on diagnostic.
11398
11399         * tree.c (pod_type_p): Use strip_array_types.
11400         (cp_valid_lang_attribute): Likewise.
11401         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
11402         multiple evaluations.
11403         (cp_has_mutable_p): Use strip_array_types.
11404
11405 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
11406
11407         * cp-tree.h (sufficient_parms_p): Declare new function.
11408         * call.c (sufficient_parms_p): New function, broken out of ...
11409         (add_function_candidate): ... here. Use it.
11410         (add_conv_candidate): Use it.
11411         * decl.c (grok_ctor_properties): Use it.
11412
11413 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
11414
11415         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
11416
11417 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
11418
11419         * decl2.c (lang_decode_option): Handle -Wformat-security.
11420
11421 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11422
11423         * pt.c (verify_class_unification): New function.
11424         (get_class_bindings): Use it.
11425         (try_class_unification): Tidy.
11426         (unify): Handle when argument of a template-id is not
11427         template parameter dependent.
11428         (template_args_equal): Handle when TREE_CODE's do not match.
11429
11430 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
11431
11432         * lang-specs.h (c++): When invoking the stand-alone preprocessor
11433         for -save-temps, pass all relevant -Defines to it, and then don't
11434         pass them to cc1plus.
11435
11436 2000-12-05  Will Cohen  <wcohen@redhat.com>
11437
11438         * decl.c (finish_case_label): Cleared
11439         more_cleanups_ok in surrounding function scopes.
11440         (define_label): Likewise.
11441
11442 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
11443
11444         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
11445         (get_matching_virtual): Remove.
11446         (look_for_overrides): Declare new function.
11447         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
11448         DECL_VINDEX here.
11449         * class.c (check_for_override): Move base class iteration code
11450         to look_for_overrides.
11451         * search.c (next_baselink): Remove.
11452         (get_virtuals_named_this): Remove.
11453         (get_virtual_destructor): Remove.
11454         (tree_has_any_destructors_p): Remove.
11455         (struct gvnt_info): Remove.
11456         (check_final_overrider): Remove `virtual' from error messages.
11457         (get_matching_virtuals): Remove. Move functionality to ...
11458         (look_for_overrides): ... here, and ...
11459         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
11460         to be overriding.
11461
11462 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
11463
11464         * typeck.c (get_delta_difference): If via a virtual base,
11465         return zero.
11466         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
11467         adjustment.
11468
11469 2000-12-04  Richard Henderson  <rth@redhat.com>
11470
11471         * error.c (dump_tree): Use output_add_string not OB_PUTS.
11472
11473 2000-12-04  Jason Merrill  <jason@redhat.com>
11474
11475         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
11476         (write_builtin_type): Pass intSI_type_node and the like through
11477         type_for_mode.
11478         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
11479         Pass intSI_type_node and the like through type_for_mode.
11480         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
11481         * pt.c (tsubst, unify): Likewise.
11482         * tree.c (walk_tree): Likewise.
11483         * error.c (dump_type): Likewise.
11484         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
11485
11486         * Make-lang.in: Tweak top comment for emacs.
11487         (cp/TAGS): Restore.
11488
11489         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
11490
11491         * class.c (clone_function_decl): Robustify.
11492
11493 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
11494
11495         * decl.c (store_bindings): Only search in the non modified
11496         old_bindings for duplicates.
11497
11498 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
11499
11500         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
11501         TYPE_POLYMORPHIC_P.
11502
11503         * typeck.c (build_static_cast): Remove unused variable.
11504
11505 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11506
11507         * pt.c: Fix typo in comment.
11508
11509 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
11510
11511         * decl2.c (warn_format): Remove definition.
11512         (lang_decode_option): Handle -Wformat-nonliteral,
11513         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
11514
11515 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
11516
11517         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
11518         (init_decl_processing): Don't create string_type_node,
11519         const_string_type_node, wint_type_node, intmax_type_node,
11520         uintmax_type_node, default_function_type, ptrdiff_type_node and
11521         unsigned_ptrdiff_type_node.  Adjust position of call to
11522         c_common_nodes_and_builtins.
11523         (identifier_global_value): New function.
11524
11525 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
11526
11527         * call.c (standard_conversion): Reject pointer to member
11528         conversions from ambiguous, inaccessible or virtual bases.
11529         * typeck.c (build_static_cast): Don't check pointers to members
11530         specially.
11531
11532 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
11533
11534         * method.c (do_build_copy_constructor): Preserve cv
11535         qualifications when accessing source object members.
11536         (do_build_assign_ref): Likewise. Remove separate diagnostics for
11537         unnamed fields.
11538
11539 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
11540
11541         * method.c (do_build_assign_ref): Construct appropriately
11542         CV-qualified base reference. Don't allow const casts in base
11543         conversion.
11544
11545 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
11546
11547         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
11548         incomplete return type.
11549
11550 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
11551
11552         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
11553         * semantics.c (finish_base_specifier): Accept a _TYPE not a
11554         _DECL.
11555
11556 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
11557
11558         * spew.c (yyerror): Cope if yylval.ttype is NULL.
11559
11560 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
11561
11562         * decl.c (grokdeclarator): Diagnose undefined template contexts.
11563
11564 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
11565
11566         * decl.c (grokdeclarator): Do type access control on friend
11567         class.
11568
11569 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
11570
11571         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
11572         bison parser ickiness.
11573         * pt.c (tsubst_friend_function): Enter namespace scope when
11574         tsubsting the function name.
11575         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
11576
11577 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
11578
11579         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
11580         * cvt.c (cp_convert_to_pointer): Add force parameter.
11581         Allow conversions via virtual base if forced.
11582         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
11583         (ocp_convert): Likewise.
11584         * search.c (binfo_from_vbase): Return the virtual base's binfo.
11585         * typeck.c (get_delta_difference): Adjust handling of virtual
11586         bases.
11587
11588 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
11589
11590         * tree.c (struct list_hash): Remove.
11591         (list_hash_table): Make it be an htab.
11592         (struct list_proxy): New type.
11593         (list_hash_eq): New function.
11594         (list_hash_pieces): Renamed from ...
11595         (list_hash): ... this.
11596         (list_hash_lookup): Remove.
11597         (list_hash_add): Remove.
11598         (hash_tree_cons): Use the generic hashtable.
11599         (mark_list_hash): Remove.
11600         (init_tree): Create the hashtable.
11601
11602 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
11603
11604         * method.c (build_mangled_C9x_name): Rename to
11605         build_mangled_C99_name.  Change C9X references in comments to
11606         refer to C99.
11607
11608 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
11609
11610         * parse.y (unary_expr): Move VA_ARG from here ...
11611         (primary): ... to here.
11612
11613 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
11614
11615         * semantics.c (finish_id_expr): If type is error_mark, return
11616         error_mark.
11617
11618 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
11619
11620         * pt.c (lookup_template_class): Simplify loop exit constructs.
11621         Cope when there is no partial instantiation of a template
11622         template member.
11623
11624 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
11625
11626         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
11627
11628 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
11629
11630         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
11631         prefix.
11632
11633         * pt.c (do_decl_instantiate): Explicitly clone constructors and
11634         destructors that haven't already been cloned.
11635
11636 2000-11-20  Richard Henderson  <rth@redhat.com>
11637
11638         * parse.y (yyparse_1): Rename the parser entry point.
11639
11640 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
11641
11642         * mangle.c (write_name): Use <unscoped-name> for names directly in
11643         function scope.
11644         (write_unscoped_name): Accept names directly in function scope.
11645
11646 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
11647
11648         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
11649         * parse.y (extdef): Add EXPORT reduction.
11650         * spew.c (yylex): Don't skip export here.
11651
11652 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
11653
11654         * decl.c (init_decl_processing): Correct name of pure virtual
11655         function under the new ABI.
11656         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
11657         (throw_bad_typeid): Likewise for bad typeid function.
11658
11659 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
11660
11661         * decl.c (grokparms): Don't even function types of `void' type,
11662         either.
11663         * mangle.c (write_type): Don't crash when confronted with the
11664         error_mark_node.
11665
11666         * decl.c (grokparms): Don't create parameters of `void' type.
11667
11668 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
11669
11670         * lex.c (mark_impl_file_chain): Delete.
11671         (init_parse): Remove call to ggc_add_string_root.  No need to
11672         ggc_strdup a string constant.  Do not add impl_file_chain to GC
11673         roots.
11674         (handle_pragma_implementation): No need to ggc_strdup main_filename.
11675
11676 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
11677
11678         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
11679
11680 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
11681
11682         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
11683         * decl.c (grokdeclarator): Don't reject void parms here.
11684         (require_complete_types_for_parms): Simplify, use
11685         complete_type_or_else.
11686         (grokparms): Remove bitrot. Remove funcdef parm.
11687         Deal with ellipsis parm lists here.
11688         * semantics.c (finish_parmlist): Don't append void_list_node
11689         here. Set PARMLIST_ELLIPSIS_P.
11690
11691 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
11692
11693         * typeck2.c (incomplete_type_error): Reorganize to avoid
11694         excessive diagnostics.
11695
11696 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
11697
11698         * lex.c (struct impl_files, internal_filename): Constify a char *.
11699
11700 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
11701
11702         * mangle.c (write_special_name_constructor): Don't generate
11703         assembler junk when confronted with an old-style constructor.
11704         (write_special_name_destructor): Likewise.
11705         (mangle_decl_string): Do it here instead.
11706
11707 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
11708
11709         * call.c (op_error): Make error messages clearer.
11710
11711 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
11712
11713         * decl.c (wrapup_globals_for_namespace): Don't mark things
11714         TREE_ASM_WRITTEN when they're not.
11715
11716 2000-11-15  Jason Merrill  <jason@redhat.com>
11717
11718         * typeck2.c (friendly_abort): Uncount the error before handing
11719         off to fancy_abort.
11720
11721 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
11722
11723         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
11724
11725 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
11726
11727         * class.c (build_vtbl_initializer): Fix typo in comment.
11728         * typeck.c (expr_sizeof): Don't crash on errors.
11729
11730 2000-11-14  Jim Wilson  <wilson@redhat.com>
11731
11732         * lang-specs.h: Add %2 after %(cc1_options).
11733
11734 2000-11-14  Richard Henderson  <rth@redhat.com>
11735
11736         * typeck.c (c_sizeof): Be strict about casting result value
11737         back to c_size_type_node.
11738         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
11739
11740 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
11741
11742         * typeck.c (build_unary_op): Use boolean_increment from
11743         c-common.c, moving the relevant code there.
11744
11745 2000-11-11  Jason Merrill  <jason@redhat.com>
11746
11747         * typeck.c (mark_addressable): Don't call put_var_into_stack.
11748
11749         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
11750         in inlines.
11751
11752 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11753
11754         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
11755         * lex.c (copy_lang_decl): Likewise.
11756
11757 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
11758
11759         * dump.c (cp_dump_tree): Don't dump function bodies here.
11760
11761         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
11762         (dump.o): Update dependency list.
11763         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
11764         (flag_dump_translation_unit): Likewise.
11765         (CP_TYPE_QUALS): Adjust definition.
11766         (DECL_C_BIT_FIELD): Remove.
11767         (SET_DECL_C_BIT_FIELD): Likewise.
11768         (CLEAR_DECL_C_BIT_FIELD): Likewise.
11769         (add_maybe_template): Likewise.
11770         (strip_array_types): Likewise.
11771         (dump_node_to_file): Likewise.
11772         (cp_dump_tree): New function.
11773         * decl.c (init_decl_processing): Set lang_dump_tree.
11774         * decl2.c (flag_dump_translation_unit): Remove.
11775         * dump.c: Move most of it to ../c-dump.c.
11776         (cp_dump_tree): New function.
11777         * pt.c (add_maybe_template): Remove.
11778         * typeck.c (strip_array_types): Likewise.
11779
11780 2000-11-07  Eric Christopher  <echristo@redhat.com>
11781
11782         * decl.c (init_decl_processing): Change definition of
11783         __wchar_t to wchar_t.  Remove artificial declaration of
11784         wchar_t.
11785         * lex.c: Change instances of __wchar_t to wchar_t.
11786
11787 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
11788
11789         * lex.c (do_identifier): Don't lookup_name for operators.
11790         * parse.y (operator): Save looking_for_typename.
11791         (unoperator): Restore it.
11792         * spew.c (frob_opname): Use nth_token for lookahead.
11793
11794 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
11795
11796         * decl.c (grok_op_properties): Always use coerce_new_type and
11797         coerce_delete_type.
11798         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
11799         exception specification. Tidy up.
11800         (coerce_delete_type): Preserve exception specification. Tidy up.
11801
11802 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
11803
11804         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
11805         (push_binding_level), error.c (cp_tree_printer), pt.c
11806         (process_partial_specialization, tsubst_template_arg_vector),
11807         search.c (lookup_member): Use memset () instead of bzero ().
11808
11809 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
11810
11811         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
11812
11813 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
11814
11815         * Make-lang.in (c++.distdir): Remove.
11816
11817 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
11818
11819         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
11820         declarations from different namespaces to be combined.
11821
11822 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
11823
11824         * decl.c: Include tm_p.h.
11825
11826 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
11827
11828         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
11829
11830 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
11831
11832         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
11833         (build_overload_value), repo.c (open_repo_file), xref.c
11834         (open_xref_file): Use strchr () and strrchr () instead of index ()
11835         and rindex ().
11836
11837 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
11838
11839         * call.c (build_over_call): Call fold on the CALL_EXPR.
11840
11841 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
11842
11843         * error.c (dump_template_decl): Separate template hearders with
11844         space not comma.
11845
11846 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
11847
11848         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
11849         TS_* flags with corresponding TFF_*.  Adjust prototypes of
11850         functions (which used to take a tree_string_flags) to take an int.
11851
11852         * cp-tree.h (enum tree_string_flags): Remove
11853         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
11854         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
11855         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
11856         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
11857         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
11858         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
11859         (type_as_string, decl_as_string, expr_as_string,
11860         context_as_string): Adjust prototype.
11861
11862         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
11863         instead of TS_PLAIN.
11864
11865         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
11866         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
11867         plain `0'.
11868
11869 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
11870
11871         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
11872         (linkage_kind): New enumeration.
11873         (decl_linkage): New function.
11874         * decl2.c (comdat_linkage): Extend comment.
11875         * error.c (dump_function_decl): Print the arguments used to
11876         instantiate a template, even when not printing the type of the
11877         function.
11878         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
11879         not TREE_PUBLIC, to test for external linkage.
11880         * tree.c (decl_linkage): New function.
11881
11882 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
11883
11884         * pt.c (instantiate_decl): Always instantiate static data members
11885         initialized in-class.
11886
11887 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
11888
11889         * Make-lang.in: Move all build rules here from Makefile.in,
11890         adapt to new context.  Wrap all rules that change the current
11891         directory in parentheses.  Expunge all references to $(P).
11892         When one command depends on another and they're run all at
11893         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
11894         all object-file generation rules.  Delete obsolete variables.
11895
11896         * Makefile.in: Delete.
11897         * config-lang.in: Delete outputs= line.
11898
11899 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
11900
11901         * error.c (dump_function_decl): Print no space between
11902         `ptr-operator' the `type-specifier' of the return type.
11903         (dump_type_prefix): Make sure we put space at the appropriate
11904         place.
11905
11906 2000-10-23  Jason Merrill  <jason@redhat.com>
11907
11908         * call.c (equal_functions): Also call decls_match for extern "C" fns.
11909
11910 2000-10-22  Jason Merrill  <jason@redhat.com>
11911
11912         * call.c (build_conditional_expr): Use ocp_convert to force
11913         rvalue conversion.
11914
11915 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
11916
11917         * call.c (standard_conversion): Use RVALUE_CONVs for all
11918         expressions that satisfy lvalue_p, not just those that satisfy
11919         real_lvalue_p.
11920
11921         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
11922
11923         * typeck.c (c_sizeof): Return an expression of `size_t' type,
11924         not one with TYPE_IS_SIZETYPE set.
11925         (dubious_conversion_warnings): Remove special-case code.
11926
11927 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
11928
11929         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
11930         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
11931         (dump_type_prefix): Print vector-of-int as 'int vector'.
11932         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
11933         * tree.c (walk_tree): Handle VECTOR_TYPE.
11934
11935         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
11936
11937 2000-10-21  Jason Merrill  <jason@redhat.com>
11938
11939         * parse.y (operator): Set got_object from got_scope.
11940         Set looking_for_typename.
11941         * decl.c (lookup_name_real): Clear val after setting from_obj.
11942         Reorganize diagnostic.
11943
11944 2000-10-20  Jason Merrill  <jason@redhat.com>
11945
11946         * tree.c (walk_tree): Don't walk into default args.
11947
11948         * error.c (dump_expr): Use host_integerp.
11949
11950 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
11951
11952         * typeck2.c (abstract_virtuals_error): Use "because" instead of
11953         "since" in error message.
11954
11955 2000-10-20  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11956
11957         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
11958
11959 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
11960
11961         * decl.c (revert_static_member_fn): Fixed typo.
11962
11963 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
11964
11965         * class.c (subobject_offset_fn): New type.
11966         (dfs_record_base_offsets): Remove.
11967         (record_base_offsets): Likewise.
11968         (dfs_search_base_offsets): Likewise.
11969         (record_subobject_offset): New function.
11970         (check_subobject_offset): Likewise.
11971         (walk_subobject_offsets): Likewise.
11972         (record_subobject_offsets): Likewise.
11973         (layout_conflict_p): Reimplement.
11974         (layout_nonempty_base_or_field): Correct handling of type
11975         conflicts during layout.
11976         (layout_empty_base): Likewise.
11977         (build_base_field): Adjust to handle new representation of empty
11978         base offset table.
11979         (build_base_fields): Likewise.
11980         (layout_virtual_bases): Likewise.
11981         (splay_tree_compare_integer_csts): New function.
11982         (layout_class_type): Use a splay_tree, rather than a varray, to
11983         represent the offsets of empty bases.
11984
11985         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
11986         * decl.c (select_decl): Don't return declarations that are
11987         DECL_ANTICIPATED.
11988
11989 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
11990
11991         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
11992         (fake_std_node): New macro.
11993         * decl.c (in_std): Rename to ...
11994         (in_fake_std): ... this.
11995         (flag_no_builtin): Remove.
11996         (flag_no_nonansi_builtin): Likewise.
11997         (walk_namespaces_r): Use fake_std_node.
11998         (push_namespace): Use std_identifier.
11999         (pop_namespace): Use in_fake_std.
12000         (lookup_name_real): Use fake_std_node.
12001         (init_decl_processing): When -fhonor-std, create the `std'
12002         namespace.  Don't create a dummy fake_std_node in that case.
12003         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
12004         (builtin_function): Put builtins whose names don't begin
12005         with `_' in the std namespace.
12006         * decl2.c (flag_no_builtin): Remove.
12007         (flag_no_nonansi_builtin): Likewise.
12008         (set_decl_namespace): Use fake_std_node.
12009         (validate_nonmember_using_decl): Likewise.
12010         (do_using_directive): Likewise.
12011         (handle_class_head): Likewise.
12012         * dump.c (dequeue_and_dump): Likewise.
12013         * except.c (init_exception_processing): Use std_identifier.
12014         * init.c (build_member_call): Use fake_std_node.
12015         * rtti.c (init_rtti_processing): Use std_identifier.
12016
12017 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
12018
12019         * cp-tree.h (back_end_hook): Remove declaration.
12020         * decl2.c (back_end_hook): Remove definition.
12021
12022         * dump.c (dequeue_and_dump): Dump TREE_USED.
12023
12024 2000-10-17  Brad Lucier <lucier@math.purdue.edu>
12025
12026         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
12027
12028 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
12029
12030         * decl.c (WINT_TYPE): Define.
12031         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
12032         c_size_type_node, signed_size_type_node and wint_type_node.
12033
12034 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
12035
12036         * decl2.c (warn_missing_format_attribute): New variable.
12037         (lang_decode_option): Decode -Wmissing-format-attribute.
12038
12039 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
12040
12041         * typeck.c (qualify_type): Remove.
12042         (composite_pointer_type): Fix handling of conversions to `cv void*'.
12043
12044 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12045
12046         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
12047
12048 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12049
12050         * Makefile.in (parse.c, parse.h): Create atomically.
12051
12052 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
12053
12054         * class.c (current_obstack): Remove.
12055         * decl.c (ggc_p): Remove.
12056         (start_decl): Don't use decl_tree_cons.
12057         (grokdeclarator): Don't use build_decl_list.
12058         (start_function): Don't use decl_tree_cons.
12059         (finish_function): Don't mess with obstacks.
12060         * decl2.c (grok_x_components): Don't use build_decl_list.
12061         * lex.c (make_call_declarator): Don't call decl_tree_cons.
12062         (implicitly_declare_fn): Don't call build_decl_list.
12063         * parse.y (frob_specs): Don't call build_decl_list or
12064         decl_tree_cons.
12065         (expr_or_declarator_intern): Don't call decl_tree_cons.
12066         (primary): Don't call build_decl_list.
12067         (fcast_or_absdcl): Likewise.
12068         (typed_declspecs): Don't call decl_tree_cons.
12069         (reserved_declspecs): Don't call build_decl_list.
12070         (declmods): Likewise.
12071         (reserved_typespecquals): Likewise.
12072         (aggr): Likewise.
12073         (new_type_id): Likewise.
12074         (cv_qualifiers): Likewise.
12075         (after_type_declarator_intern): Likewise.
12076         (notype_declarator_intern): Likewise.
12077         (absdcl_intern): Likewise.
12078         (named_parm): Likewise.
12079         * pt.c (most_specialized_class): Likewise.
12080         * repo.c (temporary_obstack): Make it a structure, not a pointer.
12081         (init_repo): Initialize it.
12082         * search.c (current_obstack): Remove.
12083         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
12084
12085 2000-10-09  Richard Henderson  <rth@cygnus.com>
12086
12087         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
12088         (c++ language support bits for libgcc): Remove.
12089         (c++.clean): Remove cplib2.txt cleanup.
12090         * config-lang.in (headers, lib2funcs): Remove.
12091
12092         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
12093         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
12094         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
12095         * inc/new.h, inc/typeinfo: Remove files.
12096
12097 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
12098
12099         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
12100         defined.
12101         (init_decl_processing): Initialize intmax_type_node and
12102         uintmax_type_node.
12103
12104 2000-10-06  Richard Henderson  <rth@cygnus.com>
12105
12106         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
12107         (original_result_rtx): Remove.
12108         * decl.c (save_function_data): Don't clear x_result_rtx.
12109         (mark_lang_function): Don't mark it either.
12110         * expr.c (fixup_result_decl): Remove.
12111         * semantics.c (genrtl_named_return_value): Frob the return decl
12112         before calling emit_local_var.
12113         (genrtl_finish_function): Don't call fixup_result_decl.
12114         Always emit the jump to return_label.
12115
12116 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
12117
12118         * pt.c (lookup_template_class): Set current access for enum.
12119         (tsubst_enum): Set file & line for enum decl.
12120
12121         * spew.c (yylex): Remove unused variable.
12122
12123 2000-10-05  Richard Henderson  <rth@cygnus.com>
12124
12125         * semantics.c (genrtl_finish_function): Don't init or check
12126         can_reach_end; remove noreturn and return value checks.
12127
12128 2000-10-05  Tom Tromey  <tromey@cygnus.com>
12129
12130         * init.c (build_java_class_ref): Use `build_static_name' with a
12131         suffix, not a prefix, to build the class object's name.
12132
12133 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
12134
12135         * cp-tree.h (access_kind): Fix comment typo.
12136         * decl2.c (grokfield): Fix diagnostic typo.
12137         * semantics.c (finish_template_type): Fix comment typo.
12138         (finish_qualified_object_call_expr): Likewise.
12139
12140 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
12141
12142         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
12143         tsubsting fails.
12144
12145 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
12146
12147         * spew.c (frob_id): New static function.
12148         (frob_opname): Use it.
12149         (yylex): Use it.
12150
12151 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
12152
12153         * decl.c (lang_mark_false_label_stack): Remove.
12154         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
12155
12156 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
12157
12158         * gxxint.texi: Use @email for formatting email addresses.
12159
12160 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
12161
12162         * error.c: Remove direct obstack manipulation.  Replace with
12163         output_buffer-based formatting.  Adjust calls to removed macros.
12164         (obstack_chunk_alloc, obstack_chunk_free): Remove.
12165         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
12166         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
12167
12168 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
12169
12170         * ir.texi: Move to ../c-tree.texi.
12171
12172 2000-09-20  Jason Merrill  <jason@redhat.com>
12173
12174         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
12175
12176 2000-09-21  Andreas Jaeger  <aj@suse.de>
12177
12178         * errfn.c: Move declaration of cp_printer and cp_printers to ...
12179         * cp-tree.h: ... here.
12180
12181         * error.c: Remove declaration of cp_printer.
12182
12183 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
12184
12185         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
12186
12187 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
12188
12189         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
12190         users.
12191
12192 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
12193
12194         * decl.c (start_function): Robustify.
12195
12196 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12197
12198         * cp-tree.h (check_function_format): Accept a `status' parameter.
12199
12200         * call.c, typeck.c: Updates calls to `check_function_format'.
12201
12202 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
12203
12204         * decl2.c (handle_class_head): Always push some scope even
12205         in the error case.
12206
12207 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
12208
12209         * cp-tree.h (struct cp_language_function): Remove
12210         x_scope_stmt_stack and name_declared.
12211         (current_scope_stmt_stack): Remove.
12212         (function_name_declared_p): New macro.
12213         (struct lang_decl_flags): Use c_lang_decl as a base class.
12214         (context): Remove.
12215         (struct lang_decl): Replace saved_tree with context.
12216         (DECL_FRIEND_CONTEXT): Adjust accordingly.
12217         (SET_DECL_FRIEND_CONTEXT): Likewise.
12218         (DECL_VIRTUAL_CONTEXT): Likewise.
12219         (DECL_SAVED_TREE): Remove.
12220         (C_DECLARED_LABEL_FLAG): Likewise.
12221         (cplus_expand_expr_stmt): Don't declare.
12222         (add_decl_stmt): Likewise.
12223         (add_scope_stmt): Likewise.
12224         * decl.c (mark_stmt_tree): Remove.
12225         (case_compare): Likewise.
12226         (finish_case_label): Use c_add_case_label.
12227         (init_decl_processing): Set more language-specific hooks.
12228         (build_enumerator): Fix typo in comment.
12229         (cplus_expand_expr_stmt): Remove.
12230         (mark_lang_function): Use mark_c_language_function.
12231         (lang_mark_tree): Use c_mark_lang_decl.
12232         * decl2.c: Change order of inclusion.
12233         * except.c: Likewise.
12234         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
12235         back on c_expand_expr.
12236         * friend.c: Include expr.h.
12237         * init.c: Change order of inclusion.
12238         * Makefile.in: Update dependencies.
12239         * lex.h (free_lang_decl_chain): Remove.
12240         * optimize.c (maybe_clone_body): Use function_name_declared_p.
12241         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
12242         it doesn't exist.
12243         (instantiate_decl): Use function_name_declared_p.
12244         * semantics.c (lang_expand_expr_stmt): Remove.
12245         (set_current_function_name_declared): Likewise.
12246         (current_function_name_declared): Likewise.
12247         (begin_compound_stmt): Use function_name_declared_p.
12248         (add_decl_stmt): Remove.
12249         (setup_vtbl_ptr): Use function_name_declared_p.
12250         (add_scope_stmt): Remove.
12251         (current_scope_stmt_stack): New function.
12252         (cp_expand_stmt): Don't handle SCOPE_STMTs.
12253         (expand_body): Use function_name_declared_p.
12254         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
12255         * typeck.c: Change order of includes.
12256         (convert_sequence): Remove.
12257
12258 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
12259
12260         * lex.c (reswords): Add _Complex.
12261
12262 2000-09-14  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12263
12264         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
12265
12266 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
12267
12268         * init.c (begin_init_stmts): Don't use // comments.
12269
12270 2000-09-12  Jason Merrill  <jason@redhat.com>
12271
12272         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
12273         all non-extern arrays.
12274
12275         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
12276         typenames, too.  Downgrade complaint to pedwarn.
12277         (xref_tag): Warn about surprising behavior of 'friend struct T'.
12278         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
12279         'class This::Inherited'.
12280
12281 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
12282
12283         * decl.c (finish_case_label): Given the LABEL_DECL a
12284         DECL_CONTEXT.
12285
12286 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
12287
12288         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
12289         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
12290         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
12291         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
12292         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
12293         New macros.
12294         (sorry_for_unsupported_tree, print_scope_operator,
12295         print_left_paren, print_right_paren, print_left_bracket,
12296         print_right_bracket, print_whitespace): Likewise.
12297         (aggr_variety): Rename to class_key_or_enum.
12298         (print_type): Rename to print_type_id.
12299         (print_type_specifier_seq, print_simple_type_specifier,
12300         print_elaborated_type_specifier,
12301         print_rest_of_abstract_declarator,
12302         print_parameter_declaration_clause, print_exception_specification,
12303         print_nested_name_specifier, print_template_id,
12304         typedef_original_name,  print_template_argument_list_start,
12305         print_template_argument_list_end): New functions.
12306
12307 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
12308
12309         * ir.texi: Add more documentation.
12310
12311 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
12312
12313         * cp-tree.h (struct saved_scope): Remove x_function_parms.
12314         (current_function_parms): Don't define.
12315         (struct cp_language_function): Remove parms_stored.
12316         (current_function_just_assigned_this): Don't define.
12317         (current_function_parms_stored): Likewise.
12318         (static_ctors): Declare.
12319         (static_dtors): Likewise.
12320         (SF_EXPAND): Don't define.
12321         (expand_start_early_try_stmts): Remove declaration.
12322         (store_parm_decls): Likewise.
12323         * decl.c (static_ctors): Don't declare.
12324         (static_dtors): Likewise.
12325         (struct binding_level): Remove this_block.
12326         (poplevel): Remove dead code.
12327         (set_block): Likewise.
12328         (mark_binding_level): Don't mark this_block.
12329         (mark_saved_scope): Don't mark x_function_parms.
12330         (init_decl_processing): Don't add current_function_parms as a GC
12331         root.
12332         (check_function_type): Change prototype.
12333         (start_function): Remove RTL-generation code.
12334         (expand_start_early_try_stmts): Remove.
12335         (store_parm_decls): Give it internal linkage.  Remove
12336         RTL-generation code.
12337         (finish_function): Remove RTL-generation code.
12338         * decl2.c (static_ctors): Fix formatting.
12339         (static_dtors): Likewise.
12340         * method.c (use_thunk): Don't call store_parm_decls.
12341         (synthesize_method): Likewise.
12342         * optimize.c (maybe_clone_body): Likewise.
12343         * parse.y (fn.def2): Likewise.
12344         (.set_base_init): Likewise.
12345         (nodecls): Likewise.
12346         * pt.c (instantiate_decl): Likewise.
12347         * rtti.c (synthesize_tinfo_fn): Likewise.
12348         * semantics.c (genrtl_try_block): Simplify.
12349         (expand_body): Use genrtl_start_function and
12350         genrtl_finish_function.
12351         (genrtl_start_function): New function.
12352         (genrtl_finish_function): Likewise.
12353
12354 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
12355
12356         * error.c (cp_tree_printer, case 'P'): Append break.
12357
12358 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
12359
12360         * cp-tree.h (frob_opname): Declare.
12361         * parse.y (saved_scopes): New static variable.
12362         (cp_parse_init): Adjust.
12363         (do_id): If lastiddecl is NULL, do do_identifier.
12364         (operator): Save scope information.
12365         (unoperator): New reduction. Restore scope information.
12366         (operator_name): Append unoperator. Call frob_opname.
12367         * spew.c (frob_opname): Define.
12368
12369 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
12370
12371         * decl.c, rtti.c: Include defaults.h if not already included.
12372         Don't define the *_TYPE_SIZE macros.
12373
12374 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
12375
12376         * cp-tree.h (push_switch): Change prototype.
12377         (check_cp_case_value): Remove declaration.
12378         (decl_constant_value): Likewise.
12379         * decl.c (struct cp_switch): Add switch_stmt and cases.
12380         (case_compare): New function.
12381         (push_switch): Set switch_stmt.  Initialize cases.
12382         (pop_switch): Clean up cases.
12383         (define_case_label): Rename to ...
12384         (finish_case_label): ... this.  Do semantic analysis for case
12385         labels here.
12386         (start_function): Correct comment.
12387         * decl2.c (check_cp_case_value): Remove.
12388         * expr.c (do_case): Remove.
12389         * pt.c (tsubst_expr): Adjust call to finish_case_label.
12390         * semantics.c (genrtl_do_poplevel): Remove declaration.
12391         (RECHAIN_STMTS): Remove.
12392         (finish_break_stmt): Use build_break_stmt.
12393         (finish_continue_stmt): Use build_continue_stmt.
12394         (finish_switch_cond): Adjust condition here, rater than in
12395         c_expand_start_case.
12396         (finish_case_label): Remove.
12397         * typeck.c (c_expand_return): Remove.
12398         (c_expand_start_case): Likewise.
12399
12400 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
12401
12402         * ir.texi: Document type nodes.
12403
12404 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
12405
12406         * cp-tree.h (init_cp_semantics): Declare.
12407         (genrtl_try_block): Don't declare.
12408         (genrtl_handler): Likewise.
12409         (genrtl_catch_block): Likewise.
12410         (genrtl_ctor_stmt): Likewise.
12411         (genrtl_subobject): Likewise.
12412         (genrtl_do_poplevel): Likewise.
12413         (genrtl_named_return_value): Likewise.
12414         * lex.c (init_parse): Call init_cp_semantics.
12415         * semantics.c (genrtl_try_block): Give it internal linkage.
12416         (genrtl_handler): Likewise.
12417         (genrtl_catch_block): Likewise.
12418         (genrtl_ctor_stmt): Likewise.
12419         (genrtl_subobject): Likewise.
12420         (genrtl_do_poplevel): Likewise.
12421         (genrtl_named_return_value): Likewise.
12422         (lang_expand_stmt): Rename to ...
12423         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
12424         (init_cp_semantics): Define.
12425
12426         * decl.c (initialize_local_var): Remove RTL-generating code.
12427         * semantics.c (genrtl_try_block): Fix formatting.
12428
12429         Move statement-tree facilities from C++ to C front-end.
12430         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
12431         (void_zero_node): Remove.
12432         (stmt_tree): Likewise.
12433         (scope_chain): Adjust.
12434         (language_function): Rename to cp_language_function.
12435         (cp_function_chain): Adjust.
12436         (current_stmt_tree): Remove.
12437         (last_tree): Likewise.
12438         (last_expr_type): Likewise.
12439         (struct lang_decl): Adjust.
12440         (STMT_IS_FULL_EXPR_P): Remove.
12441         (add_tree): Remove.
12442         (begin_stmt_tree): Likewise.
12443         (finish_stmt_tree): Likewise.
12444         (walk_tree_fn): Likewise.
12445         (walk_stmt_tree): Likewise.
12446         * class.c (finish_struct): Replace use of add_tree with add_stmt.
12447         * decl.c (mark_stmt_tree): Adjust type.
12448         (init_decl_processing): Don't build void_zero_node.
12449         (initialize_local_var): Adjust usage of current_stmt_tree.
12450         (finish_enum): Use add_stmt, not add_tree.
12451         (save_function_data): Adjust use of language_function.
12452         (finish_constructor_body): Use add_stmt, not add_tree.
12453         (finish_destructor_body): Likewise.
12454         (push_cp_function_context): Adjust use of language_function.
12455         (pop_cp_function_context): Likewise.
12456         (mark_lang_function): Likewise.
12457         (mark_cp_function_context): Likewise.
12458         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
12459         (build_vec_init): Likewise.
12460         * semantics.c (SET_LAST_STMT): Remove.
12461         (RECHAIN_STMTS): Don't use it.
12462         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
12463         (current_stmt_tree): Define.
12464         (add_tree): Remove.
12465         (finish_goto_stmt): Use add_stmt, not add_tree.
12466         (finish_expr_stmt): Likewise.
12467         (begin_if_stmt): Likewise.
12468         (finish_then_clause): Likewise.
12469         (begin_while_stmt): Likewise.
12470         (begin_do_stmt): Likewise.
12471         (finish_return_stmt): Likewise.
12472         (begin_for_stmt): Likewise.
12473         (finish_break_stmt): Likewise.
12474         (finish_continue_stmt): Likewise.
12475         (begin_switch_stmt): Likewise.
12476         (finish_case_label): Likewise.
12477         (begin_try_block): Likewise.
12478         (begin_function_try_block): Likewise.
12479         (begin_handler): Likewise.
12480         (begin_catch_block): Likewise.
12481         (begin_compound_stmt): Likewise.
12482         (begin_asm_stmt): Likewise.
12483         (finish_asm_stmt): Likewise.
12484         (finish_label_stmt): Likewise.
12485         (add_decl_stmt): Likewise.
12486         (finish_subobject): Likewise.
12487         (finish_decl_cleanup): Likewise.
12488         (finish_named_return_value): Likewise.
12489         (setup_vtbl_ptr): Likewise.
12490         (add_scope_stmt): Likewise.
12491         (finish_stmt_expr): Likewise.
12492         (prune_unused_decls): Remove.
12493         (begin_stmt_tree): Likewise.
12494         (finish_stmt_tree): Likewise.
12495         (prep_stmt): Adjust use of current_stmt_tree.
12496         (lang_expand_stmt): Likewise.
12497         * tree.c (statement_code_p): Remove.
12498         (cp_statement_code_p): New function.
12499         (walk_stmt_tree): Remove.
12500         (init_tree): Set lang_statement_code_p.
12501
12502 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
12503
12504         Integrated preprocessor.
12505
12506         * Make-lang.in, Makefile.in: Remove all references to input.c,
12507         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
12508         * gxx.gperf, hash.h, input.c: Delete.
12509         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
12510         initialized properly.
12511
12512         * class.c (fixup_pending_inline): Take a tree, not a
12513         struct pending_inline *.  All callers changed.
12514         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
12515         RID_PROTECTED entries in ridpointers[] array here.
12516         * decl.c (duplicate_decls): Do not refer to struct
12517         pending_inline.
12518         (record_builtin_type, init_decl_processing): Use RID_MAX not
12519         CP_RID_MAX.
12520         (grokdeclarator): Use C_IS_RESERVED_WORD.
12521         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
12522         cpplib.
12523         (grok_x_components): Do not inspect pending_inlines chain.
12524
12525         * cp-tree.h (struct lang_identifier): Add rid_code entry.
12526         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
12527         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
12528         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
12529         TIME_IDENTIFIER_FILEINFO): Kill.
12530         Update prototypes.
12531         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
12532         single 32-bit word.
12533         * parse.y: Call do_pending_inlines unconditionally.
12534         reinit_parse_for_method is now snarf_method.  fn.defpen is no
12535         longer necessary.  Remove unnecessary <itype> annotation on
12536         SCOPE.  Do not refer to end_of_file or struct pending_inline.
12537         * semantics.c (begin_inline_definitions): Call
12538         do_pending_inlines unconditionally.
12539
12540         * lex.c: Remove all code now shared with C front end.
12541         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
12542         into the get_identifier table.  Rewrite pragma handling to
12543         work with the registry.  Move code to save tokens for later
12544         processing to spew.c.
12545
12546         * spew.c: Rewrite everything in terms of token streams instead
12547         of text.  Move routines here from lex.c / input.c as
12548         appropriate.  GC-mark trees hanging off the pending inlines
12549         chain.
12550
12551 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
12552
12553         * NEWS: Mention that the named return value extension has been
12554         deprecated.
12555         * cp-tree.h (original_result_rtx): Define.
12556         (TREE_REFERENCE_EXPR): Remove.
12557         (DECL_VPARENT): Likewise.
12558         (pushdecl_nonclass_level): Likewise.
12559         (store_return_init): Likewise.
12560         (reinit_lang_specific): Likewise.
12561         (genrtl_named_return_value): Change prototype.
12562         * decl.c (original_result_rtx): Remove.
12563         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
12564         Do not generate RTL for local variables here.
12565         (store_return_init): Remove.
12566         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
12567         store_return_init.
12568         (finish_named_return_value): Adjust accordingly.  Warn that this
12569         extension is deprecated.
12570         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
12571
12572 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
12573
12574         * pt.c (type_unification_real): Replace switch with if.
12575         (unify): Tsubst non-type parms before comparing.
12576
12577 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
12578
12579         * error.c (dump_typename): New function, broken out of ...
12580         (dump_type): ... here. Use it.
12581         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
12582
12583 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
12584
12585         * init.c (build_offset_ref): Deal with namespace scoped
12586         TEMPLATE_ID_EXPRs.
12587
12588 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
12589
12590         * class.c (resolve_address_of_overloaded_function): Add
12591         explanation message.
12592         * decl.c (define_case_label): Reformat explanation.
12593         * decl2.c (finish_static_data_member_decl): Likewise.
12594         (grokfield): Likewise.
12595         * friend.c (do_friend): Likewise.
12596
12597 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
12598
12599         * tree.c (walk_tree): Expose tail recursion.
12600         (walk_stmt_tree): New function.
12601         * cp-tree.h: Prototype walk_stmt_tree.
12602         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
12603         the BLOCKs directly.  If a BLOCK has no variables after
12604         pruning, discard it.
12605         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
12606         restore the line number.
12607
12608 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
12609
12610         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
12611         (pt.o): Remove dependency on HTAB_H.
12612         * cp-tree.h: Include hashtab.h.
12613         (walk_tree): Change prototype.
12614         (walk_tree_without_duplicates): New function.
12615         * decl.c (check_default_argument): Use it.
12616         * optimize.c (remap_decl): Adjust calls to walk_tree.
12617         (copy_body): Likewise.
12618         (expand_calls_inline): Likewise.
12619         (calls_setjmp_p): Use walk_tree_without_duplicates.
12620         * pt.c: Don't include hashtab.h.
12621         (for_each_template_parm): Use walk_tree_without_duplicates.
12622         * semantics.c (finish-stmt_tree): Likewise.
12623         (expand_body): Likewise.
12624         * tree.c (walk_tree): Add additional parameter.
12625         (walk_tree_without_duplicates): New function.
12626         (count_trees): Use it.
12627         (verify_stmt_tree): Adjust call to walk_tree.
12628         (find_tree): Use walk_tree_without_duplicates.
12629         (no_linkage_check): Likewise.
12630         (break_out_target_exprs): Adjust call to walk_tree.
12631         (cp_unsave): Likewise.
12632
12633 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12634
12635         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
12636         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
12637         * cp-tree.h (TYPE_BINFO): Adjust comment.
12638         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
12639         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
12640         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
12641         (TYPE_TEMPLATE_INFO): Likewise.
12642         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
12643         * class.c (push_nested_class): Likewise.
12644         * decl.c (lookup_name_real): Likewise.
12645         (grokdeclarator): Likewise.
12646         (grok_op_properties): Likewise.
12647         (xref_tag): Likewise.
12648         (xref_basetypes): Likewise.
12649         * decl2.c (constructor_name_full): Likewise.
12650         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
12651         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
12652         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
12653         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12654         (dump_type_suffix): Likewise.
12655         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
12656         instead.
12657         (get_aggr_from_typedef): Likewise.
12658         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
12659         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12660         (write_template_parm): Likewise.
12661         (write_template_template_parm): Check tree code instead of
12662         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
12663         * method.c (build_overload_nested_name): Add
12664         BOUND_TEMPLATE_TEMPLATE_PARM.
12665         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
12666         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12667         * pt.c (convert_template_argument): Check tree code instead of
12668         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
12669         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
12670         (for_each_template_parm): Adjust comment.
12671         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
12672         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12673         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
12674         template_args_equal to compare template template parameter cases.
12675         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12676         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
12677         instead.
12678         * tree.c (copy_template_template_parm): Decide whether to create
12679         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
12680         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12681         (copy_tree_r): Likewise.
12682         * typeck.c (comptypes): Likewise.  Check tree code instead of
12683         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
12684
12685 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
12686
12687         * decl.c (finish_function): Move the code for handling functions
12688         marked with the constructor and destructor attributes inside the
12689         expand_p block.
12690
12691 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
12692
12693         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
12694
12695 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
12696
12697         * pt.c (lookup_template_class): Remove abort.
12698         * tree.c (get_type_decl): Allow error_mark_node.
12699
12700 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
12701
12702         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
12703         TEMPLATE_ID_EXPRs.
12704
12705 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
12706
12707         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
12708         new ABI mangling.
12709
12710 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
12711
12712         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
12713         union tag mismatch error reporting.
12714
12715 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
12716
12717         * call.c (build_scoped_method_call): Check it is not a namespace.
12718
12719 2000-08-30  Jason Merrill  <jason@redhat.com>
12720
12721         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
12722
12723         * tree.c (bot_manip): Check TREE_CONSTANT rather than
12724         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
12725         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
12726
12727         * decl.c (start_function): Always call make_function_rtl.
12728
12729 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
12730
12731         * semantics.c (prune_unused_decls): New function.
12732         (finish_stmt_tree): Call it via walk_tree.
12733
12734 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
12735
12736         * class.c (build_secondary_vtable): Constify a char *.
12737         * decl.c (init_decl_processing): Initialize function_id_node,
12738         pretty_function_id_node, and func_id_node.
12739         * input.c (struct input_source): Constify 'str'.
12740         (feed_input): Constify first argument.
12741         * mangle.c (write_identifier): Constify argument.
12742         * pt.c (mangle_class_name_for_template): Constify argument.
12743
12744 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
12745
12746         * typeck.c (mark_addressable): Remove code that pokes around in
12747         RTL.
12748
12749 2000-08-28  Jason Merrill  <jason@redhat.com>
12750
12751         * lex.c (file_name_nondirectory): Move to toplev.c.
12752
12753         * cp-tree.h (LOCAL_CLASS_P): New macro.
12754         * class.c (finish_struct_1): Use it.
12755
12756 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
12757
12758         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
12759         (write_encoding): Pass another argument to write_name.
12760         (write_name): Add ignore_local_scope parameter.  Fix handling of
12761         local names.
12762         (write_nested_name): Use write_unqualified_name.
12763         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
12764         (write_template_prefix): Use write_unqualified_name.
12765         (write_component): Remove.
12766         (write_local_name): Add parameter.  Use direct local entity to
12767         discriminator calculation.
12768         (write_class_enum_type): Pass another argument to write_name.
12769         (write_template_template_arg): Likewise.
12770         (make_guard_variable): Likewise.
12771
12772 2000-08-27  Jason Merrill  <jason@redhat.com>
12773
12774         * decl.c (pushdecl): Matching decls for local externs are found in
12775         the current level.  Propagate linkage information from previous
12776         declarations.
12777
12778 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
12779
12780         * ir.texi (Expressions): Fix typo.
12781
12782 2000-08-25  Greg McGary  <greg@mcgary.org>
12783
12784         * tree.c (init_tree): Use ARRAY_SIZE.
12785
12786 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
12787
12788         * error.c (cp_tree_printer): Rework.
12789
12790 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
12791
12792         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
12793         dyn-string.o.
12794         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
12795         (cp-demangle.o): Remove target.
12796         (dyn-string.o): Likewise.
12797
12798         * decl.c (grokfndecl): Require that `main' return an `int'.
12799         * mangle.c (write_encoding): Don't mangle return types for
12800         conversion functions.
12801
12802 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
12803
12804         * error.c (tree_formatting_info): New data type.
12805         (tree_being_formatted): New macro.
12806         (tree_formatting_flags): Likewise.
12807         (put_whitespace): Likewise.
12808         (print_tree_identifier): Likewise.
12809         (print_identifier): Likewise.
12810         (cp_tree_printer, print_function_argument_list, print_declaration,
12811         print_expression, print_function_declaration,
12812         print_function_parameter, print_type, print_cv_qualifier): New
12813         functions.
12814         (init_error): Initialize lang_printer.
12815
12816 2000-08-24  Jason Merrill  <jason@redhat.com>
12817
12818         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
12819         adjustment necessary.
12820
12821 2000-08-24  Greg McGary  <greg@mcgary.org>
12822
12823         * cp-tree.h (MAIN_NAME_P): Remove macro.
12824
12825 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
12826
12827         * error.c (print_instantiation_context): Don't forget to flush the
12828         buffer.
12829
12830 2000-08-23  Jason Merrill  <jason@redhat.com>
12831
12832         * typeck.c (build_ptrmemfunc): Save the input pmf.
12833
12834         * method.c (process_modifiers): Use same_type_p.
12835
12836 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
12837
12838         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
12839         * mangle.c (write_function_type): Change prototype.
12840         (write_encoding): Don't mangle return types for
12841         constructors or destructors.
12842         (write_type): Adjust call to write_function_type.
12843         * pt.c (instantiate_template): Instantiate alternate entry points
12844         when instantiating the main function.
12845
12846 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
12847
12848         * error.c (cp_print_error_function): Don't use embedded '\n' in
12849         output_printf.
12850
12851 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
12852
12853         * decl.c (init_decl_processing): Remove bogus initialization.
12854         * error.c (lang_print_error_function): Restore here.
12855         (init_error): Initialize print_error_function.
12856
12857 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
12858
12859         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
12860
12861 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
12862
12863         * Makefile.in (error.o): Depends on diagnostic.h
12864
12865         * cp-tree.h (problematic_instantiation_changed,
12866         record_last_problematic_instantiation, current_instantiation,
12867         print_instantiation_context): Declare.
12868         (maybe_print_template_context): Remove.
12869
12870         * decl.c (init_decl_processing): Set print_error_function to NULL.
12871         (lang_print_error_function): Remove, since we're using a new
12872         machinery.
12873
12874         * error.c: #include diagnostic.h
12875         (function_category): New function.
12876         (cp_diagnostic_starter): Likewise.
12877         (cp_diagnostic_finalizer): Likewise.
12878         (cp_print_error_function): Likewise.
12879         (maybe_print_instantiation_context): Likewise.
12880         (print_instantiation_full_context): Likewise.
12881         (print_instantiation_partial_context): Likewise.
12882         (print_instantiation_context): Define.
12883         (init_error): Initialize diagnostic pager and finalizer.
12884
12885         * pt.c (problematic_instantiation_changed): Define.
12886         (record_last_problematic_instantiation): Likewise.
12887         (current_instantiation): Likewise.
12888         (maybe_print_template_context): Remove.
12889         (print_template_context): Likewise.
12890         (current_tinst_level): Make static to reflect Brendan Kehoe's
12891         change of 1995-04-13.
12892         (push_tinst_level): Call print_instantiation_context.
12893
12894 2000-08-21  Nix  <nix@esperi.demon.co.uk>
12895
12896         * lang-specs.h: Do not process -o or run the assembler if
12897         -fsyntax-only.
12898
12899 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
12900
12901         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
12902         variables.
12903         * decl2.c (lang_decode_option): Disable gettext attributes for
12904         -ansi.
12905
12906 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
12907
12908         * lex.c (lang_init_options): Default diagnostic message maximum
12909         length to 80, when line-wrapping.
12910
12911 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
12912
12913         * class.c (build_vtbl_initializer): Clear the entire
12914         vtbl_init_data.  Start keeping track of the functions for which we
12915         have created vcall offsets here.
12916         (dfs_build_vcall_offset_vtbl_entries): Remove.
12917         (build_vcall_offset_vtbl_entries): Reimplement.
12918         (add_vcall_offset_vtbl_entries_r): New function.
12919         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
12920         computing when vcall offsets are necessary.
12921
12922 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
12923
12924         * decl.c (member_function_or_else): Use cp_error ... %T.
12925         (grokdeclarator): Likewise.
12926         (start_method): Likewise.
12927         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
12928
12929 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
12930
12931         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
12932         TYPE_DECLs.
12933
12934 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
12935
12936         * cp-tree.h (PTRMEM_OK_P): New macro.
12937         (itf_ptrmem_ok): New enumeration value.
12938         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
12939         argument. Diagnose implicit pointer to member.
12940         (instantiate_type): Don't diagnose implicit pointer to member
12941         here. Pass itf_ptrmem_ok if ok. Adjust calls to
12942         resolve_address_of_overloaded_function.
12943         * init.c (build_offset_ref): Set PTRMEM_OK_P.
12944         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
12945         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
12946         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
12947         (build_unary_op): Deal with single non-static member in
12948         microsoft-land.
12949
12950 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
12951
12952         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
12953
12954 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
12955
12956         * cp-tree.h (enum_name_string): Remove prototype.
12957         (report_case_error): Remove prototype.
12958         * cp/typeck2.c (enum_name_string): Remove.
12959         (report_case_error): Remove.
12960         * error.c (dump_expr): Deal with enum values directly.
12961         Correctly negate integer constant.
12962
12963 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
12964
12965         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
12966         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
12967         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
12968         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
12969         (__cxa_vec_new): Use __cxa_vec_new2.
12970         (__cxa_vec_delete): Use __cxa_vec_delete2.
12971
12972 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
12973
12974         * vec.cc (__cxa_vec_new): Set "C" linkage.
12975         (__cxa_vec_ctor): Likewise.
12976         (__cxa_vec_cctor): Likewise.
12977         (__cxa_vec_dtor): Likewise.
12978         (__cxa_vec_delete): Likewise.
12979         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
12980         (__cxa_vec_ctor): Likewise.
12981         (__cxa_vec_cctor): Likewise.
12982         (__cxa_vec_dtor): Likewise.
12983         (__cxa_vec_delete): Likewise.
12984
12985 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
12986
12987         * class.c (instantiate_type): Reinstate local variable
12988         deleted in previous change.
12989
12990         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
12991         itf_no_attributes.
12992
12993 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
12994
12995         * cp-tree.h (instantiate_type_flags): New enumeration.
12996         (instantiate_type): Change parameter.
12997         * class.c (instantiate_type): Adjust prototype. Adjust.
12998         * call.c (standard_conversion): Adjust instantiate_type call.
12999         (reference_binding): Likewise.
13000         (build_op_delete_call): Likewise.
13001         (convert_like_real): Likewise.
13002         * cvt.c (cp_convert_to_pointer): Likewise.
13003         (convert_to_reference): Likewise.
13004         * pt.c (convert_nontype_argument): Likewise.
13005         * typeck.c (build_binary_op): Likewise.
13006         (build_ptrmemfunc): Likewise.
13007         (convert_for_assignment): Likewise.
13008
13009 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
13010
13011         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
13012         (current_aggr): Define.
13013         * decl.c (grokdeclarator): Make sure a friend class is an
13014         elaborated type specifier.
13015         * parse.y (current_aggr): Remove static definition.
13016         (cp_parse_init): Adjust.
13017         (structsp): Clear and restore current_aggr.
13018         (component_decl_list): Clear current_aggr.
13019
13020         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
13021         aggregate tag on the typename's context.
13022
13023         * pt.c (tsubst_friend_class): Return error_mark_node, if
13024         parms becomes NULL.
13025         (instantiate_class_template): Ignore error_mark_node friend types.
13026
13027 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
13028
13029         * cvt.c (warn_ref_binding): New static function, broken out of ...
13030         (convert_to_reference): ... here. Use it.
13031
13032 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
13033
13034         * parse.y (template_arg): Add rule for template qualified with
13035         global scope.
13036
13037 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
13038
13039         * decl2.c (add_function): Reorganize.
13040         (arg_assoc): Do not consider function template decls.
13041
13042 2000-08-11  Jason Merrill  <jason@redhat.com>
13043
13044         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
13045         looking inside.
13046
13047 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
13048
13049         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
13050         (lookup_nested_tag): Likewise.
13051
13052         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
13053         can be produced.
13054
13055 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
13056
13057         * parse.y (named_complex_class_head_sans_basetype): Remove
13058         always true if.
13059
13060 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
13061
13062         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
13063         explicit TEMPLATE_ID_EXPR args.
13064         (build_expr_from_tree, case CALL_EXPR): Likewise.
13065
13066 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
13067
13068         * decl.c (check_tag_decl): Diagnose typename's which don't
13069         declare anything.
13070
13071 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
13072
13073         * init.c (build_aggr_init): Reject bogus array initializers
13074         early.
13075
13076 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
13077
13078         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
13079         runtime.
13080         * cp/tinfo.cc (__dynamic_cast): Likewise.
13081         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
13082
13083 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
13084
13085         * cvt.c (convert_to_pointer_force): Fix error message when
13086         attempting to cast from ambiguous base.
13087
13088 2000-08-08  Jason Merrill  <jason@redhat.com>
13089
13090         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
13091         (tsubst_template_arg_vector): Likewise.
13092
13093         * decl2.c (build_anon_union_vars): Choose the largest field; don't
13094         assume that one will be as large as the union.
13095
13096 2000-08-07  Kazu Hirata  <kazu@hxi.com>
13097
13098         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
13099         * decl.c (pop_labels): Likewise.
13100
13101 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
13102
13103         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
13104         specifications.
13105         (__pointer_to_member_type_info): Likewise.
13106         (__base_class_info): Likewise.
13107         (__class_type_info): Likewise.
13108         (__si_class_type_info): Likewise.
13109         (__vmi_class_type_info): Likewise.
13110         * tinfo.cc (__si_class_type_info::__do_find_public_src):
13111         Changed member names to match specifications.
13112         (__vmi_class_type_info::__do_find_public_src): Likewise.
13113         (__si_class_type_info::__do_dyncast): Likewise.
13114         (__vmi_class_type_info::__do_dyncast): Likewise.
13115         (__si_class_type_info::__do_upcast): Likewise.
13116         (__vmi_class_type_info::__do_upcast): Likewise.
13117         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
13118         (__pbase_type_info::__pointer_catch): Likewise.
13119         (__pointer_type_info::__pointer_catch): Likewise.
13120         (__pointer_to_member_type_info::__pointer_catch): Likewise.
13121
13122 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
13123
13124         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
13125         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
13126         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
13127
13128 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
13129
13130         * cp-tree.h (add_method): Change prototype.
13131         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
13132         Don't double the size of the method vector in the error case.
13133         (handle_using_decl): Adjust call to add_method.
13134         (add_implicitly_declared_members): Likewise.
13135         (clone_function_decl): Likewise.
13136         * decl2.c (check_classfn): Likewise.
13137         * semantics.c (finish_member_declaration): Likewise.
13138
13139 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
13140
13141         * decl.c (flag_isoc94): New variable.
13142
13143 2000-08-02  Jason Merrill  <jason@redhat.com>
13144
13145         * pt.c (do_type_instantiation): Add complain parm; don't complain
13146         if called recursively.
13147         * cp-tree.h, parse.y: Adjust.
13148
13149 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
13150
13151         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
13152         -Wno-strict-prototypes.
13153
13154         * g++spec.c: Adjust type of second argument to
13155         lang_specific_driver, and update code as necessary.
13156
13157         * cp-tree.h: Don't prototype min_precision here.
13158         (my_friendly_assert): Cast expression to void.
13159         * semantics.c (do_poplevel): Initialize scope_stmts.
13160
13161 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
13162
13163         * cp-tree.h (DECL_NEEDED_P): Tweak.
13164
13165 2000-07-28  Jason Merrill  <jason@redhat.com>
13166
13167         * lang-specs.h: Use %i in rule for .ii files.
13168
13169 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
13170
13171         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
13172
13173 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
13174
13175         Allow indirect primary bases.
13176         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
13177         primary_base.
13178         (CLASSTYPE_VFIELD_PARENT): Remove.
13179         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
13180         (BINFO_PRIMARY_BINFO): Remove.
13181         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
13182         (BINFO_VBASE_PRIMARY_P): Likewise.
13183         (BINFO_PRIMARY_BASE_OF): New macro.
13184         (BINFO_INDIRECT_PRIMARY_P): Likewise.
13185         (get_primary_binfo): New function.
13186         * decl.c (lang_mark_tree): Make lang_type::primary_base.
13187         * class.c (vcall_offset_data_s): Rename to ...
13188         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
13189         and add ctor_vtbl_p.
13190         (get_derived_offset): Use get_primary_binfo.
13191         (dfs_mark_primary_bases): Adjust handling of virtual primary
13192         bases.
13193         (mark_primary_bases): Likewise.
13194         (set_primary_base): Take a binfo, not an integer, as a
13195         representation of the primary base.
13196         (indirect_primary_base_p): Remove.
13197         (determine_primary_base): Adjust for indirect primary bases.
13198         (dfs_find_final_overrider): Fix typo in coment.
13199         (update_vtable_entry_for_fn): Use get_primary_binfo.
13200         (layout_nonempty_base_or_field): Tweak.
13201         (build_base_fields): Adjust for new primary base semantics.
13202         (dfs_propagate_binfo_offsets): Remove.
13203         (propagate_binfo_offsets): Rewrite.
13204         (dfs_set_offset_for_shared_vbases): Remove.
13205         (layout_virtual_bases): Don't use it.
13206         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
13207         ABI.
13208         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
13209         CLASSTYPE_VFIELD_PARENT.
13210         (dfs_get_primary_binfo): New function.
13211         (get_primary_binfo): Likewise.
13212         (dump_class_hierarchy_r): Tweak printing of primary bases.
13213         (build_vtbl_initializer): Fix typo in comments.  Use
13214         vtbl_init_data.
13215         (build_vcall_and_vbase_vtbl_entries): Likewise.
13216         (build_vbaes_offset_vtbl_entries): Likewise.
13217         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
13218         BV_VCALL_INDEX to handle indirect primary bases.
13219         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
13220         (build_rtti_vtbl_entries): Likewise.
13221         * search.c (get_shared_vbase_if_not_primary): Tweak.
13222         (find_vbase_instance): Likewise.
13223         (binfo_for_vtable): Simplify.
13224         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
13225         (make_binfo): Make it have 11 entries.
13226
13227 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
13228
13229         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
13230         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
13231         ascertaining primaryness.
13232         (G): Remove template_args.
13233         (decl_is_template_id): New function.
13234         (write_encoding): Use decl_is_template_id.
13235         (write_name): Likewise.  Handle type_decls.  Get main variant of
13236         type decls.
13237         (write_nested_name): Likewise.
13238         (write_prefix): Likewise.
13239         (write_template_prefix): Likewise.
13240         (write_special_name_constructor): Remove defunct production from
13241         comment.
13242         (write_bare_function_type): Remove comment about absent parameter.
13243         (write_template_template_arg): Add missing grammar production to
13244         comment.
13245
13246 2000-07-27  Jason Merrill  <jason@redhat.com>
13247
13248         * decl.c (duplicate_decls): If common_type produces a non-typedef
13249         type for a typedef, just use the old type.
13250
13251 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
13252
13253         * cp-tree.h (function_depth): Declare.
13254         (verify_stmt_tree): Likewise.
13255         (find_tree): Likewise.
13256         * decl.c (function_depth): Give it external linkage.
13257         * optimize.c (optimize_function): Increment and decrement it.
13258         * tree.c (verify_stmt_tree_r): New function.
13259         (verify_stmt_tree): Likewise.
13260         (find_tree_r): Likewise.
13261         (find_tree): Likewise.
13262
13263 2000-07-27  Jason Merrill  <jason@redhat.com>
13264
13265         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
13266         TYPE_PTRMEMFUNC_P.
13267         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
13268
13269 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
13270
13271         * decl.c (start_cleanup_fn): Mark the function as `inline'.
13272         * decl2.c (get_guard): Call cp_finish_decl, not
13273         rest_of_decl_compilation, for local guards.
13274         * lex.c (do_identifier): Remove unused variable.
13275
13276 2000-07-26      Marc Espie <espie@cvs.openbsd.org>
13277
13278         * parse.y:  Add missing ';'.
13279
13280 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
13281
13282         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
13283         of `extern "C++"'.
13284
13285 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
13286
13287         Kill strict_prototype. Backwards compatibility only for
13288         non NO_IMPLICIT_EXTERN_C systems.
13289         * cp-tree.h (flag_strict_prototype): Remove.
13290         (strict_prototype): Remove.
13291         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
13292         * decl.c (maybe_push_to_top_level): Adjust.
13293         (pop_from_top_level): Adjust.
13294         (decls_match): Only allow sloppy parm matching for ancient
13295         system headers.
13296         (init_decl_processing): Adjust.
13297         (grokdeclarator): Adjust.
13298         * decl2.c (flag_strict_prototype): Remove.
13299         (strict_prototype): Remove.
13300         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
13301         (lang_f_options): Remove "strict-prototype".
13302         (unsupported-options): Add "strict-prototype".
13303         * lex.c (do_identifier): Adjust.
13304         (do_scoped_id): Adjust.
13305         * parse.y (empty_parms): Adjust.
13306         * class.c (push_lang_context): Adjust.
13307         (pop_lang_context): Adjust.
13308         * typeck.c (comp_target_parms): Adjust.
13309
13310 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
13311
13312         * decl.c (poplevel): Deal with anonymous variables at for scope.
13313         (maybe_inject_for_scope_var): Likewise.
13314
13315 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
13316
13317         * decl.c: Remove all signal handling code, now done in toplev.c.
13318
13319 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
13320
13321         * decl.c (make_rtl_for_nonlocal_decl): Rework.
13322
13323         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
13324         correctly.
13325
13326 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
13327
13328         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
13329         Define my_friendly_assert and my_friendly_abort as macros
13330         which may call friendly_abort.  Prototype friendly abort, not
13331         my_friendly_abort or my_friendly_assert.
13332         * decl.c (signal_catch): Report the signal caught in the error
13333         message.  Call fatal directly.
13334         * typeck2.c (ack, my_friendly_assert): Delete.
13335         (my_friendly_abort): Rename to friendly_abort.  Expect file,
13336         line, and function parameters.  Report the abort code, then
13337         call fancy_abort.  Do not mask an abort if errors have
13338         already occurred.
13339
13340 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
13341
13342         * typeck.c (comp_target_parms): Remove obsolete parameter.
13343         (comp_target_types): Adjust.
13344
13345 2000-07-17  Jason Merrill  <jason@redhat.com>
13346
13347         * typeck.c (mark_addressable): Never set TREE_USED.
13348         * call.c (build_call): Don't abort on calls to library functions
13349         that have been declared normally.
13350
13351         * typeck.c (build_binary_op): Fix grammar in warning.
13352
13353         * exception.cc (__eh_free): Fix prototype.
13354
13355         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
13356
13357         * decl.c (pushdecl): Handle seeing an OVERLOAD in
13358         IDENTIFIER_NAMESPACE_VALUE.
13359
13360 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
13361
13362         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
13363         * method.c (use_thunk): Correct handling of vcall offsets.
13364
13365 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
13366
13367         * .cvsignore: parse.h and parse.c have no cp- prefix.
13368
13369 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
13370
13371         * .cvsignore: New file.
13372
13373 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
13374
13375         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
13376
13377 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
13378
13379         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
13380         * parse.c: Remove.
13381         * parse.h: Likewise.
13382
13383 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
13384
13385         * class.c (layout_class_type): Add pointers to virtual bases after
13386         base classes under the old ABI.
13387
13388 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
13389
13390         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
13391         (finish_continue_stmt): Likewise.
13392         (begin_for_stmt): Remove call to note_level_for_for.
13393         (finish_goto_stmt): Change call from build_min_nt
13394         to build_stmt.
13395         (finish_expr_stmt): Likewise.
13396         (begin_if_stmt): Likewise.
13397         (begin_while_stmt): Likewise.
13398         (finish_while_stmt): Likewise.
13399         (finish_return_stmt): Likewise.
13400         (begin_for_stmt): Likewise.
13401         (finish_for_stmt): Likewise.
13402         (finish_break_stmt): Likewise.
13403         (begin_switch_stmt): Likewise.
13404         (finish_case_label): Likewise.
13405         (genrtl_try_block): Likewise.
13406         (begin_try_block): Likewise.
13407         (begin_handler): Likewise.
13408         (begin_compound_stmt): Likewise.
13409         (finish_asm_stmt): Likewise.
13410         (finish_label_stmt): Likewise.
13411         (add_decl_stmt): Likewise.
13412         (finish_subobject): Likewise.
13413         (finish_decl_cleanup): Likewise.
13414         (finish_named_return_value): Likewise.
13415         (setup_vtbl_ptr): Likewise.
13416         (add_scope_stmt): Likewise.
13417         * decl.c (finish_constructor_body): Likewise.
13418         (finish_destructor_body): Likewise.
13419         * optimize.c (copy_body_r): Likewise.
13420         (initialize_inlined_parameters): Likewise.
13421         (declare_return_variable): Likewise.
13422         (expand_call_inline): Likewise.
13423
13424 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
13425
13426         * semantics.c (expand_body): Sync interface information
13427         at the end of function body expansion.
13428
13429 2000-07-09  Jason Merrill  <jason@redhat.com>
13430
13431         * init.c (build_new_1): Bail early if the call to new fails.
13432
13433         * decl.c (compute_array_index_type): Check specifically for
13434         an INTEGER_CST, not just TREE_CONSTANT.
13435
13436         * decl.c (duplicate_decls): Don't call duplicate_decls on
13437         the DECL_TEMPLATE_RESULT.
13438         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
13439         codes.
13440
13441         * error.c (dump_template_bindings): Don't crash if we had an
13442         invalid argument list.
13443
13444         * typeck.c (c_expand_start_case): Do narrowing here.
13445         * semantics.c (finish_switch_cond): Not here.
13446
13447 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
13448
13449         * parse.y (asm_clobbers): Do string concatenation.
13450
13451 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
13452
13453         * decl.c (pushtag): Don't put local classes in template functions
13454         on the local_classes list.
13455
13456 2000-07-04  Scott Snyder  <snyder@fnal.gov>
13457
13458         * decl2.c (get_guard): Add missing return for old ABI local
13459         variable case.
13460
13461 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
13462
13463         * cp-tree.h (char_type_p): New function.
13464         * decl.c (init_decl_processing): Don't initialize
13465         signed_wchar_type_node or unsigned_wchar_type_node.
13466         (complete_array_type): Handle brace-enclosed string-constants.
13467         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
13468         * tree.c (char_type_p): New function.
13469         * typeck2.c (digest_init): Use char_type_p.
13470
13471 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
13472
13473         * pt.c (tsubst): Don't layout type, if it's error_mark.
13474
13475 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
13476
13477         * pt.c (instantiate_pending_templates): Reset template level.
13478
13479 2000-07-05  Jason Merrill  <jason@redhat.com>
13480
13481         * call.c (joust): Don't complain about `operator char *()' beating
13482         `operator const char *() const'.
13483
13484 2000-07-04  scott snyder  <snyder@fnal.gov>
13485             Jason Merrill  <jason@redhat.com>
13486
13487         * repo.c (repo_get_id): Handle the case where a class with virtual
13488         bases has a null TYPE_BINFO_VTABLE.
13489
13490 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
13491             Jason Merrill  <jason@redhat.com>
13492
13493         * parse.y (member_init): Just pass in the type.
13494         * init.c (expand_member_init): Handle getting a type.
13495
13496 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13497             Jason Merrill  <jason@redhat.com>
13498
13499         * decl.c (finish_function): Warn if a function has no return
13500         statement.
13501         Suggested by Andrew Koenig.
13502         * typeck.c (check_return_expr): Do set current_function_returns_value
13503         if we got an error_mark_node.
13504
13505 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
13506
13507         * decl2.c (push_decl_namespace): Push the original namespace.
13508
13509 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
13510
13511         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
13512         * semantics.c (begin_class_definition): Clear it.
13513
13514 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
13515
13516         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
13517         (genrtl_expr_stmt): Likewise.
13518         (genrtl_decl_stmt): Likewise.
13519         (genrtl_if_stmt): Likewise.
13520         (genrtl_while_stmt): Likewise.
13521         (genrtl_do_stmt): Likewise.
13522         (genrtl_return_stmt): Likewise.
13523         (genrtl_for_stmt): Likewise.
13524         (genrtl_break_stmt): Likewise.
13525         (genrtl_continue_stmt): Likewise.
13526         (genrtl_scope_stmt): Likewise.
13527         (genrtl_switch_stmt): Likewise.
13528         (genrtl_case_label): Likewise.
13529         (genrtl_begin_compound_stmt): Likewise.
13530         (genrtl_finish_compound_stmt): Likewise.
13531         (genrtl_compound_stmt): Likewise.
13532         (genrtl_asm_stmt): Likewise.
13533
13534         * init.c (begin_init_stmts): Remove call to
13535         genrtl_begin_compound_stmt.
13536         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
13537
13538         * semantics.c (lang_expand_stmt): Changed call to
13539         genrtl_compound_stmt to ignore return value.
13540
13541 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
13542
13543         * mangle.c (canonicalize_for_substitution): Return the canonical
13544         variant of a type.
13545
13546         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
13547         TYPE_DECL.
13548         * typeck.c (commonparms): Remove obstack manipulations.
13549
13550 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
13551
13552         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
13553
13554         * Makefile.in (OBJS): Added ../c-semantics.o.
13555         (OBJDEPS): Likewise.
13556
13557         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
13558         ../c-common.h.
13559         (struct stmt_tree): Added comment.
13560         (current_function_name_declared): Removed.
13561         (stmts_are_full_exprs_p): Likewise.
13562         (genrtl_do_pushlevel): Likewise.
13563         (genrtl_clear_out_block): Likewise.
13564         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
13565         (DECL_ANON_UNION_ELEMS): Likewise.
13566         (emit_local_var): Likewise.
13567         (make_rtl_for_local_static): Likewise.
13568         (do_case): Likewise.
13569         (expand_stmt): Likewise.
13570         (genrtl_decl_cleanup): Likewise.
13571         (c_expand_asm_operands): Likewise.
13572         (c_expand_return): Likewise.
13573         (c_expand_start_case): Likewise.
13574
13575         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
13576         (emit_local_var): Likewise.
13577         (initialize_local_var): Change reference to
13578         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
13579         Change reference to stmts_are_full_exprs_p to
13580         current_stmt_tree->stmts_are_full_exprs_p.
13581         (push_cp_function_context): Likewise.
13582
13583         * expect.c (expand_throw): Change reference to
13584         stmts_are_full_exprs_p.
13585
13586         * init.c (build_aggr_init): Change reference to
13587         stmts_are_full_exprs_p.
13588         (build_vec_init): Likewise.
13589
13590         * optimize.c (maybe_clone_body): Change reference to
13591         current_function_name_declared to
13592         cp_function_chain->name_declared.
13593
13594         * pt.c (instantiate_decl): Change reference to
13595         current_function_name_declared to
13596         cp_function_chain->name_declared.
13597
13598         * semantics.c (expand_cond): Moved declaration to c-common.h.
13599         (genrtl_do_pushlevel): Moved to c-semantics.c.
13600         (genrtl_clear_out_block): Likewise.
13601         (genrtl_goto_stmt): Likewise.
13602         (genrtl_expr_stmt): Likewise.
13603         (genrtl_decl_stmt): Likewise.
13604         (gerntl_if_stmt): Likewise.
13605         (genrtl_while_stmt): Likewise.
13606         (genrtl_do_stmt): Likewise.
13607         (genrtl_return_stmt): Likewise.
13608         (genrtl_for_stmt): Likewise.
13609         (genrtl_break_stmt): Likewise.
13610         (genrtl_continue_stmt): Likewise.
13611         (genrtl_scope_stmt): Likewise.
13612         (genrtl_switch_stmt): Likewise.
13613         (genrtl_case_label): Likewise.
13614         (genrtl_begin_compound_stmt): Likewise.
13615         (genrtl_finish_compound_stmt): Likewise.
13616         (genrtl_compound_stmt): Likewise.
13617         (genrtl_asm_stmt): Likewise.
13618         (genrtl_decl_cleanup): Likewise.
13619         (expand_cond): Likewise.
13620         (expand_stmt): Renamed to ...
13621         (lang_expand_stmt): ... this.
13622         (lang_expand_expr_stmt): Initialize.
13623         (set_current_function_name_declared): Likewise.
13624         (stmts_are_full_exprs_p): Likewise.
13625         (current_function_name_declared): Likewise.
13626         (anon_aggr_type_p): Likewise.
13627         (do_poplevel): Change reference to
13628         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
13629         Change reference to stmts_are_full_exprs_p to
13630         current_stmt_tree->stmts_are_full_exprs_p.
13631         (add_tree): Likewise.
13632         (finish_expr_stmt): Likewise.
13633         (prep_stmt): Likewise.
13634         (lang_expand_stmt): Likewise.
13635         (begin_compound_stmt): Change reference to
13636         current_function_name_declared to
13637         cp_function_chain->name_declared and call to
13638         current_function_name_declared().
13639         (setup_vtbl_ptr): Likewise.
13640         (genrtl_do_poplevel): Removed.
13641
13642 2000-06-30  Jason Merrill  <jason@redhat.com>
13643
13644         * init.c (init_init_processing): Go back to aligning like
13645         double_type_node for old ABI.
13646         (get_cookie_size): Make cookie larger if we get a type that needs
13647         more alignment.
13648         (build_vec_delete): Call it.
13649
13650         * typeck.c (qualify_type_recursive): New fn.
13651         (composite_pointer_type): Use it.
13652         (build_binary_op): Use composite_pointer_type.
13653
13654 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
13655             Jason Merrill  <jason@redhat.com>
13656
13657         * typeck.c (check_return_expr): Don't complain about returning
13658         NULL from operator new if -fcheck-new.
13659         * cp-tree.h: Declare flag_check_new here.
13660         * init.c: Not here.
13661
13662 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
13663
13664         * mangle.c (find_substitution): Use same_type_p.
13665         (write_encoding): Don't check for substitutions.
13666
13667 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
13668
13669         * parse.y (expr_no_comma_rangle): New non-terminal.
13670         (template_parm): Use it for default parameter case.
13671         (template_arg): Use it.
13672         (expr_no_commas): Remove commented out undefined extensions.
13673         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
13674         * parse.h, parse.c: Rebuilt.
13675
13676 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
13677
13678         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
13679         (finish_asm_stmt): Do it here, instead.
13680
13681         * cp-tree.h (ridpointers): Don't declare.
13682         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
13683         (record_builtin_java_type): Likewise.
13684         (init_decl_processing): Likewise.
13685         * lex.c: Move inclusion of lex.h.
13686         (ridpointers): Don't define.
13687         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
13688         RID_MAX.
13689         * lex.h (enum rid): Rename to ...
13690         (enum cp_rid): ... this.
13691         (ridpointers): Don't declare.
13692         * parse.y: Move inclusion of lex.h.
13693         * parse.c: Regenerated.
13694         * spew.c: Move inclusion of lex.h.
13695
13696         * cp-tree.h (struct language_function): Remove temp_name_counter.
13697         (temp_name_counter): Remove.
13698         (get_temp_name): Change prototype.
13699         (get_guard): New function.
13700         (get_guard_cond): Likewise.
13701         (set_guard): Likewise.
13702         * cvt.c (build_up_reference): Adjust call to get_temp_name.
13703         * decl.c (expand_static_init): Use get_guard and friends to
13704         implement guard variables.
13705         * decl2.c (get_temp_name): Assume that the variables created are
13706         always static.
13707         (get_sentry): Rename to ...
13708         (get_guard): ... this.  Implement new ABI guard variables.
13709         (get_guard_bits): New function.
13710         (get_guard_cond): Likewise.
13711         (set_guard): Likewise.
13712         (start_static_initialization_or_destruction): Use them.
13713         (do_static_initialization): Replace sentry with guard throughout.
13714         (do_static_destruction): Likewise.
13715         * init.c (create_temporary_var): Add comment.
13716
13717 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
13718
13719         * mangle.c (find_substitution): Use same_type_p.
13720         (write_encoding): Don't check for substitutions.
13721
13722 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
13723
13724         * parse.y (expr_no_comma_rangle): New non-terminal.
13725         (template_parm): Use it for default parameter case.
13726         (template_arg): Use it.
13727         (expr_no_commas): Remove commented out undefined extensions.
13728         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
13729         * parse.h, parse.c: Rebuilt.
13730
13731 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
13732
13733         * cp-tree.h (flag_const_strings): Remove.
13734         (warn_parentheses): Likewise.
13735         (warn_format): Likewise.
13736         (common_type): Likewise.
13737         (default_conversion): Likewise.
13738         (build_binary_op): Likewise.
13739         (cp_build_binary_op): New macro.
13740         * call.c (build_new_op): Use cp_build_binary_op instead of
13741         build_binary_op.
13742         * class.c (build_vtable_entry_ref): Likewise.
13743         * decl.c (expand_static_init): Likewise.
13744         (compute_array_index_type): Likewise.
13745         (build_enumerator): Likewise.
13746         * decl2.c (delete_sanity): Likewise.
13747         (start_static_initialization_or_destruction): Likewise.
13748         * error.c (dump_type_suffix): Likewise.
13749         * init.c (resolve_offset_ref): Likewise.
13750         (build_new): Likewise.
13751         (build_new_1): Likewise.
13752         (build_vec_delete_1): Likewise.
13753         (build_vec_init): Likewise.
13754         (build_delete): Likewise.
13755         * rtti.c (synthesize_tinfo_fn): Likewise.
13756         (synthesize_tinfo_var): Likewise.
13757         * search.c (expand_upcast_fixups): Likewise.
13758         (fixup_all_virtual_upcast_offsets): Likewise.
13759         * typeck.c (build_array_ref): Likewise.
13760         (get_member_function_from_ptrfunc): Likewise.
13761         (build_binary_op): Add parameter.
13762         (pointer_int_sum): Use cp_build_binary_op.
13763         (pointer_diff): Likewise.
13764         (build_modify_expr): Likewise.
13765         (get_delta_difference): Likewise.
13766         (build_ptrmemfunc): Likewise.
13767
13768 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
13769
13770         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
13771         * decl.c (create_implicit_typedef): Adjust.
13772         * decl2.c (build_artificial_parm): Adjust.
13773         * method.c (implicitly_declare_fn): Adjust.
13774         * pt.c (push_inline_template_parms_recursive): Adjust.
13775         (process_template_parm): Adjust.
13776         (overloaded_template_name): Adjust.
13777         * semantics.c (finish_template_template_parm): Adjust.
13778
13779 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
13780
13781         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
13782         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
13783         where to emit thunks.
13784         (build_vtt): Adjust call to build_vtt_inits.
13785         (build_vtt_inits): Add parameter to indicate whether or not
13786         sub-VTTs for virtual bases should be included.  Adjust handling of
13787         construction vtables.
13788         (get_matching_base): New function.
13789         (dfs_build_vtt_inits): Rename to ...
13790         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
13791         construction vtables.
13792         (dfs_fixup_binfo_vtbls): Likewise.
13793         (build_ctor_vtbl_groups): Build construction vtables for virtual
13794         bases, too.
13795         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
13796         to build construction vtbls.
13797         (dfs_accumulate_vtbl_inits): Adjust handling of
13798         construction vtables.
13799
13800         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
13801         types correctly.
13802
13803 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
13804
13805         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
13806
13807 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
13808
13809         * search.c (hides): Remove.
13810         (is_subobject_of_p): Add most_derived parameter. Use
13811         CANONICAL_BINFO.
13812         (lookup_field_queue_p): Adjust.
13813         (lookup_field_r): Adjust.
13814
13815 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
13816
13817         * decl2.c (handle_class_head): Bash typedefs to the type's main
13818         decl.
13819
13820 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
13821
13822         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
13823         (begin_global_stmt_expr): ... this.
13824         (genrtl_finish_stmt_expr): Rename to ...
13825         (finish_global_stmt_expr): ... this.
13826         * init.c (begin_init_stmts): Adjust calls.
13827         (finish_init_stmts): Likewise.
13828         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
13829         (begin_global_stmt_expr): ... this.
13830         (genrtl_finish_stmt_expr): Rename to ...
13831         (finish_global_stmt_expr): ... this.
13832
13833 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
13834
13835         * search.c (lookup_member): Fix typo in comment.
13836
13837 2000-06-24  Jason Merrill  <jason@redhat.com>
13838
13839         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
13840         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
13841
13842 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13843
13844         * parse.y (complex_direct_notype_declarator): Support global_scope.
13845         * Makefile.in: Adjust conflict count.
13846
13847 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
13848
13849         * parse.y (template_arg): Convert TEMPLATE_DECL
13850         that is a template template parameter to
13851         TEMPLATE_TEMPLATE_PARM here.
13852
13853         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
13854         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
13855         (copy_template_template_parm): Adjust prototype.
13856         * decl.c (grokdeclarator): Remove dead code.
13857         * pt.c (process_template_parm): Tidy.
13858         (lookup_template_class): Construct nodes in
13859         copy_template_template_parm.
13860         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
13861         lookup_template_class.  Use TYPE_TI_TEMPLATE.
13862         * tree.c (copy_template_template_parm): Add NEWARGS
13863         parameter.
13864         (mapcar): Adjust call to copy_template_template_parm.
13865         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
13866         * method.c (build_template_template_parm_names): Change error
13867         code to avoid compilation warning.
13868
13869         * gxxint.texi: Document template template parameter
13870         name mangling.
13871
13872 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
13873
13874         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
13875         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
13876         (cp-demangle.o): New rule.
13877         (dyn-string.o): Likewise.
13878         * inc/cxxabi.h (__cxa_demangle): New declaration.
13879
13880 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
13881
13882         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
13883         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
13884         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
13885         a tree, not an int.
13886         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
13887         (make_thunk): Change prototype.
13888         (emit_thunk): Rename to use_thunk.
13889         (mangle_thunk): Change prototype.
13890         * class.c (get_derived_offset): Simplify.
13891         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
13892         BV_GENERATE_THUNK_WITH_VTABLE_P.
13893         (build_primary_vtable): Simplify.
13894         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
13895         (dfs_find_base): Remove.
13896         (update_vtable_entry_for_fn): Correct bug in finding the base
13897         where a virtual function was first declared.  Figure out whether
13898         or not to emit a vcall-thunk with the vtables in which it appears.
13899         Correct logic for deciding whether to use an ordinary thunk, or a
13900         vcall thunk.
13901         (finish_struct_1): Remove unnecssary code.
13902         (build_vtbl_initializer): Use ssize_int for the running counter of
13903         negative indices.
13904         (build_vtbl_initializer): Only use vcall thunks where necessary.
13905         Mark thunks as needing to be emitted with their vtables, or not.
13906         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
13907         indices.  Use size_binop.
13908         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
13909         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
13910         size_binop.
13911         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
13912         (build_vtable_entry): Mark thunks as needing to be emitted with
13913         their vtables, or not.
13914         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
13915         * decl2.c (mark_vtable_entries): Use use_thunk instead of
13916         emit_thunk.
13917         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
13918         information.
13919         * error.c (dump_expr): Use BV_FN.
13920         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
13921         not an int.
13922         * method.c (make_thunk): Likewise.
13923         (emit_thunk): Rename to use_thunk.  Allow callers to decide
13924         whether or not to actually emit the thunk.  Adjust for changes in
13925         representation of vcall offsets.
13926         * search.c (dfs_get_pure_virtuals): Use BV_FN.
13927         * semantics.c (emit_associated_thunks): New function.
13928         (expand_body): Use it.
13929         * ir.texi: Adjust decriptions of thunks.
13930
13931 2000-06-22  Jason Merrill  <jason@redhat.com>
13932
13933         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
13934         (tsubst_friend_function): Copy it here.
13935
13936         * decl.c (grok_op_properties): Fix typo.
13937
13938         * decl2.c (delete_sanity): Clarify warning, avoid failure on
13939         deleting void*.
13940
13941         * pt.c (check_explicit_specialization): Clarify error.
13942
13943         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
13944         an old OVERLOAD when we're declaring a non-function.
13945         (pushdecl, destroy_local_var): Check for error_mark_node.
13946         (warn_extern_redeclared_static): Also bail early if
13947         we're a CONST_DECL.
13948         (push_overloaded_decl): Ignore an old error_mark_node.
13949
13950 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
13951
13952         * call.c (build_x_va_arg): Check if in a template decl.
13953         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
13954
13955 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13956
13957         * class.c (push_lang_context): TYPE_NAME gets you to the Java
13958         types DECLs.
13959         * decl.c (check_goto): Computed gotos assumed OK.
13960
13961 2000-06-20  Jason Merrill  <jason@redhat.com>
13962
13963         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
13964         for which we don't need to look for instantiations.
13965
13966 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
13967
13968         * parse.y (program): Always call finish_translation_unit.
13969         * parse.c, parse.h: Rebuilt.
13970
13971 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
13972
13973         * method.c: Don't include hard-reg-set.h.
13974
13975 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
13976
13977         * rtti.c (get_base_offset): Cope when vbase field is in a base.
13978
13979 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
13980
13981         * call.c (build_conditional_expr): Use VOID_TYPE_P.
13982         * cvt.c (cp_convert_to_pointer): Likewise.
13983         (convert_to_void): Likewise.
13984         * error.c (dump_expr): Likewise.
13985         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
13986         * init.c (build_delete): Likewise.
13987         * method.c (emit_thunk): Likewise.
13988         * optmize.c (declare_return_variable): Likewise.
13989         * rtti.c (get_tinfo_decl_dynamic): Likewise.
13990         (get_typeid): Likewise.
13991         (build_dynamic_cast_1): Likewise.
13992         * typeck.c (composite_pointer_type): Likewise.
13993         (common_type): Likewise.
13994         (build_indirect_ref): Likewise.
13995         (build_binary_op): Likewise.
13996         (build_x_compound_expr): Likewise.
13997         (check_return_expr): Likewise.
13998         * typeck2.c (add_exception_specifier): Likewise.
13999
14000         * mangle.c (write_method_parms): Use direct comparison for end
14001         of parmlist.
14002
14003 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
14004
14005         * cp-tree.h (genrtl_try_block): Declare function.
14006         (genrtl_handler): Likewise.
14007         (genrtl_catch_block): Likewise.
14008         (genrtl_ctor_stmt): Likewise.
14009         (genrtl_subobject): Likewise.
14010         (genrtl_decl_cleanup): Likewise.
14011         (genrtl_do_poplevel): Likewise.
14012         (genrtl_do_pushlevel): Likewise.
14013         (genrtl_clear_out_block): Likewise.
14014         (genrtl_goto_stmt): Likewise.
14015         (genrtl_expr_stmt): Likewise.
14016         (genrtl_decl_stmt): Likewise.
14017         (genrtl_if_stmt): Likewise.
14018         (genrtl_while_stmt): Likewise.
14019         (genrtl_do_stmt): Likewise.
14020         (genrtl_return_stmt): Likewise.
14021         (genrtl_for_stmt): Likewise.
14022         (genrtl_break_stmt): Likewise.
14023         (genrtl_continue_stmt): Likewise.
14024         (genrtl_scope_stmt): Likewise.
14025         (genrtl_switch_stmt): Likewise.
14026         (genrtl_case_label): Likewise.
14027         (genrtl_begin_compound_stmt): Likewise.
14028         (genrtl_finish_compound_stmt): Likewise.
14029         (genrtl_compound_stmt): Likewise.
14030         (genrtl_asm_stmt): Likewise.
14031         (genrtl_named_return_value): Likewise.
14032         (genrtl_begin_stmt_expr): Likewise.
14033         (genrtl_finish_stmt_expr): Likewise.
14034         (finish_for_stmt): Removed first argument.
14035         (finish_switch_stmt): Likewise.
14036
14037         * semantics.c (genrtl_try_block): Define function.
14038         (genrtl_handler): Likewise.
14039         (genrtl_catch_block): Likewise.
14040         (genrtl_ctor_stmt): Likewise.
14041         (genrtl_subobject): Likewise.
14042         (genrtl_decl_cleanup): Likewise.
14043         (genrtl_do_poplevel): Likewise.
14044         (genrtl_do_pushlevel): Likewise.
14045         (genrtl_clear_out_block): Likewise.
14046         (genrtl_goto_stmt): Likewise.
14047         (genrtl_expr_stmt): Likewise.
14048         (genrtl_decl_stmt): Likewise.
14049         (genrtl_if_stmt): Likewise.
14050         (genrtl_while_stmt): Likewise.
14051         (genrtl_do_stmt): Likewise.
14052         (genrtl_return_stmt): Likewise.
14053         (genrtl_for_stmt): Likewise.
14054         (genrtl_break_stmt): Likewise.
14055         (genrtl_continue_stmt): Likewise.
14056         (genrtl_scope_stmt): Likewise.
14057         (genrtl_switch_stmt): Likewise.
14058         (genrtl_case_label): Likewise.
14059         (genrtl_begin_compound_stmt): Likewise.
14060         (genrtl_finish_compound_stmt): Likewise.
14061         (genrtl_compound_stmt): Likewise.
14062         (genrtl_asm_stmt): Likewise.
14063         (genrtl_named_return_value): Likewise.
14064         (genrtl_begin_stmt_expr): Likewise.
14065         (genrtl_finish_stmt_expr): Likewise.
14066         (finish_for_stmt): Removed first argument and generate rtl
14067         specific code.
14068         (finish_switch_stmt): Likewise.
14069         (do_poplevel): Removed generate rtl specific code.
14070         (do_pushlevel): Likewise.
14071         (add_tree): Likewise.
14072         (finish_goto_stmt): Likewise.
14073         (finish_expr_stmt): Likewise.
14074         (begin_if_stmt): Likewise.
14075         (finish_if_stmt_cond): Likewise.
14076         (finish_then_clause): Likewise.
14077         (begin_else_clause): Likewise.
14078         (finish_else_clause): Likewise.
14079         (finish_if_stmt): Likewise.
14080         (clear_out_block): Likewise.
14081         (begin_while_stmt): Likewise.
14082         (finish_while_stmt_cond): Likewise.
14083         (finish_while_stmt): Likewise.
14084         (begin_do_stmt): Likewise.
14085         (finish_do_body): Likewise.
14086         (finish_do_stmt): Likewise.
14087         (finish_return_stmt): Likewise.
14088         (begin_for_stmt): Likewise.
14089         (finish_for_init_stmt): Likewise.
14090         (finish_for_cond): Likewise.
14091         (finish_for_expr): Likewise.
14092         (finish_break_stmt): Likewise.
14093         (finish_continue_stmt): Likewise.
14094         (begin_switch_stmt): Likewise.
14095         (finish_switch_cond): Likewise.
14096         (finish_case_label): Likewise.
14097         (begin_try_block): Likewise.
14098         (begin_function_try_block): Likewise.
14099         (finish_try_block): Likewise.
14100         (finish_cleanup_try_block): Likewise.
14101         (finish_cleanup): Likewise.
14102         (finish_function_try_block): Likewise.
14103         (finish_handler_sequence): Likewise.
14104         (finish_function_handler_sequence): Likewise.
14105         (begin_handler): Likewise.
14106         (finish_handler_parms): Likewise.
14107         (begin_catch_block): Likewise.
14108         (finish_handler): Likewise.
14109         (begin_compound_stmt): Likewise.
14110         (finish_compound_stmt): Likewise.
14111         (finish_asm_stmt): Likewise.
14112         (finish_label_stmt): Likewise.
14113         (finish_label_decl): Likewise.
14114         (finish_subobject): Likewise.
14115         (finish_decl_cleanup): Likewise.
14116         (finish_named_return_value): Likewise.
14117         (begin_stmt_expr): Likewise.
14118         (finish_stmt_expr): Likewise.
14119
14120         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
14121         to call genrtl_expr_stmt when appropriate.
14122
14123         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
14124         begin_compound_expr to call genrtl_begin_stmt_expr and
14125         genrtl_begin_compound_expr when appropriate.
14126         (finish_init_stmts): Changed calls to finish_compound_expr and
14127         finish_stmt_expr to call genrtl_finish_compound_expr and
14128         genrtl_finish_stmt_expr when appropriate.
14129         (expand_default_init): Changed call to finish_expr_stmt to call
14130         genrtl_expr_stmt when appropriate.
14131         (build_vec_init): Likewise.
14132
14133         * parse.y (simple_stmt): Removed first argument from call to
14134         finish_for_stmt. Removed first argument from call to
14135         finish_switch_stmt.
14136
14137         * parse.c: Regenerated.
14138
14139         * pt.c (tsubst_expr): Removed first argument from call to
14140         finish_for_stmt. Removed first argument from call to
14141         finish_switch_stmt.
14142
14143 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
14144
14145         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
14146         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
14147
14148         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
14149         (cplus_tree_code_length[]): Likewise.
14150         (cplus_tree_code_name[]): Likewise.
14151         (init_parse): Added call to add_c_tree_codes. Changed
14152         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
14153
14154 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
14155
14156         * cp-tree.h (finish_mem_initializers): Declare.
14157         (count_trees): Likewise.
14158         * parse.y (base_init): Use finish_mem_initializers.
14159         * semantics.c (finish_mem_initializers): New function.
14160
14161         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
14162         the number of trees.
14163         (n_trees): Remove.
14164         (count_trees): Don't use it.
14165
14166 2000-06-15  Jason Merrill  <jason@redhat.com>
14167
14168         * tree.c (count_trees): New debugging function.
14169
14170         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
14171         * init.c (build_member_call): Pull out the name of a DECL.
14172
14173         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
14174         * semantics.c (expand_body): Push to TV_INTEGRATION here.
14175         * optimize.c (optimize_function): Not here.
14176         * pt.c (instantiate_decl): Push to TV_PARSE.
14177
14178 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
14179
14180         * cp-tree.h (struct language_function): Remove x_base_init_list
14181         and x_member_init_list.
14182         (current_base_init_list): Remove.
14183         (current_member_init_list): Likewise.
14184         (setup_vtbl_ptr): Change prototype.
14185         (emit_base_init): Likewise.
14186         (expand_member_init): Likewise.
14187         (reinit_parse_for_function): Remove.
14188         * decl.c (save_function_data): Don't clear x_base_init_list and
14189         x_member_init_list.
14190         (mark_language_function): Don't mark them.
14191         * init.c (perform_member_init): Tweak comment.
14192         (sort_member_init): Take the list of initializers as an argument.
14193         (sort_base_init): Likewise.
14194         (emit_base_init): Likewise.
14195         (expand_member_init): Return the initializer.  Don't use global
14196         variables.
14197         * lex.c (reinit_parse_for_function): Remove.
14198         * method.c (build_template_parm_names): Correct substitution.
14199         (do_build_copy_constructor): Don't use current_member_init_list
14200         and current_base_init_list.
14201         (synthesize_method): Likewise.
14202         * parse.y (base_init): Split mem-initializers into
14203         base-initializers and field-initializers.
14204         (member_init_list): Build up the list here.
14205         (member_init): Return the initializer.
14206         (fn.depfn): Don't use reinit_parse_for_function.
14207         * parse.c: Regenerated.
14208         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
14209         ERROR_MARK.
14210         (tsubst_expr): Don't use current_member_init_list
14211         and current_base_init_list.
14212         (tsubst_expr_values): Rename to ...
14213         (tsubst_initializer_list): ... this.  Use convert_from_reference.
14214         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
14215         and current_base_init_list.
14216         (begin_function_definition): Don't call reinit_parse_for_function.
14217
14218         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
14219
14220         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
14221         correctly.
14222
14223         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
14224
14225 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
14226
14227         * cp-tree.h (IF_COND): Move to c-common.h.
14228         (THEN_CLAUSE): Likewise.
14229         (ELSE_CLAUSE): Likewise.
14230         (WHILE_COND): Likewise.
14231         (WHILE_BODY): Likewise.
14232         (DO_COND): Likewise.
14233         (DO_BODY): Likewise.
14234         (RETURN_EXPR): Likewise.
14235         (EXPR_STMT_EXPR): Likewise.
14236         (FOR_INIT_STMT): Likewise.
14237         (FOR_COND): Likewise.
14238         (FOR_EXPR): Likewise.
14239         (FOR_BODY): Likewise.
14240         (SWITCH_COND): Likewise.
14241         (SWITCH_BODY): Likewise.
14242         (CASE_LOW): Likewise.
14243         (CASE_HIGH): Likewise.
14244         (GOTO_DESTINATION): Likewise.
14245         (COMPOUND_BODY): Likewise.
14246         (ASM_CV_QUAL): Likewise.
14247         (ASM_STRING): Likewise.
14248         (ASM_OUTPUTS): Likewise.
14249         (ASM_INPUTS): Likewise.
14250         (ASM_CLOBBERS): Likewise.
14251         (DECL_STMT_DECL): Likewise.
14252         (STMT_EXPR_STMT): Likewise.
14253         (LABEL_STMT_LABEL): Likewise.
14254         (SCOPE_BEGIN_P): Likewise.
14255         (SCOPE_END_P): Likewise.
14256         (SCOPE_STMT_BLOCK): Likewise.
14257         (SCOPE_NULLIFIED_P): Likewise.
14258         (SCOPE_NO_CLEANUPS_P): Likewise.
14259         (SCOPE_PARTIAL_P): Likewise.
14260         (ASM_VOLATILE_P): Likewise.
14261         (STMT_LINENO): Likewise.
14262         (STMT_LINENO_FOR_FN_P): Likewise.
14263
14264         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
14265         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
14266         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
14267         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
14268         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
14269
14270         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
14271
14272         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
14273         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
14274
14275         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
14276         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
14277         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
14278
14279 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
14280
14281         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
14282         * class.c (dfs_find_final_overrider): Set it appropriately.
14283         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
14284         avoid unneeded secondary vptrs.
14285
14286 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
14287
14288         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
14289         (check_bitfield_decl, check_field_decl): Likewise.
14290         (build_vtbl_or_vbase_field, build_base_field): Likewise.
14291         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
14292         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
14293         (xfer_tag, finish_enum): Likewise.
14294         * decl2.c (finish_builtin_type): Likewise.
14295         * init.c (init_init_processing): Likewise.
14296         * pt.c (instantiate_class_template): Likewise.
14297         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
14298         * cp-tree.h (struct lang_type): Add user_align member.
14299         (CLASSTYPE_USER_ALIGN): Define.
14300
14301 2000-06-13  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
14302
14303         * Make-lang.in (c++.install-common): Install g++-cross in
14304         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
14305         $(target_alias)-g++ and $(target_alias)-c++.
14306
14307 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
14308
14309         * class.c (vcall_offset_data_s): Add last_init and fns.
14310         (overrides): Rename to same_signature_p.
14311         (dfs_find_final_overrider): Adjust accordingly.
14312         (mark_overriders): Likewise.
14313         (warn_hidden): Likewise.
14314         (build_vtbl_initializer): Reorganize machinery for building things
14315         at negative offsets.
14316         (build_vcall_and_vbase_vtbl_entries): Likewise.
14317         (build_vbase_offset_vtbl_entries): Likewise.
14318         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
14319         offset entries.  Do not create two entries for functions with the
14320         same signature.
14321         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
14322         (build_rtti_vtbl_entries): Reorganize machinery for building things
14323         at negative offsets.
14324
14325         * optimize.c (expand_call_inline): Don't recurse into the code
14326         used to initialize the parameters more than once.
14327
14328 2000-06-11  Mark Mitchell <mark@codesourcery.com>
14329
14330         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
14331         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
14332         (find_substitution): Only use the `Sa' substitution for
14333         std::allocator, not instantiations of it.
14334         (write_template_prefix): Move comment.  Only use a TREE_LIST to
14335         represent substitutions for a member template.
14336         (write_array_type): Mangle array dimensions correctly.
14337         * optimize.c (maybe_clone_body): Copy more information from the
14338         cloned function.
14339         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
14340         on the regenerated declaration.
14341
14342 2000-06-11  Chip Salzenberg  <chip@valinux.com>
14343             Mark Mitchell <mark@codesourcery.com>
14344
14345         * class.c (build_vtable): Clarify comment.
14346         (build_ctor_vtbl_group): Pass the most derived type to
14347         build_vtable.
14348
14349 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14350
14351         * decl2.c (compare_options): Don't needlessly cast away const-ness.
14352
14353 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
14354
14355         * decl.c (add_binding): Handle duplicate declarations of external
14356         variables.
14357
14358 2000-06-09  Chip Salzenberg  <chip@valinux.com>
14359             Mark Mitchell <mark@codesourcery.com>
14360
14361         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
14362         argument.
14363         (write_signed_number): New macro.
14364         (write_unsigned_number): Likewise.
14365         (write_source_name): Use them.
14366         (write_number): Handle signed and unsigned values.
14367         (write_integer_cst): Use tree_int_cst_sgn, and use
14368         write_unsigned_number or write_signed_number as appropriate.
14369         (write_discriminator): Use write_unsigned_number or
14370         write_signed_number as appropriate.
14371         (write_template_arg_literal): Likewise.
14372         (write_array_type): Use tree_low_cst.
14373         (write_template_parm):  Use write_unsigned_number or
14374         write_signed_number as appropriate.
14375         (write_substitution): Adjust call to write_number.
14376         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
14377         (write_expression): Handle non-type template arguments of
14378         reference type correctly.
14379         (mangle_thunk): Use write_signed_number.
14380
14381 2000-06-09  Chip Salzenberg  <chip@valinux.com>
14382
14383         * mangle.c (find_substition): Don't mangle objects with typename
14384         substitutions (e.g. "cin" as "Si").
14385
14386 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
14387
14388         * call.c (add_candidate): Use ggc_alloc_cleared.
14389         * decl.c (lookup_label): Likewise.
14390         * lex.c (retrofit_lang_decl): Likewise.
14391
14392 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
14393
14394         * semantics.c (expand_body): Push to TV_EXPAND.
14395         * optimize.c (optimize_function): Push to TV_INTEGRATION.
14396         * decl.c (start_function): Always call announce_function.
14397
14398         * tinfo2.cc: Just declare abort.
14399
14400 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
14401
14402         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
14403         whenever @ is a symbolic name.
14404
14405 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
14406
14407         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
14408
14409 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
14410
14411         * decl.c (pushdecl): Look up functions by DECL_NAME, not
14412         DECL_ASSEMBLER_NAME.
14413
14414 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
14415
14416         * decl2.c (c_language): Define.
14417
14418 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
14419
14420         * lex.c (lang_init_options): Tweak.
14421
14422         * decl2.c: Remove #inclusion of diagnostic.h
14423         (lang_decode_option): Move diagnostic formatting options to
14424         toplevel.
14425
14426         * lang-options.h: Remove documentation for diagnostic options.
14427
14428         * Makefile.in (lex.o): Depends upon diagnostic.h
14429
14430 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
14431
14432         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
14433         the same DECL_RESULT, it's not a redefinition.
14434         * pt.c (tsubst_decl): Remove code to handle illegal
14435         specializations.
14436
14437 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
14438
14439         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
14440
14441 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
14442
14443         * search.c (maybe_suppress_debug_info): Don't check
14444         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
14445
14446         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
14447         here if extern_p.
14448
14449         Remember instantiation context in deferred instantiations.
14450         * cp-tree.h (struct tinst_level): Remove.
14451         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
14452         * pt.c (current_tinst_level): Now a tree.
14453         (print_template_context, push_tinst_level, pop_tinst_level,
14454         tinst_for_decl): Adjust.
14455         (reopen_tinst_level): New fn.
14456         (init_pt): Register current_tinst_level as a root.
14457         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
14458         of the pending templates list.
14459         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
14460         * lex.c (extract_interface_info): Adjust.
14461         * decl2.c (warn_if_unknown_interface): Adjust.
14462
14463 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
14464
14465         * class.c (indirect_primary_base_p): New function.
14466         (determine_primary_base): Use it.
14467
14468 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
14469
14470         Update new-abi dynamic cast algorithm.
14471         * tinfo.cc (__class_type_info::__dyncast_result): Add
14472         whole_details. Adjust constructor.
14473         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
14474         Avoid unnecessary searching.
14475         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
14476
14477 2000-06-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14478
14479         * decl.c (init_decl_processing): Don't call record_component_aliases.
14480         * tree.c (build_cplus_array_type_1): Likewise.
14481
14482 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
14483
14484         * ir.texi: Correct typo.
14485         * mangle.c (write_expression): Handle non-type template arguments
14486         with reference type.
14487         * method.c (build_overload_value): Likewise.
14488         * pt.c (convert_nontype_argument): Explicitly represent conversion
14489         to a reference with an ADDR_EXPR.
14490         (unify): Always unify arguments in left-to-right order.
14491
14492 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
14493             Mark Mitchell  <mark@codesourcery.com>
14494
14495         * Make-lang.in (CXX_SRCS): Add mangle.c.
14496         * Makefile.in (CXX_OBJS): Add mangle.o.
14497         (mangle.o): New rule.
14498
14499         * class.c (local_classes): New variable.
14500         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
14501         (get_vtt_name): Use mangle_vtt_name for new ABI.
14502         (init_class_processing): Initialize local_classes.
14503         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
14504         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
14505         (std_identifier): New macro.
14506         (DECL_VOLATILE_MEMFUNC_P): New macro.
14507         (DECL_NAMESPACE_STD_P): Likewise.
14508         (local_classes): Declare.
14509         (get_mostly_instantiated_function_type): Declare.
14510         (init_mangle): Declare.
14511         (mangle_decl): Likewise.
14512         (mangle_type_string): Likewise.
14513         (mangle_type): Likewise.
14514         (mangle_typeinfo_for_type): Likewise.
14515         (mangle_typeinfo_string_for_type): Likewise.
14516         (mangle_vtbl_for_type): Likewise.
14517         (mangle_vtt_for_type): Likewise.
14518         (mangle_ctor_vtbl_for_type): Likewise.
14519         (mangle_thunk): Likewise.
14520         (mangle_conv_op_name_for_type): Likewise.
14521         (mangle_guard_variable): Likewise.
14522         * decl.c (pushtag): Keep track of local classes.
14523         (initialize_predefined_identifiers): Initialize std_identifier.
14524         (init_decl_processing): Use std_identifier.
14525         (start_decl): Don't treat instantiations as specializations.
14526         (grokdeclarator): Likewise.
14527         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
14528         name for fully-instantiated templates.
14529         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
14530         destructors with the new ABI.
14531         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
14532         (grokfield): Use mangle_type for new ABI.
14533         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
14534         (get_sentry): Use mangle_guard_variable for new ABI.
14535         (start_static_initialization_or_destruction): Likewise.
14536         * expr.c (extract_aggr_init): Remove.
14537         (extract_scalar_init): Likewise.
14538         (extract_init): Remove #if 0'd code.
14539         * mangle.c: New function.
14540         * method.c (build_mangled_name): Assert not flag_new_abi.
14541         (build_static_name): Likewise.
14542         (build_decl_overload_real): Likewise.
14543         (build_typename_overload): Likewise.
14544         (build_overload_with_type): Likewise.
14545         (build_overload_name): Likewise.
14546         (get_ctor_vtbl_name): Likewise.
14547         (start_squangling): Likewise.
14548         (get_id_2): Likewise.
14549         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
14550         (init_method): Call init_mangle for new ABI.
14551         (make_thunk): Call mangle_thunk for new ABI.
14552         * operators.def: Correct new ABI manglings for the `%' operator.
14553         Add `::' operator.
14554         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
14555         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
14556         (lookup_template_class): Call mangle_decl for new ABI.
14557         (get_mostly_instantiated_function_type): New function.
14558         (set_mangled_name_for_template_decl): Use it.
14559         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
14560         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
14561         conversion op names.
14562         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
14563         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
14564         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
14565         mangle_typeinfo_string_for_type.
14566
14567 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
14568
14569         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
14570         (INNERMOST_TEMPLATE_ARGS): New macro.
14571         (innermost_args): Remove.
14572         (get_innermost_template_args): New function.
14573         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
14574         * error.c (dump_function_decl): Be caution when using
14575         most_general_template.
14576         * method.c (build_template_parm_names):  Use
14577         INNERMOST_TEMPLATE_ARGS.
14578         * pt.c (add_to_template_args): Tidy comment
14579         (get_innermost_template_args): New function.
14580         (check_explicit_specialization): Clear DECL_INITIAL for a new
14581         specialization.
14582         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
14583         Tidy.
14584         (push_template_decl): Always register specializations of the most
14585         general template.
14586         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
14587         (coerce_template_parms): Likewise.
14588         (lookup_template_class): Likewise.
14589         (innermost_args): Remove.
14590         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
14591         (tsubst_decl): Handle tricky specializations.  Use
14592         get_innermost_template_args.
14593         (instantiate_template): Simplify handling of partial
14594         instantiations.
14595         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
14596         (most_general_template): Reimplement, in a more straightforward
14597         manner.
14598         (regenerate_decl_from_template): Tweak formatting.  Use
14599         TMPL_ARGS_DEPTH for clarity.
14600         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
14601
14602         * dump.c (dequeue_and_dump): Dump information about thunks.
14603
14604 2000-06-01  Richard Henderson  <rth@cygnus.com>
14605
14606         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
14607
14608 2000-06-01  Richard Henderson  <rth@cygnus.com>
14609
14610         * decl2.c (unsupported_options): Fix typo, make const.
14611         (lang_decode_option): Fix bsearch argument order.
14612
14613 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
14614
14615         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
14616         on FIELD_DECLs.
14617
14618 2000-05-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14619
14620         * cp-tree.h (c_get_alias_set): Deleted.
14621         * Makefile.in (decl.o): Include ../expr.h.
14622         * decl.c (expr.h): Include.
14623         (init_decl_processing): Call record_component_aliases for arrays.
14624         (grokdeclarator): Likewise.
14625         Set TREE_ADDRESSABLE for fields that aren't bitfields.
14626         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
14627
14628 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
14629
14630         Remove guiding declaration support.
14631         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
14632         (flag_guiding_decls): Remove.
14633         * call.c (build_user_type_conversion_1): Remove support for
14634         guiding decls.
14635         (build_new_function_call): Likewise.
14636         (build_new_op): Likewise.
14637         (build_new_method_call): Likewise.
14638         * decl.c (start_function): Likewise.
14639         * friend.c (is_friend): Likewise.
14640         (do_friend): Likewise.
14641         * decl2.c ((flag_dump_translation_unit): Make it const.
14642         (flag_guiding_decls): Remove.
14643         (unsupported_options): New variable
14644         (compare_options): New function.
14645         (lang_decode_option): Use them.
14646
14647         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
14648
14649         * method.c (mangle_expression): Adjust test for legal expression
14650         operators.
14651
14652         * pt.c (instantiate_decl): Save and restore the local
14653         specializations list.
14654
14655 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
14656
14657         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
14658
14659 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
14660
14661         * call.c (add_template_candidate_real): Handle member template
14662         constructors for classes with virtual bases.
14663         (build_user_type_conversion_1): Use in_charge_arg_for_name.
14664         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
14665
14666         * ir.texi: Update thunk documentation.
14667
14668         * call.c (joust): Fix handling of overloaded builtin operators.
14669
14670 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
14671
14672         * cp-tree.h (DECL_ANTICIPATED): New macro.
14673         Document new use of DECL_LANG_FLAG_7.
14674         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
14675         in the user namespace.
14676         * lex.c (do_identifier): If the identifier's declaration has
14677         DECL_ANTICIPATED on, it has not yet been declared.  But do not
14678         replace it with an ordinary implicit declaration.
14679
14680         * tinfo2.cc: Include stdlib.h.
14681
14682 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
14683
14684         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
14685         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
14686         CLASSTYPE_ALIGN.
14687
14688 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
14689
14690         * decl2.c (lang_decode_option): Use skip_leading_substring instead
14691         of plain strncmp.
14692
14693 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
14694
14695         * operators.def (<?): Duplicated, should have been...
14696         (>?): this.  Fixed.
14697
14698 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
14699             Mark Mitchell  <mark@codesourcery.com>
14700
14701         * cp-tree.h (ansi_opname): Make it a macro.
14702         (ansi_assopname): Likewise.
14703         (struct lang_decl_flags): Add assignment_operator_p.
14704         (struct lang_decl): Add operator_code.
14705         (DECL_VTT_PARM): Adjust.
14706         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
14707         overloaded operator.
14708         (SET_OVERLOADED_OPERATOR_CODE): New macro.
14709         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
14710         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
14711         (opname_tab): Remove.
14712         (assignop_tab): Likewise.
14713         (operator_name_info_t): New type.
14714         (operator_name_info): New variable.
14715         (assignment_operator_name_info): Likewise.
14716         (build_cp_library_fn): Remove declaration.
14717         (push_cp_library_fn): Likewise.
14718         (operator_name_string): Likewise.
14719         (build_decl_overload): Likewise.
14720         * call.c (print_z_candidates): Simplify.
14721         (build_object_call): Adjust usage of ansi_opname.  Use
14722         DECL_OVERLOADED_OPERATOR_P.
14723         (op_error): Adjust operator name lookup.
14724         (build_conditional_expr): Adjust usage of ansi_opname.
14725         (build_new_op): Likewise.
14726         (build_op_delete_call): Likewise.
14727         (build_over_call): Likewise.
14728         (joust): Use DECL_OVERLOADED_OPERATOR_P.
14729         * decl.c (duplicate_decls): Copy operator_code.
14730         (init_decl_processing): Adjust parameters to push_cp_library_fn.
14731         (builtin_function): Adjust parameters to build_library_fn_1.
14732         (build_library_fn_1): Accept an overloaded operator code.
14733         (build_library_fn): Pass ERROR_MARK.
14734         (build_cp_library_fn): Accept an overloaded operator code.
14735         (push_cp_library_fn): Likewise.
14736         (grokfndecl): Tweak.
14737         (grokdeclarator): Simplify code to compute names of overloaded
14738         operators.  Adjust use of ansi_opname.
14739         (ambi_op_p): Work on tree_codes, not identifiers.
14740         (unary_op_p): Likewise.
14741         (grok_op_properties): Likewise.
14742         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
14743         (lang_mark_tree): Don't try to mark the operator_code.
14744         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
14745         * error.c (dump_decl): Remove special handling for operator
14746         names.
14747         (dump_function_name): Likewise.
14748         (dump_expr): Adjust name lookup of operators.
14749         (op_to_string): Simplify.
14750         (assop_to_string): Likewise.
14751         * init.c (build_new_1): Adjust use of ansi_opname.
14752         * lex.c (opname_tab): Remove.
14753         (assignop_tab): Likewise.
14754         (ansi_opname): Likewise.
14755         (ansi_assopname): Likewise.
14756         (operator_name_string): Likewise.
14757         (reinit_lang_specific): Likewise.
14758         (operator_name_info): New variable.
14759         (assignment_operator_name_info): Likewise.
14760         (init_operators): New function.
14761         (init_parse): Use it.
14762         (do_identifier): Adjust use of ansi_opname.
14763         * method.c (mangle_expression): Don't use ansi_opname for
14764         mangling.
14765         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
14766         (build_decl_overload): Remove.
14767         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
14768         (do_build_assign_ref): Adjust use of ansi_opname.
14769         (synthesize_method): Likewise.
14770         (implicitly_declare_fn): Likewise.
14771         * operators.def: New file.
14772         * parse.y (operator): Adjust use of ansi_opname.
14773         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
14774         (set_mangled_name_for_template_decl): Don't play games with
14775         current_namespace.
14776         (special_function_p): Adjust use of ansi_opname.
14777         * typeck.c (check_return_expr): Likewise.
14778         * Make-lang.in (cc1plus): Depend on operators.def.
14779         * Makefile.in (lex.o): Likewise.
14780         (decl.o): Likewise.
14781
14782 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
14783
14784         * Make-lang.in (cplib2.ready): Eradicate.
14785
14786 2000-05-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14787
14788         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
14789         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
14790         (built_min, cp_tree_equal): Likewise.
14791
14792 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
14793
14794         * class.c (layout_nonempty_base_or_field): Replace
14795         `record_layout_info' with `record_layout_info_s'.
14796
14797 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
14798
14799         Fix goto checking.
14800         * cp-tree.h (struct language_function): x_named_labels is now
14801         a struct named_label_list*.
14802         * decl.c (struct named_label_use_list): Renamed from...
14803         (struct named_label_list): ...this.  New struct.
14804         (push_binding_level): Don't set eh_region.
14805         (note_level_for_eh): New fn.
14806         (pop_label): Take label and old value directly.
14807         (pop_labels): Adjust for new named_labels format.
14808         (lookup_label): Likewise.
14809         (poplevel): Note characteristics of a binding level containing a
14810         named label.  Mess with named label lists earlier.
14811         (mark_named_label_lists): New fn.
14812         (mark_lang_function): Call it.
14813         (use_label): New fn, split out from...
14814         (make_label_decl): ...here.  Don't call it.
14815         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
14816         check_previous_gotos): New fns, split out from...
14817         (define_label): ...here.
14818         (check_switch_goto): New fn.
14819         (define_case_label): Call it.
14820         (check_goto): New fn.
14821         * semantics.c (finish_goto_stmt): Call it and use_label.
14822         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
14823         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
14824
14825 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
14826
14827         * class.c (build_vtable_entry_ref): Correct usage of
14828         get_vtbl_decl_for_binfo.
14829
14830         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
14831         * method.c (implicitly_declare_fn): Not here.
14832
14833 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
14834
14835         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
14836         (CPTI_PTMD_DESC_TYPE): ... here.
14837         (ptmd_desc_type_node): Rename to ...
14838         (ptm_desc_type_node): ... here.
14839         * decl.c: Likewise.
14840         * rtti.c (ptmd_initializer): Rename to ...
14841         (ptm_initializer): ... here.
14842         (sythesize_tinfo_var): Adjust. Deal with pointer to member
14843         function.
14844         (create_tinfo_types): Adjust.
14845
14846 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
14847
14848         Finish implementation of VTTs.
14849         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
14850         CPTI_VTT_PARM_IDENTIFIER.
14851         (vtt_parm_identifier): New macro.
14852         (vtt_parm_type): Likewise.
14853         (BINFO_SUBVTT_INDEX): Likewise.
14854         (BINFO_VPTR_INDEX): Likewise.
14855         (struct lang_decl): Add vtt_parm.
14856         (DECL_VTT_PARM): New macro.
14857         (DECL_USE_VTT_PARM): Likewise.
14858         (DECL_NEEDS_VTT_PARM_P): Likewise.
14859         (get_vtt_name): Declare.
14860         (build_artificial_parm): Likewise.
14861         (fixup_all_virtual_upcast_offsets): Likewise.
14862         (expand_indirect_vtbls_init): Remove.
14863         * call.c (build_new_method_call): Pass the vtt to subobject
14864         constructors and destructors.
14865         * class.c (get_vtt_name): Give it external linkage.
14866         (build_clone): Handle the magic VTT parameters for clones.
14867         (clone_function_decl): Fix typo in comment.
14868         (build_vtt): Keep track of the indices in the VTTs where various
14869         entities are stored.
14870         (build_vtt_inits): Likewise.
14871         (dfs_build_vtt_inits): Likewise.
14872         (build_ctor_vtbl_group): Tweak type of construction vtables.
14873         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
14874         primary bases, when building construction vtables.
14875         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
14876         (initialize_predefined_identifiers): Add vtt_parm_identifier.
14877         (init_decl_processing): Initialize vtt_parm_type.
14878         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
14879         (lang_mark_tree): Make vtt_parm.
14880         * decl2.c (build_artificial_parm): New function.
14881         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
14882         (grokclassfn): Use build_artificial_parm.
14883         * init.c (initialize_vtbl_ptrs): Call
14884         fixup_all_virtual_upcast_offsets directly.
14885         (perform_member_init): Use the complete subobject destructor for
14886         member cleanups.
14887         (build_vtbl_address): New function.
14888         (expand_virtual_init): Handle VTTs.
14889         * optimize (maybe_clone_body): Likewise.
14890         * search.c (fixup_all_virtual_upcast_offsets): Give it external
14891         linkage.
14892         (expand_indirect_vtbls_init): Remove.
14893         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
14894         * tree.c (make_binfo): Make them bigger.
14895
14896 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
14897
14898         * inc/cxxabi.h (__pbase_type_info): Define, based on
14899         __pointer_type_info.
14900         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
14901         (__pointer_to_member_type_info): Likewise.
14902         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
14903         (__pointer_to_member_type_info::__is_pointer_p): Remove.
14904         (__pointer_type_info::__do_catch): Rename to ...
14905         (__pbase_type_info::__do_catch): ... here. Adjust.
14906         (__pbase_type_info::__pointer_catch): Implement.
14907         (__pointer_type_info::__pointer_catch): Adjust.
14908         (__pointer_to_member_type_info::__pointer_catch): Adjust.
14909
14910 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
14911
14912         * tinfo.h (__user_type_info::contained_virtual_p): New
14913         predicate.
14914         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
14915         shaped hierarchy.
14916         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
14917         diamond shaped hierarchy. Add early out for mixed diamond and
14918         duplicate shaped hierarchy.
14919
14920 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
14921
14922         * cp-tree.h (build_delete): Change prototype.
14923         (build_vec_delete): Likewise.
14924         * call.c (build_scoped_method_call): Use special_function_kind
14925         values to indicate the kind of destruction to be done.
14926         (build_method_call): Likewise.
14927         * decl.c (finish_destructor_body): Likewise.
14928         (maybe_build_cleanup_1): Likewise.  Rename to ...
14929         (maybe_build_cleanup): ... this.
14930         * decl2.c (delete_sanity): Use special_function_kind
14931         values to indicate the kind of destruction to be done.
14932         (build_cleanup): Likewise.
14933         * init.c (perform_member_init): Likewise.
14934         (build_vec_delete_1): Likewise.
14935         (build_dtor_call): Simplify.
14936         (build_delete): Use special_function_kind
14937         values to indicate the kind of destruction to be done.
14938         (build_vbase_delete): Likewise.
14939         (build_vec_delete): Likewise.
14940
14941         * init.c (sort_member_init): Fix typo in error message generation
14942         code.
14943
14944 2000-05-15  Donald Lindsay  <dlindsay@cygnus.com>
14945
14946         * semantics.c (begin_class_definition): make the packed
14947         attribute be sensitive to the "-fpack-struct" command line flag
14948
14949 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
14950
14951         Update new-abi upcast algorithm.
14952         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
14953         prototype and meaning of return value.
14954         (__si_class_type_info::__do_upcast): Likewise.
14955         (__vmi_class_type_info::__do_upcast): Likewise.
14956         * tinfo.cc (__class_type_info::__upcast_result): Replace
14957         whole2dst with part2dst. Adjust ctor.
14958         (__class_type_info::__do_upcast): Adjust call of worker function.
14959         (__class_type_info::__do_upcast): Adjust.
14960         (__si_class_type_info::__do_upcast): Adjust. Use parent's
14961         __do_upcast.
14962         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
14963         virtual base in diamond hierarchy bug.
14964
14965 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
14966
14967         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
14968         and bitfield to tinfo_fn_p.
14969         (DECL_TINFO_FN_P): Adjust.
14970         (SET_DECL_TINFO_FN_P): Likewise.
14971         (DECL_MUTABLE_P): Likewise.
14972         (DECL_C_BIT_FIELD): Likewise.
14973         (SET_DECL_C_BIT_FIELD): Likewise.
14974         (CLEAR_DECL_C_BIT_FIELD): Likewise.
14975         (DECL_UNINLINABLE): Likewise.
14976         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
14977         (handle_using_decl): Remove assertion.
14978         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
14979         to build FIELD_DECLs.
14980         (build_base_field): Likewise.
14981         (layout_class_type): Likewise.
14982         * decl.c (init_decl_processing): Likewise.
14983         (build_ptrmemfunc_type): Likewise.
14984         (grokdeclarator): Likewise.
14985         * decl2.c (grok_x_components): Likewise.
14986         * except.c (call_eh_info): Likewise.
14987         * init.c (init_init_processing): Likewise.
14988         * rtti.c (expand_class_desc): Likewise.
14989         (create_pseudo_type_info): Likewise.
14990         (get_vmi_pseudo_type_info): Likewise.
14991         (create_tinfo_types): Likewise.
14992         * ptree.c (print_lang_decl): Adjust.
14993         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
14994         before checking DECL_MUTABLE_P.
14995
14996         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
14997         parameters for template functions.
14998         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
14999         destructors as well as constructors.
15000
15001 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
15002
15003         * class.c (build_ctor_vtbl_group): Set inits.
15004         * optimize.c (maybe_clone_body): Set DECL_INLINE and
15005         DECL_THIS_INLINE appropriately for clones.
15006
15007         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
15008         (DECL_CONV_FN_P): Simplify.
15009         (DECL_OPERATOR): Remove.
15010         (language_to_string): Declare.
15011         * decl.c (duplicate_decls): Fix typo in comment.
15012         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
15013         (grok_op_properties): Use DECL_CONV_FN_P instead of
15014         IDENTIFIER_TYPENAME_P.
15015         * dump.c (dequeue_and_dump): Dump the language linkage of
15016         declarations.
15017         * error.c (language_to_string): Give it external linkage.
15018         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
15019         (implicitly_declare_fn): Set DECL_LANGUAGE.
15020         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
15021         IDENTIFIER_TYPENAME_P.
15022         (tsubst_decl): Likewise.
15023         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
15024         * semantics.c (finish_member_declaration): Don't mark members of
15025         classes declared in an extern "C" region as extern "C".
15026
15027 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15028
15029         * decl2.c (qualified_lookup_using_namespace): Look through
15030         namespace aliases.
15031
15032         * decl.c (push_using_decl): Return the old decl on namespace level.
15033
15034 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
15035
15036         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
15037         (VTT_NAME_PREFIX): New macro.
15038         (CTOR_VTBL_NAME_PREFIX): Likewise.
15039         (get_ctor_vtbl_name): New function.
15040         * class.c (get_vtable_name): Simplify.
15041         (get_vtt_name): New function.
15042         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
15043         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
15044         when a virtual base becomes primary.
15045         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
15046         VTTs.
15047         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
15048         additional parameters.
15049         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
15050         (initialize_array): New function.
15051         (build_vtt): Likewise.
15052         (build_vtt_inits): Likewise.
15053         (dfs_build_vtt_inits): Likewise.
15054         (dfs_fixup_binfo_vtbls): Likewise.
15055         (build_ctor_vtbl_group): Likewise.
15056         (initialize_vtable): Use initialize_array.
15057         (accumulate_vtbl_inits): Reimplement to handle construction
15058         vtables.
15059         (dfs_accumulate_vtbl_inits): Likewise.
15060         (bulid_vtbl_initializer): Adjust parameter name.
15061         * method.c (build_typename_overload): Remove #if 0'd code.
15062         (get_ctor_vtbl_name): New function.
15063         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
15064         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
15065
15066         * cp-tree.h (struct lang_type): Remove search_slot.
15067         (CLASSTYPE_SEARCH_SLOT): Remove.
15068         (emit_base_init): Change prototype.
15069         (initialize_vtbl_ptrs): Likewise.
15070         (expand_indirect_vtbls_init): Likewise.
15071         (clear_search_slots): Remove.
15072         * decl.c (lang_mark_tree): Don't mark search_slot.
15073         * init.c (initialize_vtbl_ptrs): Simplify.
15074         (emit_base_init): Likewise.
15075         * search.c (struct vbase_info): Document decl_ptr.
15076         (convert_pointer_to_single_level): Remove.
15077         (dfs_find_vbases): Remove.
15078         (dfs_init_base_pointers): Simplify.
15079         (dfs_clear_vbase_slots): Remove.
15080         (dfs_vtable_path_unmark): New function.
15081         (init_vbase_pointers): Simplify.
15082         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
15083         (expand_indirect_vtbls_init): Simplify.  Don't call
15084         mark_all_temps_used.
15085         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
15086         initialize_vtbl_ptrs.
15087
15088 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
15089
15090         * except.c: Add static prototypes.
15091
15092 2000-05-20  H.J. Lu  <hjl@gnu.org>
15093
15094         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
15095
15096 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
15097
15098         Don't create a separate copy of virtual bases for the
15099         CLASSTYPE_VBASECLASSES list.
15100         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
15101         (BINFO_FOR_VBASE): Remove.
15102         (CANONICAL_BINFO): Adjust.
15103         (binfo_for_vbase): New function.
15104         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
15105         instead of BINFO_FOR_VBASE.
15106         (build_vbase_pointer): Likewise.
15107         (build_secondary_vtable): Likewise.
15108         (dfs_mark_primary_bases): Likewise.
15109         (mark_primary_bases): Likewise.
15110         (layout_nonempty_base_or_field): Likewise.
15111         (dfs_set_offset_for_shared_vbases): Likewise.
15112         (dfs_set_offset_for_unshared_vbases): Likewise.
15113         (layout_virtual_bases): Likewise.  Adjust for changes to the
15114         CLASSTYPE_VBASECLASSES list.
15115         (dump_class_hierarchy_r): Use binfo_for_vbase
15116         instead of BINFO_FOR_VBASE.
15117         (dump_class_hierarchy): Likewise.
15118         (finish_vtbls): Likewise.
15119         (build_vtbl_initializer): Adjust for changes to the
15120         CLASSTYPE_VBASECLASSES list.
15121         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
15122         * decl.c (finish_destructor_body): Adjust for changes to the
15123         CLASSTYPE_VBASECLASSES list.
15124         * init.c (sort_base_init): Use binfo_for_vbase.
15125         (construct_virtual_bases): Adjust for changes to the
15126         CLASSTYPE_VBASECLASSES list.
15127         (expand_member_init): Use binfo_for_vbase.
15128         (build_vbase_delete):  Adjust for changes to the
15129         CLASSTYPE_VBASECLASSES list.
15130         * method.c (do_build_copy_constructor): Likewise.
15131         * rtti.c (get_base_offset): Use binfo_for_vbase.
15132         (expand_class_desc): Remove #if 0'd code.
15133         * search.c (struct vbase_info): Remove vbase_types.
15134         (get_base_distance):  Use binfo_for_vbase.
15135         (lookup_field_queue_p): Use CANONICAL_BINFO.
15136         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
15137         (get_pure_virtuals): Adjust for changes to the
15138         CLASSTYPE_VBASECLASSES list.
15139         (dfs_find_vbases): Use binfo_for_vbase.
15140         (dfs_init_vbase_pointers): Likewise.
15141         (init_vbase_pointers): Don't initialize vi.vbase_types.
15142         (virtual_context): Use binfo_for_vbase.
15143         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
15144         CLASSTYPE_VBASECLASSES list.
15145         (expand_indirect_vtbls_init): Simplify.
15146         (dfs_get_vbase_types): Don't replicate virtual bases.
15147         (find_vbase_instance): Use binfo_for_vbase.
15148         (binfo_for_vbase): New function.
15149         * typeck.c (get_delta_difference): Use binfo_for_vbase.
15150
15151 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
15152
15153         * decl2.c (finish_anon_union): Generalize error messages to handle
15154         anonymous structures.
15155         * init.c (perform_member_init): Remove `name' parameter.
15156         (build_field_list): New function.
15157         (sort_member_init): Handle anonymous union initialization order
15158         correctly.  Check for multiple initializations of the same union.
15159         (emit_base_init): Don't look up fields by name here.
15160         (expand_member_init): Record the result of name lookup for future
15161         reference.
15162         * typeck.c (build_component_ref): Fix formatting.
15163
15164 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
15165
15166         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
15167         * typeck.c (build_x_compound_expr): Replace warn_unused with
15168         warn_unused_value.
15169
15170         * decl2.c (lang_decode_option): Update -Wall unused flags by
15171         calling set_Wunused.
15172
15173 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
15174
15175         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
15176         * init.c (dfs_vtable_path_unmark): Remove.
15177         * search.c (marked_new_vtable_p): Likewise.
15178         (unmarked_new_vtable_p): Likewise.
15179         (dfs_search_slot_nonempty_p): Likewise.
15180         (dfs_mark): Likewise.
15181         (dfs_vtable_path_unmark): Likewise.
15182         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
15183         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
15184         (dfs_init_vbase_pointers): Remove special-case new ABI code.
15185         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
15186         (init_vbase_pointers): Simplify.
15187         (expand_indirect_vtbls_init): Likewise.
15188
15189         * class.c (copy_virtuals): New function.
15190         (build_primary_table): Use it.
15191         (build_secondary_vtable): Likewise.
15192         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
15193         indicate that no vcall offset is required.
15194         (add_virtual_function): Likewise.
15195         (modify_all_vtables): Likewise.
15196         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
15197         (dfs_accumulate_vtbl_inits): Likewise.
15198         (build_vtbl_initializer): Make changes to handle construction
15199         vtables.
15200         (dfs_build_vcall_offset_vtbl_entries): Likewise.
15201         (build_rtti_vtbl_entries): Likewise.
15202         (build_vtable_entries): Handle a NULL vcall_index.
15203
15204 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
15205
15206         * decl2.c (lang_decode_option): Fix thinko.
15207
15208 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
15209
15210         * except.c (check_handlers): New fn.
15211         * cp-tree.h: Declare it.
15212         * semantics.c (finish_handler_sequence): Call it.
15213         (finish_function_handler_sequence): Likewise.
15214         (finish_handler_parms): Set TREE_TYPE on the handler.
15215         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
15216         * search.c (get_base_distance_recursive): If protect>1, ignore
15217         special access.
15218         (get_base_distance): Don't reduce watch_access.
15219
15220 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
15221
15222         * lex.c: #include diagnostic.h.
15223         (lang_init_options): Set default prefixing rules.
15224
15225         * lang-options.h: Add -fdiagnostics-show-location=.
15226
15227         * decl2.c: #include diagnostic.h.
15228         (lang_decode_option): Handle -fdiagnostics-show-location=.
15229
15230 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
15231
15232         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
15233         * vec.cc: Revert my 2000-05-07 change.
15234
15235 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
15236
15237         * class.c (check_field_decls): Complain about non-static data
15238         members with same name as class in class with constructor.
15239
15240 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
15241
15242         * decl.c (grokdeclarator): Allow non-static data members with
15243         same name as class.
15244
15245 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
15246
15247         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
15248         and pending_inline.filename.  Update prototypes.
15249         * decl.c (define_label): Constify filename parameter.
15250         * decl2.c (warn_if_unknown_interface): Constify local char *.
15251         * input.c Constify input_source.filename. Don't declare
15252         input_filename or lineno.  Constify filename parameter to feed_input.
15253         * lex.c (init_parse): Constify parameter and return value.
15254         (cp_pragma_interface, cp_pragma_implementation): Constify
15255         filename argument.
15256         (reinit_parse_for_method, reinit_parse_for_block,
15257         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
15258         Constify local char *.
15259         * pt.c: Don't declare lineno or input_filename.
15260         (print_template_context, tsubst_friend_function, tsubst_decl,
15261         tsubst, instantiate_decl): Constify local char *.
15262         * semantics.c (expand_body): Constify local char *.
15263         * tree.c (build_srcloc): Constify filename parameter.
15264         * typeck.c (c_expand_asm_operands): Constify filename
15265         parameter.
15266
15267 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
15268
15269         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
15270         offsetof expansion.
15271
15272 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
15273
15274         * inc/cxxabi.h:  Fix typos in comment.
15275         (__base_class_info::__offset): Use a static_cast.
15276
15277 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
15278
15279         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
15280         of std::size_t and std::ptrdiff_t respectively.
15281         * tinfo.cc: Likewise.
15282         * vec.cc: Likewise.
15283
15284 2000-05-06  Richard Henderson  <rth@cygnus.com>
15285
15286         * typeck.c (build_c_cast): Don't warn integer->pointer size
15287         mismatch for constants.
15288
15289 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
15290
15291         * rtti.c (ptmd_initializer): Set non-public, if class is
15292         incomplete.
15293
15294         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
15295         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
15296         __cxa_vec_delete): Likewise.
15297         * tinfo.cc (__dynamic_cast): Likewise.
15298         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
15299         __cxa_vec_delete): Likewise.
15300
15301 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
15302
15303         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
15304         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
15305         (lang_decl_flags): Add vcall_offset.
15306         (THUNK_VCALL_OFFSET): Use it.
15307         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
15308         * method.c (make_thunk): Create the lang_decl here, not in
15309         emit_thunk.
15310         (emit_thunk): Make generic thunks into ordinary functions once
15311         they have been fed to expand_body.
15312         * semantics.c (expand_body): Set current_function_is_thunk here.
15313
15314 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15315
15316         * class.c (update_vtable_entry_for_fn): Prototype.
15317
15318         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
15319         and `tmpl'.
15320
15321         * search.c (dfs_build_inheritance_graph_order): Prototype.
15322
15323 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
15324
15325         * cp-tree.h (special_function_kind): Add various kinds of
15326         destructors.
15327         (special_function_p): New function.
15328         * class.c (overrides): Don't let one kind of destructor override
15329         another.
15330         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
15331         whether or not to instantiate a template.
15332         * tree.c (special_function_p): Define.
15333
15334 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
15335
15336         * cp-tree.def (THUNK_DECL): Remove.
15337         * cp-tree.h (DECL_THUNK_P): New macro.
15338         (DECL_NON_THUNK_FUNCTION_P): Likewise.
15339         (DECL_EXTERN_C_FUNCTION_P): Likewise.
15340         (SET_DECL_THUNK_P): Likewise.
15341         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
15342         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
15343         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
15344         * decl.c (decls_match): Use DECL_EXTERN_C_P.
15345         (duplicate_decls): Likewise.
15346         (pushdecl): Likewise.  Adjust thunk handling.
15347         (grokfndecl): Use DECL_EXTERN_C_P.
15348         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
15349         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
15350         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
15351         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
15352         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
15353         DECL_NO_STATIC_CHAIN.
15354         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
15355         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
15356         * search.c (covariant_return_p): Remove THUNK_DECL handling.
15357         * ir.texi: Update.
15358
15359 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
15360
15361         * tree.c (walk_tree): Set lineno.
15362
15363 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
15364
15365         * exception.cc: Update license notice.
15366         * new.cc: Likewise.
15367         * new1.cc: Likewise.
15368         * new2.cc: Likewise.
15369         * tinfo.cc: Likewise.
15370         * tinfo2.cc: Likewise.
15371         * vec.cc: Likewise.
15372         * inc/cxxabi.h: Likewise.
15373         * inc/exception: Likewise.
15374         * inc/new: Likewise.
15375         * inc/new.h: Likewise.
15376         * inc/typeinfo: Likewise.
15377
15378 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
15379
15380         * tree.c (build_target_expr_with_type): If we already have a
15381         TARGET_EXPR, just return it.
15382
15383         * optimize.c (initialize_inlined_parameters): Don't generate an
15384         EXPR_STMT if we can just use DECL_INITIAL.
15385         * decl.c (emit_local_var): Only make the initialization a
15386         full-expression if stmts_are_full_exprs_p.
15387
15388 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
15389
15390         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
15391         macro.
15392         * call.c (standard_conversion): Use it.
15393         (direct_reference_binding): Likewise.
15394         (build_over_call): Likewise.
15395         (is_properly_derived_from): Likewise.
15396         (compare_ics): Likewise.
15397         * class.c (resolves_to_fixed_type_p): Likewise.
15398         * optimize.c (declare_return_variable): Likewise.
15399         * pt.c (is_specialization_of): Likewise.
15400         (unify): Likewise.
15401         * typeck.c (comp_target_parms): Likeiwse.
15402         (build_static_cast): Likewise.
15403         (build_reinterpret_cast): Likewise.
15404         (build_const_cast): Likewise.
15405         (comp_ptr_ttypes_real): Likewise.
15406         (comp_ptr_ttypes_const): Likewise.
15407         * typeck2.c (process_init_constructor): Likewise.
15408
15409 2000-04-30  Scott Snyder <snyder@fnal.gov>
15410
15411         * decl.c (finish_destructor_body): Use the base destructor when
15412         destroying virtual bases.
15413
15414 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
15415
15416         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
15417         STMT_EXPRs.
15418         * optimize.c (struct inline_data): Add target_exprs field.
15419         (declare_return_variable): When a function returns an aggregate,
15420         use the variable declared in the TARGET_EXPR as the remapped
15421         DECL_RESULT.
15422         (expand_call_inline): Update the pending target_exprs stack.
15423         (optimize_function): Initialize the stack.
15424
15425         * decl2.c (finish_file): Fix typo in comment.
15426
15427         * method.c (emit_thunk): Don't try to return a `void' value.
15428
15429         * optimize.c (initialize_inlined_parameters): If the parameter is
15430         addressable, we need to make a new VAR_DECL, even if the
15431         initializer is constant.
15432
15433 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
15434
15435         * decl.c (grok_op_properties): Add an extra check of argtypes.
15436
15437 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
15438
15439         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
15440         variables.
15441         (initialize_inlined_parameters): Try to avoid creating new
15442         VAR_DECLs.
15443
15444 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
15445
15446         * lex.c (my_get_run_time): Remove.
15447         (init_filename_times): Use get_run_time instead of my_get_run_time.
15448         (check_newline): Likewise.
15449         (dump_time_statistics): Likewise.
15450         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
15451         of computing elapsed time explicitly.
15452
15453 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
15454
15455         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
15456         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
15457         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
15458         before calling decl_constant_value.
15459         * class.c (check_bitfield_decl): Likewise.
15460         * cvt.c (ocp_convert): Likewise.
15461         (convert): Likewise.
15462         * decl.c (compute_array_index_type): Likewise.
15463         (build_enumerator): Likewise.
15464         * decl2.c (check_cp_case_value): Likewise.
15465         * pt.c (convert_nontype_argument): Likewise.
15466         (tsubst): Likewise.
15467         * typeck.c (decay_conversion): Likewise.
15468         (build_compound_expr): Likewise.
15469         (build_reinterpret_cast): Likewise.
15470         (build_c_cast): Likewise.
15471         (convert_for_assignment): Likewise.
15472
15473 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
15474
15475         * decl.c (finish_function): Don't play games with DECL_INLINE.
15476
15477 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
15478
15479         * ir.texi: Correct typo.
15480
15481 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15482
15483         * decl.c (grokdeclarator): Reject VLAs as members.
15484
15485 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
15486
15487         * call.c (standard_conversion): Accept conversion between
15488         COMPLEX_TYPEs.
15489
15490         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
15491
15492 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
15493
15494         * decl2.c (finish_file): Remove double setup for accounting
15495         compile time.
15496
15497 2000-04-24  Robert Lipe <robertlipe@usa.net>
15498
15499         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
15500
15501 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
15502
15503         * new.cc (set_new_handler): Needs to be in std::.
15504
15505 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
15506
15507         * cp-tree.h (lang_decl): Remove pretty_function_p.
15508         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
15509         language-specific node.
15510         * decl.c (cp_make_fname_decl): Use build_decl, not
15511         build_lang_decl, to build the variables.
15512         (grokvardecl): Don't call build_lang_decl for local variables in
15513         templates.
15514         (grokdeclarator): Don't call build_lang_decl for local type
15515         declarations in templates.
15516         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
15517         zero'd memory, rather than calling memset.
15518         * pt.c: Include hashtab.h.
15519         (local_specializations): New variable.
15520         (retrieve_local_specialization): Use it.
15521         (register_local_specialization): Likewise.
15522         (tsubst_decl): Don't assume local variables have
15523         DECL_LANG_SPECIFIC.
15524         (instantiate_decl): Set up local_specializations.
15525         * Makefile.in (HTAB_H): New variable.
15526
15527 2000-04-23  Richard Henderson  <rth@cygnus.com>
15528
15529         * typeck.c (c_expand_asm_operands): Restore the original
15530         contents of the output list.
15531
15532 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
15533
15534         * ir.texi:  Document complex number representation.
15535
15536 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
15537
15538         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
15539         (target_incomplete_p): New function.
15540         (tinfo_base_init): Create comdat NTBS name variable.
15541         (ptr_initializer): Add non_public parameter. Calculate it.
15542         (ptmd_initializer): Likewise.
15543         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
15544         (create_real_tinfo_var): Add non_public parameter. Use it.
15545         Push proxy into global namespace.
15546         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
15547         New enumeration.
15548         * inc/typeinfo (type_info::before, type_info::operator==):
15549         Compare __name addresses.
15550
15551         * tinfo2.cc: Remove new-abi builtins comment.
15552
15553 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
15554
15555         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
15556
15557         * call.c (joust): Exit early if we get the same function, too.
15558
15559         * decl2.c (key_method): Return NULL_TREE for template classes.
15560         (import_export_class): Don't need to check for template classes.
15561
15562 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
15563
15564         * lex.c: Remove references to cccp.c.
15565
15566 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
15567
15568         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
15569         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
15570         (DECL_DESTRUCTOR_P): Use destructor_attr.
15571         (DECL_CONST_MEMFUNC_P): Reimplement.
15572         (DECL_VOLATILE_MEMFUNC_P): Remove.
15573         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
15574         (overrides): Use DECL_DESTRUCTOR_P.
15575         (check_for_override): Likewise.
15576         * decl.c (start_function): Likewise.
15577         * decl2.c (grokfclassfn): Likewise.
15578         (check_classfn): Likewise.
15579         (grok_function_init): Likewise.
15580
15581 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
15582
15583         * decl2.c (grokfield): Issue error on illegal data member
15584         declaration.
15585
15586 2000-04-17  Mark P Mitchell  <mark@codesourcery.com>
15587
15588         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
15589
15590 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
15591
15592         * class.c (build_vtable_entry): Don't build thunks for type-info
15593         functions.
15594
15595 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
15596
15597         * decl.c (decls_match): Allow a redeclaration of a builtin to
15598         specify args while the builtin did not.
15599
15600 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
15601
15602         * cp-tree.def (THUNK_DECL): Add to documentation.
15603         * cp-tree.h (flag_huge_objects): Declare.
15604         * class.c (modify_vtable_entry): Tidy.
15605         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
15606         Calculate delta appropriately for the new ABI.
15607         (dfs_modify_vtables): Use it.
15608         (modify_all_vtables): Fix thinko in code to add overriding copies
15609         of functions to primary vtables.
15610         (build_clone): Fix typo in comment.
15611         (clone_function_decl): Correct order of destructors in vtable.
15612         (build_vbase_offset_vtbl_entries): Adjust comment.
15613         (dfs_vcall_offset_queue_p): Remove.
15614         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
15615         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
15616         (build_vtable_entry): Correct check for pure virtual functions.
15617         Don't declare flag_huge_objects.
15618         * decl.c (flag_huge_objects): Remove declaration.
15619         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
15620         Use int_size_in_bytes.
15621         (emit_thunk): Handle vcall offset thunks.
15622
15623 2000-04-15  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15624
15625         * decl2.c (parse_time, varconst_time): Delete declarations.
15626         (finish_file): Delete LINENO declaration.
15627         START_TIME and THIS_TIME now long.
15628
15629 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
15630
15631         * class.c (build_base_field): Reformat comment.
15632
15633         * inc/cxxabi.h (stddef.h): Comment inclusion.
15634         (__base_class_info::__offset): Comment shift.
15635
15636 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
15637
15638         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
15639         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
15640         (cp_push_exception_identifier): New macro.
15641         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
15642         (DECL_BASE_DESTRUCTOR_P): Likewise.
15643         (DECL_DELETING_DESTRUCTOR_P): Likewise.
15644         (get_vtbl_decl_for_binfo): Fix formatting.
15645         (in_charge_arg_for_name): New macro.
15646         (maybe_build_cleanup_and_delete): Remove declaration.
15647         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
15648         (in_charge_arg_for_name): New function.
15649         (build_new_method_call): Use it.  Handle cloned destructors.
15650         (build_clone): Don't make the base constructor virtual.
15651         Automatically defer generated functions.
15652         (clone_function_decl): Handle destructors, too.
15653         (clone_constructors_and_destructors): Likewise.
15654         (create_vtable_ptr): Don't create a vtable entry for a cloned
15655         function.
15656         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
15657         (initialize_predefined_identifiers): Update appropriately.
15658         (finish_destructor_body): Simplify.
15659         (maybe_build_cleanup_and_delete): Remove.
15660         * except.c (expand_throw): Handle new-ABI destructors.
15661         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
15662         (build_dtor_call): New function.
15663         (build_delete): Use it.  Simplify.
15664         * optimize.c (maybe_clone_body): Handle destructors.
15665         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
15666
15667         * exception.cc (cleanup_fn): New typedef.
15668         (CALL_CLEANUP): New macro.
15669         (cp_eh_info): Use them.
15670         (__cp_push_exception): Likewise.
15671         (__cp_pop_exception): Likewise.
15672
15673 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
15674
15675         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
15676         (complete_dtor_identifier): New macro.
15677         (CLASSTYPE_FIRST_CONVERSION): Remove.
15678         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
15679         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
15680         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
15681         (CLASSTYPE_CONSTRUCTORS): Likewise.
15682         (CLASSTYPE_DESTRUCTORS): Likewise.
15683         (lang_decl): Add cloned_function.
15684         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
15685         (DECL_BASE_CONSTRUCTOR_P): Likewise.
15686         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
15687         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
15688         (DECL_CLONED_FUNCTION_P): Likewise.
15689         (DECL_CLONED_FUNCTION): Likewise.
15690         (clone_function_decl): Declare.
15691         (maybe_clone_body): Likewise.
15692         * call.c (build_user_type_conversion_1): Call complete object
15693         constructors in the new ABI.
15694         (build_new_method_call): Don't add in-charge parameters under the
15695         new ABI.
15696         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
15697         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
15698         CLASSTYPE_DESTRUCTOR_SLOT.
15699         (build_clone): New function.
15700         (clone_function_decl): Likewise.
15701         (clone_constructors_and_destructors): Likewise.
15702         (check_bases_and_members): Use it.
15703         * decl.c (iniitialize_predefined_identifiers): Initialize
15704         complete_dtor_identifier.
15705         (finish_function): Don't add extra code to a clone.
15706         (lang_mark_tree): Mark cloned_function.
15707         * decl2.c (mark_used): Don't bother trying to instantiate things
15708         we synthesized.
15709         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
15710         * method.c (set_mangled_name_for_decl): Don't treat clones as
15711         constructors.
15712         (synthesize_method): Sythesize cloned functions, not the clones.
15713         * optimize.c (inline_data): Update comment on ret_label.
15714         (remap_block): Don't assume DECL_INITIAL exists.
15715         (copy_body_r): Allow ret_label to be NULL.
15716         (maybe_clone_body): Define.
15717         * pt.c (tsubst_decl): Handle clones.
15718         (instantiate_clone): New function.
15719         (instantiate_template): Use it.
15720         (set_mangled_name_for_template_decl): Don't treat clones as
15721         constructors.
15722         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
15723         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
15724         * semantics.c (expand_body): Clone function bodies as necessary.
15725
15726         * optimize.c (remap_decl): Avoid sharing structure for arrays
15727         whose size is only known at run-time.
15728         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
15729
15730         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
15731         to has_in_charge_parm_p.
15732         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
15733         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
15734         (DECL_COPY_CONSTRUCTOR_P): New macro.
15735         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
15736         (build_user_type_conversion_1): Likewise.
15737         (convert_like_real): Likewise.
15738         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
15739         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
15740         (copy_args_p): Likewise.
15741         (grok_ctor_properties): Likewise.
15742         (start_function): Likewise.
15743         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
15744         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
15745         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
15746         * method.c (do_build_copy_constructor): Use
15747         DECL_HAS_IN_CHARGE_PARM_P.
15748         (synthesize_method): Likewise.
15749         * pt.c (instantiate_template): Remove goto.
15750         * tree.c (build_cplus_method_type): Remove mention of obstacks in
15751         comment.
15752
15753         * cp-tre.h (finish_function): Change prototype.
15754         * decl.c (end_cleanup_fn): Adjust caller.
15755         (finish_function): Take only one parameter.
15756         * decl2.c (finish_objects): Adjust caller.
15757         (finish_static_storage_duration_function): Likewise.
15758         * method.c (emit_thunk): Likewise.
15759         * parse.y: Likewise.
15760         * parse.c: Regenerated.
15761         * pt.c (instantiate_decl): Likewise.
15762         * rtti.c (synthesize_tinfo_fn): Likewise.
15763         * semantics.c (expand_body): Likewise.
15764
15765         * cp-tree.h (copy_decl): New function.
15766         * class.c (finish_struct_1): Use it.
15767         * lex.c (copy_decl): Define it.
15768         * pt.c (tsubst_decl): Likewise.
15769         * tree.c (copy_template_template_parm): Likewise.
15770
15771         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
15772         has_nonpublic_assign_ref.
15773         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
15774         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
15775         * class.c (finish_struct_methods): Don't set
15776         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
15777         (interface_only): Don't declare.
15778         (interface_unknown): Likewise.
15779
15780 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15781
15782         * tree.h (HAVE_TEMPLATES): Remove definition.
15783         * lang-options.h (-fthis-is-variable): Remove documentation.
15784
15785 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
15786
15787         * class.c (instantiate_type): Handle object-relative template-id.
15788
15789         * semantics.c (finish_expr_stmt): Call convert_to_void here.
15790         * decl.c (cplus_expand_expr_stmt): Not here.
15791
15792         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
15793         Initialize exprtype earlier.
15794
15795         * parse.y (fn.def1): Check for defining types in return types.
15796
15797         * decl.c (check_tag_decl): Notice extra fundamental types.
15798         Diagnose empty decls in classes, too.
15799
15800         * decl.c (grokdeclarator): Don't override an anonymous name if no
15801         declarator was given.
15802
15803         * cvt.c (convert_to_void): Call resolve_offset_ref.
15804
15805         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
15806
15807         * decl2.c (decl_namespace): Handle getting a type.
15808
15809         * typeck.c (build_c_cast): Re-enable warning for cast between
15810         pointer and integer of different size.
15811
15812 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
15813
15814         * inc/cxxabi.h (__pointer_type_info): Add restrict and
15815         incomplete flags.
15816         (__pointer_type_info::__pointer_catch): New virtual function.
15817         (__pointer_to_member_type_info): Derive from
15818         __pointer_type_info. Adjust.
15819         (__pointer_to_member_type_info::__do_catch): Remove.
15820         (__pointer_to_member_type_info::__is_pointer_p): Declare.
15821         (__pointer_to_member_type_info::__pointer_catch): Declare.
15822         * rtti.c (qualifier_flags): Add restrict flag.
15823         (ptmd_initializer): Reorder members.
15824         (create_tinfo_types): Expand comments. Reorder
15825         ptmd_desc_type_node members.
15826         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
15827         Implement.
15828         (__pointer_type_info::__do_catch): Move specific code into
15829         __pointer_catch. Call it.
15830         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
15831         specific catch checking. Fix void conversion check.
15832         (__pointer_to_member_type_info::__do_catch): Remove.
15833         (__pointer_to_member_type_info::__pointer_catch): Implement.
15834
15835 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15836
15837         * lex.c (init_parse): Remove traces of classof and headof.
15838         * decl2.c (flag_operator_names): Default to 1.
15839         (lang_decode_option): Do not set it for -ansi.
15840
15841 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
15842
15843         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
15844         (DECL_MAIN_VARIANT): Remove.
15845         * decl.c (duplicate_decls): Don't set it.
15846         (start_function): Likewise.
15847         (lang_mark_tree): Don't mark it.
15848         * decl2.c (defer_fn): Don't use it.
15849         * lex.c (retrofit_lang_decl): Don't set it.
15850         * pt.c (tsubst_decl): Likewise.
15851         * ptree.c (print_lang_decl): Don't print it.
15852         * typeck.c (mark_addressable): Don't use it.
15853
15854 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
15855
15856         * vec.cc: Include <new> and <exception>.
15857         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
15858         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
15859         terminate.
15860         (__cxa_vec_delete): Catch dtor exceptions.
15861
15862 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
15863
15864         Prepend __ to implementation defined names.
15865         * inc/typeinfo (type_info): Rename _name to __name.
15866         (type_info::type_info): Rename parameter.
15867         (type_info::operator==, type_info::operator!=,
15868         type_info::before): Likewise.
15869         (type_info::is_pointer_p, type_info::is_function_p,
15870         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
15871         parameters.
15872         * inc/cxxabi.h
15873         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
15874         (__pointer_type_info::__pointer_type_info): Likewise.
15875         (__pointer_type_info::is_pointer_p,
15876         __pointer_type_info::do_catch): Prepend __. Rename parameters.
15877         (__array_type_info::__array_type_info): Rename parameters.
15878         (__function_type_info::__function_type_info): Likewise.
15879         (__function_type_info::is_function_p): Prepend __.
15880         (__enum_type_info::__enum_type_info): Rename parameters.
15881         (__pointer_to_member_type_info::__pointer_to_member_type_info):
15882         Likewise.
15883         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
15884         parameters.
15885         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
15886         (__class_type_info::__class_type_info): Rename parameters.
15887         (__class_type_info::sub_kind): Prepend __. Adjust member names.
15888         (__class_type_info::upcast_result,
15889         __class_type_info::dyncast_result): Prepend __. Move definition
15890         into tinfo.cc.
15891         (__class_type_info::do_upcast, __class_type_info::do_catch,
15892         __class_type_info::find_public_src,
15893         __class_type_info::do_dyncast,
15894         __class_type_info::do_find_public_src): Prepend __. Rename
15895         parameters.
15896         (__si_class_type_info::__si_class_type_info): Rename parameters.
15897         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
15898         __si_class_type_info::do_find_public_src): Prepent __. Rename
15899         parameters.
15900         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
15901         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
15902         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
15903         parameters.
15904         (__dynamic_cast): Rename parameters.
15905         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
15906         type_info::do_catch, type_info::do_upcast): Prepend __.
15907         (contained_p, public_p, virtual_p, contained_public_p,
15908         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
15909         (__class_type_info::do_catch,
15910         __class_type_info::do_upcast): Prepend __. Adjust.
15911         (__class_type_info::__upcast_result,
15912         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
15913         Adjust.
15914         (__class_type_info::find_public_src): Prepend __. Adjust.
15915         (__class_type_info::do_find_public_src,
15916         __si_class_type_info::do_find_public_src,
15917         __vmi_class_type_info::do_find_public_src): Likewise.
15918         (__class_type_info::do_dyncast,
15919         __si_class_type_info::do_dyncast,
15920         __vmi_class_type_info::do_dyncast): Likewise.
15921         (__class_type_info::do_upcast,
15922         __si_class_type_info::do_upcast,
15923         __vmi_class_type_info::do_upcast): Likewise.
15924         (__dynamic_cast): Adjust.
15925         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
15926         (__function_type_info::is_function_p): Likewise.
15927         (__pointer_type_info::do_catch): Likewise. Adjust.
15928         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
15929         (__throw_type_match_rtti_2): Adjust.
15930         (__is_pointer): Adjust.
15931
15932 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
15933
15934         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
15935         (complete_ctor_identifier): New macro.
15936         (special_function_kind): Add sfk_copy_constructor and
15937         sfk_assignment_operator.
15938         (LOOKUP_HAS_IN_CHARGE): Remove.
15939         (cons_up_default_function): Rename to ...
15940         (implicitly_declare_fn): ... this.
15941         * call.c (build_new_method_call): Add in-charge parameters for
15942         constructors here.
15943         * class.c (add_implicitly_declared_members): Change parameter name
15944         from cant_have_assignment to cant_have_const_assignment.
15945         Replace calls to cons_up_default_function to implicitly_declare_fn.
15946         * cvt.c (ocp_convert): Use complete_ctor_identifier.
15947         * decl.c (initialize_predefined_identifiers): Initialize it.
15948         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
15949         complex expression.
15950         * init.c (expand_default_init): Don't calculate the in-charge
15951         parameter here.
15952         (build_new_1): Likewise.
15953         * lex.c (cons_up_default_function): Move to method.c.
15954         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
15955         (implicitly_declare_fn): New function.
15956         * typeck.c (build_static_cast): Use complete_ctor_identifier.
15957         (build_modify_expr): Likewise.
15958         * typeck2.c (build_functional_cast): Likewise.
15959
15960         Under the new ABI, constructors don't return `this'.
15961         * cp-tree.h (warn_reorder): Declare.
15962         (special_function_kind): New enum.
15963         (global_base_init_list): Remove declaration.
15964         (emit_base_init): Don't return a value.
15965         (check_base_init): Don't declare.
15966         (is_aggr_typedef): Likewise.
15967         * decl.c (check_special_function_return_type): New function.
15968         (return_types): Remove.
15969         (grokdeclarator): Use check_special_function_return_type.
15970         (start_function): Don't initialize ctor_label under the new ABI.
15971         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
15972         * init.c (begin_init_stmts): Move to top of file.
15973         (finish_init_stmts): Likewise.
15974         (warn_reorder): Don't declare.
15975         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
15976         value.
15977         (check_base_init): Remove.
15978         (is_aggr_typedef): Likewise.
15979         (build_new_1): Don't use the return value of a constructor.
15980         * semantics.c (setup_vtbl_ptr): Don't use the return value
15981         of emit_base_init.
15982         * typeck.c (check_return_expr): Don't magically convert return
15983         statements into `return this' in constructors under the new ABI.
15984
15985         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
15986         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
15987         (base_ctor_identifier): New macro.
15988         (base_dtor_identifier): Likewise.
15989         (deleting_dtor_identifier): Likewise.
15990         * decl.c: Don't include obstack.h.
15991         (obstack_chunk_alloc): Don't define.
15992         (obstack_chunk_free): Likewise.
15993         (struct predefined_identifier): New type.
15994         (initialize_predefined_identifiers): New function.
15995         (init_decl_processing): Use it.
15996         (debug_temp_inits): Remove.
15997         (start_method): Don't call preserve_data.
15998         (hack_incomplete_structures): Update comment.
15999         * init.c (init_init_processing): Don't initialize
16000         nelts_identifier.
16001         (build_offset_rf): Remove dead code.
16002         (build_delete): Use CLASSTYPE_N_BASECLASSES.
16003         * search.c (init_search_processing): Don't initialize
16004         vptr_identifier.
16005
16006 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16007
16008         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
16009         some sign_compare warnings.
16010
16011 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
16012
16013         Rename abi::__vmi_class_type_info members.
16014         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
16015         base_list, detail_masks members to vmi_flags, vmi_base_count,
16016         vmi_bases and vmi_flags_masks respectively.
16017         (__vmi_class_type_info::vmi_flags_masks): Rename
16018         details_unknown_mask to flags_unknown_mask.
16019         * tinfo.cc (__class_type_info::do_upcast): Adjust.
16020         (__vmi_class_type_info::do_find_public_src): Adjust.
16021         (__vmi_class_type_info::do_dyncast): Adjust.
16022         (__vmi_class_type_info::do_upcast): Adjust.
16023
16024 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
16025
16026         * tinfo.cc (convert_to_base): New function.
16027         (get_vbase_offset): Remove. Move into convert_to_base.
16028         (__vmi_class_type_info::do_find_public_src): Adjust.
16029         (__vmi_class_type_info::do_dyncast): Adjust.
16030         (__vmi_class_type_info::do_upcast): Adjust.
16031
16032 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
16033
16034         * tinfo.cc (operator=): Use __builtin_strcmp.
16035         * tinfo2.cc (before): Likewise.
16036
16037 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
16038
16039         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
16040         (DECL_SAVED_INLINE): Rename to ...
16041         (DECL_DEFERRED_FN): ... this.
16042         (in_function_p): Remove declaration.
16043         (mark_inline_for_output): Rename to ...
16044         (defer_fn): ... this.
16045         * decl.c (finish_function): Adjust call to mark_inline_for_output.
16046         (in_function_p): Remove definition.
16047         * decl2.c (saved_inlines): Rename to ...
16048         (deferred_fns): ... this.
16049         (saved_inlines_used): Rename to ...
16050         (deferred_fns_used): ... this.
16051         (mark_inline_for_output): Rename to ...
16052         (defer_fn): ... this.
16053         (finish_file): Adjust accordingly.
16054         (init_decl2): Likewise.
16055         * lex.c (cons_up_default_function): Likewise.
16056         * pt.c (mark_decl_instantiated): Likewise.
16057         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
16058         circumstances.
16059         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
16060         * semantics.c (expand_body): Defer more functions.
16061
16062 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
16063
16064         * vec.cc: New file.
16065         * Make-lang.in (CXX_LIB2FUNCS): Add it.
16066         (vec.o): Build it.
16067         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
16068         __cxa_vec_delete): Declare.
16069
16070 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
16071
16072         * rtti.c (dfs_class_hint_mark): New static function.
16073         (dfs_class_hint_unmark): New static function.
16074         (class_hint_flags): Use them.
16075
16076 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
16077
16078         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
16079
16080 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
16081
16082         * cp-tree.h (instantiate_decl): Change prototype.
16083         * decl2.c (mark_used): Adjust call.
16084         * optimize.c (inlinable_function_p): Adjust handling of templates.
16085         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
16086         (do_type_instantiation): Likewise.
16087         (instantiate_decl): Defer more templates.
16088         (instantiate_pending_templates): Adjust logic to handle inline
16089         friend functions.
16090
16091         * Makefile.in (GGC_H): New variable.  Use it throughout in place
16092         of ggc.h.
16093
16094         * call.c: Don't include obstack.h.  Include ggc.h.
16095         (obstack_chunk_alloc): Don't define.
16096         (obstack_chunk_free): Likewise.
16097         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
16098         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
16099         (pop_switch): Free it.
16100
16101         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
16102
16103         * dump.c (dequeue_and_dump): Don't try to print the bit_position
16104         if we don't have a DECL_FIELD_OFFSET.
16105
16106 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
16107
16108         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
16109         special_function_p.
16110
16111 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16112
16113         * cfns.gperf (hash, libc_name_p): Prototype.
16114
16115         * rtti.c (build_dynamic_cast_1): Constification.
16116
16117         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
16118
16119         * semantics.c (deferred_type_access_control): Prototype.
16120
16121 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
16122
16123         Correct many new ABI issues regarding vbase and vcall offset
16124         layout.
16125         * cp-tree.h (BINFO_VTABLE): Document.
16126         (struct lang_type): Tweak formatting.
16127         (BINFO_PRIMARY_BINFO): Add to documentation.
16128         (CLASSTYPE_VSIZE): Fix typo in comment.
16129         (CLASSTYPE_VBASECLASSES): Update documentation.
16130         (BINFO_VBASE_MARKED): Remove.
16131         (SET_BINFO_VBASE_MARKED): Likewise.
16132         (CLEAR_BINFO_VBASE_MARKED): Likewise.
16133         (BINFO_FIELDS_MARKED): Remove.
16134         (SET_BINFO_FIELDS_MARKED): Likewise.
16135         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
16136         (enum access_kind): New enumeration.
16137         (num_extra_vtbl_entries): Remove declaration.
16138         (size_extra_vtbl_entries): Likewise.
16139         (get_vtbl_decl_for_binfo): New function.
16140         (dfs_vbase_unmark): Remove declaration.
16141         (mark_primary_bases): Likewise.
16142         * class.c (SAME_FN): Remove.
16143         (struct vcall_offset_data_s): Move definition.
16144         (build_vbase_pointer): Use `build', not `build_binary_op', to
16145         access the vbase pointer under the new ABI.
16146         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
16147         (build_primary_vtable): Likewise.
16148         (dfs_mark_primary_bases): Move here from search.c.
16149         (mark_primary_bases): Likewise.
16150         (determine_primary_bases): Under the new ABI, don't make a base
16151         class a primary base just because we don't yet have any virtual
16152         functions.
16153         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
16154         (num_vfun_entries): Remove.
16155         (dfs_count_virtuals): Likewise.
16156         (num_extra_vtbl_entries): Likewise.
16157         (size_extra_vtbl_entries): Likewise.
16158         (layout_virtual_bases): Iterate in inheritance graph order under
16159         the new ABI.
16160         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
16161         indicate that a vfield is present.
16162         (init_class_processing): Initialize access_public_node, etc., from
16163         ak_public, etc.
16164         (get_vtbl_decl_for_binfo): New function.
16165         (dump_class_hierarchy_r): Likewise.
16166         (dump_class_hierarchy): Use it.
16167         (finish_vtbls): Build the vtbls in inheritance graph order.
16168         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
16169         (initialize_vtable): Use get_vtbl_decl_for_binfo.
16170         (accumulate_vtbl_inits): Add comments explaining why a pre-order
16171         walk is required.
16172         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
16173         where the vptr points, even for primary vtables.
16174         (build_vtbl_initializer): Adjust handling of vbase and vcall
16175         offsets.
16176         (build_vcall_and_vbase_vtable_entries): New function.
16177         (dfs_build_vbase_offset_vtbl_entries): Remove.
16178         (build_vbase_offset_vtbl_entries): Reimplement.
16179         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
16180         were already handled in a primary base class vtable.
16181         (build_vcall_offset_vtbl_entries): Adjust.
16182         (build_rtti_vtbl_entries): Adjust.
16183         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
16184         * init.c (expand_virtual_init): Simplify.
16185         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
16186         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
16187         * search.c (BINFO_ACCESS): New macro.
16188         (SET_BINFO_ACCESS): Likewise.
16189         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
16190         (access_in_type): Likewise.
16191         (dfs_accessible_p): Likewise.
16192         (protected_accessible_p): Likewise.
16193         (lookup_fnfields_1): Adjust documentation.
16194         (dfs_mark_primary_bases): Move to class.c
16195         (mark_primary_bases): Likewise.
16196         (dfs_vbase_unmark): Remove.
16197         (virtual_context): Use BINFO_FOR_VBASE.
16198         (dfs_get_vbase_types): Simplify.
16199         (dfs_build_inheritance_graph_order): New function.
16200         (get_vbase_types): Use it.
16201         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
16202
16203         * tinfo.cc (get_vbase_offset): New function.
16204         (__vmi_class_type_info::do_find_public_src): Use it.
16205         (__vmi_class_type_info::do_dyncast): Likewise.
16206         (__vmi_class_type_info::do_upcast): Likewise.
16207
16208 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
16209
16210         * lang-specs.h: Pass -fno-show-column to the preprocessor.
16211
16212 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
16213
16214         * rtti.c (class_hint_flags): Rename flags.
16215         (class_initializer): Remove flags.
16216         (synthesize_tinfo_var): Combine offset and flags. Add flags
16217         for __vmi_class_type_info.
16218         (create_tinfo_types): Remove flags from __class_type_info and
16219         __si_class_type_info. Merge flags and offset from
16220         base_class_type_info.
16221         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
16222         (__base_class_info::is_virtual_p): Adjust.
16223         (__base_class_info::is_public_p): Adjust.
16224         (__base_class_info::offset): New accessor.
16225         (__class_type_info::details): Remove member.
16226         (__class_type_info::__class_type_info): Lose details.
16227         (__class_type_info::detail_masks): Remove.
16228         (__si_class_type_info::__si_class_type_info): Lose details.
16229         (__vmi_class_type_info::details): New member.
16230         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
16231         (__vmi_class_type_info::detail_masks): New member.
16232         * tinfo.cc (__class_type_info::do_upcast): Initialize result
16233         with unknown_details_mask.
16234         (__vmi_class_type_info::do_find_public_src): Adjust
16235         (__vmi_class_type_info::do_dyncast): Adjust.
16236         (__vmi_class_type_info::do_upcast): Set result details, if
16237         needed. Adjust.
16238         (__dynamic_cast): Temporarily #if out optimization.
16239
16240 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
16241
16242         * rtti.c (get_tinfo_decl): Mark used.
16243         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
16244         mark as dealt with, if we output it.
16245
16246 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
16247
16248         * class.c: Reorganize to put virtual function table initialization
16249         machinery at the end of the file.
16250
16251 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
16252
16253         * class.c (finish_struct): Use bitsize_zero_node.
16254         * pt.c (instantiate_class_template): Likewise.
16255
16256 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
16257
16258         Put RTTI entries at negative offsets in new ABI.
16259         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
16260         vbase offset at index -3, not -1.
16261         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
16262         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
16263         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
16264         (build_rtti_vtbl_entries): New function.
16265         (set_rtti_entry): Remove.
16266         (build_primary_vtable): Don't use it.
16267         (build_secondary_vtable): Likewise.
16268         (start_vtable): Remove.
16269         (first_vfun_index): New function.
16270         (set_vindex): Likewise.
16271         (add_virtual_function): Don't call start_vtable.  Do call
16272         set_vindex.
16273         (set_primary_base): Rename parameter.
16274         (determine_primary_base): Likewise.
16275         (num_vfun_entries): Don't use skip_rtti_stuff.
16276         (num_extra_vtbl_entries): Include RTTI information.
16277         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
16278         (skip_rtti_stuff): Remove.
16279         (dfs_modify_vtables): Don't use it.
16280         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
16281         (layout_nonempty_base_or_field): Update size handling.
16282         (create_vtable_ptr): Tweak.
16283         (layout_class_type): Adjust parameter names.
16284         (finish_struct_1): Simplify.
16285         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
16286         (skip_rtti_stuff): Remove.
16287         (first_vfun_index): New function.
16288         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
16289         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
16290         (marked_vtable_pathp): Declare.
16291         (unmarked_vtable_pathp): Likewise.
16292         * error.c (dump_expr): Use first_vfun_index to calculate vtable
16293         offsets.
16294         * rtti.c (build_headof): Look for RTTI at negative offsets.
16295         (get_tinfo_decl_dynamic): Likewise.
16296         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
16297         here.
16298         (create_pseudo_type_info): Do it here instead.  Adjust so that
16299         vptr points at first virtual function.
16300         * search.c (marked_vtable_pathp): Make it global.
16301         (unmarked_vtable_pathp): Likewise.
16302         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
16303         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
16304         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
16305         (get_pure_virtuals): Likewise.
16306         (expand_upcast_fixups): Likewise.
16307         * tree.c (debug_binfo): Likewise.
16308         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
16309         negative offset.
16310
16311 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16312
16313         * class.c (check_field_decl): Fix typo.
16314         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
16315         (check_methods): Likewise.
16316         (check_field_decls): Likewise.
16317         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
16318         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
16319         Use DECL_RESULT_FLD, not DECL_RESULT.
16320         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
16321         * lex.c (identifier_type): Likewise.
16322         * pt.c (determine_specialization, lookup_template_class): Likewise.
16323         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
16324         (resolve_overloaded_unification, more_specialized): Likewise.
16325         * semantics.c (finish_member_declaration): Likewise.
16326         * typeck.c (build_x_function_call): Likewise.
16327
16328 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
16329
16330         * class.c (layout_empty_base): Handle empty bases with non-byte
16331         alignment.
16332         (build_base_field): Likewise.
16333         (layout_virtual_bases): Likewise.
16334
16335         * class.c (finish_struct_1): Fix typo in this change:
16336
16337         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16338
16339 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
16340
16341         * decl.c (grokdeclarator): Count partial specializations when
16342         keeping track of how many template classes have been seen.
16343
16344         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
16345
16346 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16347
16348         * class.c (build_vbase_pointer_fields): layout_field now place_field.
16349         (get_vfield_offset): Use byte_position.
16350         (set_rtti_entry): Set OFFSET to ssizetype zero.
16351         (get_binfo_offset_as_int): Deleted.
16352         (dfs_record_base_offsets): Use tree_low_cst.
16353         (dfs_search_base_offsets): Likewise.
16354         (layout_nonempty_base_or_field): Reflect changes in RLI format
16355         and call byte_position.
16356         (layout_empty_base): Convert offset to ssizetype.
16357         (build_base_field): use rli_size_unit_so_far.
16358         (dfs_propagate_binfo_offsets): Do computation in proper type.
16359         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
16360         (layout_class_type): Reflect changes in RLI names and fields.
16361         (finish_struct_1): Set DECL_FIELD_OFFSET.
16362         * dump.c (dequeue_and_dump): Call bit_position.
16363         * expr.c (cplus_expand_constant): Use byte_position.
16364         * rtti.c (expand_class_desc): Use bitsize_one_node.
16365         * typeck.c (build_component_addr): Use byte_position and don't
16366         special case for zero offset.
16367
16368 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
16369
16370         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
16371
16372         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
16373         tinfo object.
16374         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
16375         vtable.
16376
16377 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16378
16379         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
16380         DECL_P macros.
16381         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
16382         make_typename_type, check_initializer, cp_finish_decl,
16383         xref_tag): Likewise.
16384         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
16385         decl_namespace, arg_assoc_template_arg, arg_assoc,
16386         validate_nonmember_using_decl, do_class_using_decl): Likewise.
16387         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
16388         args_to_string): Likewise.
16389         * friend.c (is_friend): Likewise.
16390         * lex.c (note_got_semicolon, note_list_got_semicolon,
16391         is_global): Likewise.
16392         * method.c (build_overload_nested_name, build_overload_value,
16393         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
16394         * parse.y (typename_sub, typename_sub1): Likewise.
16395         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
16396         process_partial_specialization, convert_template_argument,
16397         template_args_equal, add_pending_template, lookup_template_class,
16398         for_each_template_parm_r, maybe_fold_nontype_arg,
16399         tsubst, instantiate_template, type_unification_real, unify,
16400         instantiate_pending_templates, set_mangled_name_for_template_decl):
16401         Likewise.
16402         * repo.c (repo_get_id, repo_template_used): Likewise.
16403         * search.c (lookup_field_1): Likewise.
16404         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
16405         * xref.c (classname): Likewise.
16406
16407 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
16408
16409         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
16410         (CANONICAL_BINFO): New macro.
16411         (BINFO_NEW_VTABLE_MARKED): Use it.
16412         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
16413         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
16414         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
16415         not TREE_TYPE.
16416         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
16417         (build_secondary_vtable): Likewise.
16418         (dfs_finish_vtbls): Likewise.
16419         (dfs_accumulate_vtbl_inits): Likewise.
16420         (accumulate_vtbl_inits): New function.
16421         (finish_vtbls): Make sure that virtual bases come after
16422         non-virtual bases in the vtable group.
16423         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
16424         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
16425         * search.c (struct vbase_info): Move definition.
16426         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
16427         (unmarked_new_vtable_p): Likewise.
16428         (dfs_mark_vtable_path): Remove.
16429         (dfs_mark_new_vtable): Remove.
16430         (dfs_unmark_new_vtable): Likewise.
16431         (dfs_clear_search_slot): Likewise.
16432         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
16433         (dfs_clear_vbase_slots): Likewise.
16434         (init_vbase_pointers): LIkewise.
16435
16436 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
16437
16438         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
16439         SIZETYPE to a non-SIZETYPE.
16440
16441 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
16442
16443         * class.c (layout_virtual_bases): Adjust names in conditionally
16444         compiled code.
16445
16446         * class.c (record_base_offsets): New function.
16447         (layout_conflict_p): Likewise.
16448         (layout_nonempty_base_or_field): Use it.
16449         (layout_empty_base): New function.
16450         (build_base_field): Use it.
16451         (build_base_fields): Update comment.
16452         (layout_virtual_bases): Fold in a little code form
16453         layout_basetypes.  Use layout_empty_base.
16454         (layout_basetypes): Remove.
16455         (end_of_class): New function.
16456         (layout_class_type): Use it.  Adjust.
16457
16458         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
16459         (fntype_p): Remove.
16460         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
16461         comment.
16462         (dfs_skip_nonprimary_vbases_markedp): Likewise.
16463         * typeck.c (fntype_p): Remove.
16464
16465         * cp-tree.h (TI_SPEC_INFO): Remove.
16466         (CLASSTYPE_TI_SPEC_INFO): Likewise.
16467         * pt.c (process_partial_specialization): Likewise.
16468
16469         * class.c (build_base_field): Fix thinko in computation of binfo
16470         offsets.
16471
16472         * tree.c (mark_local_for_remap_p): Mark variables declared in
16473         TARGET_EXPRs as well.
16474
16475 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
16476
16477         * typeck.c (require_complete_type, complete_type,
16478         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
16479         build_array_ref, convert_arguments, pointer_diff,
16480         build_x_unary_op, build_unary_op, build_c_cast,
16481         build_modify_expr): Use COMPLETE_TYPE_P etc.
16482         * call.c (is_complete, convert_like_real,
16483         build_new_method_call): Likewise.
16484         * class.c (build_vbase_pointer_fields, check_bases,
16485         build_base_field, finish_struct_1, pushclass): Likewise.
16486         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
16487         * decl.c (maybe_process_template_type_declaration, pushtag,
16488         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
16489         layout_var_decl, check_initializer, cp_finish_decl,
16490         grokdeclarator, require_complete_types_for_parms,
16491         grok_op_properties, xref_tag, xref_basetypes,
16492         check_function_type): Likewise.
16493         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
16494         * friend.c (do_friend): Likewise.
16495         * init.c (build_offset_ref): Likewise.
16496         * parse.y (structsp): Likewise.
16497         * pt.c (maybe_process_partial_specialization,
16498         tsubst_friend_function, instantiate_class_template, tsubst,
16499         do_type_instantiation, instantiate_pending_templates): Likewise.
16500         * repo.c (repo_get_id): Likewise.
16501         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
16502         synthesize_tinfo_var, emit_support_tinfos): Likewise.
16503         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
16504         * semantics.c (begin_class_definition): Likewise.
16505         * tree.c (build_cplus_method_type): Likewise.
16506         * typeck2.c (digest_init, build_functional_cast,
16507         add_exception_specifier): Likewise.
16508         * parse.h, parse.c: Regenerated.
16509
16510 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
16511
16512         * inc/cxxabi.h: New header file. Define new-abi entry points.
16513         (__pointer_type_info::target): Rename member to ...
16514         (__pointer_type_info::type): ... here.
16515         (__base_class_info::type): Rename member to ...
16516         (__base_class_info::base): ... here.
16517         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
16518         * cp-tree.h (CPTI_ABI): New global tree enumeration.
16519         (abi_node): New global tree node.
16520         * decl.c (abi_node): Document.
16521         (init_decl_processing): Initialize abi_node.
16522         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
16523         (get_vmi_pseudo_type_info): Likewise.
16524         (create_tinfo_types): Likewise.
16525         (emit_support_tinfos): Likewise.
16526         * tinfo.h (cxxabi.h): Include for new-abi.
16527         Move rtti class definitions to new header file.
16528         * tinfo.cc (abi): Use the namespace.
16529         (std): Move new abi rtti classes from here ...
16530         (__cxxabiv1): ... to here.
16531         * tinfo2.cc (cxxabi.h): Include for new-abi.
16532         Move rtti class definitions to new header file.
16533         (std): Move new abi rtti classes from here ...
16534         (__cxxabiv1): ... to here.
16535         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
16536         namespace.
16537
16538 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
16539             Jason Merrill  <jason@casey.cygnus.com>
16540
16541         * method.c (build_overload_int): Use host_integerp.
16542
16543 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16544
16545         * init.c (build_offset_ref): Handle the case of a templated member
16546         function.
16547
16548 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16549
16550         * except.c (expand_exception_blocks): Clear catch_clauses_last.
16551
16552 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
16553
16554         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
16555         * class.c (check_bitfield_decl): Turn illegal bitfields into
16556         non-bitfields.
16557         (dfs_propagate_binfo_offsets): Adjust for new size_binop
16558         semantics.
16559         (dfs_offset_for_unshared_vbases): Likewise.
16560         * cvt.c (cp_convert_to_pointer): Convert NULL to a
16561         pointer-to-member correctly under the new ABI.
16562         * expr.c (cplus_expand_constant): Don't use cp_convert when
16563         turning an offset into a pointer-to-member.
16564         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
16565         when dereferencing them under the new ABI.
16566         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
16567         of pointers-to-members under the new ABI.
16568
16569         * class.c (check_bitfield_decl): Remove restriction on really long
16570         bitfields.
16571         (layout_class_type): Implement new ABI handling of bitfields
16572         longer than their types.
16573
16574 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16575
16576         * parse.y (extdefs): Call ggc_collect.
16577         * parse.c: Regenerated.
16578
16579 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
16580
16581         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
16582         (note_name_declared_in_class): Use OVL_CURRENT to get at a
16583         potential overload.
16584
16585 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16586
16587         * class.c (build_vbase_path): Use integer_zerop.
16588         (build_vtable_entry): Use tree_low_cst.
16589         (get_vfield_offset): Use bit_position.
16590         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
16591         Use tree_low_cst.
16592         (check_bitfield_decl): Set DECL_SIZE using convert.
16593         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
16594         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
16595         Use tree_low_cst.
16596         (finish_struct_1): Use bit_position.
16597         (dump_class_hierarchy): Use tree_low_cst.
16598         * cp-tree.h (min_precision): Add declaration.
16599         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
16600         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
16601         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
16602         * expr.c (cplus_expand_constant): Use bit_position.
16603         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
16604         * rtti.c (get_base_offset): Use bit_position.
16605         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
16606         host_integerp, and tree_low_cst.
16607         (pointer_int_sum): Use integer_zerop.
16608         (build_component_addr): Use bit_position.
16609
16610 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
16611
16612         * typeck.c (require_complete_type): Don't assume size_zero_node.
16613         (complete_type_or_else): Likewise.
16614
16615 2000-03-16  Steven Grady <grady@digitaldeck.com>
16616             Jason Merrill  <jason@casey.cygnus.com>
16617
16618         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
16619
16620 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
16621
16622         * decl2.c (grokfield): Bail out if type is error_mark_node.
16623
16624 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
16625
16626         * tinfo2.cc (__ptr_to_member_data): Rename to ...
16627         (__pointer_to_member_data): ... here. Adjust.
16628         * rtti.c (create_tinfo_types): Adjust.
16629
16630 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
16631
16632         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
16633         * decl.c (ref_desc_type_node): Undocument.
16634         * rtti.c (ptr_ref_initializer): Rename to ...
16635         (ptr_initializer): ... here. Adjust comments.
16636         (ptmd_initializer): Fix comment thinko.
16637         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
16638         (create_tinfo_types): Remove ref_desc_type_node init.
16639         * tinfo2.cc (__reference_type_info): Remove.
16640
16641 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
16642
16643         * decl.c (cp_finish_decl): Remove obsolete comment.
16644
16645         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
16646
16647 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
16648
16649         * cp-tree.h: Tweak documentation.
16650         * class.c (build_vbase_pointer_fields): Layout the fields, too.
16651         (avoid_overlap): Remove.
16652         (get_binfo_offset_as_int): New function.
16653         (dfs_serach_base_offsets): Likewise.
16654         (layout_nonempty_base_or_field): Likewise.
16655         (build_base_field): Layout fields here.  Avoid placing two objects
16656         of the same type at the same address, under the new ABI.
16657         (build_base_fields): Adjust accordingly.
16658         (create_vtable_ptr): Return the new field, but don't attach it to
16659         TYPE_FIELDS.
16660         (remove_base_field): Remove.
16661         (remove_base_fields): Remove.
16662         (layout_basetypes): Adjust accordingly.
16663         (layout_class_type): Call layout_field for each field, rather than
16664         just making a wholesale call to layout_type.
16665
16666 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
16667
16668         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
16669
16670 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
16671
16672         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
16673
16674         * except.c (dtor_nothrow): New fn.
16675         (do_pop_exception): Use it.  Take type parm.
16676         (push_eh_cleanup): Take type parm.
16677         (expand_start_catch_block): Pass it.
16678         (build_eh_type_type_ref): Accept null type.
16679
16680 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
16681
16682         * cp-tree.h (revert_static_member_fn): Change prototype.
16683         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
16684         (grok_op_properties): Likewise.
16685         (start_function): Likewise.
16686         (revert_static_member_fn): Simplify.
16687         * pt.c (check_explicit_specialization): Adjust call to
16688         revert_static_member_fn.
16689
16690 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
16691
16692         * cp-tree.h (scope_kind): New type.
16693         (tmpl_spec_kind): Likewise.
16694         (declare_pseudo_global_level): Remove.
16695         (pseudo_global_level_p): Rename to template_parm_scope_p.
16696         (pushlevel): Remove declaration.
16697         (begin_scope): New function.
16698         (finish_scope): Likewise.
16699         (current_tmpl_spec_kind): Likewise.
16700         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
16701         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
16702         Add template_spec_p.
16703         (toplevel_bindings_p): Adjust.
16704         (declare_pseudo_global_level): Remove.
16705         (pseudo_global_level_p): Rename to template_parm_scope_p.
16706         (current_tmpl_spec_kind): New function.
16707         (begin_scope): Likewise.
16708         (finish_scope): Likewise.
16709         (maybe_push_to_top_level): Adjust.
16710         (maybe_process_template_type_declaration): Likewise.
16711         (pushtag): Likewise.
16712         (pushdecl_nonclass_level): Likewise.
16713         (lookup_tag): Likewise.
16714         (grokfndecl): Handle member template specializations.  Share
16715         constructor and non-constructor code.
16716         * decl2.c (check_classfn): Handle member template specializations.
16717         * pt.c (begin_template_parm_list): Use begin_scope.
16718         (begin_specialization): Likewise.
16719         (end_specialization): Likewise.
16720         (check_explicit_specialization): Use current_tmpl_spec_kind.
16721         Handle member template specializations.
16722         (end_template_decl): Use finish_scope.  Remove call to
16723         get_pending_sizes.
16724         (push_template_decl_real): Remove bogus error message.
16725         (tsubst_decl): Fix typo in code contained in comment.
16726         (instantiate_template): Handle member template specializations.
16727         (most_general_template): Likewise.
16728
16729 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
16730
16731         * lex.c (whitespace_cr): Compress consecutive calls to warning().
16732         (do_identifier): Ditto for error().
16733
16734         * pt.c (convert_nontype_argument): Ditto for cp_error().
16735         (convert_template_argument): Ditto for cp_pedwarn().
16736
16737 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
16738
16739         * exception.cc (__check_null_eh_spec): New fn.
16740         * except.c (expand_end_eh_spec): Call it if the spec is throw().
16741
16742 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
16743
16744         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
16745         * except.c (expand_end_eh_spec): Add the return type.
16746         * rtti.c (throw_bad_cast): Add the parmtypes.
16747         (throw_bad_typeid): Likewise.
16748
16749         * semantics.c (expand_stmt): Only leave out rtl for unused
16750         artificials, and set DECL_IGNORED_P on them as well.
16751         * decl.c (wrapup_globals_for_namespace): Likewise.
16752
16753 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
16754
16755         * decl.c (maybe_commonize_var): Skip all artificial decls.
16756         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
16757
16758 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
16759
16760         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
16761         * cp-tree.h: Declare flag_enforce_eh_specs.
16762         * decl.c (store_parm_decls, finish_function): Check it.
16763
16764         C library functions don't throw.
16765         * Makefile.in (cfns.h): New target.
16766         (except.o): Depend on it.
16767         * Make-lang.in (cc1plus): Depend on cfns.gperf.
16768         * cfns.gperf: New file.
16769         * cfns.h: Generated.
16770         * except.c: Include it.
16771         (nothrow_libfn_p): New fn.
16772         * decl.c (grokfndecl): Use it.
16773         * cp-tree.h: Declare it.
16774
16775         * decl.c (push_overloaded_decl_1, auto_function,
16776         define_function): Lose.
16777         (build_library_fn_1): New static fn.
16778         (builtin_function): Use it.
16779         (get_atexit_node): Use build_library_fn_ptr.
16780         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
16781         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
16782         push_void_library_fn, push_throw_library_fn): New fns.
16783         * cp-tree.h: Declare them.
16784         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
16785         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
16786         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
16787         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
16788         * rtti.c (build_runtime_decl): Lose.
16789         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
16790         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
16791         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
16792
16793         * call.c (build_call): Remove result_type parm.
16794         Call mark_used on unused artificial fns.
16795         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
16796
16797 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
16798
16799         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
16800         appropriate.
16801         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
16802         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
16803         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
16804         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
16805         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
16806         expand_generic_desc): Likewise.
16807
16808 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
16809
16810         * exception.cc (__cp_pop_exception): Cleanup the original object.
16811
16812 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
16813
16814         * decl.c (grok_op_properties): Merge conversion to void warning
16815         with other silly op warnings.
16816
16817 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
16818
16819         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
16820         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
16821
16822 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
16823
16824         * decl.c (cp_make_fname_decl): New function.
16825         (wrapup_globals_for_namespace): Don't emit unused static vars.
16826         (init_decl_processing): Remove comment about use of
16827         array_domain_type. Set make_fname_decl.
16828         (cp_finish_decl): Remove __FUNCTION__ nadgering.
16829         * semantics.c (begin_compound_stmt): Remove
16830         current_function_name_declared flagging.
16831         (expand_stmt): Don't emit unused local statics.
16832         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
16833         specially.
16834
16835 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
16836
16837         * typeck.c (convert_for_assignment): Don't look at array
16838         initializer.
16839         * call.c (convert_like_real): Likewise.
16840
16841 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
16842
16843         Add initial support for '\uNNNN' specifier.
16844         * lex.c (read_ucs): New fn.
16845         (readescape, skip_white_space): Call it.
16846         (is_extended_char, is_extended_char_1): New fns.
16847         (utf8_extend_token): New fn, #if 0'd out.
16848         (real_yylex): Treat extended chars like letters.
16849
16850         * search.c (note_debug_info_needed): Walk the bases even if we
16851         weren't deferring the type itself.
16852
16853 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16854
16855         * decl2.c (finish_objects): Constify a char*.
16856
16857         * method.c (emit_thunk): Likewise.
16858
16859 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
16860
16861         * typeck.c (dubious_conversion_warnings): Look through
16862         REFERENCE_TYPE.
16863
16864 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16865
16866         * class.c (dfs_modify_vtables): I is now unsigned.
16867         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
16868         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
16869         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
16870         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
16871         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
16872         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
16873         Call integer_all_onesp.
16874         * typeck2.c (process_init_constructor): Use compare_tree_int.
16875
16876         * lang-specs.h (as): Don't call if -syntax-only.
16877
16878 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
16879
16880         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
16881         RTL_EXPR_HAS_NO_SCOPE after all.
16882
16883 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
16884
16885         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
16886         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
16887         RTL_EXPR_HAS_NO_SCOPE.
16888
16889         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
16890         later.
16891
16892         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
16893
16894 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
16895
16896         * call.c (convert_like): Macrofy.
16897         (convert_like_with_context): New macro.
16898         (convert_like_real): Renamed from convert_like.  Add calling
16899         context parameters, for diagnostics. Add recursive flag.  Call
16900         dubious_conversion_warnings for outer conversion.
16901         (build_user_type_conversion): Use convert_like_with_context.
16902         (build_over_call): Likewise. Don't warn about dubious
16903         conversions here. Adjust convert_default_arg calls.
16904         (convert_default_arg): Add context parameters for diagnostics.
16905         Pass through to convert_like_with_context.
16906         * cp-tree.h (convert_default_arg): Add context parameters.
16907         (dubious_conversion_warnings): Prototype new function.
16908         * typeck.c (convert_arguments): Adjust convert_default_arg call.
16909         (dubious_conversion_warnings): New function, broken
16910         out of convert_for_assignment.
16911         (convert_for_assignment): Adjust.
16912
16913 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
16914
16915         * decl2.c (key_method): Break out from...
16916         (import_export_vtable, import_export_class): ...here.
16917
16918         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
16919         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
16920
16921         * search.c (note_debug_info_needed, dfs_debug_mark,
16922         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
16923         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
16924
16925 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
16926
16927         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
16928         typos.
16929
16930 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
16931
16932         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
16933         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
16934         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
16935         (lang_type): Split gets_new into has_new and has_array_new.
16936         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16937         (TYPE_GETS_NEW): Split into ...
16938         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
16939         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
16940         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
16941         (build_op_new_call): Don't declare.
16942         (build_new_1): Likewise.
16943         * call.c (build_op_new_call): Remove.
16944         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
16945         instead of TYPE_NEEDS_DESTRUCTOR.
16946         (finish_struct_bits): Likewise.
16947         (add_implicitly_declared_members): Likewise.
16948         (check_field_decl): Likewise.
16949         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
16950         correctly under the new ABI.
16951         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
16952         instead of TYPE_NEEDS_DESTRUCTOR.
16953         (initialize_local_var): Likewise.
16954         (destroy_local_var): Likewise.
16955         (cp_finish_decl): Likewise.
16956         (register_dtor_fn): Likewise.
16957         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
16958         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
16959         TYPE_VEC_DELETE_TAKES_SIZE here.
16960         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
16961         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
16962         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16963         (finish_destructor_body): Likewise.
16964         (maybe_build_cleanup_1): Likewise.
16965         * decl2.c (do_static_destruction): Likewise.
16966         * init.c (build_new_1): Make it static.
16967         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16968         (expand_cleanup_for_base): Likewise.
16969         (get_cookie_size): New function.
16970         (build_new_1): Handle array-new cookies correctly under the new
16971         ABI.
16972         (build_vec_delete_1): Likewise.
16973         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16974         (build_delete): Likewise.
16975         (build_vec_delete): Handle array-new cookies correctly under the new
16976         ABI.
16977         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16978         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
16979         TYPE_HAS_ARRAY_NEW_OPERATOR.
16980         * ptree.c (print_lang_type): Check them.
16981         * search.c (context_for_name_lookup): Fix typo in comment.
16982         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16983         * tree.c (break_out_cleanups): Likewise.
16984         (build_cplus_array_test_1): Likewise.
16985         (cp_build_qualified_type_real): Likewise.
16986         * typeck.c (complete_type): Likewise.
16987
16988         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
16989         the command-line, not the end.
16990
16991 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
16992
16993         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
16994
16995 2000-03-02  Tom Tromey  <tromey@cygnus.com>
16996
16997         * cp-tree.h (build_java_class_ref): Declare.
16998         * init.c (build_java_class_ref): No longer static.
16999         * except.c (expand_throw): Generate a Java-style `throw' if the
17000         thrown object is a "Java" object.
17001         (initialize_handler_parm): Generate a Java-style lookup of
17002         exception info if the caught object is a "Java" object.
17003         (catch_language, catch_language_init): New globals.
17004         (decl_is_java_type): New function.
17005         (expand_start_catch_block): Don't call push_eh_info() or
17006         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
17007         class reference to build_catch_block.
17008
17009 2000-03-02  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17010
17011         * typeck.c (comptypes): Treat sizetype like its language equivalent.
17012
17013 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
17014
17015         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
17016         to merge reference/pointer code and fix incorrect warnings.
17017
17018 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
17019
17020         * search.c (protected_accessible_p): Use context_for_name_lookup.
17021
17022         * init.c (construct_virtual_bases): Fix thinko.
17023         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
17024
17025 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
17026
17027         * decl.c (current_function_decl): Move to toplev.c.
17028
17029 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
17030
17031         * pt.c (fn_type_unification): Unify return type, whenever
17032         provided.
17033         (get_bindings_real): Only pass return type when necessary.
17034         Remove explicit return type check.
17035         * class.c (resolve_address_of_overloaded_function): Pass desired
17036         return type to fn_type_unification.
17037
17038 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17039
17040         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
17041         DECL_FIELD_SIZE.
17042         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
17043         DECL_FIELD_SIZE.
17044         * rtti.c (expand_class_desc): Likewise.
17045         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
17046         (THUNK_VCALL_OFFSET): Likewise.
17047         (THUNK_DELTA): Reflect changes in ../tree.h.
17048
17049 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
17050
17051         * search.c (protected_accessible_p): Also allow the access if
17052         the member is public in DERIVED.  Lose TYPE parm.
17053         (friend_accessible_p): Lose TYPE parm.
17054         (accessible_p): Adjust.
17055
17056 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17057
17058         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
17059         on things that are not sizes; ssize_binop deleted.
17060         Call size_diffop when appropriate.
17061         (dfs_build_vcall_offset_vtbl_entries): Likewise.
17062         (build_primary_vtable, build_secondary_vtable): Likewise.
17063         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
17064         Variable I is HOST_WIDE_INT.
17065         (get_vfield_offset): Pass proper types to size_binop.
17066         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
17067         (finish_struct_1): Likewise.
17068         (skip_rtti_stuff): Arg N is now pointer to signed.
17069         (layout_class_type): Use size_zero_node.
17070         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
17071         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
17072         * decl.c (complete_arry_type): Pass proper types to size_binop.
17073         (xref_basetypes): BINFO_OFFSET is sizetype.
17074         * error.c (dump_expr): Don't use size_binop non-sizes.
17075         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
17076         * init.c (construct_virtual_bases): Fix type error.
17077         (build_vec_delete_1): Pass proper type to size_binop and don't
17078         fold result.
17079         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
17080         * rtti.c (get_base_offset): Pass proper type to size_binop.
17081         * search.c (dfs_find_vbases): Fix type error.
17082         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
17083         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
17084         * tree.c (debug_binfo): Variable N is signed.
17085         Use HOST_WIDE_INT_PRINT_DEC.
17086         * typeck.c (comptypes): sizetype is same as equivalent integer type.
17087         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
17088         size_one_node and size_zero_node.
17089         (c_alignof): Use size_one_node.
17090         (build_component_addr): Pass proper types to size_binop.
17091         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
17092
17093 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
17094
17095         Implement class scope using-declarations for functions.
17096         * class.c (handle_using_decl): Call add_method for used functions.
17097         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
17098         (add_method): Used functions are hidden by local functions.
17099         (check_bases_and_members): Handle using-decls before finalizing
17100         CLASSTYPE_METHOD_VEC.
17101         * call.c (add_function_candidate): Add ctype parm; if nonzero,
17102         override the type of 'this' accordingly.
17103         (add_template_candidate, add_template_candidate_real): Add ctype parm.
17104         (convert_class_to_reference, build_user_type_conversion_1,
17105         build_new_function_call, build_object_call, build_new_op,
17106         build_new_method_call): Pass ctype parm.
17107
17108         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
17109         the baselink.
17110         * call.c (convert_class_to_reference, build_user_type_conversion_1,
17111         build_new_function_call, build_object_call, build_new_op,
17112         build_new_method_call, build_op_delete_call): Don't get basetype_path
17113         from a baselink.
17114         * typeck.c (build_component_ref): Likewise.
17115         * init.c (build_offset_ref): Likewise.
17116         (resolve_offset_ref): Don't call enforce_access.
17117         Call build_scoped_ref.
17118         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
17119         would cause an error or if -pedantic.
17120         * class.c (alter_access): Lose binfo parm.
17121
17122 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
17123
17124         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
17125         types.
17126
17127 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
17128
17129         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
17130         pseudo_type_info creation into the std namespace
17131
17132 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
17133
17134         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
17135         (import_export_class): Remove declaration.
17136         * decl2.c (import_export_class): Make it static.
17137         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
17138         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
17139         EXPR_WITH_FILE_LOCATION.
17140         * lex.c (check_newline): Tweak filename/lineno setting.
17141         * semantics.c (begin_while_stmt): Fix typo in comment.
17142
17143 2000-02-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17144
17145         * lang-options.h (-fmessage-length=): Add missing option.
17146
17147         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
17148
17149 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
17150
17151         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
17152
17153 2000-02-25  Jim Wilson  <wilson@cygnus.com>
17154
17155         * optimize.c (expand_call_inline): Emit the return label before
17156         evaluating the return value.
17157
17158 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
17159
17160         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
17161         than duplicating functionality here.
17162         * optimize.c: Include input.h.
17163         (expand_call_inline): Use push_srcloc and pop_srcloc.
17164         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
17165         * parse.c: Regenerated.
17166         * Makefile.in (lex.o): Depend on input.h.
17167         (optimize.o): Likewise.
17168
17169 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
17170
17171         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
17172         function type, rather than ICE.
17173
17174 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
17175
17176         * decl.c (grokdeclarator): Call decl_type_access_control.
17177         * parse.y (parse_end_decl): Don't call decl_type_access_control if
17178         decl is null.
17179
17180 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
17181
17182         * decl.c (decls_match): Remove obsolete static member nadgering.
17183
17184 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17185
17186         * decl.c (grokdeclarator): Change ANSI to ISO.
17187         * lex.c (consume_string, readescape, do_identifier): Likewise.
17188         (parse_float, real_yylex): Likewise.
17189         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
17190         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
17191         new_type_id, maybe_label_decls, simple_stmt,
17192         for.init.statement): Likewise.
17193         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
17194         * semantics.c (finish_named_return_value): Likewise.
17195         * parse.c: Regenerate.
17196
17197 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
17198
17199         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
17200         (CPTI_CLASS_STAR_TYPE): Remove.
17201         (vtable_index_type): Likewise.
17202         (class_star_type_node): Remove.
17203         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
17204         (build_binary_op_nodefault): Remove.
17205         * call.c (build_new_op): Use build_binary_op instead of
17206         build_binary_op_nodefault.
17207         * decl.c (init_decl_processing): Remove class_star_type_node
17208         initialization.  Make delta_type_node ptrdiff_type_node under the
17209         new ABI.  Initialize vtable_index_type.
17210         (build_ptrmemfunc_type): Build different structures for the new
17211         ABI.
17212         (build_enumerator): Use build_binary_op instead of
17213         build_binary_op_nodefault.
17214         * method.c (build_overload_value): Mangle pointers-to-members
17215         appropriately under the new ABI.
17216         * typeck.c (build_array_ref): Use build_binary_op instead of
17217         build_binary_op_nodefault.
17218         (get_member_function_from_ptrfunc): Adjust for the new ABI.
17219         (build_binary_op_nodefault): Rename to ...
17220         (build_binary_op): ... this.  Remove old version.  Adjust for
17221         pointer-to-member comparisons under the new ABI.
17222         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
17223         (build_ptrmemfunc): Adjust for the new ABI.
17224         (expand_ptrmemfunc_cst): Likewise.
17225         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
17226         (pfn_from_ptrmemfunc): Adjust for the new ABI.
17227
17228 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
17229
17230         * call.c (build_object_call): Compress consecutive calls to
17231         cp_error.
17232         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
17233         (build_op_delete_call): Adjust message formatting.
17234
17235         * class.c (check_bases): Compress consecutive calls to
17236         cp_pedwarn.
17237         (finish_struct_anon): Say 'ISO C++'.
17238
17239         * decl.c (start_decl): Same here.
17240         (grok_reference_init): Likewise.
17241         (grokfndecl): Correct message formatting.
17242         (grokfndecl): Improve diagnostic.
17243         (check_static_variable_definition): Likewise. Say 'ISO C++'
17244         (compute_array_index_type): Say 'ISO C++'
17245         (create_array_type_for_decl): Compress consecutive calls to
17246         cp_error.
17247         (grokdeclarator): Say 'ISO C++'
17248         (grok_op_properties): Likewise.
17249
17250         * decl2.c (delete_sanity): Clairify diagnostic.
17251         (check_member_template): Same here.
17252         (grok_function_init): Use consistent terminology.
17253
17254         * expr.c (do_case): Say 'ISO C++'
17255
17256         * friend.c (do_friend): Compress consecutive calls to warning.
17257
17258 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
17259
17260         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
17261         * class.c (build_secondary_vtable): Reorganize.  Don't create a
17262         new vtable under the new ABI.
17263         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
17264         computing the size.
17265         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
17266         the initializing elements.
17267         (initialize_vtable): New function.
17268         (dfs_finish_vtbls): Use it.
17269         (dfs_accumulate_vtbl_inits): New function.
17270         (finish_vtbls): Merge primary and secondary vtables under the new
17271         ABI.
17272         (finish_struct_1): Remove redundant call to layout_vtable_decl.
17273         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
17274         aren't VAR_DECLs.
17275
17276         * class.c (build_vtable): New function, split out from ...
17277         (get_vtable_decl): ... here, and ...
17278         (build_secondary_vtable): ... here.
17279
17280         * pt.c (tsubst_decl): Fix formatting.
17281
17282 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17283
17284         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
17285         (avoid_overlap, build_base_field): Likewise.
17286         (build_base_field, build_base_fields, is_empty_class):
17287         Test DECL_SIZE with integer_zero.
17288         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
17289         * cp-tree.h (struct lang_type): New field size_unit.
17290         (CLASSTYPE_SIZE_UNIT): New macro.
17291         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
17292         (cp_finish_decl): Delete -Wlarger-than processing.
17293         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
17294         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
17295         * tree.c (make_binfo): binfo vector is one entry longer.
17296         (walk_tree): Walk DECL_SIZE_UNIT.
17297
17298 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
17299
17300         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
17301         comment.
17302         (build_vtable_entry): Don't assume all vtable entries are
17303         functions.
17304         (build_vtbl_initializer): Adjust accordingly.
17305         (get_vtable_decl): Fix formatting.
17306
17307 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
17308
17309         * semantics.c (deferred_type_access_control): Walk the entire
17310         type_lookups list.
17311         (save_type_access_control): Rename from
17312         initial_deferred_type_access_control.  Just remember the value.
17313         (decl_type_access_control): New fn.
17314         (begin_function_definition): Use deferred_type_access_control, after
17315         we've started the function.  Set type_lookups to error_mark_node.
17316         * parse.y (frob_specs, fn.def1): Adjust.
17317         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
17318         (parse_end_decl, parse_bitfield0, parse_method): New fns.
17319         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
17320         (after_type_component_declarator0): Likewise.
17321         (after_type_component_declarator): Likewise.
17322         (notype_component_declarator): Likewise.
17323         * cp-tree.h: Adjust.
17324
17325         * decl.c (redeclaration_error_message): Allow redeclaration of
17326         namespace-scope decls.
17327
17328 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
17329
17330         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
17331
17332 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
17333
17334         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
17335         * decl2.c (grokclassfn): Likewise.
17336
17337         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
17338
17339         * decl2.c (lang_decode_option): Don't set default message length
17340         here.
17341         * lex.c (lang_init_options): Set it here.
17342
17343 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
17344
17345         Make DECL_CONTEXT mean the class in which a member function was
17346         declared, even for a virtual function.
17347         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
17348         (DECL_FRIEND_CONTEXT): New macro.
17349         (DECL_REAL_CONTEXT): Remove.
17350         (SET_DECL_FRIEND_CONTEXT): Likewise.
17351         (DECL_VIRTUAL_CONTEXT): Adjust.
17352         (DECL_CLASS_SCOPE_P): Use TYPE_P.
17353         (add_friends): Remove.
17354         (hack_decl_function_context): Likewise.
17355         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
17356         CP_DECL_CONTEXT.
17357         (build_over_call): Fix indentation.  Use DECL_CONTEXT
17358         instead of DECL_CLASS_CONTEXT.
17359         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
17360         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
17361         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
17362         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
17363         (build_base_field): Likewise.
17364         (finish_struct_1): Likewise.
17365         (build_self_reference): Likewise.
17366         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
17367         DECL_REAL_CONTEXT.
17368         (pushtag): Use decl_function_context, not
17369         hack_decl_function_context.
17370         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
17371         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
17372         (pushdecl): Remove bogus code.
17373         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
17374         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
17375         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
17376         Use decl_function_context, nothack_decl_function_context.
17377         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
17378         (grokdeclarator): Likewise.  Use decl_function_context, not
17379         hack_decl_function_context.
17380         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
17381         (start_function): Use DECL_FRIEND_CONTEXT, not
17382         DECL_CLASS_CONTEXT.  Use decl_function_context, not
17383         hack_decl_function_context.
17384         (finish_function): Use decl_function_context, not
17385         hack_decl_function_context.
17386         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
17387         DECL_CLASS_CONTEXT.
17388         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
17389         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
17390         (grokfield): Likewise.
17391         (finish_builtin_type): Likewise.
17392         (finish_vtable_vardec): Use decl_function_context, not
17393         hack_decl_function_context.
17394         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
17395         (start_static_initialization_or_destruction): Likewise.
17396         (finish_static_initialization_or_destruction): Likewise.
17397         (mark_used): Adjust logic for deciding when to synthesize methods.
17398         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
17399         DECL_REAL_CONTEXT.
17400         * error.c (dump_function_decl): Use DECL_CONTEXT, not
17401         DECL_CLASS_CONTEXT.
17402         * friend.c (is_friend): Likewise.
17403         (add_friends): Remove.
17404         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
17405         * lex.c (begin_definition_of_inclass_inline): Use
17406         decl_function_context, not hack_decl_function_context.
17407         (process_next_inline): Likewise.
17408         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
17409         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
17410         DECL_CLASSS_CONTEXT.
17411         (hack_identifier): Likewise.
17412         (synthesize_method):  Use decl_function_context, not
17413         hack_decl_function_context.
17414         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
17415         DECL_REAL_CONTEXT.
17416         (is_member_template): Use decl_function_context, not
17417         hack_decl_function_context.  Use DECL_CONTEXT, not
17418         DECL_CLASS_CONTEXT.
17419         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
17420         DECL_CLASS_CONTEXT.
17421         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
17422         DECL_REAL_CONTEXT.
17423         (push_template_decl_real): Likewise.
17424         (instantiate_class_template): Don't call add_friends.
17425         (tsubst_default_argument): Use DECL_CONTEXT, not
17426         DECL_REAL_CONTEXT.
17427         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
17428         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
17429         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
17430         DECL_CLASS_CONTEXT.
17431         * repo.c (repo_inline_used): Likewise.
17432         * search.c (current_scope): Adjust for new _CONTEXT macros.
17433         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
17434         DECL_REAL_CONTEXT.
17435         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
17436         (lookup_fnfields_here):Likewise.
17437         (check_final_overrider): Likewise.
17438         (init_vbase_pointers): Likewise.
17439         (virtual_context): Likewise.
17440         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
17441         (expand_body): Use decl_function_context, not
17442         hack_decl_function_context.
17443         * tree.c (hack_decl_function_context): Remove.
17444         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
17445         DECL_CLASS_CONTEXT.
17446         * typeck2.c (error_not_base_type): Likewise.
17447
17448 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
17449
17450         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
17451
17452 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17453
17454         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
17455
17456 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
17457
17458         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
17459
17460 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
17461
17462         * decl2.c (lang_decode_option): Enable automatic line wrapping.
17463
17464 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
17465
17466         * parse.y (frob_specs): Split out...
17467         (parse_decl): From here.
17468         (fn.def2): Call initial_deferred_type_access_control.
17469         (after_type_component_declarator0): Call frob_specs.
17470         (notype_component_declarator0): Likewise.
17471         * search.c (friend_accessible_p): Nested classes are friends of their
17472         enclosing classes.
17473
17474 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
17475
17476         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
17477         used to create an implicit temporary.
17478
17479         * class.c (dfs_modify_vtables): Tweak calculation of functions to
17480         override.
17481
17482 2000-02-08  Nathan Sidwell  <nathan@acm.org>
17483
17484         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
17485         strip array element qualifiers too.
17486
17487 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
17488
17489         * decl.c (store_parm_decls): Don't build cleanups for parameters
17490         while processing_template_decl.
17491
17492 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
17493
17494         * cp-tree.h (struct saved_scope): Add incomplete field.
17495         (namespace_scope_incomplete): New macro.
17496         * decl.c (pushdecl): Use it.
17497         (hack_incomplete_structures): Use it.  See through artificial
17498         binding levels.
17499         (mark_saved_scope): Mark it.
17500
17501         Implement access control for nested types.
17502         * search.c (type_access_control): New fn.
17503         (accessible_p): Now we do perform access control for types.
17504         * semantics.c (deferred_type_access_control): New fn.
17505         (initial_deferred_type_access_control): New fn.
17506         (begin_function_definition): Call it.  Add lookups parm.
17507         * decl.c (struct binding_level): Add this_class field.
17508         (pushlevel_class): Set it.
17509         (mark_binding_level): Mark it.
17510         (lookup_name_real): Use it.  Call type_access_control.
17511         (mark_saved_scope): Mark lookups field.
17512         * cp-tree.h (flagged_type_tree): Add lookups field.
17513         (struct saved_scope): Add lookups field.
17514         (type_lookups): New macro.
17515         * parse.y (declmods): Now <ftype>.
17516         (parse_decl): Add lookups parm.  Call
17517         initial_deferred_type_access_control.
17518         (lang_extdef): Clear type_lookups.
17519         (typed_declspecs, declmods, typespec): Set lookups field.
17520         (initdcl): Call deferred_type_access_control.
17521         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
17522         component_decl_1, named_parm): Adjust.
17523         * friend.c (is_friend): Nested classes are friends of their
17524         enclosing classes.
17525
17526         * class.c (currently_open_derived_class): New fn.
17527         * method.c (hack_identifier): Use it.
17528
17529         * lex.c (do_identifier): Remove obsolete code.
17530
17531         * parse.y (typed_typespecs): Propagate new_type_flag properly.
17532
17533 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
17534
17535         * tinfo.h: Remove apostrophes from C++ comment (xgettext
17536         thinks this file is plain C).
17537
17538 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17539
17540         * Makefile.in (call.o): Depend on $(EXPR_H).
17541
17542         * call.c: Include "expr.h".
17543
17544         * class.c (dump_class_hierarchy): Add prototype.
17545
17546         * search.c (dfs_get_pure_virtuals): Likewise.
17547
17548 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
17549
17550         * parse.y (simple_stmt): Allow :: token in asm parameter list.
17551         * parse.c: Rebuilt.
17552
17553 2000-01-31  Jim Wilson  <wilson@cygnus.com>
17554
17555         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
17556         Store it in DECL_FCONTEXT.
17557         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
17558
17559 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
17560
17561         * tinfo.h (old abi): #include "tconfig.h".
17562         * tinfo.cc (convert_to_base): Move into old abi section.
17563
17564 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
17565
17566         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
17567         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
17568         (BINFO_PRIMARY_BINFO): New macro.
17569         (BF_DELTA): Rename to ...
17570         (BV_DELTA): ... this.
17571         (BF_VCALL_INDEX): Rename to ...
17572         (BV_VCALL_INDEX): ... this.
17573         (BF_FN): Rename to ...
17574         (BV_FN): ... this.
17575         * class.c (build_vbase_path): Adjust for changes to reverse_path.
17576         (set_rtti_entry): Rename BF_ macros to BV_ variants.
17577         (modify_vtable_entry): Simplify.
17578         (add_virtual_function): Rename BF_ macros to BV_ variants.
17579         (build_vtable_initializer): Likewise.
17580         (get_class_offset_1): Remove.
17581         (dfs_get_class_offset): Likewise.
17582         (get_class_offset): Likewise.
17583         (dfs_find_final_overrider): New function.
17584         (find_final_overrider): Likewise.
17585         (modify_one_vtable): Remove.
17586         (dfs_find_base): New function.
17587         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
17588         find_final_overrider.
17589         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
17590         virtuals.
17591         (dfs_fixup_vtable_deltas): Remove.
17592         (override_one_vtable): Remove.
17593         (merge_overrides): Likewise.
17594         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
17595         unreal chilren of virtual bases.
17596         (finish_struct_1): Don't use merge_overrides.  Don't use
17597         dfs_fixup_vtable_deltas.
17598         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
17599         BINFOs.
17600
17601 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
17602             Jason Merrill  <jason@yorick.cygnus.com>
17603
17604         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
17605
17606 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
17607
17608         * exception.cc (__throw_bad_typeid): Add missing std::.
17609
17610 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17611
17612         * cp-tree.h (make_thunk): PROTO -> PARAMS.
17613
17614 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
17615
17616         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
17617
17618         Runtime support for new-abi rtti.
17619         * inc/typeinfo (type_info::operator!=): Define in class.
17620         (type_info::before, type_info::name, type_info::operator==,
17621         type_info::operator!=): Define new ABI implementations.
17622         (type_info::is_pointer_p, type_info::is_function_p): Declare
17623         new virtual functions.
17624         (type_info::do_catch, type_info::do_upcast): Likewise.
17625
17626         * tinfo.h (__base_class_info): Define new class.
17627         (__class_type_info): Likewise.
17628         (__si_class_type_info): Likewise.
17629         (__vmi_class_type_info): Likewise.
17630         (__dynamic_cast): Prototype.
17631
17632         * tinfo.cc: Conditionalize old and new rtti mechanisms.
17633         (type_info::is_pointer_p): Define new function.
17634         (type_info::is_function_p): Likewise.
17635         (type_info::do_catch): Likewise.
17636         (type_info::do_upcast): Likewise.
17637         (vtable_prefix): New structure for vtable access.
17638         (adjust_pointer): Define new template function.
17639         (contained_p, public_p, virtual_p, contained_public_p,
17640         contained_nonpublic_p, contained_nonvirtual_p): Define new
17641         functions.
17642         (nonvirtual_base_type): New local variable.
17643         (__class_type_info::~__class_type_info): Define.
17644         (__si_class_type_info::~__si_class_type_info): Likewise.
17645         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
17646         (__class_type_info::do_catch): Define new function.
17647         (__class_type_info::do_upcast): Likewise.
17648         (__class_type_info::find_public_src): Likewise.
17649         (__class_type_info::do_find_public_src): Likewise.
17650         (__si_class_type_info::do_find_public_src): Likewise.
17651         (__vmi_class_type_info::do_find_public_src): Likewise.
17652         (__class_type_info::do_dyncast): Likewise.
17653         (__si_class_type_info::do_dyncast): Likewise.
17654         (__vmi_class_type_info::do_dyncast): Likewise.
17655         (__class_type_info::do_upcast): Likewise.
17656         (__si_class_type_info::do_upcast): Likewise.
17657         (__vmi_class_type_info::do_upcast): Likewise.
17658         (__dynamic_cast): Likewise.
17659
17660         * tinfo2.cc (__fundamental_type_info): Define new class.
17661         (__pointer_type_info): Likewise.
17662         (__reference_type_info): Likewise.
17663         (__array_type_info): Likewise.
17664         (__function_type_info): Likewise.
17665         (__enum_type_info): Likewise.
17666         (__ptr_to_member_type_info): Likewise.
17667         (__fundamental_type_info::~__fundamental_type_info): Define.
17668         (__pointer_type_info::~__pointer_type_info): Likewise.
17669         (__reference_type_info::~__reference_type_info): Likewise.
17670         (__array_type_info::~__array_type_info): Likewise.
17671         (__function_type_info::~__function_type_info): Likewise.
17672         (__enum_type_info::~__enum_type_info): Likewise.
17673         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
17674         (__pointer_type_info::do_catch): Define new function.
17675         (__ptr_to_member_type_info::do_catch): Define new function.
17676
17677         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
17678         (__is_pointer): Likewise.
17679
17680         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
17681
17682 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
17683
17684         * cp/class.c (build_vtable): Rename to build_primary_vtable.
17685         (prepare_fresh_vtable): Rename to build_secondary_vtable.
17686         (make_new_vtable): New function.
17687         (modify_vtable_entry): Handle generation of new vtables correctly.
17688         (modify_one_vtable): Remove unused parameter.
17689         (dfs_fixup_vtable_deltas): Likewise.
17690         (override_one_vtable): Use build_secondary_vtable.
17691         (finish_struct_1): Use build_primary_vtable and
17692         build_secondary_vtable.
17693
17694 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
17695
17696         * cp/decl.c: Adjust variable names, comments, help strings.
17697
17698 2000-01-29  Nathan Sidwell  <nathan@acm.org>
17699
17700         * new2.cc (operator delete[]): Use operator delete, don't assume
17701         implementation.
17702
17703 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
17704
17705         * class.c (build_vtbl_initializer): Add argument to
17706         build_vtable_entry call.
17707
17708 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
17709
17710         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
17711         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
17712         (BF_DELTA): New macro.
17713         (BF_VCALL_INDEX): Likewise.
17714         (BF_FN): Likewise.
17715         (THUNK_VCALL_OFFSET): Likewise.
17716         (make_thunk): Change prototype.
17717         * class.c (build_vtable_entry): Integrate
17718         build_vtable_entry_for_fn.  Handle vcall indices.
17719         (build_vtable_entry_for_fn): Remove.
17720         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
17721         BF_VCALL_INDEX, BF_FN.
17722         (modify_vtable_entry): Integrate common code from
17723         modify_one_vtable and dfs_fixup_vtable_deltas.
17724         (add_virtual_function): Set BF_VCALL_INDEX.
17725         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
17726         and BF_FN.
17727         (modify_one_vtable): Simplify.
17728         (dfs_fixup_vtable_deltas): Likewise.
17729         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
17730         * method.c (make_thunk): Handle vcall indices.
17731
17732 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
17733
17734         Compiler side new abi rtti (not enabled).
17735         * cp-tree.h (new_abi_rtti_p): New macro.
17736         (emit_support_tinfos): Prototype new function.
17737         (tinfo_decl_p): Likewise.
17738         (emit_tinfo_decl): Likwise.
17739         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
17740         macros.
17741         (doing_runtime): New local static.
17742         (init_rtti_processing): Add new-abi initializer.
17743         (get_tinfo_decl): Add new-abi logic.
17744         (tinfo_from_decl): Likewise.
17745         (build_dynamic_cast_1): Likewise.
17746         (qualifier_flags): New static function.
17747         (tinfo_base_init): Likewise.
17748         (generic_initializer): Likewise.
17749         (ptr_ref_initializer): Likewise.
17750         (ptmd_initializer): Likewise.
17751         (class_hint_flags): Likewise.
17752         (class_initializer): Likewise.
17753         (synthesize_tinfo_var): Likewise.
17754         (create_real_tinfo_var): Likewise.
17755         (create_pseudo_type_info): Likewise.
17756         (get_vmi_pseudo_type_info): Likewise.
17757         (create_tinfo_types): Likewise.
17758         (emit_support_tinfos): New global function.
17759         (tinfo_decl_p): New global predicate.
17760         (emit_tinfo_decl): New global function.
17761         * class.c (set_rtti_entry): Generalize for old and new rtti.
17762         (build_vtbl_initializer): Likewise.
17763         * decl2.c (finish_file): Likewise.
17764
17765 2000-01-27  Jim Wilson  <wilson@cygnus.com>
17766
17767         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
17768         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
17769
17770 2000-01-27  Mike Stump  <mrs@wrs.com>
17771
17772         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
17773         for scopes.
17774
17775 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
17776
17777         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
17778
17779 2000-01-26  J"orn Rennecke <amylaar@cygnus.co.uk>
17780
17781         * optimize.c (calls_setjmp_r): Supply new argument
17782         to special_function_p.
17783
17784 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17785
17786         * call.c: PROTO -> PARAMS.
17787         * class.c: Likewise.
17788         * cp-tree.h: Likewise.
17789         * cvt.c: Likewise.
17790         * decl.c: Likewise.
17791         * decl.h: Likewise.
17792         * decl2.c: Likewise.
17793         * dump.c: Likewise.
17794         * errfn.c: Likewise.
17795         * error.c: Likewise.
17796         * except.c: Likewise.
17797         * expr.c: Likewise.
17798         * init.c: Likewise.
17799         * input.c: Likewise.
17800         * lex.c: Likewise.
17801         * lex.h: Likewise.
17802         * method.c: Likewise.
17803         * optimize.c: Likewise.
17804         * parse.y: Likewise.
17805         * pt.c: Likewise.
17806         * repo.c: Likewise.
17807         * rtti.c: Likewise.
17808         * search.c: Likewise.
17809         * semantics.c: Likewise.
17810         * spew.c: Likewise.
17811         * tree.c: Likewise.
17812         * typeck.c: Likewise.
17813         * typeck2.c: Likewise.
17814         * xref.c: Likewise.
17815
17816 2000-01-25  Richard Henderson  <rth@cygnus.com>
17817
17818         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
17819
17820 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
17821
17822         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
17823         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
17824         (struct vcall_offset_data_s): New type.
17825         (dfs_vcall_offset_queue_p): New function.
17826         (dfs_build_vcall_offset_vtbl_entries): Likewise.
17827         (build_vcall_offset_vtbl_entries): Likewise.
17828         (layout_vtable_decl): Likewise.
17829         (num_vfun_entries): Likewise.
17830         (num_extra_vtbl_entries): Add the entries for vcall offsets.
17831         (build_vtbl_initializer): Likewise.
17832         (dfs_finish_vtabls): Use layout_vtable_decl.
17833         (modify_one_vtables): Always duplicate vtables under the new ABI.
17834         (finish_struct_1): Use layout_vtable_decl.
17835
17836 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17837
17838         * decl.c (member_function_or_else): Change third arg from a format
17839         specifier to an `enum overload_flags'.  Callers changed.
17840
17841 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
17842
17843         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
17844         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
17845         build_const_cast, get_delta_difference, check_return_expr): Avoid
17846         ANSI string concatenation usage.
17847
17848 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
17849
17850         * class.c (layout_class_type): Put the fields required to make a
17851         class non-empty at the end, not the beginning, of the TYPE_FIELDs
17852         list.
17853
17854 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
17855
17856         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
17857         template.
17858
17859         * decl2.c (mark_used): Do instantiate inlines that have been
17860         explicitly instantiated.
17861
17862 2000-01-24  Richard Henderson  <rth@cygnus.com>
17863
17864         * call.c (build_over_call): Use expand_tree_builtin.
17865         * typeck.c (build_function_call_real): Likewise.
17866         (build_binary_op_nodefault): Handle unordered compares.
17867
17868 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
17869
17870         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
17871         cp_tree_index values.
17872         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
17873         New global node #defines for them.
17874         * rtti.c (call_void_fn): Replace with ...
17875         (build_runtime_decl): ... new static function.
17876         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
17877         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
17878         (build_dynamic_cast_1): Always produce correctly typed result.
17879         Explicitly produce type_info addresses. Use dynamic_cast_node.
17880         * exception.cc (__throw_bad_cast): Return `void *'.
17881         (__throw_bad_typeid): Return `const type_info &'.
17882
17883 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
17884
17885         * cp-tree.h (get_vtable_decl): Prototype new function.
17886         * class.c (get_vtable_decl): New function. Broken out from ...
17887         (build_vtable): ... here. Use it.
17888         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
17889         by get_vtable_decl.
17890
17891 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
17892
17893         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
17894         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
17895         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
17896         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
17897         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
17898         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
17899         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
17900         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
17901         (CPTI_TINFO_VAR_ID): New enumeration.
17902         (__tp_desc_type_node, __access_mode_type_node,
17903         __bltn_desc_type_node, __user_desc_type_node,
17904         __class_desc_type_node, __ptr_desc_type_node,
17905         __attr_desc_type_node, __func_desc_type_node,
17906         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
17907         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
17908         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
17909         enum_desc_type_node, class_desc_type_node,
17910         si_class_desc_type_node, vmi_class_desc_type_node,
17911         ptmd_desc_type_node, base_desc_type_node): New #defines.
17912         (tinfo_fn_id, tinfo_fn_type): Rename to ...
17913         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
17914         (tinfo_var_id): New enumeration.
17915         (DECL_TINFO_FN_P): Augment comment.
17916         * decl.c (cp_global_trees): Adjust documentation.
17917         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
17918         tinfo_decl_type and tinfo_var_id.
17919         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
17920         (build_typeid): Remove unused variable.
17921         (get_tinfo_var): Use tinfo_var_id.
17922         (tinfo_name): New static function.
17923         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
17924         (tinfo_from_decl): Likewise.
17925         (get_base_offset): New static function, broken out of
17926         expand_class_desc.
17927         (expand_si_desc): Use tinfo_name.
17928         (expand_class_desc): Likewise. Lose local static variable.
17929         Use base_desc_type_node. Use get_base_offset.
17930         (expand_ptr_desc): Use tinfo_name.
17931         (expand_attr_desc): Likewise.
17932         (expand_generic_desc): Likewise.
17933
17934         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
17935         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
17936
17937 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
17938
17939         * cp-tree.h (__eprintf): Remove declaration.
17940         * tree.c (__eprintf): Remove definition.
17941
17942 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
17943             Mark Mitchell  <mark@codesourcery.com>
17944
17945         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
17946         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
17947
17948 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
17949
17950         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
17951
17952 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
17953
17954         * cp-tree.h (register_dtor_fn): New function.
17955         * decl.c (destroy_local_static): Rename to ...
17956         (register_dtor_fn): ... this.  Give it external linkage.
17957         (expand_static_init): Use it.
17958         * decl2.c (do_static_initialization): Likewise, if using
17959         __cxa_atexit.
17960         (do_static_destruction): Check that __cxa_atexit is not in use.
17961         (finish_file): Don't call do_static_destruction if using
17962         __cxa_atexit.
17963
17964         * typeck.c (convert_arguments): Restore two-message error
17965         reporting.
17966
17967 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
17968
17969         Remap dynamic cast hint values to be consistent across ABIs.
17970         * search.c (dynamic_cast_base_recurse): Remap generated value.
17971         (get_dynamic_cast_base_type): Adjust documentation.
17972         * tinfo.h (__user_type_info::dyncast): Likewise.
17973         (__user_type_info::find_public_subobj): Remap BOFF meaning.
17974         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
17975         (__class_type_info::do_dyncast): Likewise.
17976         (__class_type_info::do_find_public_subobj): Likewise.
17977         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
17978
17979 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
17980
17981         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
17982
17983         * typeck2.c (incomplete_type_error): Restore previous
17984         cp_error and cp_error_at call sequence.
17985
17986 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
17987
17988         * class.c (dump_class_hierarchy): Make format agree with argument;
17989         cast pointer to unsigned long and print with %lx.
17990
17991 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
17992
17993         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
17994
17995         * typeck.c (composite_pointer_type, common_type,
17996         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
17997         build_function_call_real, convert_arguments,
17998         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
17999         build_unary_op, mark_addressable, build_compound_expr,
18000         build_static_cast, build_reinterpret_cast, build_const_cast,
18001         build_c_cast, build_modify_expr, get_delta_difference,
18002         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
18003         'ISO C++'.  Fusion consecutive calls to diagnostic message routines
18004         into a single one.
18005         * typeck2.c (readonly_error, abstract_virtuals_error,
18006         process_init_constructor, check_for_new_type): Likewise.
18007
18008 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
18009
18010         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
18011         VAR_DECLs.
18012
18013 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
18014
18015         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
18016         (build_x_typeid): Likewise.
18017         (get_tinfo_fn): Likewise.
18018         (get_tinfo_fn_unused): Rename to ...
18019         (get_tinfo_decl): ... here.
18020         * rtti.c (build_headof): Replace logic error with assertion.
18021         (get_tinfo_fn_dynamic): Rename to ...
18022         (get_tinfo_decl_dynamic): ... here. Make static. Use
18023         complete_type_or_else.
18024         (build_x_typeid): Move into ...
18025         (build_typeid): ... here. Adjust call to
18026         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
18027         throw_bad_typeid expression.
18028         (get_tinfo_fn_unused): Rename to ...
18029         (get_tinfo_decl): ... here. Adjust comment.
18030         (get_tinfo_fn): Delete.
18031         (tinfo_from_decl): New static function.
18032         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
18033         (get_typeid): Use complete_type_or_else.
18034         (build_dynamic_cast_1): Adjust calls to
18035         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
18036         * parse.y (primary): Adjust call to build_typeid.
18037         * except.c (build_eh_type_type_ref): Adjust call to
18038         get_tinfo_decl. Mark as used.
18039         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
18040         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
18041         * parse.c: Regenerated.
18042
18043 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
18044
18045         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
18046         calling convention.
18047         (resolves_to_fixed_type_p): Document calling convention.
18048         * rtti.c (build_x_typeid): Initialize NONNULL.
18049
18050         * cp-tree.h (build_shared_int_cst): New function.
18051         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
18052         * class.c (modify_vtable_entry): Likewise.
18053         (add_virtual_function): Split out code to generated shared
18054         INTEGER_CSTs to build_share_int_cst.
18055         (modify_all_vtables): Handle all the overridden functions here.
18056         Add overridden functions from non-primary virtual bases to the
18057         primary vtable.
18058         (finish_struct_1): Adjust call to modify_all_vtables.  Add
18059         overridden functions from non-primary bases to the vtable.
18060         * tree.c (build_shared_int_cst): New function.
18061
18062         * cp-tree.h (scratchalloc): Remove.
18063         (build_scratch_list): Likewise.
18064         * call.c (convert_class_to_reference): Replace build_scratch_list
18065         and build_expr_list with build_tree_list.
18066         (add_candidate): Replace scratchalloc with expralloc.  Note memory
18067         leak.
18068         (build_user_type_conversion_1):  Replace build_scratch_list
18069         and build_expr_list with build_tree_list.
18070         (build_new_op): Likewise.
18071         (build_op_delete_call): Likewise.
18072         (convert_like): Likewise.
18073         * cvt.c (ocp_convert): Likewise.
18074         * decl.c (start_decl): Likewise.
18075         (start_function): Likewise.
18076         (finish_destructor_body): Likewise.
18077         (maybe_build_cleanup_1): Likewise.
18078         * decl2.c (reparse_decl_as_expr): Likewise.
18079         * init.c (perform_member_init): Likewise.
18080         (expand_cleanup_for_base): Likewise.
18081         (build_builtin_delete_call): Likewise.
18082         (build_new_1): Likewise.
18083         (build_delete): Likewise.
18084         * method.c (do_build_assign_ref): Likewise.
18085         * parse.y (already_scoped_stmt): Likewise.
18086         (nontrivial_exprlist): Likewise.
18087         (net_initializer): Likewise.
18088         (initlist): Likewise.
18089         * parse.c: Regenerated.
18090         * rtti.c (build_x_typeid): Likewise.
18091         (build_dynamic_cast_1): Likewise.
18092         * typeck.c (build_x_compound_expr): Likewise.
18093         (build_static_cast): Likewise.
18094         (build_modify_expr): Likewise.
18095
18096         * cp-tree.h (DECL_VINDEX): Add documentation.
18097         * class.c (build_vtable_entry): Likewise.
18098         (start_vtable): Add comment.
18099         (add_virtual_function): Replace pending_hard_virtuals with
18100         overridden_virtuals and pending_virtuals with new_virtuals.
18101         Replace redundant assignments with assertions.
18102         (check_for_override): Add comment.
18103         (check_bases_and_members): Replace pending_hard_virtuals with
18104         overridden_virtuals and pending_virtuals with new_virtuals.
18105         (create_vtbl_ptr): Likewise.
18106         (layout_class_type): Likewise.
18107         (finish_struct_1): Likewise.  Add comments.
18108
18109 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
18110
18111         * class.c (finish_struct_1): Replace redundant code with
18112         assertions.
18113
18114         * cp-tree.h (flag_new_abi): Move.
18115         (flag_use_cxa_atexit): Likewise.
18116         (flag_honor_std): Likewise.
18117         (flag_rtti): Likewise.
18118         (vbase_offsets_in_vtable_p): Define.
18119         (vptrs_present_everywhere_p): Likewise.
18120         (TYPE_CONTAINS_VPTR_P): Likewise.
18121         (dfs_walk_real): Declare.
18122         * class.c (build_vbase_pointer_fields): Check
18123         vbase_offsets_in_vtable_p.
18124         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
18125         BINFO_VPTR_FIELD.
18126         (build_vbase_offset_vtbl_entries): Simplify.
18127         (build_vbase_offset_vtbl_entries): Adjust.
18128         (build_vbase_pointer): Add ability to look up vbase offsets in
18129         vtable.
18130         (start_vtable): New function.
18131         (add_virtual_function): Use it.
18132         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
18133         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
18134         (build_vtbl_initializer): Take the type of the complete object as
18135         input.  Use it to correctly calculate vbase offsets.
18136         (dfs_finish_vtbls): Pass the complete type to
18137         build_vtbl_initializer.
18138         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
18139         (create_vtable_ptr): Create a vtable even if there are no
18140         new virtual functions, under the new ABI.
18141         (finish_struct_1): Likewise.
18142         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
18143         * decl.c (exapnd_static_init): Remove call to
18144         preserve_initializer.
18145         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
18146         vtables.
18147         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
18148         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
18149         (construct_virtual_bases): Don't initialize virtual base pointers
18150         under the new ABI.
18151         (build_aggr_init): Clean up comment.
18152         (expand_aggr_init_1): Likewise.
18153         * rtti.c (expand_class_desc): Store the virtual function table
18154         index where the vbase offset lives in the offset field.
18155         * search.c (dfs_walk_real): Make it global.
18156         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
18157         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
18158
18159         * tinfo.h (USItype): Make it signed under the new ABI.
18160         * tinfo.cc (convert_to_base): New function.  Encapsulate base
18161         conversion logic here.
18162         (__class_type_info::do_upcast): Use it.
18163         (__class_type_info::do_dyncast): Likewise.
18164         (__class_type_info::do_find_public_subobj): Likewise.
18165
18166         * init.c (construct_virtual_bases): Don't look up the addresses of
18167         virtual bases at run-time.
18168
18169         * class.c (build_vbase_pointer): Relocate.
18170         (build_vbase_pointer_fields): Likewise.
18171         (dfs_build_vbase_offset_vtbl_entries): Likewise.
18172         (build_vbase_offset_vtbl_entries): Likewise.
18173
18174         * decl.c (init_decl_processing): Complain if -fnew-abi
18175         -fno-vtable-thunks is used.
18176
18177         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
18178         flag_new_abi.
18179
18180 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
18181
18182         * cp-tree.h (num_extra_vtbl_entries): New function.
18183         (size_extra_vtbl_entries): Likewise.
18184         (dfs_vtable_path_unmark): Likewise.
18185         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
18186         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
18187         * class.c (num_extra_vtbl_entries): New function.
18188         (size_extra_vtbl_entries): Likewise.
18189         (dfs_build_vbase_offset_vtbl_entries): New function.
18190         (build_vbase_offset_vtbl_entries): Likewise.
18191         (build_vtbl_initializer): Use it.
18192         (finish_struct_1): Adjust vtable sizes (using
18193         num_extra_vtbl_entries).
18194         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
18195         THUNK_DECL is non-NULL before expanding it.
18196         * init.c (expand_virtual_init): Adjust the vtable pointer by
18197         size_extra_vtbl_entries before storing it.
18198         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
18199         Handle TREE_LIST parameters here, not in the dfs_* functions.
18200         (dfs_unmarked_real_bases_queue_p): Adjust.
18201         (dfs_marked_real_bases_queue_p): Likewise.
18202         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
18203         (dfs_vtable_path_marked_real_bases_queue_p): New function.
18204         (dfs_vtable_path_unmark): Likewise.
18205
18206 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
18207
18208         * optimize.c (copy_body_r): Clear the operand three of a
18209         TARGET_EXPR when copying it.
18210
18211 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
18212
18213         * method.c (build_decl_overload_real): Check whether we are in ::
18214         before returning __builtin_new/delete.
18215
18216 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
18217
18218         * pt.c (tsubst_friend_function): Improve comment.
18219         (instantiate_decl): Avoid crashing when a "nested" function is
18220         instantiated from the top level.
18221
18222         * dump.c (dqeueue_and_dump): Dump
18223         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
18224
18225 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18226
18227         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
18228
18229 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
18230
18231         * g++spec.c (lang_specific_driver): Add -fnew-abi if
18232         ENABLE_NEW_GXX_ABI defined.
18233         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
18234         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
18235         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
18236
18237 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
18238
18239         * decl.c (start_cleanup_fn): Call pushdecl.
18240
18241         * call.c (convert_class_to_reference): Fix typos.
18242         (build_conditional_expr): Handle errors gracefully.
18243         * class.c (push_nested_class): Likewise.
18244         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
18245         (DECL_THIS_EXTERN): Use it.
18246         (DECL_THIS_STATIC): Likewise.
18247         * cvt.c (convert_to_void): Handle errors gracefully.
18248         (build_expr_type_conversion): Likewise.
18249         * decl.c (maybe_push_decl): Likewise.
18250         (start_decl_1): Likewise.
18251         (require_complete_types_for_parms): Likewise.
18252         * parse.y (structsp): Likewise.
18253         (base_class): Likewise.
18254         * parse.c: Regenerated.
18255         * pt.c (finish_member_template_decl): Likewise.
18256         * typeck.c (decay_conversion): Likewise.
18257
18258         * cp-tree.h (dfs_skip_vbases): New function.
18259         (find_vbase_instance): Likewise.
18260         * class.c (determine_primary_base): Allow a nearly empty base to
18261         serve as a primary base class under the new ABI.
18262         (get_class_offset_1): Rename to ...
18263         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
18264         messages here.
18265         (get_class_offset): Use it.  Issue error messages here.
18266         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
18267         find the right copies of virtual bases.
18268         (fixup_vtable_deltas1): Rename to ...
18269         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
18270         bases as primary bases.
18271         (fixup_vtable_deltas): Remove.
18272         (override_one_vtable): Handle virtual bases as primary bases.
18273         (merge_overrides): Likewise.
18274         (finish_struct_1): Likewise.
18275         (dump_class_hierarchy): Dump primary-ness of bases as well.
18276         * search.c (mark_primary_bases): Use a pre-order traversal to
18277         handle primary virtual bases.
18278         (dfs_skip_vbases): New fiunction.
18279         (expand_upcast_fixups): Adjust to handle primary virtual bases.
18280         (fixup_virtual_upcast_offsets): Likewise.
18281         (fixup_all_virtual_upcast_offsets): Likewise.
18282         (dfs_find_vbase_instances): New function.
18283         (find_vbase_instance): Likewise.
18284
18285 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
18286
18287         * lex.c (DIR_SEPARATOR): Delete macro.
18288
18289 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
18290
18291        * decl2.c (lang_decode_option): Handle automatic line wrapping
18292        option.
18293
18294 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
18295
18296         * friend.c (do_friend): Don't resolve scopes when processing
18297         template declarations, even if the qualifying scope doesn't
18298         involve template parameters.
18299
18300 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
18301
18302         * class.c (dfs_modify_vtables_queue_p): Remove.
18303         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
18304         and dfs_marked_real_bases_queue_p instead of
18305         dfs_modify_vtables_queue_p.
18306
18307         * class.c (build_vbase_path): Simplify.
18308         (dfs_propagate_binfo_offsets): New function.
18309         (propagate_binfo_offsets): Use it.
18310         (remove_base_field): Simplify.
18311         (dfs_set_offset_for_vbases): Remove.
18312         (dfs_set_offset_for_shared_vbases): New function.
18313         (dfs_set_offset_for_unshared_vbases): Likewise.
18314         (layout_virtual_bases): Use them.
18315         (layout_basetypes): Don't call propagate_binfo_offsets.
18316         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
18317         for the vbases.
18318
18319         * class.c (build_base_field): New function, split out from ...
18320         (build_base_fields): ... here.  Use it.  Allocate primary bases
18321         first, under the new ABI.
18322         (get_vtable_entry): Remove.
18323         (remove_base_field): New function, split out from ...
18324         (remove_base_fields): ... here.  Adjust since primary bases come
18325         first under the new ABI.
18326
18327         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
18328         (initialize_vtbl_ptrs): New function.
18329         (expand_indirect_vtbls_init): Change prototype.
18330         (convert_pointer_to_vbase): Declare.
18331         * init.c (expand_direct_vtbls_init): Remove.
18332         (dfs_initialize_vtbl_ptrs): New function.
18333         (initialize_vtbl_ptrs): Likewise.
18334         (emit_base_init): Use initialize_vtbl_ptrs.
18335         * search.c (convert_pointer_to_vbase): Make it global.
18336         (expand_indirect_vtbls_init): Remove vtable initialization code.
18337         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
18338
18339         * class.c (dfs_finish_vtbls): New function.
18340         (finish_vtbls): Use it.
18341         (dump_class_hierarchy): New function.
18342
18343         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
18344         (BINFO_VBASE_PRIMARY_P): New macro.
18345         (BINFO_VIRTUALS): Add to documentation.
18346         (SET_BINFO_PRIMARY_MARKED_P): Remove.
18347         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
18348         (dfs_mark_primary_bases_queue_p): Likewise.
18349         (dfs_unmarked_real_bases_queue_p): New function.
18350         (dfs_marked_real_bases_queue_p): Likewise.
18351         * search.c (dfs_mark_primary_bases): Adjust.
18352         (mark_primary_bases): Likewise.
18353         (get_shared_vbase_if_not_primary): New function.
18354         (dfs_unmarked_real_bases_queue_p): Likewise.
18355         (dfs_marked_real_bases_queue_p): Likewise.
18356         (dfs_get_pure_virtuals): Simplify.
18357         (get_pure_virtuals): Likewise.
18358
18359 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18360
18361         * lex.c: Include tm_p.h.
18362
18363 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
18364
18365         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
18366
18367 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
18368
18369         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
18370         * pt.c (instantiate_decl): Defer comdat templates that might not be
18371         needed.
18372
18373         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
18374         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
18375         (finish_file): Likewise.
18376
18377         * decl2.c (import_export_class): Undo 12/14 change.
18378
18379         * error.c (dump_decl): operator new, not operatornew.
18380
18381         * class.c (field_decl_cmp): A nontype is "greater" than a type.
18382         * search.c (lookup_field_1): Look for the last field with the
18383         desired name.
18384
18385 2000-01-05  Nathan Sidwell  <nathan@acm.org>
18386
18387         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
18388         FUNCTION_DECL.
18389
18390 2000-01-05  Nathan Sidwell  <nathan@acm.org>
18391
18392         * typeck.c (build_static_cast): Don't strip target qualifiers
18393         when casting from a class.
18394
18395 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18396
18397         * class.c (warn_hidden): Initialize variable `fndecl'.
18398
18399 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
18400
18401         * decl.c (flag_isoc9x): New variable to be able to use code in
18402         c-common.c.  For now always zero.
18403
18404 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
18405
18406         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
18407         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
18408         or unshare_base_binfos for virtual bases here.
18409         * search.c (dfs_get_vbase_types): Do it here.
18410         (get_vbase_types): Adjust.
18411
18412 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
18413
18414         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
18415         (BINFO_PRIMARY_MARKED_P): Use flag 5.
18416         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
18417         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
18418         (unmark_primary_bases): Remove declaration.
18419         (unmarkedp): Declare.
18420         (dfs_vbase_unmark): Likewise.
18421         * class.c (determine_primary_base): Return immediately if there
18422         are no base classes.  Call mark_primary_bases here.
18423         (modify_all_direct_vtables): Remove.
18424         (modify_all_indirect_vtables): Remove.
18425         (dfs_modify_vtables_queue_p): New function.
18426         (dfs_modify_vtables): New function.
18427         (modify_all_vtables): Use them.
18428         (build_base_fields): Build FIELD_DECLs for primary virtual base
18429         classes.
18430         (create_vtable_ptr): Don't call determine_primary_base here.
18431         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
18432         (dfs_set_offset_for_vbases): ... this.
18433         (layout_virtual_bases): Use it.
18434         (layout_class_type): Call determine_primary_base here.
18435         * search.c (unmarkedp): Make it global.
18436         (shared_marked_p): Simplify.
18437         (shared_unmarked_p): Likewise.
18438         (dfs_primary_bases_queue_p): Remove.
18439         (dfs_unmark_primary_bases): Likewise.
18440         (unmark_primary_bases): Likewise.
18441         (mark_primary_bases): Simplify.
18442         (get_pure_virtuals): Don't call mark_primary_bases here.
18443         (dfs_vbase_unmark): New function.
18444         (get_vbase_types): Simplify.
18445
18446         * class.c (struct base_info): Remove.
18447         (determine_primary_base): Take has_virtual_p rather than a
18448         base_info as input.  Don't calculate max_has_virtual.
18449         (finish_struct_bits): Remove max_has_virtual argument.
18450         (create_vtable_ptr): Remove max_has_virtual_p argument.
18451         (layout_virtual_bases): Remove max argument.
18452         (layout_basetypes): Likewise.
18453         (layout_class_type): Remove max_has_virtual_p argument.
18454         (finish_struct_1): Remove max_has_virtual.
18455
18456         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
18457         (layout_basetypes): Remove.
18458         * class.c (propagate_binfo_offsets): Moved here from tree.c.
18459         Update to handle primary virtual bases.
18460         (remove_base_fields): New function, split out from
18461         layout_basetypes.
18462         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
18463         (layout_virtual_bases): New function, split out from
18464         layout_basetypes.  Update to handle primary virtual bases.
18465         (layout_basetypes): Moved here from tree.c.  Use
18466         remove_base_fields and layout_virtual_bases.
18467         * search.c (dfs_mark_primary_bases_queue_p): New function.
18468         (mark_primary_bases): Use it.
18469         * tree.c (CEIL): Remove.
18470         (propagate_binfo_offsets): Remove.
18471         (layout_basetypes): Remove.
18472
18473 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
18474
18475         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
18476         (BINFO_PRIMARY_MARKED_P): New macro.
18477         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
18478         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
18479         (mark_primary_bases): New function.
18480         (unmark_primary_bases): Likewise.
18481         * search.c (get_abstract_virtuals_1): Remove.
18482         (dfs_mark_primary_bases): New function.
18483         (mark_primary_bases): Likewise.
18484         (dfs_unmark_primary_bases): Likewise.
18485         (unmark_primary_bases): Likewise.
18486         (dfs_get_pure_virtuals): Likewise.
18487
18488 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
18489
18490         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
18491         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
18492         (modify_one_vtable): Adjust.
18493         (fixup_vtable_deltas1): Likewise.
18494         (override_one_vtable): Likewise.
18495         * search.c (get_abstract_virtuals_1): Likewise.
18496         (get_pure_virtuals): Likewise.
18497         (expand_upcast_fixups): Likewise.
18498         * tree.c (debug_binfo): Likewise.
18499
18500         * class.c (build_vtable): Don't return a value.  Don't rebuild
18501         vtables for bases that have already been handled.
18502         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
18503         already been handled.
18504         (modify_one_vtable): Adjust accordingly.
18505         (fixup_vtable_deltas1): Likewise.
18506         (finish_struct_1): Likewise.
18507
18508 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
18509
18510         * call.c (build_new_method_call): Also check destructors.