OSDN Git Service

gcc/
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2003-05-07  Richard Henderson  <rth@redhat.com>
2
3         PR c++/10570
4         * cfns.gperf: Comment out POSIX thread cancellation points,
5         plus abort and raise.
6         * cfns.h: Regenerate.
7
8 2003-05-07  Jason Merrill  <jason@redhat.com>
9
10         * call.c (build_conditional_expr): Don't assume that the folded
11         expression has result_type.
12
13 2003-05-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14
15         * typeck.c (build_unary_op): Deal with const qualifier in
16         invalid pointer-to-member earlier.
17
18 2003-05-05  Jason Merrill  <jason@redhat.com>
19
20         PR c++/9537
21         * call.c (conditional_conversion): Build an RVALUE_CONV if
22         we're just changing the cv-quals.
23         (build_conditional_expr): Don't call convert to change
24         cv-quals.
25
26 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
27
28         PR c++/10496
29         * typeck.c (build_unary_op): Don't output const qualifier when
30         output invalid pointer-to-member diagnostics.
31
32 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
33
34         * decl.c: Fix typos.
35
36 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
37
38         PR c++/4494
39         * decl.c (start_function): Use same_type_p to check return type
40         of main.
41
42 2003-05-03  Zack Weinberg  <zack@codesourcery.com>
43
44         PR c/10604
45         * cp/typeck.c (build_x_compound_expr): No need to check
46         extra_warnings as well as warn_unused_value.
47
48 2003-05-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
49
50         PR c++/9364, c++/10553, c++/10586
51         * decl.c (make_typename_type): Don't crash on illegal code.
52
53 2003-05-03  Nathan Sidwell  <nathan@codesourcery.com>
54
55         * class.c (finish_struct): Use location_t and input_location
56         directly.
57         * decl.c (make_label_decl): Likewise.
58         (use_label): Likewise.
59         * decl2.c (warn_if_unknown_interface): Likewise.
60         (start_static_initialization_or_destruction): Likewise.
61         (generate_ctor_or_dtor_function): Likewise.
62         (finish_file): Likewise.
63         * error.c (print_instantiation_full_context): Likewise.
64         * init.c (create_temporary_var): Likewise.
65         * method.c (synthesize_method): Likewise.
66         * parser.c (cp_token): Likewise.
67         (cp_lexer_set_source_position_from_token): Likewise.
68         (cp_lexer_get_preprocessor_token): Likewise.
69         (cp_parser_statement): Likewise.
70         * pt.c (tsubst_friend_function): Likewise.
71         (instantiate_class_template): Likewise.
72         (tsubst_decl): Likewise.
73         (tsubst): Likewise.
74         (instantiate_decl): Likewise.
75         * semantics.c (begin_class_definition): Likewise.
76         (expand_body): Likewise.
77
78 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
79
80         * class.c (finish_struct): Rename lineno to input_line.
81         * decl.c (push_binding_level, pop_binding_level,
82         suspend_binding_level, resume_binding_level, make_label_decl,
83         use_label, start_function): Likewise.
84         * decl2.c (warn_if_unknown_interface,
85         start_static_initialization_or_destruction,
86         generate_ctor_or_dtor_function, finish_file): Likewise.
87         * error.c (cp_line_of, print_instantiation_full_context,
88         print_instantiation_context): Likewise.
89         * except.c (check_handlers_1, check_handlers): Likewise.
90         * init.c (create_temporary_var): Likewise.
91         * method.c (use_thunk, synthesize_method): Likewise.
92         * parser.c (cp_lexer_set_source_position_from_token,
93         cp_lexer_get_preprocessor_token): Likewise.
94         * pt.c (push_tinst_level, pop_tinst_level,
95         tsubst_friend_function, instantiate_class_template, tsubst_decl,
96         tsubst, tsubst_expr, instantiate_decl): Likewise.
97         * semantics.c (genrtl_try_block, finish_label_stmt,
98         begin_class_definition, expand_body,
99         genrtl_finish_function): Likewise.
100         * tree.c (build_min_nt, build_min): Likewise.
101
102 2003-05-01  Mark Mitchell  <mark@codesourcery.com>
103
104         * decl2.c (comdat_linkage): Don't externalize explicit
105         instantiations.
106
107 2003-05-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
108
109         PR c++/10554
110         * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
111         is not NULL.
112
113 2003-05-01  Steven Bosscher  <steven@gcc.gnu.org>
114
115         * cp-tree.h (struct lang_id2): Remove.  Move fields from here...
116         (struct lang_identifier): ... to here.
117         (LANG_ID_FIELD): Remove.
118         (SET_LANG_ID): Remove.
119         (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
120         (SET_IDENTIFIER_LABEL_VALUE): Likewise.
121         (IDENTIFIER_IMPLICIT_DECL): Likewise.
122         (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
123         (IDENTIFIER_ERROR_LOCUS): Likewise.
124         (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
125
126 2003-05-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
127
128         PR c++/8772
129         * pt.c (convert_template_argument): Correct diagnostic.
130
131 2003-04-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
132
133         PR c++/9432, c++/9528
134         * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
135
136 2003-04-30  Garbiel Dos Reis  <gcc@integrable-solutions.net>
137
138         * decl.c (check_previous_goto_1): Adjust prototype.
139         (check_previous_goto): Adjust use.
140         (check_switch_goto): Likewise.
141         (use_label): Adjust.
142         (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
143         (struct named_label_use_list): Use location_t datatype.
144
145 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
146
147         PR c++/10551
148         * pt.c (mark_decl_instantiated): Defer all explicit instantiations
149         that have not yet been written out.
150
151 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
152
153         PR c++/10549
154         * class.c (layout_class_type): Mark overlong bitfields as having
155         the maximum size permitted by their type, after layout.
156
157         PR c++/10527
158         * error.c (dump_expr): Correctly handling of NEW_EXPR.4
159
160 2003-04-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
161
162         * call.c (build_operator_new_call): Fix typo.
163         * lang-options.h: Likewise.
164
165 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
166
167         PR c++/10515
168         * cp-tree.h (lookup_field_1): Declare it.
169         * search.c (lookup_field_1): Make it public.
170         * decl.c (reshape_init): Handle designated initializers.
171
172         * decl.c (maybe_commonize_var): Further tweak support for systems
173         without weak symbols.
174
175 2003-04-27  Mark Mitchell  <mark@codesourcery.com>
176
177         * decl.c (maybe_commonize_var): Fix thinko in last patch.
178
179 2003-04-27  Mark Mitchell  <mark@codesourcery.com>
180
181         PR c++/10506
182         * method.c (use_thunk): Decrement immediate_size_expand.
183
184         PR c++/10503
185         * cp-tree.h (DECL_VAR_MARKED_P): New macro.
186         (DECL_MAYBE_TEMPLATE): Remove.
187         * class.c (fixed_type_or_null): Avoid infinite recursion.
188
189         * decl.c (maybe_commonize_var): Make the code match the comments.
190         * pt.c (instantiate_decl): Move call to import_export_decl.
191
192 2003-04-26  Mark Mitchell  <mark@codesourcery.com>
193
194         * decl2.c (finish_file): Fix merge botch.
195
196 2003-04-25  Mark Mitchell  <mark@codesourcery.com>
197
198         * decl2.c (finish_file): Don't call import_export_decl for
199         functions that are not defined.
200         (handle_class_head): Robustify.
201         * pt.c (instantiate_decl): Do not call cp_finish_decl for
202         variables that are not defined.
203
204 2003-04-24  Sylvain Pion  <Sylvain.Pion@mpi-sb.mpg.de>
205
206         * call.c (print_z_candidates): Fix off by one error.
207
208 2003-04-24  Nathan Sidwell  <nathan@codesourcery.com>
209
210         PR c++/10337
211         * call.c (joust): Don't warn about conversion ops that are exact
212         or cv-conversions. Rearrange to avoid multiple type comparisons.
213
214 2003-04-23  Mark Mitchell  <mark@codesourcery.com>
215
216         PR c++/10471
217         * call.c (build_cxx_call): Robustify.
218
219 2003-04-23  Neil Booth  <neil@daikokuya.co.uk>
220
221         * Make-lang.in (lex.o): Remove mbchar.h.
222         * lex.c (MULTIBYTE_CHARS): Lose.
223         * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
224         in c-lex.c.
225
226 2003-04-23  Mark Mitchell  <mark@codesourcery.com>
227
228         PR c++/9847
229         * cp-tree.h (duplicate_tag_error): Remove.
230         * class.c (duplicate_tag_error): Remove.
231         * semantics.c (begin_class_definition): Return immediately for a
232         duplicate class definition.
233
234         PR c++/10451
235         * decl.c (grokdeclarator): Correct logic for "mutable" errors.
236
237 2003-04-22  Mark Mitchell  <mark@codesourcery.com>
238
239         PR c++/10446
240         * search.c (lookup_fnfields_1): Handle empty slots in the method
241         vector.
242
243         PR c++/10428
244         * decl.c (check_elaborated_type_specifier): New function, split
245         out from ...
246         (xref_tag): ... here.  Use the new function in more places.
247
248         * rtti.c (throw_bad_typeid): Use build_cxx_call.
249
250 2003-04-21  Mark Mitchell  <mark@codesourcery.com>
251
252         * call.c (build_over_call): Use build_cxx_call.
253         (build_cxx_call): New method, split out of build_over_call.
254         * cp-tree.h (language_function): Add can_throw.
255         (build_cxx_call): Declare it.
256         * decl.c (finish_function): If a function does not contain any
257         calls to functions that can throw an exception, indicate that
258         fact.
259         * decl2.c (mark_used): Do not defer the instantiation of
260         functions, if the current function does not throw.
261         * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
262         * pt.c (instantiate_decl): Make sure import_export_decl is called
263         before emitting things.
264         * rtti.c (throw_bad_cast): Use build_cxx_call.
265         (build_dynamic_cast_1): Likewise.
266         * typeck.c (build_function_call): Likewise.
267
268 2003-04-21  Nathan Sidwell  <nathan@codesourcery.com>
269
270         PR c++/9881
271         * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
272         expressions. Reverts my 2002-08-08 patch.
273
274         * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
275         cheaper early exit.
276
277 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
278
279         * cp/decl2.c (start_static_storage_duration_function): Take count
280         arg, don't check if it wraps round.
281         (generate_ctor_or_dtor_function): Add locus arg, use it.
282         (generate_ctor_and_dtor_functions_for_priority): Data arg is a
283         locus.
284         (finish_file): Set line numbers to past EOF for synthesized
285         functions.
286
287 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
288
289         PR c++/10405
290         * search.c (lookup_field_1): Final scan goes backwards for
291         types, forwards for non-types.
292
293 2003-04-17  Roger Sayle  <roger@eyesopen.com>
294
295         PR c/10375
296         * decl.c (duplicate_decls): Preserve "const", "noreturn" and
297         "nothrow" function attributes.
298
299 2003-04-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
300
301         PR c++/10347
302         * pt.c (type_dependent_expression_p): Handle array new.
303
304 2003-04-15  Mark Mitchell  <mark@codesourcery.com>
305
306         PR c++/10381
307         * parser.c (cp_parser_primary_expression): Reorganize logic for
308         dealing with name lookup failures.
309
310 2003-04-15  Jason Merrill  <jason@redhat.com>
311
312         * decl2.c (mark_used): Don't instantiate anything if
313         skip_evaluation.
314
315 2003-04-14  Ziemowit Laski  <zlaski@apple.com>
316
317         * tree.c (build_cplus_array_type_1): Do not call
318         uses_template_parms() on a NULL index_type.
319
320 2003-04-13  Roger Sayle  <roger@eyesopen.com>
321
322         * decl.c (duplicate_decls): Preserve pure and malloc attributes.
323
324 2003-04-12  Mark Mitchell  <mark@codesourcery.com>
325
326         PR c++/10300
327         * init.c (build_new_1): Reorganize.
328
329 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
330
331         * class.c (initialize_array)
332         * decl.c (reshape_init)
333         * decl2.c (build_expr_from_tree)
334         * init.c (build_zero_init)
335         * pt.c (tsubst_copy, tsubst_copy_and_build)
336         * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
337         (ptm_initializer, class_initializer, get_pseudo_ti_init)
338         * semantics.c (finish_compound_literal)
339         * typeck.c (build_ptrmemfunc1)
340         * typeck2.c (store_init_value, process_init_constructor)
341         (build_functional_cast): Use build_constructor.
342
343 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
344
345         * call.c (print_z_candidates): Use gcc_gettext_width, not
346         strlen, to determine how much padding to use.
347
348 2003-04-10  Zack Weinberg  <zack@codesourcery.com>
349
350         * decl.c: Update all calls to shadow_warning.
351
352 2003-04-10  Mark Mitchell  <mark@codesourcery.com>
353
354         * class.c (layout_class_type): Correct handling for overlong
355         bit-fields whose width is the same as an integer type.
356
357 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
358
359         * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
360         * cp-lang.c (cp_tree_size): New function.
361         (LANG_HOOKS_TREE_SIZE): Override.
362
363         * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
364         tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
365         (union lang_tree_node): Remove common and srcloc members.
366         (build_srcloc_here): Don't prototype.
367         * decl.c (cp_tree_node_structure): Kill SRCLOC case.
368         * pt.c (pending_templates): Correct comment.
369         * tree.c (build_srcloc, build_srcloc_here): Kill.
370
371 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
372
373         * call.c: Include intl.h.
374         (print_z_candidate): Always use inform; get rid of errfn
375         argument. Reorganize so that all the strings get picked up
376         by xgettext.  Note obligation of caller to pass first argument
377         through gettext.
378         (print_z_candidates): Update to match.  Indent second and
379         successive candidates by strlen() of translated message.
380         (joust): Restructure ambiguous-conversion pedwarn so that
381         translators see a complete sentence.  Update calls to
382         print_z_candidate.
383
384         * Make-lang.in (cp/call.o): Update dependencies.
385
386 2003-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
387
388         * decl.c (set_current_binding_level): Delete, revert last change.
389         (current_binding_level): Modify to allow it as as lvalue.
390
391 2003-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
392
393         * name-lookup.c (find_binding): Pass appropriate pointer type to
394         POP_TIMEVAR_AND_RETURN.
395
396 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
397
398         * Make-lang.in (cp-warn): Add $(STRICT_WARN).
399         * cp-tree.h: Don't insist on having GNUC.
400
401 2003-04-03  Jason Merrill  <jason@redhat.com>
402
403         * cvt.c (ocp_convert): Only abort if we try to convert an object
404         of TREE_ADDRESSABLE type.
405
406         * class.c (build_vtable): Set DECL_ALIGN here.
407         (get_vtable_decl): Not here.
408         (layout_vtable_decl): Or here.
409         (create_vtable_ptr): Or here.
410         (layout_class_type): Or here.
411         (check_bitfield_decl): Don't mess with field alignment.
412
413 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
414
415         * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
416         DEF_ASSN_OPERATOR): Delete spurious semi-colon.
417         * rtti.c (dfs_class_hint_mark): Likewise.
418
419         * decl.c (push_local_name, push_class_level_binding,
420         maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
421         functions returning void.
422         * decl2.c (add_using_namespace): Likewise.
423
424         * decl.c (print_binding_level, print_other_binding_stack,
425         print_binding_stack): Cast argument of %p specifier to void*.
426         * ptree.c (cxx_print_decl): Likewise.
427
428         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
429         VAR_FUNCTION_OR_PARM_DECL_CHECK,
430         VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
431         BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
432         LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
433
434         * decl.c (set_current_binding_level): New macro.  Use throughout
435         when setting the current binding level.
436
437         * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
438         in enum.
439         * method.c (mangling_flags): Likewise.
440
441         * cp-tree.h (lang_type_header): Add __extension__ and use
442         CHAR_BITFIELD for members.
443
444 2003-04-02  Geoffrey Keating  <geoffk@apple.com>
445
446         PR other/9274
447         * mangle.c: Include gt-cp-mangle.h.
448         (subst_identifiers): Mark with GTY.
449         * config-lang.in (gtfiles): Add cp/mangle.c.
450         * Make-lang.in: (gt-cp-mangle.h): New rule.
451         (cp/mangle.o): Depends on gt-cp-mangle.h.
452
453 2003-04-01  Andrew Pinski  <pinskia@physics.uc.edu>
454
455         * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
456         after \$(srcdir)/cp/name-lookup.h.
457         * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
458         of ggc_alloc.  Include gt-cp-name-lookup.h at the end of the file.
459         * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
460         (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
461
462 2003-03-31  Jason Merrill  <jason@redhat.com>
463
464         PR java/10145
465         * class.c (check_field_decl): Don't set DECL_ALIGN.
466
467 2003-03-30  Mark Mitchell  <mark@codesourcery.com>
468
469         PR c++/7647
470         * decl.c (grokdeclarator): Tidy, slightly.
471         * search.c (lookup_field_1): Add want_type parameter.
472         (lookup_field_r): Adjust call to lookup_field_1.
473
474 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
475
476         * Make-lang.in (cp/name-lookup.o): Add more dependencies.
477
478 2003-03-30  Gabriel Dos Reis <gdr@integrable-solutions.net>
479
480         * cp-tree.h (binding_for_name: Move to name-lookup.h  Adjust
481         prototype.
482         (cxx_scope_find_binding_for_name): Likewise.
483         * decl.c (find_binding: Move to name-lookup.c.
484         (binding_for_name): Likewise.
485         (cxx_scope_find_binding_for_name): Likewise.
486         (BINDING_LEVEL):  Remove.
487         (push_binding): Tidy.
488         (push_class_binding): Likewise.
489         (pop_binding): Likewise.
490         (poplevel): Likewise.
491         (poplevel_class): Likewise.
492         (set_identifier_type_value_with_scope): Likewise.
493         (push_overloaded_decl): Likewise.
494         (lookup_tag): Likewise.
495         (unqualified_namespace_lookup): Likewise.
496         (lookup_name_current_level): Likewise.
497         (maybe_inject_for_scope_var): Likewise.
498         (namespace_binding): Move to name-lookup.c.
499         (set_namespace_binding): Likewise.
500         * decl2.c (lookup_using_namespace): Tidy.
501         (qualified_lookup_using_namespace): Likewise.
502         (do_toplevel_using_decl): Likewise.
503         * name-lookup.c: Include "timevar.h"
504         * name-lookup.h (cxx_scope):  Declare.
505         (struct cxx_binding): Lose member "has_level".  Adjust "scope"
506         member declaration.
507         (BINDING_SCOPE): Adjust definition.
508         (BINDING_HAS_LEVEL_P): Remove.
509
510 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
511
512         * name-lookup.c: New file.
513         * name-lookup.h: Likewise..
514         * decl.c (push_binding): Adjust use cxx_binding_make.
515         (free_bindings): Move to name-lookup.c
516         (pop_binding): Use cxx_binding_free.
517         (binding_for_name): Tidy.
518         * cp-tree.h: Include "name-lookup.h"
519         (cxx_binding_make): Move to name-lookup.h
520         (cxx_binding_clear): Likewise.
521         (struct cxx_binding): Likewise.
522         (LOCAL_BINDING_P): Likewise.
523         (INHERITED_VALUE_BINDING_P): Likewise.
524         (BINDING_SCOPE): Likewise.
525         (BINDING_HAS_LEVEL_P): Likewise.
526         (BINDING_VALUE): Likewise.
527         (BINDING_TYPE): Likewise.
528         * config-lang.in (gtfiles): Add cp/name-lookup.h
529         * Make-lang.in (cp/name-lookup.o): New rule.
530         (CXX_OBJS): Add cp/name-lookup.o
531         (CXX_TREE_H): Add cp/name-lookup.h
532
533 2003-03-28  Jason Merrill  <jason@redhat.com>
534
535         PR c++/10245
536         * cvt.c (force_rvalue): New fn.
537         * call.c (build_conditional_expr): Use it.
538         * cp-tree.h: Declare it.
539
540 2003-03-28  Mike Stump  <mrs@apple.com>
541
542         * error.c (dump_expr): Add 0x to printed hex numbers to make
543         output match source code better.
544
545 2003-03-28  Mark Mitchell  <mark@codesourcery.com>
546
547         PR c++/10218
548         * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
549         definitions.
550
551         * decl2.c (generate_ctor_or_dtor_function): Tolerate a
552         non-existant ssdf_decls array.
553         (finish_file): Call generator_ctor_or_dtor_function when there are
554         static constructors or destructors and no other static
555         initializations.
556
557 2003-03-28  Nathan Sidwell  <nathan@codesourcery.com>
558
559         PR c++/10047
560         * decl2.c (finish_file): Don't warn about explicitly instantiated
561         inline decls.
562
563 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
564
565         PR c++/10224
566         * pt.c (lookup_template_class): Only check instantiated args if
567         they do not contain template parameters.
568
569 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
570
571         PR c++/10158
572         * parser.c (cp_parser_function_definition): Set
573         DECL_INITIALIZED_IN_CLASS for members.
574         * pt.c (instantiate_decl): Only reduce the template args for
575         friends that are not defined in class.
576
577 2003-03-25  Jason Merrill  <jason@redhat.com>
578
579         * call.c (print_z_candidate): Change name of first arg to msgid.
580         (joust): Add comment for translators.
581
582 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
583
584         PR c++/9898, PR c++/383, DR 322
585         * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
586         through reference types on both PARM and ARG.
587
588 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
589
590         PR c++/10119
591         * error.c (dump_expr) <BASELINK>: Use dump_expr.
592         * pt.c (maybe_fold_nontype_args): New function.
593         (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
594         <TEMPLATE_ID_EXPR>: Break out folding code, call it.
595         (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
596         maybe_fold_nontype_args.
597
598 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
599
600         PR c++/10026
601         * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
602
603 2003-03-23  Mark Mitchell  <mark@codesourcery.com>
604
605         PR c++/7086
606         * typeck.c (cxx_mark_addressable):  Adjust call to
607         gen_mem_addressof or put_var_into_stack.
608
609 2003-03-22  Nathan Sidwell  <nathan@codesourcery.com>
610
611         PR c++/9978, c++/9708
612         * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
613         * call.c (add_template_candidate_real): Adjust
614         instantiate_template call.
615         * class.c (resolve_address_of_overloaded_function): Likewise.
616         * decl.c (build_enumerator): Set TREE_CONSTANT.
617         * pt.c (check_instantiated_args): New.
618         (push_inline_template_parms_recursive): Set TREE_CONSTANT,
619         TREE_READONLY.
620         (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
621         (reduce_template_parm_level): Likewise.
622         (process_template_parm): Likewise.
623         (check_explicit_specialization): Adjust instantiate_template call.
624         (convert_template_argument): Don't check non-type argument here.
625         (lookup_template_class): Check them here.
626         (tsubst_friend_function): Adjust instantiate_template call.
627         (instantiate_template): Add tsubst_flags parameter, use it. Check
628         instantiated args.
629
630 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
631
632         * decl.c: Update calls to shadow_warning.
633
634 2003-03-21  Nathan Sidwell  <nathan@codesourcery.com>
635
636         PR c++/9898
637         * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
638         (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
639
640 2003-03-20  Mark Mitchell  <mark@codesourcery.com>
641
642         * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
643         friends.
644         * cp/pt.c (instantiate_class_template): Fix formatting.
645
646 2003-03-14  Matt Austern  <austern@apple.com>
647
648         * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
649         (unemitted_tinfo_decl_p): Remove.
650         (emit_tinfo_decl): Change declaration to remove unused parameter.
651         * decl2.c (finish_file): Change tinfo emission to loop through
652         unemitted_tinfo_decls array instead of looping through all decls.
653         * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
654         unused second parameter.
655         (init_rtti_processing): initialize unemitted_tinfo_decls varray.
656         (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
657         (emit_tinfo_decl): remove unused second parameter, add assertion
658         that decl hasn't already been emitted.
659
660 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
661
662         * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
663         type from 'int' to 'bool'. Replace 0 and 1 with true and false in
664         return statements.
665
666 2003-03-19  Jason Merrill  <jason@redhat.com>
667
668         PR c++/8316, c++/9315, c++/10136
669         * call.c (print_z_candidate): Split out from...
670         (print_z_candidiates): ...here.
671         (joust): Use it.
672
673 2003-03-17  Roger Sayle  <roger@eyesopen.com>
674
675         PR c++/10031
676         * decl.c (duplicate_decls): Use the new type when prototyping
677         anticipated decls, even when the types match.  This defines the
678         exception list for the built-in function.
679
680 2003-03-17  Jason Merrill  <jason@redhat.com>
681
682         PR c++/10091
683         * typeck.c (build_class_member_access_expr): Compare
684         TYPE_MAIN_VARIANTs.
685
686 2003-03-17  Mark Mitchell  <mark@codesourcery.com>
687
688         PR c++/9639
689         * parser.c (cp_parser_declarator_id): Clear parser->scope.
690
691 2003-03-16  Jason Merrill  <jason@redhat.com>
692
693         PR c++/9993
694         * decl.c (finish_function): Only allow the NRVO to use variables
695         declared at function scope.
696
697 2003-03-17  Andreas Jaeger  <aj@suse.de>
698
699         * Make-lang.in (cp/TAGS): Remove.
700
701 2003-03-16  Nathan Sidwell  <nathan@codesourcery.com>
702
703         PR c++/9629
704         * cp-tree.h (struct language_function): Add in_base_initializer.
705         (in_base_initializer): define it.
706         (expand_member_init): Remove INIT param.
707         * init.c (expand_member_init): Remove INIT param, return the member.
708         (emit_mem_initializers): Set in_base_initializer.
709         * class.c (build_base_path): Check in_base_initializer.
710         * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
711         * pt.c (tsubst_initializer_list): Likewise.
712
713 2003-03-16   Gabriel Dos Reis <gdr@integrable-solutions.net>
714
715         * decl.c (binding_for_name): Fix initialization thinko.
716
717 2003-03-15  Gabriel Dos Reis <gdr@integrable-solutions.net>
718
719         Compile-time improvement: 2/n.
720         * cp-tree.h (struct cxx_binding): New datatype;
721         (struct lang_identifier): Use it.
722         (LOCAL_BINDING_P): Adjust definition.
723         (INHERITED_VALUE_BINDING_P): Likewise.
724         (BINDING_SCOPE): Likewise.
725         (BINDING_HAS_LEVEL_P): Likewise.
726         (BINDING_VALUE): Likewise.
727         (BINDING_TYPE): Likewise.
728         (IDENTIFIER_VALUE): Likewise.
729         (struct tree_binding): Remove.
730         (TS_CP_BINDING): Likewise.
731         ((union lang_tree_node): Remove field "binding".
732         (cxx_binding_clear): New macro.
733         (binding_for_name): Adjust return type.
734         (qualified_lookup_using_namespace): Adjust prototype.
735         (lookup_using_namespace): Adjust prototype.
736         (cxx_scope_find_binding_for_name): Declare.
737         * cp-tree.def: Remove CPLUS_BINDING definition.
738         * decl.c (push_binding): Adjust local variable type.
739         (add_binding): Likewise.
740         (push_class_binding): Likewise.
741         (pop_binding): Likewise.
742         (poplevel): Likewise.
743         (poplevel_class): Likewise.
744         (free_bindings):  Adjust type.
745         (find_binding): Adjust return type, add a third parameter. Remove
746         non-useful assertion now that we use static typing.
747         (cxx_scope_find_binding_for_name): New function.
748         (binding_for_name): Use it.  Adjust local variable type. Simplify.
749         (namespace_binding):  Simplify.
750         (set_namespace_binding): Likewise.
751         (set_identifier_type_value_with_scope): Adjust local variable type.
752         (lookup_tag): Don't type-abuse of local variable 'old'.
753         (lookup_namespace_name): Likewise.  Allocate binding on stack.
754         (select_decl): Adjust prototype.
755         (unqualified_namespace_lookup):  Allocate binding on stack.
756         Don't type-abuse of local variable 'val'.
757         (lookup_name_real): Likewise.
758         (maybe_inject_for_scope_var): Adjust local variable type.
759         (cp_tree_node_structure): Remove CPLUS_BINDING case label.
760         (namespace_binding): Adjust logic, simplify.
761         (BINDING_LEVEL): Adjust definition.
762         (push_class_level_binding): Adjust local variable type.
763         (struct cxx_saved_binding): Adjust field 'binding' type.
764         * decl2.c (ambiguous_decl): Adjust prototype.
765         (lookup_using_namespace): Adjust local variable type.
766         (qualified_lookup_using_namespace): Catch type error and correct
767         ensueing logic error.
768         (do_nonmember_using_decl): Adjust local variable type.  Allocate
769         temporary cxx_binding on stack.
770         (do_toplevel_using_decl): Adjust local variable type.
771         * ptree.c (cxx_print_cxx_binding): New function.
772         (cxx_print_identifier): Use it.
773         (cxx_print_xnode): Delete CPLUS_BINDING case label.
774
775 2003-03-15  Roger Sayle  <roger@eyesopen.com>
776
777         * tree.c (count_functions): Fix whitespace.
778
779 2003-03-15  Neil Booth  <neil@daikokuya.co.uk>
780
781         * Make-lang.in: Update.
782
783 2003-03-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
784
785         PR c++/6440
786         * pt.c (maybe_process_partial_specialization): Handle
787         member class template when enclosing class template is
788         explicit specialized.
789         (most_general_template): Stop looking when DECL is already
790         specialized.
791
792 2003-03-13  Jason Merrill  <jason@redhat.com>
793
794         PR c++/9420
795         * search.c (lookup_conversions): Call complete_type here.
796         * call.c (implicit_conversion): Not here.
797
798 2003-03-13  Mark Mitchell  <mark@codesourcery.com>
799
800         * decl2.c (do_nonmember_using_decl): Correct handling of
801         simultaneous type/non-type bindings.
802
803         * call.c (initialize_reference): Remove bogus assertion.
804         * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
805
806 2003-03-12  Andrew Lewycky  <andrew@mxc.ca>
807
808         PR c++/7050
809         * expr.c (cxx_expand_expr): Return const0_rtx for throw
810         expressions.
811
812 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
813
814         PR c++/9474
815         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
816         to merge old and new declarations.
817
818 2003-03-12  Alexandre Oliva  <aoliva@redhat.com>
819
820         * g++.1: Remove.
821         * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
822         (cp/g++.1): Build it from scratch in the build tree.
823         (c++.install-man): Depend on it.  Install it from the build tree.
824         (c++.mostlyclean): Clean it.
825
826 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
827
828         PR c++/9474
829         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
830         to merge old and new declarations.
831
832         PR c++/9924
833         * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
834
835 2003-03-11  Jason Merrill  <jason@redhat.com>
836
837         PR c++/9820
838         * search.c (lookup_member): Fix handling of functions in a class
839         being defined.
840
841 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
842
843         PR c++/8700
844         * call.c (convert_class_to_reference): Adjust usage of
845         splice_viable.
846         (any_viable): Remove.
847         (splice_viable): Combine with any_viable.
848         (print_z_candidates): Avoid printing duplicates.
849         (build_user_type_conversion_1): Adjust usage of splice_viable.
850         (build_new_function_call): Likewise.
851         (build_operator_new_call): Likewise.
852         (build_object_call): Likewise.
853         (build_conditional_expr): Likewise.
854         (build_new_op): Likewise.
855         (build_new_method_call): Likewise.
856         (joust): Remove spurious comment.
857         * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
858         * decl2.c (arg_assoc_class): Simplify.
859         * friend.c (add_friend): Likewise.
860
861 2003-03-11  Jason Merrill  <jason@redhat.com>
862
863         PR c++/8660
864         * decl2.c (check_classfn): A member template only matches a
865         member template.
866
867 2003-03-11  Neil Booth  <neil@daikokuya.co.uk>
868
869         * Make-lang.in (CXX_C_OBJS): Update.
870         * lang-specs.h: Don't define __GNUG__ here.
871
872 2003-03-10  Mark Mitchell  <mark@codesourcery.com>
873
874         * call.c (perform_overload_resolution): New function.
875         (build_new_function_call): Use it.
876         (build_operator_new_call): Likewise.
877         (add_candidates): Add explicit_targs and template_only parameters.
878         (build_new_op): Adjust accordingly.
879         * cp-tree.h (build_operator_new_call): New function.
880         (build_function_call_real): Remove.
881         (build_function_call_maybe): Likewise.
882         * init.c (build_new_1): Use build_operator_new_call.
883         * typeck.c (build_function_call_real): Rename to ...
884         (build_function_call): ... this.
885
886 2003-03-10  Devang Patel  <dpatel@apple.com>
887
888         PR c++/9394
889         * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
890
891 2003-03-10  Jason Merrill  <jason@redhat.com>
892
893         PR c++/9798
894         * decl.c (push_using_directive): Push before recursing.
895
896         PR c++/9868, c++/9524
897         * call.c (resolve_scoped_fn_name): Handle the case of a function
898         pointer member.
899
900         * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
901         argument in the pointer-to-member case.
902
903 2003-03-09  Mark Mitchell  <mark@codesourcery.com>
904
905         PR c++/9373
906         * cp-lang.c (cxx_get_alias_set): Use alias set zero for
907         pointers to member functions.
908
909         PR c++/8534
910         * decl.c (build_ptrmemfunc_type): Do not allow default arugments
911         in pointer-to-member-function types.
912
913 2003-03-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
914
915         * expr.c (cplus_expand_constant): Use C90 prototype style.
916         (cxx_expand_expr): Likewise.
917
918 2003-03-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
919
920         PR c++/9970
921         * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
922         functions.
923
924 2003-03-08  Geoffrey Keating  <geoffk@apple.com>
925
926         * lang-specs.h (c++-header): Change .pch to .gch.
927
928 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
929
930         * cp-tree.h (cxx_init): Update prototype.
931         * lex.c (cxx_init): Similarly.
932
933 2003-03-08  Mark Mitchell  <mark@codesourcery.com>
934
935         PR c++/9823
936         * cp-tree.h (begin_mem_initializers): Remove.
937         * parser.c (cp_parser_mem_initializer_list): Inline it here.
938         Do not call finish_mem_initializers if not in a constructor.
939         (cp_parser_class_head): Fix typo in error message.
940         * semantics.c (begin_mem_initializers): Remove.
941         * testsuite/g++.dg/parser/constructor1.C: New test.
942
943         PR c++/9809
944         * call.c (add_function_candidate): Skip builtin fuctions that have
945         not yet been declared.
946
947         PR c++/9982
948         * init.c (build_new_1): Correct logic for determining whether or
949         not to use an array cookie.
950
951         PR c++/9524
952         * parser.c (cp_parser_postfix_expression): Call
953         finish_non_static_data_member, even when processing_template_decl.
954
955         PR c++/9912
956         * cp-tree.h (is_ancestor): New function.
957         (handle_class_head): Change prototype.
958         * decl2.c (is_namespace_ancestor): Rename to ...
959         (namespace_anecestor): ... this.
960         (set_decl_namespace): Adjust accordingly.
961         (handle_class_head): Remove unncessary parameters.
962         * parser.c (cp_parser_class_head): Check that
963         nested-name-specifiers are used appropriately.
964
965 2003-03-07  Mark Mitchell  <mark@codesourcery.com>
966
967         * call.c (reference_binding): Remove REF_IS_VAR parameter.
968         (implicit_conversion): Adjust call to reference_binding.
969         (make_temporary_var_for_ref_to_type): Add TYPE parameter.
970         (initialize_reference): Adjust handling for references bound to
971         rvalues.
972         * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
973         prototype.
974         (real_non_cast_lvalue_p): New method.
975         * cvt.c (build_up_reference): Adjust use of
976         make_temporary_var_for_ref_to_temp.
977         * tree.c (real_non_cast_lvalue_p): New method.
978
979 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
980
981         * except.c (init_exception_processing): Use C90 prototype style.
982         (cp_protect_cleanup_actions): Likewise.
983         (prepare_eh_type): Likewise.
984         (build_eh_type_type): Likewise.
985         (build_exc_ptr): Likewise.
986         (do_begin_catch): Likewise.
987         (dtor_nothrow): Likewise.
988         (do_end_catch): Likewise.
989         (push_eh_cleanup): Likewise.
990         (decl_is_java_type): Likewise.
991         (choose_personality_routine): Likewise.
992         (initialize_handler_parm): Likewise.
993         (expand_start_catch_block): Likewise.
994         (expand_end_catch_block): Likewise.
995         (begin_eh_spec_block): Likewise.
996         (finish_eh_spec_block): Likewise.
997         (do_allocate_exception): Likewise.
998         (do_free_exception): Likewise.
999         (wrap_cleanups_r): Likewise.
1000         (stabilize_throw_expr): Likewise.
1001         (build_throw): Likewise.
1002         (complete_ptr_ref_or_void_ptr_p): Likewise.
1003         (is_admissible_throw_operand): Likewise.
1004         (nothrow_libfn_p): Likewise.
1005         (can_convert_eh): Likewise.
1006         (check_handlers_1): Likewise.
1007         (check_handlers): Likewise.
1008
1009 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
1010
1011         * call.c (merge_conversion_sequences): New function.
1012         (build_conv): Set ICS_USER_FLAG for USER_CONVs.
1013         (convert_class_to_reference): Correct handling of second
1014         standard conversion sequence in a user-defined conversion
1015         sequence.
1016         (build_user_type_conversion_1): Use merge_conversion_sequences.
1017         * cp-tree.def: Add comments for CONV nodes.
1018         * rtti.c (get_tinfo_decl): Use build_address/build_nop.
1019
1020 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1021
1022         * error.c (init_error): Use C90 prototype style.
1023         (dump_scope): Likewise.
1024         (dump_qualifiers): Likewise.
1025         (dump_template_argument): Likewise.
1026         (dump_template_argument_list): Likewise.
1027         (dump_template_parameter): Likewise.
1028         (dump_template_bindings): Likewise.
1029         (dump_type): Likewise.
1030         (dump_typename): Likewise.
1031         (class_key_or_enum): Likewise.
1032         (dump_aggr_type): Likewise.
1033         (dump_type_prefix): Likewise.
1034         (dump_type_suffix): Likewise.
1035         (dump_global_iord): Likewise.
1036         (dump_simple_decl): Likewise.
1037         (dump_decl): Likewise.
1038         (dump_template_decl): Likewise.
1039         (dump_function_decl): Likewise.
1040         (dump_parameters): Likewise.
1041         (dump_exception_spec): Likewise.
1042         (dump_function_name): Likewise.
1043         (dump_template_parms): Likewise.
1044         (dump_char): Likewise.
1045         (dump_expr_list): Likewise.
1046         (dump_expr): Likewise.
1047         (dump_binary_op): Likewise.
1048         (dump_unary_op): Likewise.
1049         (type_as_string): Likewise.
1050         (expr_as_string): Likewise.
1051         (decl_as_string): Likewise.
1052         (context_as_string): Likewise.
1053         (lang_decl_name): Likewise.
1054         (cp_file_of): Likewise.
1055         (cp_line_of): Likewise.
1056         (decl_to_string): Likewise.
1057         (expr_to_string): Likewise.
1058         (fndecl_to_string): Likewise.
1059         (code_to_string): Likewise.
1060         (language_to_string): Likewise.
1061         (parm_to_string): Likewise.
1062         (op_to_string): Likewise.
1063         (type_to_string): Likewise.
1064         (assop_to_string): Likewise.
1065         (args_to_string): Likewise.
1066         (cv_to_string): Likewise.
1067         (cxx_print_error_function): Likewise.
1068         (cp_diagnostic_starter): Likewise.
1069         (cp_diagnostic_finalizer): Likewise.
1070         (cp_print_error_function): Likewise.
1071         (function_category): Likewise.
1072         (print_instantiation_full_context): Likewise.
1073         (print_instantiation_partial_context): Likewise.
1074         (maybe_print_instantiation_context): Likewise.
1075         (print_instantiation_context): Likewise.
1076         (cp_printer): Likewise.
1077         (print_integer): Likewise.
1078         (print_non_consecutive_character): Likewise.
1079         (locate_error): Likewise.
1080
1081 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
1082
1083         PR c++/9965
1084         * call.c (reference_binding): Add ref_is_var parameter.
1085         (implicit_conversion): Adjust call to reference_binding.
1086         (initialize_reference): Likewise.
1087
1088         PR c++/9400
1089         * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
1090         PARM_DECLs.
1091
1092         PR c++/9791
1093         * class.c (get_basefndecls): Use lookup_fnfields_1.
1094
1095 2003-03-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1096
1097         PR c++/9188
1098         * parser.c (cp_parser_type_parameter): Remove redundant `expect'
1099         in error message.
1100         (cp_parser_single_declaration): Likewise.
1101
1102 2003-03-05  Jason Merrill  <jason@redhat.com>
1103
1104         PR c++/9440
1105         * call.c (build_conditional_expr): Use convert rather than an
1106         explicit NOP_EXPR.
1107
1108 2003-03-02  Matt Austern  <austern@apple.com>
1109
1110         * decl.c (cp_binding_level): Add static_decls varray member.
1111         (add_decl_to_level): Add static/inline namespace scope
1112         declarations to static_decls array.
1113         (wrapup_global_for_namespace): Pass static_decls only, instead of
1114         all decls, to wrapup_global_declarations/check_global_declarations.
1115         (push_namespace): Initialize static_decls for ordinary namespaces.
1116         (cxx_init_decl_processing): Initialize static_decls for global
1117         namespace.
1118
1119 2003-03-05  Mark Mitchell  <mark@codesourcery.com>
1120
1121         * class.c (end_of_class): Correct thinko.
1122
1123 2003-03-04  Nathanael Nerode  <neroden@gcc.gnu.org>
1124
1125         * config-lang.in: Replace ${libstdcxx_version} by its value.
1126
1127 2003-03-04  Gabriel Dos Reis <gdr@integrable-solutions.net>
1128
1129         * cp-tree.h (cxx_saved_binding): Declare.
1130         (struct saved_scope): Adjust type of field 'old_binding'.
1131         * decl.c (cxx_saved_binding_make): New macro.
1132         (struct cxx_saved_binding): Define.
1133         (store_bindings): Adjust prototype.  Use cxx_saved_binding to save
1134         C++ bindings.
1135         (maybe_push_to_top_level): Adjust local variable type.
1136         (pop_from_top_level): Likewise.
1137
1138 2003-03-04  Tom Tromey  <tromey@redhat.com>
1139
1140         * Make-lang.in (c++.tags): New target.
1141
1142 2003-03-04  Neil Booth  <neil@daikokuya.co.uk>
1143
1144         * Make-lang.in: Update.
1145
1146 2003-03-03  Jason Merrill  <jason@redhat.com>
1147
1148         * decl.c (finish_enum): Do set the type in a template. Simplify.
1149         * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
1150
1151 2003-03-03  Mark Mitchell  <mark@codesourcery.com>
1152
1153         PR c++/9878
1154         * call.c (convert_class_to_reference): Correct conversion
1155         sequences.
1156         (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
1157         (implicit_conversion): Adjust call to reference_binding.
1158         (add_candidate): Change type of candidates parameter.
1159         (add_function_candidate): Likewise.
1160         (add_conv_candidate): Likewise.
1161         (build_builtin_candidate): Likewise.
1162         (add_builtin_candidate): Likewise.
1163         (add_builtin_candidates): Likewise.
1164         (add_template_candidate_real): Likewise.
1165         (add_template_candidate): Likewise.
1166         (add_template_conv_candidate): Likewise.
1167         (build_user_type_conversion_1): Adjust accordingly.
1168         (build_object_call): Likewise.
1169         (build_conditional_expr): Likewise.
1170         (add_candidates): Likewise.
1171         (build_new_op): Likewise.
1172         (convert_like_real): Use USER_CONV_CAND.  Use build_nop.
1173         (build_new_method_call): Adjust calls to add_function_candidate.
1174         (make_temporary_var_for_ref_to_temp): New function.
1175         (initialize_reference): Add decl parameter.
1176         * class.c (build_rtti_vtbl_entries): Use build_address and
1177         build_nop.
1178         * cp-tree.h (initialize_reference): Change prototype.
1179         (make_temporary_var_for_ref_to_temp): New function.
1180         (build_type_conversion): Change prototype.
1181         (build_address): New function.
1182         (build_nop): Likewise.
1183         * cvt.c (cp_convert_to_pointer): Adjust call to
1184         build_type_conversion.  Avoid indicating redundant NOP_EXPRs.
1185         Use build_nop.
1186         (convert_to_pointer_force): Use build_nop.
1187         (build_up_reference): Use make_temporary_var_for_ref_to_temp.
1188         (convert_to_reference): Adjust call to build_type_conversion.
1189         (ocp_convert): Likewise.
1190         (build_type_conversion): Remove for_sure parameter.
1191         * decl.c (grok_reference_init): Use initialize_reference.
1192         * typeck.c (build_address): New function.
1193         (build_nop): Likewise.
1194         (build_unary_op): Use them.
1195         (build_ptrmemfunc): Tidy slightly.
1196         (convert_for_initialization): Adjust call to
1197         initialize_reference.
1198         * typeck2.c (store_init_value): Remove #if 0'd code.
1199
1200 2003-03-03  Jason Merrill  <jason@redhat.com>
1201
1202         * decl.c (start_function): Clear DECL_NUM_STMTS.
1203
1204         * class.c (get_vtable_decl): Use vtbl_type_node.
1205         (build_primary_vtable): Check for it.
1206
1207 2003-03-02  Aldy Hernandez  <aldyh@redhat.com>
1208
1209         * decl.c (check_initializer): Check for vector_opaque_p.
1210
1211 2003-03-02  Ashif Harji  <asharji@uwaterloo.ca>
1212
1213         * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
1214           invoke an external cpp during compilation.
1215
1216 2003-03-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1217
1218         * decl.c (duplicate_decls): Convert use of warning_with_decl() to
1219         that of warning().
1220         (start_decl): Likewise.
1221         (start_function): Likewise.
1222
1223 2003-03-01  Neil Booth  <neil@daikokuya.co.uk>
1224
1225         * Make-lang.in (CXX_C_OBJS): Update.
1226
1227 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
1228
1229         PR c++/9892
1230         * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
1231         instantiating it.
1232
1233 2003-02-28  Aldy Hernandez  <aldyh@redhat.com>
1234
1235         * parser.c (cp_parser_init_declarator): Revert opaque
1236         vector_opaque_p change.
1237         Do not include target.h.
1238
1239 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
1240
1241         PR c++/9879
1242         * cp-tree.h (build_zero_init): Add parameter.
1243         * decl.c (cp_finish_decl): Adjust call.
1244         * init.c (build_zero_init): Add nelts parameter.  Adjust recursive
1245         calls.
1246         (build_default_init): Add nelts parameter.  Adjust calls to
1247         build_zero_init.
1248         (build_new_1): Adjust call to build_default_init.
1249         * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
1250
1251 2003-02-26  Devang Patel  <dpatel@apple.com>
1252
1253         * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
1254         required.  Postpone enum setting for template decls.
1255         (build_enumerator): Delay copying value node until finish_enum
1256         (). Remove #if 0'ed code.
1257         * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
1258         (tsubst_copy): Add check for enum type.
1259
1260 2003-02-25  Mark Mitchell  <mark@codesourcery.com>
1261
1262         PR c++/9683
1263         * decl2.c (prune_vars_needing_no_initialization): Do not throw
1264         away initializations for DECL_EXTERNAL VAR_DECLs.
1265         (finish_file): Adjust accordingly.
1266         * pt.c (instantiate_decl): Do not defer VAR_DECLs.
1267
1268 2003-02-24 Gabriel Dos Reis  <gdr@integrable-solutions.net>
1269
1270         * decl.c (add_binding): Time TV_NAME_LOOKUP.
1271         (push_class_binding): Likewise.
1272         (set_namespace_binding): Likewise.
1273
1274 2003-02-24  Mark Mitchell  <mark@codesourcery.com>
1275
1276         PR c++/9836
1277         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
1278         specializations back to the main template.
1279         * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
1280         * pt.c (resolve_typename_type): Likewise.
1281
1282 2003-02-24  Jeffrey D. Oldham  <oldham@codesourcery.com>
1283
1284         PR c++/9778
1285         * pt.c (tsubst_copy_and_build): For a templated function inside a
1286         scope, process template arguments.
1287
1288 2003-02-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1289
1290         PR c++/9602
1291         * typeck2.c (abstract_virtuals_error): Don't check when
1292         TYPE is still template parameter dependent.
1293
1294 2003-02-23  Mark Mitchell  <mark@codesourcery.com>
1295
1296         PR c++/5333
1297         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
1298         * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
1299         * pt.c (instantiate_class_template): Don't try to instantiate
1300         dependent types.
1301         (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
1302
1303 2003-02-21  Mark Mitchell  <mark@codesourcery.com>
1304
1305         PR c++/9749
1306         * decl.c (grokdeclarator): Do not allow parameters with variably
1307         modified types.
1308
1309 2003-02-21  Nathan Sidwell  <nathan@codesourcery.com>
1310
1311         * search.c (grow_bfs_bases): Remove. Fold into ...
1312         (bfs_walk): ... here, fix fencepost error. Fix merge lossage
1313         in previous patch.
1314
1315 2003-02-20  Mark Mitchell  <mark@codesourcery.com>
1316
1317         PR c++/9729
1318         * mangle.c (mangle_conv_op_name_for_type): Issue an error message
1319         when the G++ 3.2 ABI prevents correct compilation.
1320
1321 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
1322
1323         Change base class access representation. Share virtual base
1324         binfos.
1325         * cp/call.c (build_special_member_call): Remove binfo_for_vbase
1326         call.
1327         * cp/class.c (build_base_path): Likewise.
1328         (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
1329         (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
1330         (make_new_vtable): Adjust.
1331         (force_canonical_binfo_r): Delete.
1332         (force_canonical_binfo): Delete.
1333         (mark_primary_virtual_base): Delete.
1334         (dfs_unshared_virtual_bases): Delete.
1335         (mark_primary_bases): Adjust.
1336         (maybe_warn_about_overly_private_class): Adjust.
1337         (dfs_base_derived_from): Delete.
1338         (base_derived_from): Follow the inheritance chain.
1339         (struct find_final_overrider_data): Add vpath member.
1340         (dfs_find_final_overrider): Adjust.
1341         (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
1342         (find_final_overrider): Adjust.
1343         (update_vtable_entry_for_fn): Adjust.
1344         (modify_all_vtables): Adjust.
1345         (walk_subobject_offsets): Adjust.
1346         (layout_nonempty_base_or_field): Adjust.
1347         (layout_empty_base): Remove last parameter. Adjust.
1348         (build_base_field): Adjust.
1349         (build_base_fields): Adjust.
1350         (propagate_binfo_offsets): Remove last parameter. Adjust.
1351         (dfs_set_offset_for_unshared_vbases): Delete.
1352         (layout_virtual_bases): Adjust.
1353         (finish_struct_1): Adjust.
1354         (init_class_processing): Don't init access nodes.
1355         (dfs_get_primary_binfo): Delete.
1356         (get_primary_binfo): Adjust.
1357         (dump_class_hierarchy_r): Remove most derived arg, add IGO
1358         parameter. Adjust.
1359         (dump_class_hierarchy): Adjust.
1360         (finish_vtbls): Adjust.
1361         (get_original_base): Delete.
1362         (build_vtt_inits): Adjust.
1363         (dfs_build_secondary_vptr_vtt_inits): Adjust.
1364         (dfs_ctor_vtable_bases_queue_p): Adjust.
1365         (build_ctor_vtbl_group): Adjust.
1366         (dfs_accumulate_vtbl_inits): Adjust.
1367         (build_vtbl_initializer): Adjust.
1368         (build_vbase_offset_vtbl_entries): Adjust.
1369         (add_vcall_offset_vtbl_entries_1): Adjust.
1370         * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
1371         (access_*_node): Remove.
1372         (CANONICAL_BINFO): Delete.
1373         (BINFO_UNSHARED_MARKED): Remove.
1374         (BINFO_MARKED): Set LANG_FLAG_0 directly.
1375         (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
1376         (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
1377         (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
1378         Delete.
1379         (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
1380         (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
1381         (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
1382         Delete.
1383         (BINFO_DEPENDENT_BASE_P): New.
1384         (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
1385         index.
1386         (markedp, unmarkedp): Adjust.
1387         (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
1388         dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
1389         find_vbase_instance, binfo_for_vbase): Delete.
1390         (copied_binfo, original_binfo): Declare.
1391         (finish_base_specifier): Add virtual_p arg.
1392         (unshare_base_binfos): Delete.
1393         (copy_base_binfos): Declare.
1394         (reverse_path): Delete.
1395         * cp/decl.c (xref_basetypes): Access and virtuality passed
1396         differently. Don't copy direct base binfos here. Call
1397         copy_base_binfos.
1398         * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
1399         (initialize_vtbl_ptrs): Adjust.
1400         (expand_member_init): Adjust.
1401         * cp/parser.c (cp_parser_base_specifier): Adjust.
1402         * cp/pt.c (instantiate_class_template): Adjust.
1403         (get_template_base_recursive): Adjust.
1404         * cp/rtti.c (get_pseudo_ti_init): Adjust.
1405         (get_pseudo_ti_desc): Adjust.
1406         * cp/tree.c (unshare_base_binfos): Rename to ...
1407         (copy_base_binfos): ... here, reimplement.
1408         (make_binfo): Set BINFO_DEPENDENT_BASE_P.
1409         (reverse_path): Remove.
1410         * cp/typeck.c (get_delta_difference): Adjust error messages.
1411         * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
1412         * cp/search.c (lookup_base_r): Adjust.
1413         (dynamic_cast_base_recurse): Adjust.
1414         (canonical_binfo): Remove.
1415         (dfs_canonical_queue): Remove.
1416         (dfs_assert_unmarked_p): Remove.
1417         (assert_canonical_unmarked): Remove.
1418         (shared_marked_p, shared_unmarked_p): Remove.
1419         (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
1420         (dfs_access_in_type): Adjust.
1421         (access_in_type): Adjust.
1422         (dfs_accessible_queue_p): Adjust.
1423         (dfs_accessible_p): Adjust.
1424         (is_subobject_of_p_1, is_subobject_of_p): Remove.
1425         (struct lookup_field_info): Remove from_dep_base_p field.
1426         (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
1427         (lookup_field_r): Remove dependent base code.
1428         (lookup_member): Likewise.
1429         (dfs_walk, dfs_walk_real): Add access arg to queue fn.
1430         (dfs_unmarked_real_bases_queue_p): Remove.
1431         (dfs_marked_real_bases_queue_p): Remove.
1432         (dfs_skip_vbases): Remove.
1433         (dfs_get_pure_virtuals): Adjust.
1434         (markedp, unmarkedp): Adjust.
1435         (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
1436         (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
1437         (dfs_unmark): Adjust.
1438         (dfs_get_vbase_types):Remove.
1439         (dfs_build_inheritance_graph_order): Remove.
1440         (get_vbase_types): Remove
1441         (dfs_find_vbase_instance): Remove.
1442         (find_vbase_instance): Remove.
1443         (dfs_debug_unmarkedp): Adjust.
1444         (dependent_base_p): Remove.
1445         (dfs_push_type_decls): Adjust.
1446         (dfs_push_decls): Adjust.
1447         (dfs_no_overlap_yet): Adjust.
1448         (copied_binfo): New function.
1449         (original_binfo): New function.
1450         (binfo_for_vbase): Remove.
1451
1452 2003-02-18  Zack Weinberg  <zack@codesourcery.com>
1453
1454         * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
1455         (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
1456         vectors, for speed.
1457
1458 2003-02-18  Mark Mitchell  <mark@codesourcery.com>
1459
1460         PR c++/9704
1461         * class.c (layout_class_type): In the 3.2 ABI, take into account
1462         trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
1463
1464 2003-02-18  Matt Austern <austern@apple.com>
1465
1466         * cp/cp-lang.c: Change lang hooks so that final_write_globals does
1467         nothing for C++.
1468         * cp/decl.c (wrapup_globals_for_namespace): Remove special
1469         handling of global namespace.
1470
1471 2003-02-18  Geoffrey Keating  <geoffk@apple.com>
1472
1473         * cp-tree.h (rid_to_yy): Delete.
1474         (C_RID_YYCODE): Delete.
1475         (finish_file): Delete redundant declaration.
1476
1477 2003-02-18  Jason Merrill  <jason@redhat.com>
1478
1479         PR c++/9623
1480         * decl.c (reshape_init): Don't mess with initializer labels.
1481
1482         PR c++/9485
1483         * parser.c (cp_parser_postfix_expression): Set idk properly for
1484         object->scope::member.
1485
1486 2003-02-18  Ben Elliston  <bje@redhat.com>
1487
1488         PR other/7350
1489         * decl.c (duplicate_decls): Fix typo in comment.
1490
1491 2003-02-17  Michael Elizabeth Chastain <mec@shout.net>
1492
1493         PR debug/9717
1494         * class.c (build_base_field): Mark fields for base classes with
1495         DECL_IGNORED_P.
1496
1497 2003-02-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1498
1499         PR c++/9457
1500         * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
1501         CONSTRUCTOR_ELTS only once.
1502
1503 2003-02-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1504
1505         PR c++/9459
1506         * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
1507         (dump_type_suffix): Likewise.
1508
1509 2003-02-14  Nathan Sidwell  <nathan@codesourcery.com>
1510
1511         * search.c: ANSIfy function declarations and definitions.
1512         * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
1513         * call.c (build_method_call, resolve_scoped_fn_name,
1514         build_java_interface_fn_ref): Adjust lookup_field, lookup_member
1515         calls.
1516         * class.c (handle_using_decl): Likewise.
1517         * decl.c (make_typename_type, make_unmound_class_template,
1518         start_decl, compute_array_index_type): Likewise.
1519         * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
1520         * init.c (expand_member_init, build_member_call): Likewise.
1521         * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
1522         resolve_typename_type): Likewise.
1523         * typeck.c (lookup_destructor, finish_class_member_access_exprm
1524         build_prememfunc_access_expr): Likewise.
1525
1526 2003-02-13  Gabriel Dos Reis <gdr@integrable-solutions.net>
1527
1528         * decl2.c: Include "timevar.h".
1529         (namespace_ancestor): Time name lookup.
1530         (add_using_namespace): Likewise.
1531         (lookup_using_namespace): Likewise.
1532         (qualified_lookup_using_namespace): Likewise.
1533         (decl_namespace): Likewise.
1534         (lookup_arg_dependent): Likewise.
1535         * lex.c (do_identifier): Likewise.
1536         (do_scoped_id): Likewise.
1537         * pt.c (lookup_template_class): Likewise.
1538
1539 2003-02-14   Andrew Pinski <pinskia@physics.uc.edu>
1540
1541         * decl.c: (define_label): Fix warning for return 0 instead of NULL.
1542
1543 2003-02-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1544
1545         * decl.c: Include "timevar.h".
1546         (poplevel): Time name lookup.
1547         (find_binding): Likewise.
1548         (push_namespace): Likewise.
1549         (pop_nested_namespace): Likewise.
1550         (store_bindings): Likewise.
1551         (maybe_push_to_top_level): Likewise.
1552         (pop_from_top_level): Likewise.
1553         (push_local_name): Likewise.
1554         (pushtag): Likewise.
1555         (pushdecl): Likewise.
1556         (pushdecl_with_scope): Likewise.
1557         (pushdecl_namespace_level): Likewise.
1558         (pushdecl_top_level): Likewise.
1559         (pushdecl_class_level): Likewise.
1560         (push_class_level_binding): Likewise.
1561         (push_using_decl): Likewise.
1562         (push_using_directive): Likewise.
1563         (push_overloaded_decl): Likewise.
1564         (lookup_label): Likewise.
1565         (define_label): Likewise.
1566         (lookup_tag): Likewise.
1567         (lookup_tag_reverse): Likewise.
1568         (lookup_namespace_name): Likewise.
1569         (select_decl): Likewise.
1570         (unqualified_namespace_lookup): Likewise.
1571         (lookup_name_real): Likewise.
1572         (lookup_name_current_level): Likewise.
1573         (lookup_type_current_level): Likewise.
1574         (maybe_inject_for_scope_var): Likewise.
1575         (xref_tag): Likewise.
1576
1577         * Make-lang.in (cp/decl.o): Add dependency on timevar.h
1578
1579 2003-02-12  Phil Edwards  <pme@gcc.gnu.org>
1580
1581         * decl.c (build_enumerator):  Remove unneeded test.
1582
1583 2003-02-09  Dan Nicolaescu  <dann@ics.uci.edu>
1584
1585         * cp-tree.h (struct lang_type_header): Make all fields unsigned
1586         char.
1587
1588 2003-02-03  Mark Mitchell  <mark@codesourcery.com>
1589
1590         PR c++/7129
1591         * call.c (z_candidate): Add args.
1592         (convert_class_to_reference): Set it.
1593         (implicit_conversion): Tidy.
1594         (add_candidate): Add args parameter.
1595         (add_function_candidate): Adjust call to add_candidate.
1596         (add_conv_candidate): Likewise.
1597         (build_builtin_candidate): Likewise.
1598         (build_user_type_conversion_1): Eliminate wasteful tree_cons
1599         usage.
1600         (build_new_function_call): Likewise.
1601         (build_object_call): Likewise.
1602         (add_candidates): New function.
1603         (build_new_op): Use it.
1604         (covert_like_real): Adjust call to build_over_call.
1605         (build_over_call): Remove args parameter.
1606         * operators.def: Add <?= and >?=.
1607
1608 2003-02-01  Richard Sandiford  <rsandifo@redhat.com>
1609
1610         * typeck.c (build_indirect_ref): Don't check flag_volatile.
1611
1612 2003-01-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1613
1614         PR c++/8849
1615         * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
1616
1617 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
1618
1619         * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
1620         BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
1621         (BINFO_LANG_ELTS): New #define.
1622         * tree.c (make_binfo): Use BINFO_LANG_ELTS.
1623
1624 2003-01-30  Geoffrey Keating  <geoffk@apple.com>
1625
1626         * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
1627
1628 2003-01-30  Mark Mitchell  <mark@codesourcery.com>
1629
1630         * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
1631         for class types.
1632         * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
1633         rather than TYPE_LANG_FLAG_0.
1634         (TYPE_BUILT_IN): Remove.
1635         (TYPE_DEPENDENT_P): New macro.
1636         (TYPE_DEPENDENT_P_VALID): Likewise.
1637         (lang_type_class): Add fields_readonly.
1638         * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
1639         * pt.c (dependent_type_p_r): New function, split out from ...
1640         (dependent_type_p): ... here.  Memoize results.
1641         * search.c (dependent_base_p): Use dependent_type_p, not
1642         uses_template_parms.
1643         * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
1644         for class types.
1645
1646 2003-01-29  Mark Mitchell  <mark@codesourcery.com>
1647
1648         * call.c (build_field_call): Use build_new_op, not build_opfncall.
1649         (prep_operand): New function.
1650         (build_new_op): Use it.  Remove dead code.
1651         * class.c (pushclass): Change "modify" parameter type from int to
1652         bool.
1653         (currently_open_class): Use same_type_p, not pointer equality.
1654         (push_nested_class): Adjust calls to pushclass, remove modify
1655         parameter.
1656         * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
1657         (pushclass): Change prototype.
1658         (push_nested_class): Likewise.
1659         (grokoptypename): Remove.
1660         (build_opfncall): Remove.
1661         (value_dependent_expression_p): Declare.
1662         (resolve_typename_type): Likewise.
1663         (resolve_typename_type_in_current_instantiation): Likewise.
1664         (enter_scope_of): Remove.
1665         (tsubst): Remove.
1666         (tsubst_expr): Likewise.
1667         (tsubst_copy): Likewise.
1668         (tsubst_copy_and_build): Likewise.
1669         * decl.c (warn_about_implicit_typename_lookup): Remove.
1670         (finish_case_label): Return error_mark_node for erroneous labels.
1671         (start_decl): Adjust calls to push_nested_class.
1672         (grokfndecl): Call push_scope/pop_scope around call to
1673         duplicate_decls.
1674         (grokdeclarator): Do not call tsubst.
1675         (start_function): Adjust calls to push_nested_class.
1676         * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
1677         (check_classfn): Use push_scope/pop_scope around type comparisions.
1678         (grokoptypename): Remove.
1679         (push_sscope): Adjust call to push_nested_class.
1680         * error.c (dump_type): Show cv-qualification of typename types.
1681         * init.c (build_member_call): Use build_new_op, not
1682         build_opfncall.
1683         * method.c (build_opfncall): Remove.
1684         * parser.c (cp_parser): Add allow_non_constant_expression_p and
1685         non_constant_expression_p.
1686         (cp_parser_constant_expression): Adjust prototype.
1687         (cp_parser_resolve_typename_type): Remove.
1688         (cp_parser_non_constant_expression): New function.
1689         (cp_parser_non_constant_id_expression): Likewise.
1690         (cp_parser_new): Set allow_non_constant_expression_p and
1691         non_constant_expression_p.
1692         (cp_parser_primary_expression): Reject `this' and `va_arg' in
1693         constant-expressions.  Note that dependent names aren't really
1694         constant.
1695         (cp_parser_postfix_expression): Reject conversions to non-integral
1696         types in constant-expressions.  Neither are increments or
1697         decrements.
1698         (cp_parser_unary_expression): Reject increments and decrements in
1699         constant-expressions.
1700         (cp_parser_direct_new_declarator): Adjust call to
1701         cp_parser_constant_expression.
1702         (cp_parser_cast_expression): Reject conversions to non-integral
1703         types in constant-expressions.
1704         (cp_parser_assignment_expression): Rejects assignments in
1705         constant-expressions.
1706         (cp_parser_expression): Reject commas in constant-expressions.
1707         (cp_parser_labeled_statement): Adjust call to
1708         cp_parser_constant_expression.
1709         (cp_parser_direct_declarator): Simplify array bounds, even in
1710         templates, when they are non-dependent.  Use
1711         resolve_typename_type, not cp_parser_resolve_typename_type.
1712         (cp_parser_class_head): Use resolve_typename_type, not
1713         cp_parser_resolve_typename_type.
1714         (cp_parser_member_declaration): Adjust call to
1715         cp_parser_constant_expression.
1716         (cp_parser_constant_initializer): Likewise.
1717         (cp_parser_constructor_declarator): Use resolve_typename_type, not
1718         cp_parser_resolve_typename_type.
1719         (cp_parser_late_parsing_default_args): Adjust call to
1720         push_nested_class.
1721         * pt.c (tsubst): Give it internal linkage.
1722         (tsubst_expr): Likewise.
1723         (tsubst_copy): Likewise.
1724         (tsubst_copy_and_build): Likewise.
1725         (push_access_scope_real): Likewise.
1726         (tsubst_friend_class): Likewise.
1727         (instantiate_class_template): Adjust call to pushclass.
1728         (value_dependent_expression_p): Give it external linkage.
1729         Robustify.
1730         (resolve_typename_type): New function.
1731         * semantics.c (finish_call_expr): Use build_new_op, not
1732         build_opfncall.
1733         (begin_constructor_declarator): Remove.
1734         (begin_class_definition): Adjust call to pushclass.
1735         (enter_scope_of): Remove.
1736         * typeck.c (comptypes): Resolve typename types as appropriate.
1737         (build_x_indirect_ref): Use build_new_op, not build_opfncall.
1738         (build_x_compound_expr): Likewise.
1739         (build_modify_expr): Likewise.
1740         (build_x_modify_expr): Likewise.
1741         * typeck2.c (build_x_arrow): Likewise.
1742
1743 2003-01-29  Fariborz Jahanian  <fjahanian@apple.com>
1744
1745         * pt.c (last_pending_template) Declare GTY().
1746
1747 2003-01-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1748
1749         PR c++/8591
1750         * parser.c (cp_parser_elaborated_type_specifier): Convert
1751         TEMPLATE_DECL to TYPE_DECL only when processing template friends.
1752         (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
1753
1754 2003-01-28  Nathan Sidwell  <nathan@codesourcery.com>
1755
1756         PR c++/9437
1757         * pt.c (unify): Don't unify '*T' with 'U C::*'.
1758
1759         PR c++/3902
1760         * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
1761         inside a declarator.
1762
1763 2003-01-27  Nathan Sidwell  <nathan@codesourcery.com>
1764
1765         * class.c (update_vtable_entry_for_fn): Add index parameter.
1766         Generate vcall thunk for covariant overriding from a virtual
1767         primary base.
1768         (dfs_modify_vtables): Adjust.
1769
1770 2003-01-25  Nathan Sidwell  <nathan@codesourcery.com>
1771
1772         PR c++/9403
1773         * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
1774         template keyword.
1775         (cp_parser_base_specifier): Look for and consume a
1776         TEMPLATE keyword. Replace switch with array index.
1777
1778         PR c++/795
1779         * semantics.c (finish_non_static_data_member): Remember the
1780         field's type even in a template.
1781
1782         PR c++/9415
1783         * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
1784         already scoped.
1785
1786         PR c++/8545
1787         * parser.c (cp_parser_cast_expression): Be more tentative.
1788
1789 2003-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1790
1791         * cp-tree.h (flagged_type_tree_s): Remove.
1792         (check_for_new_type): Likewise.
1793         * typeck2.c (check_for_new_type): Likewise.
1794
1795 2003-01-23  Nathanael Nerode  <neroden@gcc.gnu.org>
1796
1797         * dump.c: ANSIfy function declarations and definitions.
1798
1799         * cp-tree.h, decl.h: Get rid of PARAMS.  Again.
1800
1801 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
1802
1803         PR c++/9354
1804         * init.c (build_new): Set the type of the new-expression, even
1805         when processing_templte_decl.
1806
1807         PR c++/9216
1808         * parser.c (cp_parser_primary_expression): Improve error message
1809         for templates used in an expression context.
1810
1811         PR c++/8696
1812         * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
1813         parse when encountering "typedef".
1814
1815 2003-01-22  Nathanael Nerode  <neroden@gcc.gnu.org>
1816
1817         * class.c, parser.c: ANSIfy function definitions and declarations.
1818
1819 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
1820
1821         PR c++/9328
1822         * error.c (dump_decl): For an OVERLOAD, just print the name of the
1823         function; it doesn't make sense to try to print its type.
1824         * semantics.c (finish_typeof): Issue errors about invalid uses.
1825
1826         PR c++/9298
1827         * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
1828         function.
1829         (cp_parser_expression_statement): Use it.
1830         (cp_parser_explicit_instantiation): Likewise.
1831         * pt.c (do_decl_instantiation): Improve error handling logic.
1832
1833 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
1834
1835         PR c++/9384
1836         * parser.c (cp_parser_using_declaration): Issue error messages
1837         about name resolution failures here.
1838
1839         PR c++/9388
1840         * class.c (currently_open_derived_class): Use dependent_type_p.
1841         * cp-tree.h (dependent_type_p): New function.
1842         (dependent_template_arg_p): Likewise.
1843         (dependent_template_p): Likewise.
1844         (type_dependent_expression_p): Likewise.
1845         * parser.c (cp_parser_dependent_type_p): Remove.
1846         (cp_parser_value_dependent_type_p): Likewise.
1847         (cp_parser_type_dependent_expression_p): Likewise.
1848         (cp_parser_dependent_template_arg_p): Likewise.
1849         (cp_parser_dependent_template_id_p): Likewise.
1850         (cp_parser_dependent_template_p): Likewise.
1851         (cp_parser_diagnose_invalid_type_name): Replace
1852         cp_parser_dependent_type_p with dependent_type_p, etc.
1853         (cp_parser_primary_expresion): Likewise.
1854         (cp_parser_nested_name_specifier_opt): Likewise.
1855         (cp_parser_postfix_expression): Likewise.
1856         (cp_parser_unary_expression): Likewise.
1857         (cp_parser_template_name): Likewise.
1858         (cp_parser_class_name): Likewise.
1859         (cp_parser_lookup_name): Likewise.
1860         * pt.c (dependent_type_p): New function.
1861         (value_dependent_expression_p): Likewise.
1862         (type_dependent_expression_p): Likewise.
1863         (dependent_template_arg_p): Likewise.
1864         (dependent_template_id_p): Likewise.
1865         (dependent_template_p): Likewise.
1866
1867         PR c++/9285
1868         PR c++/9294
1869         * parser.c (cp_parser_simple_declaration): Return quickly when
1870         encountering errors.
1871
1872 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1873
1874         Make-lang.in (cp/decl.o-warn): Add -Wno-error.
1875
1876 2003-01-17  Jason Merrill  <jason@redhat.com>
1877
1878         PR c++/9167, c++/9358
1879         * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
1880
1881 2003-01-17  Jason Merrill  <jason@redhat.com>
1882
1883         PR c++/9342
1884         * call.c (build_conditional_expr): Always do lvalue-rvalue
1885         conversion.
1886
1887 2003-01-17  Mark Mitchell  <mark@codesourcery.com>
1888
1889         PR c++/9294
1890         * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
1891         * cp-tree.h (BASELINK_BINFO): Adjust.
1892         (BASELINK_FUNCTIONS): Likewise.
1893         (BASELINK_ACCESS_BINFO): Likewise.
1894         (tree_baselink): New structure.
1895         (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
1896         (lang_tree_node): Add baselink.
1897         * decl.c (cp_tree_node_structure): Add BASELINK case.
1898         * search.c (build_baselink): Adjust.
1899         * tree.c (cp_walk_subtrees): Add BASELINK case.  Remove BASELINK_P
1900         test from TREE_LIST case.
1901
1902         PR c++/9272
1903         * parser.c (cp_parser_constructor_declarator_p): Do not assume
1904         that a constructor cannot be declared outside of its own class.
1905
1906         * parser.c (cp_parser_resolve_typename_type): If the scope cannot
1907         be resolved, neither can the qualified name.
1908
1909         * rtti.c (get_pseudo_ti_desc): Fix thinko.
1910
1911 2003-01-16  Jason Merrill  <jason@redhat.com>
1912
1913         PR c++/8564
1914         * init.c (build_vec_init): Re-add maxindex parm.
1915         (perform_member_init, build_aggr_init): Pass it.
1916         (build_new_1): Pass it. Use an incomplete array type for full_type.
1917         * typeck.c (build_modify_expr): Pass it.
1918         * cp-tree.h: Adjust.
1919
1920 2003-01-16  Jeffrey D. Oldham  <oldham@codesourcery.com>
1921
1922         * cp-tree.h (tsubst_copy_and_build): New declaration.
1923         * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
1924         (tsubst_expr): Use 'tsubst_copy_and_build'.  Update initial comment.
1925         (tsubst_copy_and_build): New function.
1926
1927 2003-01-16  Mark Mitchell  <mark@codesourcery.com>
1928
1929         * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
1930         (PARTIAL_INSTANTIATION_P): Remove.
1931         (IMPLICIT_TYPENAME_P): Likewise.
1932         (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
1933         (build_typename_type): Remove declaration.
1934         (parmlist_is_exprlist): Likewise.
1935         * decl.c (build_typename_type): Make it static, remove third
1936         parameter.
1937         (push_class_binding): Don't do implicit typename stuff.
1938         (make_typename_type): Likewise.
1939         (lookup_name_real): Likewise.
1940         (grokdeclarator): Don't try to convert declarations into
1941         initializations.  Don't do implicit typename stuff.
1942         (parmlist_is_exprlist): Remove.
1943         (xref_basetypes): Simplify.
1944         * decl2.c (grokfield): Don't try to convert declarations into
1945         initializations.
1946         (build_anon_union_vars): Do this while processing templates, too.
1947         (finish_anon_union): Likewise.
1948         * error.c (dump_type): Remove implicit typename handling.
1949         * parser.c (cp_parser_diagnose_invalid_type_name): New method.
1950         (cp_parser_primary_expression): Correct handling of names not
1951         found by unqualified name lookup in templates.
1952         (cp_parser_nested_name_specifier_opt): Avoid checking dependency
1953         of types when possible.
1954         (cp_parser_simple_declaration): Complain intelligently about some
1955         invalid declarations.
1956         (cp_parser_member_declaration): Likewise.
1957         (cp_parser_constructor_declarator_p): Don't check when we're in a
1958         function scope.
1959         * pt.c (instantiate_class_template): Remove
1960         PARTIAL_INSTANTIATION_P gunk.
1961         * search.c (lookup_field_r): Don't build implicit typenames.
1962         (marked_pushdecls_p): Don't enter dependent base types.
1963         (unmarked_pushdecls_p): Likewise.
1964         * semantics.c (begin_class_definition): Remove implicit typename
1965         stuff.
1966
1967 2003-01-16  Nathan Sidwell  <nathan@codesourcery.com>
1968
1969         PR c++/9212
1970         * parser.c (cp_parser_direct_declarator): If accepting either
1971         abstract or named, the name must be an unqualified-id.
1972
1973 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1974
1975         * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
1976
1977 2003-01-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1978
1979         * decl2.c (check_classfn): Fix uninitialized warning.
1980         (build_anon_union_vars): Likewise.
1981         * pt.c (tsubst_copy): Likewise.
1982
1983 2003-01-14  Jeffrey D. Oldham  <oldham@codesourcery.com>
1984
1985         Further conform g++'s __vmi_class_type_info to the C++ ABI
1986         specification.
1987         * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
1988         the specification.
1989         (class_hint_flags): Likewise.
1990
1991 2003-01-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1992
1993         * config-lang.in: Add semantics.c to gtfiles.
1994         * cp-tree.h (flagged_type_tree_s): Remove lookups field.
1995         (saved_scope): Likewise.
1996         (type_lookups): Remove.
1997         (deferred_access): New structure.
1998         (type_access_control): Remove.
1999         (save_type_access_control): Likewise.
2000         (reset_type_access_control): Likewise.
2001         (decl_type_access_control): Likewise.
2002         (push_deferring_access_checks): Declare.
2003         (resume_deferring_access_checks): Likewise.
2004         (stop_deferring_access_checks): Likewise.
2005         (pop_deferring_access_checks): Likewise.
2006         (get_deferred_access_checks): Likewise.
2007         (pop_to_parent_deferring_access_checks): Likewise.
2008         (perform_deferred_access_checks): Likewise.
2009         (perform_or_defer_access_check): Likewise.
2010         * decl.c (make_typename_type): Use perform_or_defer_access_check.
2011         (make_unbound_class_template): Likewise.
2012         (grokdeclarator): Don't call decl_type_access_control.
2013         * parser.c (cp_parser_context): Remove deferred_access_checks
2014         and deferring_access_checks_p fields.
2015         (cp_parser_context_new): Adjust.
2016         (cp_parser): Remove access_checks_lists.
2017         (cp_parser_defer_access_check): Remove.
2018         (cp_parser_start_deferring_access_checks): Remove.
2019         (cp_parser_stop_deferring_access_checks): Remove.
2020         (cp_parser_perform_deferred_access_checks): Remove.
2021         (cp_parser_nested_name_specifier_opt): Use new deferred access
2022         functions.
2023         (cp_parser_simple_declaration): Likewise.
2024         (cp_parser_template_id): Likewise.
2025         (cp_parser_function_definition): Likewise.
2026         (cp_parser_class_specifier): Likewise.
2027         (cp_parser_lookup_name): Likewise.
2028         (cp_parser_single_declaration): Likewise.
2029         (cp_parser_pre_parsed_nested_name_specifier): Likewise.
2030         (cp_parser_parse_tentatively): Likewise.
2031         (cp_parser_parse_definitely): Likewise.
2032         (yyparse): Likewise.
2033         (cp_parser_init_declarator): Remove access_checks parameter.
2034         Use new deferred access functions.
2035         (cp_parser_function_definition_from_specifiers_and_declarator):
2036         Likewise.
2037         (cp_parser_class_head): Remove deferring_access_checks_p and
2038         saved_access_checks parameters.  Use new deferred access functions.
2039         (cp_parser_member_specification_opt): Don't call
2040         reset_type_access_control.
2041         * search.c (type_access_control): Remove.
2042         * semantics.c: Include "gt-cp-semantics.h".
2043         (deferred_type_access_control): Remove.
2044         (deferred_access_stack): New variable.
2045         (deferred_access_free_list): Likewise.
2046         (push_deferring_access_checks): New function.
2047         (resume_deferring_access_checks): Likewise.
2048         (stop_deferring_access_checks): Likewise.
2049         (pop_deferring_access_checks): Likewise.
2050         (get_deferred_access_checks): Likewise.
2051         (pop_to_parent_deferring_access_checks): Likewise.
2052         (perform_deferred_access_checks): New function, adapted from
2053         cp_parser_perform_deferred_access_checks.
2054         (perform_or_defer_access_check): New function, adapted from
2055         cp_parser_defer_access_check.
2056         (current_type_lookups): Remove.
2057         (deferred_type_access_control): Likewise.
2058         (decl_type_access_control): Likewise.
2059         (save_type_access_control): Likewise.
2060         (reset_type_access_control): Likewise.
2061         (begin_function_definition): Adjust.
2062         (begin_class_definiton): Likewise.
2063
2064 2003-01-13  Jason Merrill  <jason@redhat.com>
2065
2066         PR c++/8748
2067         * class.c (build_base_path): Take the address before calling save_expr.
2068
2069         * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
2070         all the ambiguous conversions are bad.
2071
2072         * class.c (maybe_warn_about_overly_private_class): Don't stop
2073         searching when we find a nonprivate method.
2074
2075         * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
2076
2077 2003-01-12  Mark Mitchell  <mark@codesourcery.com>
2078
2079         * cp-tree.h (get_arglist_len_in_bytes): Remove.
2080
2081         PR c++/9264
2082         * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
2083         typeame types more robustly.
2084
2085 2003-01-11  Phil Edwards  <pme@gcc.gnu.org>
2086
2087         * parser.c:  Fix comment typos.
2088
2089 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
2090
2091         PR c++/9099
2092         * parser.c (cp_parser_scope_through_which_access_occurs): Handle
2093         an object_type which is not a class type.
2094
2095 2003-01-10  Geoffrey Keating  <geoffk@apple.com>
2096
2097         * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
2098         (cp_parser_late_parsing_default_args): Likewise.
2099
2100 2003-01-10  Nathanael Nerode  <neroden@gcc.gnu.org>
2101
2102         * cfns.gperf: ANSIfy function declarations.
2103         * cfns.h: Regenerate.
2104         * cp-tree.h: ANSIfy function declarations.
2105
2106 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
2107
2108         * cp-tree.h (reparse_absdcl_as_expr): Remove.
2109         (reparse_absdcl_as_casts): Likewise.
2110         (reparse_decl_as_expr): Likewise.
2111         (finish_decl_parsing): Likewise.
2112         * decl2.c (reparse_absdcl_as_expr): Remove.
2113         (reparse_absdcl_as_casts): Likewise.
2114         (repase_decl_as_expr): Likewise.
2115         (finish_decl_parsing): Likewise.
2116
2117         PR c++/9128
2118         PR c++/9153
2119         PR c++/9171
2120         * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
2121         function.
2122         (cp_parser_nested_name_specifier_opt): Correct the
2123         check_dependency_p false.
2124         (cp_parser_postfix_expression): Fix formatting.
2125         (cp_parser_decl_specifier_seq): Avoid looking for constructor
2126         declarators when possible.
2127         (cp_parser_template_id): Avoid performing name-lookup when
2128         possible.
2129         (cp_parser_class_head): Do not count specializations when counting
2130         levels of templates.
2131         (cp_parser_constructor_declarator_p): Return immediately if
2132         there's no chance that the tokens form a constructor declarator.
2133         * rtti.c (throw_bad_typeid): Add comment.  Do not return an
2134         expression with reference type.
2135         (get_tinfo_decl_dynamic): Do not return an expression with
2136         reference type.
2137         (build_typeid): Add comment.  Do not return an expression with
2138         reference type.
2139         * typeck.c (build_class_member_access_expr): Improve handling of
2140         conditionals and comma-expressions as objects.
2141
2142 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
2143
2144         * cfns.gperf: ANSIfy function declarations.
2145         * cfns.h: Regenerate.
2146         * cp-tree.h: ANSIfy function declarations.
2147         * parser.c: ANSIfy function declarations & definitions.
2148
2149         * decl.c (bad_specifiers): Fix parameter order error I introduced.
2150
2151 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
2152
2153         Merge from pch-branch:
2154
2155         2003-01-09  Geoffrey Keating  <geoffk@apple.com>
2156
2157         Merge to tag pch-merge-20030102:
2158
2159         * semantics.c (finish_translation_unit): Don't call finish_file.
2160         * parser.c: Don't include ggc.h.
2161         (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
2162         read first token here.  Don't allow PCH files after the first
2163         token is read.
2164         (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
2165         (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
2166         (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
2167         (cp_parser_late_parsing_for_member): Don't duplicate call to
2168         cp_lexer_set_source_position_from_token.
2169         (cp_parser_late_parsing_default_args): Likewise.
2170         (yyparse): Call finish_file after clearing the_parser.
2171
2172         2002-12-11  Geoffrey Keating  <geoffk@apple.com>
2173
2174         * Make-lang.in: Remove $(GGC_H) from all dependencies.
2175         (CXX_TREE_H): Add $(GGC_H).
2176         * class.c: Don't include ggc.h.
2177         (field_decl_cmp): Make parameters be 'const void *' to match qsort.
2178         (method_name_cmp): Likewise.
2179         (resort_data): New variable.
2180         (resort_field_decl_cmp): New.
2181         (resort_method_name_cmp): New.
2182         (resort_sorted_fields): New.
2183         (resort_type_method_vec): New.
2184         (finish_struct_methods): Delete cast.
2185         (finish_struct_1): Delete cast.
2186         * cp-tree.h: Include ggc.h.
2187         (struct lang_type_class): Add reorder attribute to field `methods'.
2188         (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
2189         (resort_sorted_fields): New prototype.
2190         (resort_type_method_vec): New prototype.
2191         * call.c: Don't include ggc.h.
2192         * decl.c: Likewise.
2193         * decl2.c: Likewise.
2194         * init.c: Likewise.
2195         * lex.c: Likewise.
2196         * method.c: Likewise.
2197         * optimize.c: Likewise.
2198         * parse.y: Likewise.
2199         * pt.c: Likewise.
2200         * repo.c: Likewise.
2201         * search.c: Likewise.
2202         * semantics.c: Likewise.
2203         * spew.c: Likewise.
2204         * tree.c: Likewise.
2205
2206         * lang-specs.h: Remove comment.
2207
2208         2002-12-03  Geoffrey Keating  <geoffk@apple.com>
2209
2210         * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
2211         (operator_name_info): Mark to be saved for PCH, specify size.
2212         (assignment_operator_name_info): Likewise.
2213
2214         2002-11-19  Geoffrey Keating  <geoffk@apple.com>
2215
2216         * decl.c (anon_cnt): Mark to be saved for PCH.
2217
2218         2002-10-25  Geoffrey Keating  <geoffk@apple.com>
2219
2220         * lex.c  (init_reswords): Delete now-untrue comment.
2221         Allocate ridpointers using GGC.
2222
2223         2002-10-04  Geoffrey Keating  <geoffk@apple.com>
2224
2225         * cp-tree.h (union lang_decl_u2): Add tags to all fields.
2226
2227         * g++spec.c (lang_specific_driver): Don't include standard
2228         libraries in `added'.
2229
2230         2002-08-27  Geoffrey Keating  <geoffk@redhat.com>
2231
2232         * decl2.c (finish_file): Call c_common_write_pch.
2233         * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
2234
2235         2002-08-17  Geoffrey Keating  <geoffk@redhat.com>
2236
2237         * g++spec.c (lang_specific_driver): Treat .h files as C++ header
2238         files when using g++.
2239         * lang-specs.h: Handle compiling C++ header files.
2240
2241 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
2242
2243         * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
2244
2245 2003-01-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2246
2247         * pt.c (push_access_scope_real): Call push_to_top_level for
2248         function in namespace scope.
2249         (pop_access_scope): Call pop_from_top_level for function in
2250         namespace scope.
2251
2252 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
2253
2254         * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
2255
2256 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
2257
2258         * Make-lang.in (c++.install-common, c++.install-man,
2259         c++.uninstall): Prepend $(DESTDIR) to destination paths in
2260         all (un)installation commands.
2261         (c++.install-common): Rewrite $(LN) commands to support
2262         DESTDIR with "ln" as well as with "ln -s".
2263
2264 2003-01-08  Jason Merrill  <jason@redhat.com>
2265
2266         * parser.c (cp_parser_primary_expression): See through explicitly
2267         scoped ALIAS_DECLs, too.
2268
2269 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
2270
2271         * decl.c: Remove some #if 0 code.
2272
2273         * decl.c: ANSIfy function declarations.
2274
2275 2003-01-07  Mark Mitchell  <mark@codesourcery.com>
2276
2277         * parser.c (cp_parser_asm_definition): Correct handling of omitted
2278         operands.
2279
2280 2003-01-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2281
2282         PR c++/9030
2283         * decl.c (make_typename_type): Check access only when tf_error.
2284         (make_unbound_class_template): Likewise.
2285         * pt.c (saved_access_scope): New variable.
2286         (push_access_scope_real): New function.
2287         (push_access_scope): Likewise.
2288         (pop_access_scope): Likewise.
2289         (tsubst_default_argument): Use them.
2290         (instantiate_template): Likewise.
2291         (regenerate_decl_from_template): Likewise.
2292         (instantiate_decl): Likewise.
2293         (get_mostly_instantiated_function_type): Likewise.
2294
2295 2003-01-07  Nathanael Nerode <neroden@gcc.gnu.org>
2296
2297         * tree.c: Delete bogus #if 0 code.
2298
2299 2003-01-07  Andreas Schwab  <schwab@suse.de>
2300
2301         * class.c (layout_class_type): Don't use
2302         PCC_BITFIELD_TYPE_MATTERS if not defined.
2303
2304 2003-01-06  Mark Mitchell  <mark@codesourcery.com>
2305
2306         PR c++/9165
2307         * decl2.c (build_cleanup): Mark the object as used.
2308
2309         * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
2310         (hash_local_specialization): New function.
2311         (register_local_specialization): Revert 2003-01-05 change.
2312         (instantiate_decl): Use hash_local_specialization when creating
2313         the local_specializations table.
2314
2315         * decl2.c (mark_used): Do not synthesize thunks.
2316
2317         * class.c (layout_class_type): Correct handling of unnamed
2318         bitfields wider than their types.
2319
2320         PR c++/9189
2321         * parser.c (cp_parser): Remove default_arg_types.  Update
2322         documentation for unparsed_functions_queues.
2323         (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
2324         parameter.
2325         (cp_parser_new): Don't set parser->default_arg_types.
2326         (cp_parser_function_definition): Adjust usage of
2327         unparsed_funtions_queues.
2328         (cp_parser_class_specifier): Don't mess with
2329         parser->default_arg_types.  Handle default argument processing in
2330         a separate phase from function body processing.
2331         (cp_parser_template_declaration_after_export): Adjust usage of
2332         unparsed_functions_queues.
2333         (cp_parser_late_parsing_for_member): Do not handle default
2334         arguments.
2335
2336 2003-01-06  Nathan Sidwell  <nathan@codesourcery.com>
2337
2338         PR c++/9109
2339         * parser.c (cp_parser_declarator_kind): New enum.
2340         (cp_parser_declarator): Adjust.
2341         (cp_parser_direct_declarator): Adjust. Allow for either named or
2342         abstract declarator. Prefer abstract, if possible. Allow
2343         parenthesized function name.
2344         (cp_parser_condition): Adjust cp_parser_declarator call.
2345         (cp_parser_explicit_instantiation): Likewise.
2346         (cp_parser_init_declarator): Likewise.
2347         (cp_parser_type_id): Likewise.
2348         (cp_parser_function_definition): Likewise.
2349         (cp_parser_member_declaration): Likewise.
2350         (cp_parser_parameter_declaration): Use cp_parser_declarator to do
2351         the tentative parsing.
2352         (cp_parser_exception_declaration): Likewise.
2353
2354 2003-01-05  Mark Mitchell  <mark@codesourcery.com>
2355
2356         * parser.c (cp_parser_template_parameter): Adjust call to
2357         cp_parser_parameter_declaration.
2358         (cp_parser_parameter_declaration_list): Likewise.
2359         (cp_parser_parameter_declaration): Replace
2360         greater_than_is_operator_p with template_parm_p parameter.  Do not
2361         cache tokens for template default arguments.
2362
2363         * pt.c (retrieve_local_specialization): Use htab_find, not
2364         htab_find_with_hash.
2365         (register_local_specialization): Use htab_find_slot, not
2366         htab_find_slot_with_hash.
2367         (instantiate_decl): Pass a hash function to htab_create.
2368
2369 2003-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2370
2371         * parser.c (cp_parser_binary_expression,
2372         cp_parser_multiplicative_expression,
2373         cp_parser_additive_expression, cp_parser_shift_expression,
2374         cp_parser_relational_expression, cp_parser_equality_expression,
2375         cp_parser_and_expression, cp_parser_exclusive_or_expression,
2376         cp_parser_inclusive_or_expression,
2377         cp_parser_logical_and_expression, cp_parser_logical_or_expression,
2378         cp_parser_binary_expression): Const-ify.
2379
2380 2003-01-04  Mark Mitchell  <mark@codesourcery.com>
2381
2382         * method.c (use_thunk): Disable access control while building the
2383         body of the thunk.
2384
2385 2003-01-03  Nathanael Nerode  <neroden@gcc.gnu.org>
2386
2387         * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
2388         front end.
2389
2390 2003-01-03  Matt Austern  <austern@apple.com>
2391
2392         * cp-tree.h (struct lang_type_class): add field for key method
2393         (cp_global_trees): rename dynamic_classes to keyed_classes
2394         (key_method): add definition
2395         * class.c (finish_struct_1): compute class's key method, and add
2396         the class to keyed_classes list if there is no key method.
2397         * decl.c (finish_function): add class to keyed_classes list if we
2398         see a definition of the class's key method.
2399         * pt.c (instantiate_class_template): add template specialization
2400         of a dynamic class to keyed_classes list.
2401         * decl2.c (key_method): remove
2402         (finish_file): iterate only through keyed_classes list when
2403         deciding whether to emit vtables, remove class from its list after
2404         we do the emission.
2405
2406 2003-01-02  Jason Merrill  <jason@redhat.com>
2407
2408         * call.c (build_conditional_expr): Stabilize lvalues properly.
2409         * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
2410         * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
2411         Don't allow CALL_EXPR or VA_ARG_EXPR, either.
2412
2413         * call.c (convert_like_real): Call decl_constant_value for an
2414         IDENTITY_CONV even if there are no more conversions.
2415
2416         * cvt.c (build_up_reference): Don't push unnamed temps.
2417
2418         * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
2419
2420         * dump.c (cp_dump_tree): Don't try to dump class-specific fields
2421         for a backend struct.
2422
2423         * except.c (wrap_cleanups_r, build_throw): Make
2424         MUST_NOT_THROW_EXPRs void.
2425         * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
2426
2427         * init.c (build_vec_delete_1): Pre-evaluate the base address.
2428
2429         * init.c (get_temp_regvar): Simplify logic.
2430
2431         * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
2432         our replacement is a decl.
2433
2434         * decl.c (cp_make_fname_decl): Push the decls inside the
2435         outermost scope.
2436
2437 2003-01-03  Nathan Sidwell  <nathan@codesourcery.com>
2438
2439         PR c++/45, c++/3784
2440         * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
2441         the same too.
2442
2443 2003-01-03  Graham Stott  <graham.stott@btinternet.com>
2444
2445         * parser.c (struct cp_parser): Add access_checks_lists field
2446         (cp_parser_simple_declaration): Use.
2447         (cp_parser_init_declarator): Likewise.
2448
2449 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
2450
2451         * parser.c (cp_parser_declaration): Accept the __extension__
2452         keyword before the declaration.
2453
2454         PR c++/2843
2455         * parser.c (cp_parser_parameter_declaration): Allow attributes to
2456         appear after the declarator.
2457
2458         * call.c (build_new_method_call): Fix typo in message format
2459         string.
2460
2461 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
2462
2463         * parser.c (cp_lexer_next_token_is): Declare it inline.
2464         (cp_lexer_set_source_position_from_token): Likewise.
2465         (cp_lexer_debugging_p): Likewise.
2466         (cp_parser_parsing_tentatively): Likewise.
2467         (cp_parser_nested_name_specifier_opt): Reduce the number of calls
2468         to the cp_lexer_peek_token.
2469
2470         * parser.c (cp_parser_sizeof_operand): Do not evaluate the
2471         expression.
2472
2473 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
2474
2475         * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
2476         cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
2477         cp/repo.c: Fix copyright years.
2478
2479 2003-01-01  Neil Booth  <neil@daikokuya.co.uk>
2480
2481         * lex.c: Remove superfluous include of cpplib.h.
2482         (CONSTRAINT): Define without conditions.
2483         (init_cp_pragma): Use c_register_pragma.
2484
2485 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
2486
2487         * .cvsignore: Remove.
2488
2489 2002-12-31  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2490
2491         * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
2492           except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
2493           lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
2494           pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
2495           typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
2496           copyright header.
2497         * lex.h: parse.y is dead, so don't mention it.  Also replace the
2498           copyright header with the default GNU copyright header.
2499
2500 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
2501
2502         * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
2503         (lookup_name_namespace_only): Likewise.
2504         (begin_only_namespace_names): Likewise.
2505         (end_only_namespace_names): Likewise.
2506         * decl.c (only_namespace_names): Remove.
2507         (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
2508         (lookup_name_real): Do not check only_namespace_names.
2509         (lookup_name_namespace_only): Remove.
2510         (begin_only_namespace_names): Likewise.
2511         (end_only_namespace_names): Likewise.
2512         * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
2513         nested-name-specifiers more gracefully.
2514         (cp_parser_class_or_namespace_name): Avoid looking up namespace
2515         names when they cannot possibly appear.
2516         (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
2517         (cp_parser_elaborated_type_specifier): Likewise.
2518         (cp_parser_namespace_name): Only look for namespace names.
2519         (cp_parser_lookup_name): Add is_namespace parameter.
2520         (cp_parser_lookup_name_simple): Adjust call to
2521         cp_parser_lookup_name.
2522
2523         * parser.c (cp_parser_dependent_type_p): Fix thinko.
2524
2525 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
2526
2527         * .cvsignore: Update.
2528
2529 2002-12-31  Nathan Sidwell  <nathan@codesourcery.com>
2530
2531         * class.c (modify_vtable_entry): Remove unused variable.
2532         (get_vcall_index): Always expect a non-thunk.
2533         (update_vtable_entry_for_fn): Combine covariant adjustments, when
2534         overriding a thunk. Pass get_vcall_index a non-thunk.
2535
2536         * decl2.c (finish_file): Mark undefined inlines as extern.
2537
2538 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
2539
2540         * cp-tree.def (RETURN_INIT): Remove.
2541         * cp-tree.h (DECL_IN_MEMORY_P): Remove.
2542         (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
2543         (note_level_for_for): Remove.
2544         (note_level_for_try): Likewise.
2545         (note_level_for_catch): Likewise.
2546         (finish_named_return_value): Likewise.
2547         (do_pushlevel): Change prototype.
2548         (pending_lang_change): Remove.
2549         * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
2550         sk_for.
2551         (note_level_for_for): Remove.
2552         (note_level_for_try): Likewise.
2553         (note_level_for_catch): Likewise.
2554         (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
2555         * parser.c (cp_parser_context_free_list): Make it "deletable".
2556         (cp_parser_template_argument): Remove misleading comment.
2557         * pt.c (tsubst_expr): Remove RETURN_INIT code.
2558         * semantics.c (genrtl_named_return_value): Remove.
2559         (do_pushlevel): Take a scope kind as an argument.
2560         (begin_if_stmt): Adjust.
2561         (begin_while_stmt): Likewise.
2562         (begin_for_stmt): Likewise.
2563         (finish_for_init_stmt): Likewise.
2564         (begin_switch_stmt): Likewise.
2565         (begin_handler): Likewise.
2566         (begin_compound_stmt): Likewise.
2567         (finish_named_return_value): Remove.
2568         (cp_expand_stmt): Remove RETURN_INIT case.
2569         * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
2570
2571 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
2572
2573         PR c++/9112
2574         * parser.c (cp_parser_direct_declarator): Handle erroneous
2575         parenthesized declarators correctly.
2576
2577 2002-12-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2578
2579         * cp-tree.h (pending_lang_change): Declare.
2580
2581 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
2582
2583         * parser.c (cp_parser_context_free_list): New variable.
2584         (cp_parser_context_new): Use it.
2585         (cp_parser_error): Check return code from
2586         cp_parser_simulate_error.
2587         (cp_parser_simulate_error): Return a value.
2588         (cp_parser_id_expression): Optimize common case.
2589         (cp_parser_class_name): Likewise.
2590         (cp_parser_class_specifier): Adjust call to
2591         cp_parser_late_parsing_default_args.
2592         (cp_parser_lookup_name): Optimize common case.
2593         (cp_parser_late_parsing_for_member): Adjust call to
2594         cp_parser_late_parsing_default_args.
2595         (cp_parser_late_parsing_default_args): Add scope parameter.
2596         (cp_parser_require): Avoid creating the error message unless it's
2597         needed.
2598         (cp_parser_parse_definitely): Place free'd contexts on the free
2599         list.
2600
2601         * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
2602
2603 2002-12-30  David Edelsohn  <edelsohn@gnu.org>
2604
2605         * parser.c (cp_parser_parameter_declaration_clause): Treat system
2606         header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
2607
2608 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
2609
2610         * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
2611         GCC, not GNU CC.
2612
2613 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
2614
2615         * parse.y: Remove.
2616         * spew.c: Likewise.
2617         * Make-lang.in (gt-cp-spew.h): Remove.
2618         * cp-tree.h (do_pending_lang_change): Remove.
2619         (do_identifier): Change prototype.
2620         (finish_id_expr): Remove.
2621         * decl.c (lookup_name_real): Remove yylex variable.
2622         * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
2623         * lex.c (init_cpp_parse): Remove.
2624         (reduce_cmp): Likewise.
2625         (token_cmp): Likewise.
2626         (yychar): Likewise.
2627         (lastiddecl): Likewise.
2628         (token_count): Likewise.
2629         (reduce_count): Likewise.
2630         (yyhook): Likewise.
2631         (print_parse_statistics): Likewise.
2632         (do_pending_lang_change): Likewise.
2633         (do_identifier): Remove parsing parameter.
2634         * lex.h (lastiddecl): Remove.
2635         (looking_for_typename): Remove.
2636         (looking_for_template): Likewise.
2637         (pending_lang_change): Likewise.
2638         (yylex): Likewise.
2639         * semantics.c (finish_id_expr): Remove.
2640
2641         * decl.c (grokdeclarator): Diagnost "extern thread" and "static
2642         thread" correctly.
2643
2644 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
2645
2646         * decl.c, decl2.c, decl.h:  GCC, not GNU CC.  This is the C++ front
2647         end, not the C front end.
2648
2649 2002-12-30  Nathan Sidwell  <nathan@codesourcery.com>
2650
2651         * cp-tree.h (THUNK_TARGET): New macro.
2652         (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
2653         (finish_thunk): Remove offset parms.
2654         * class.c (find_final_overrider): Look through thunks.
2655         (get_vcall_index): Use THUNK_TARGET.
2656         (update_vtable_entry_for_fn): Look through thunks. Set covariant
2657         fixed offset here. Adjust finish_thunk call.
2658         (build_vtbl_initializer): Adjust finish_thunk calls.
2659         * mangle.c (mangle_call_offset): Remove superfluous if.
2660         (mangle_thunk): Adjust.
2661         * method.c (make_thunk): Adjust.
2662         (finish_thunk): Adjust.
2663         (thunk_adjust): Remove assert.
2664         (use_thunk): Use THUNK_TARGET
2665         * dump1.c (cp_dump_tree): Adjust thunk dumping.
2666
2667         PR c++/9054
2668         * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
2669         * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
2670
2671 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2672
2673         Remove traditional C constructs 4/n.
2674         * decl2.c (grok_method_quals, warn_if_unknown_interface,
2675         grok_x_components, cp_build_parm_decl, build_artificial_parm,
2676         maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
2677         delete_sanity, check_member_template, check_java_method,
2678         check_classfn, finish_static_data_member_decl, grokfield,
2679         grokbitfield, grokoptypename, grok_function_init,
2680         cplus_decl_attributes, constructor_name, defer_fn,
2681         build_anon_union_vars, finish_anon_union, coerce_new_type,
2682         coerce_delete_type, comdat_linkage, maybe_make_one_only,
2683         key_method, import_export_vtable, import_export_class,
2684         output_vtable_inherit, import_export_decl, import_export_tinfo,
2685         build_cleanup, get_guard, get_guard_bits, get_guard_cond,
2686         set_guard, start_objects, finish_objects,
2687         start_static_storage_duration_function,
2688         finish_static_storage_duration_function, get_priority_info,
2689         start_static_initialization_or_destruction,
2690         finish_static_initialization_or_destruction,
2691         do_static_initialization, do_static_destruction,
2692         prune_vars_needing_no_initialization, write_out_vars,
2693         reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
2694         add_using_namespace, merge_functions, ambiguous_decl,
2695         lookup_using_namespace, lookup_using_namespace,
2696         qualified_lookup_using_namespace, set_decl_namespace,
2697         decl_namespace, current_decl_namespace, push_decl_namespace,
2698         pop_decl_namespace, push_scope, pop_scope, add_function,
2699         arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
2700         lookup_arg_dependent, do_namespace_alias,
2701         validate_nonmember_using_decl, do_nonmember_using_decl,
2702         do_toplevel_using_decl, do_local_using_decl,
2703         do_class_using_decl, do_using_directive, check_default_args,
2704         mark_used, handle_class_head): Use C90 prototypings.  Use booleans.
2705         * parser.c (cp_parser_class_head): Use booleanss.
2706         * decl.c (walk_globals, walk_vtables): Likewise.
2707         * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
2708         walk_globals): Change return type from 'int' to 'bool'.
2709         * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
2710         throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
2711         build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
2712         get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
2713         qualifier_flags, tinfo_base_init, generic_initializer,
2714         ptr_initializer, dfs_class_hint_mark, ptm_initializer,
2715         dfs_class_hint_unmark, class_hint_flags, class_initializer,
2716         typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
2717         get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
2718         unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
2719         * repo.c (repo_compile_flags, repo_template_declared,
2720         repo_template_defined, repo_class_defined, repo_get_id,
2721         repo_template_used, repo_vtable_used, repo_inline_used,
2722         repo_tinfo_used, repo_template_instantiated, extract_string,
2723         open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
2724         finish_repo): Likewise.
2725         * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
2726         cxx_print_xnode): Likewise..
2727         * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
2728         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
2729         * cxxfilt.c (demangle_it, print_demangler_list, usage,
2730         standard_symbol_characters, hp_symbol_characters, main, fatal):
2731         Likewise.
2732         (strip_underscore):  Change type from 'int' to 'bool'.
2733         (main): Use boolean constants.
2734
2735 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2736
2737         Remove traditional C constructs 3/n.
2738         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
2739         build_up_reference, warn_ref_binding, convert_to_reference,
2740         convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
2741         convert_to_void, convert, convert_force, build_type_conversion,
2742         build_expr_type_conversion, type_promotes_to,
2743         perform_qualification_conversions): Use C90 prototyping style.
2744         * decl2.c (grok_array_decl): Use boolean constant.
2745         (delete_sanity): Likewise.
2746         * typeck.c (build_unary_op): Likewise.
2747         * semantics.c (finish_switch_cond): Likewise.
2748         * parser.c (cp_parser_direct_new_declarator): Likewise.
2749         * init.c (build_new): Likewise.
2750
2751 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
2752
2753         * Make-lang.in (po-generated): Remove parse.c.
2754         (CXX_OBJS): Remove parse.o and spew.o.  Add parser.o.
2755         ($(srcdir)/cp/parse.h): Remove target.
2756         ($(srcdir)/cp/parse.c): Likewise.
2757         (gt-cp-parse.h): Likewise.
2758         (gt-cp-parser.h): New target.
2759         (c++.distclean): Do not remove parse.output.
2760         (c++.maintainer-clean): Do not remove parse.c or parse.h.
2761         (cp/spew.o): Remove target.
2762         (cp/lex.o): Adjust dependencies.
2763         (cp/pt.o): Likewise.
2764         (cp/parse.o): Likewise.
2765         (cp/TAGS): Do not mention parse.c.
2766         (cp/parser.o): New target.
2767         * NEWS: Mention the new parser.
2768         * call.c (build_scoped_method_call): Simplify.
2769         (build_method_call): Likewise.
2770         (build_new_function_call): Adjust calls to add_function_candidate
2771         and add_template_candidate.
2772         (build_new_op): Improve handling of erroroneous operands.
2773         (convert_default_arg): Remove circular argument processing.
2774         (name_as_c_string): New function.
2775         (build_new_method_call): Use it.
2776         (perform_implicit_conversion): Use error_operand_p.
2777         * class.c (finish_struct_anon): Use constructor_name_p.
2778         (check_field_decls): Likewise.
2779         (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
2780         (resolve_address_of_overloaded_function): Likewise.
2781         (instantiate_type): Tweak pointer-to-member handling.
2782         (get_primary_binfo): Remove incorrect assertion.
2783         * config-lang.in (gtfiles): Add parser.c, remove parse.c.
2784         * cp-tree.h (DEFARG_TOKENS): New macro.
2785         (default_arg): New structure.
2786         (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
2787         (lang_tree_node): Add default_arg.
2788         (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
2789         (type_info_ref_type): New macro.
2790         (saved_scope): Make processing_explicit_instantiation a boolean.
2791         (check_access): New field.
2792         (unparsed_text): Remove.
2793         (language_function): Remove unparsed_inlines.
2794         (error_operand_p): New macro.
2795         (lang_decl): Adjust pending_inline_info.
2796         (DEFARG_POINTER): Remove.
2797         (tag_types): Add typenames.
2798         (lookup_ualified_name): Declare.
2799         (lookup_name_real): Likewise.
2800         (shadow_tag): Adjust prototype.
2801         (get_scope_of_declarator): Declare it.
2802         (process_next_inline): Remove it.
2803         (check_for_missing_semicolon): Likewise.
2804         (maybe_get_template_decl_from_type_decl): Declare it.
2805         (finish_label_stmt): Adjust prototype.
2806         (finish_non_static_data_meber): Declare it.
2807         (finish_pseudo_destructor_call_expr): Rename to ...
2808         (finish_pseudo_destructor_expr): ... this.
2809         (finish_compound_literal): Declare it.
2810         (begin_inline_definitions): Remove it.
2811         (init_spew): Remove.
2812         (peekyylex): Likewise.
2813         (arbitrate_lookup): Likewise.
2814         (frob_opname): Likewise.
2815         (maybe_snarf_defarg): Likewise.
2816         (add_defarg_fn): Likewise.
2817         (do_pending_defargs): Likewise.
2818         (done_pending_defargs): Likewise.
2819         (unprocessed_defarg_fn): Likewise.
2820         (replace_defarg): Likewise.
2821         (end_input): Likewise.
2822         (get_overloaded_fn): Likewise.
2823         * cvt.c (convert_to_reference): Improve error handling.
2824         * decl.c (lookup_name_real): Do not declare it static.
2825         (maybe_push_to_top_level): Set check_access.
2826         (identifier_type_value): Adjust call to lookup_name_real.
2827         (lookup_qualified_name): New method.
2828         (lookup_name_real): Remove special-case parsing code.
2829         (lookup_name-nonclass): Adjust call to lookup_name_real.
2830         (lookup_name_namespace_only): Likewise.
2831         (lookup_name): Likewise.
2832         (check_tag_decl): Return the type declared.
2833         (shadow_tag): Likewise.
2834         (register_dtor_fn): Tweak check_access.
2835         (grokfndecl): Use constructor_name_p.
2836         (get_scope_of_declarator): New function.
2837         (grokdeclarator): Obscure tweaks for slightly different declarator
2838         representations.
2839         (start_method): Return error_mark_node to indicate failure.
2840         (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
2841         * decl2.c (constructor_name_full): Simplify.
2842         (constructor_name): Use it.
2843         (build_expr_from_tree): Adjust for changes to do new parser.
2844         (push_scope): Improve robustness.
2845         (validate_nonmember_using_decl): Process declarations, not names.
2846         (do_class_using_decl): Likewise.
2847         (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
2848         here.
2849         * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
2850         * expr.c (cxx_expand_expr): Handle BASELINKs.
2851         * init.c (member_init_ok_or_else): Issue more errors.
2852         (build_offset_ref): Tweak handling of FUNCTION_DECLs.
2853         * lex.c: Do not include parse.h.
2854         (yypring): Do not declare.
2855         (yylval): Likewise.
2856         (make_reference_declarator): Remove error-generating code.
2857         (rid_to_yy): Remove.
2858         (cxx_init): Do not call init_spew.
2859         (yypring): Remove.
2860         (check_for_missing_semicolon): Remove.
2861         * lex.h (got_scope): Remove.
2862         (got_object): Remove.
2863         * method.c (hack_identifier): Use finish_non_static_data_member.
2864         (implicitly_declare_fn): Adjust use of constructor_name.
2865         * parser.c: New file.
2866         * pt.c (parse.h): Do not include it.
2867         (maybe_get_template_decl_from_template): Do not declare it.
2868         (finish_member_template_decl): Tweak.
2869         (begin_explicit_instantiation): Adjust for
2870         processing_explicit_instantiation being boolean.
2871         (end_explicit_instantiation): Likewise.
2872         (maybe_process_partial_specialization): Tighten specialization
2873         test.
2874         (retrieve_local_specialization): Adjust ue of hash table.
2875         (eq_local_specializations): New function.
2876         (register_local_specialization): Likewise.
2877         (push_template_decl_real): Remove unnecessary test.
2878         (maybe_get_template_decl_from_type_decl): Don't make it static.
2879         (for_each_template_parm_r): Handle TYPEOF_TYPE.
2880         (tsubst_copy): Use retrieive_local_specialization to handle
2881         PARM_DECL.  Adjust handling of CONST_DECLs.  Handle BASELINKs.
2882         Handle COMPONENT_REFs with pseudo-destructor-expressions.
2883         Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
2884         (tsubst_expr): Pass decls, not names, to do_local_using_decl.
2885         (unify): Tweak handling of CONST_DECLs.
2886         (regenerate_decl_from_template): Use push_nested_class.
2887         (template_for_substitution): New funciton.
2888         (instantiate_decl): Use it.  Register parameters as local
2889         specializations.
2890         * rtti.c (init_rtti_processing): Set type_info_ref_type.
2891         (build_typeid): Use it.
2892         (get_typeid): Likeise.
2893         * search.c (accessible_p): Use check_access, not
2894         flag_access_control.
2895         (adjust_result_of_qualified_name_lookup): Pay attention to the
2896         context_class.
2897         * semantics.c (finish_asm_stmt): Adjust error handling.
2898         (finish_label_stmt): Return the statement.
2899         (finish_non_static_data_member): New function.
2900         (finish_class_expr): Handle BASELINKs.
2901         (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
2902         (finish_object_call_expr): Simplify handling during templates.
2903         (finish_pseudo_destructor_call_expr): Rename to ...
2904         (finish_pseudo_dtor_expr): ... this.
2905         (finish_compound_literal): New function.
2906         (begin_inline_definitions): Remove.
2907         (finish_sizeof): Remove special template handling.
2908         * spew.c: Do not include parse.h.
2909         * tree.c (get_overloaded_fn): Remove.
2910         * typeck.c (build_class_member_access_expr): Handle
2911         PSEUDO_DTOR_EXPR.  Adjust handling of static member functions.
2912         (lookup_destructor): New function.
2913         (finish_class_member_access_expr): Use it.
2914         (convert_arguments): Simplify.
2915         (build_unary_op): Handle BASELINKs.
2916
2917 2002-12-26  Nathan Sidwell  <nathan@codesourcery.com>
2918
2919         PR c++/4803
2920         * decl2.c (mark_used): Defer inline functions.
2921         (finish_file): Merge deferred_fns loops. Check all used
2922         inline functions have a definition.
2923         * method.c (make_thunk): Thunks are not inline.
2924
2925         PR c++/5116, c++/764
2926         * call.c (build_new_op): Make sure template class operands are
2927         instantiated.
2928
2929 2002-12-24  Nathan Sidwell  <nathan@codesourcery.com>
2930
2931         PR C++/7964
2932         * cp-tree.h (resolve_scoped_fn_name): Prototype.
2933         * call.c (resolve_scoped_fn_name): New function. Deal with
2934         more template expansion. Broken out of ...
2935         * parse.y (parse_finish_call_expr): ... here. Call it.
2936         * decl2.c (build_expr_from_tree, CALL_EXPR): Use
2937         resolve_scoped_fn_name and build_call_from_tree.
2938
2939         PR c++/9053
2940         * decl.c (duplicate_decls): Templates may be disambiguated by
2941         return type.
2942
2943         PR c++/8702
2944         * decl2.c (check_classfn): Use lookup_fnfield_1. List all
2945         conversion operators on failure.
2946
2947 2002-12-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2948
2949         Remove traditional C constructs 2/n.
2950         * call.c (tourney, build_field_call, equal_functions, joust,
2951         compare_ics, build_over_call, build_java_interface_fn_ref,
2952         convert_like_real, op_error, build_object_call, resolve_args,
2953         build_vfield_ref, check_dtor_name, build_scoped_method_call,
2954         build_addr_func, build_call, build_method_call, null_ptr_cst_p,
2955         sufficient_parms_p, build_conv, non_reference, strip_top_quals,
2956         standard_conversion, reference_related_p,
2957         reference_compatible_p, convert_class_to_reference,
2958         direct_reference_binding, reference_binding,
2959         ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
2960         add_template_conv_candidate, any_viable, any_strictly_viable,
2961         build_this, splice_viable, print_z_candidates,
2962         build_user_type_conversion, build_new_function_call,
2963         conditional_conversion, build_conditional_expr, build_new_op,
2964         build_op_delete_call, enforce_access, call_builtin_trap,
2965         convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
2966         convert_default_arg, type_passed_as, convert_for_arg_passing,
2967         in_charge_arg_for_name, is_properly_derived_from,
2968         maybe_handle_implicit_object, maybe_handle_ref_bind,
2969         source_type, add_warning, can_convert, can_convert_arg,
2970         perform_implicit_conversion, can_convert_arg_bad,
2971         initialize_reference, add_conv_candidate,
2972         add_template_candidate_real, add_template_candidate): Ansify.
2973
2974 2002-12-22  Nathan Sidwell  <nathan@codesourcery.com>
2975
2976         PR c++/8572
2977         * cp-tree.h (grokoptypename): Add SCOPE parameter.
2978         * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
2979         if in a template scope.
2980         * parse.y (unoperator): Return the scope.
2981         (operator_name): Adjust grokoptypename call.
2982
2983 2002-12-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2984
2985         * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
2986         * decl.c (make_unbound_class_template): Adjust.  Check for tf_error.
2987         * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
2988
2989 2002-12-20  Kazu Hirata  <kazu@cs.umass.edu>
2990
2991         * ChangeLog: Fix a typo.
2992         * class.c: Fix comment typos.
2993         * cp-tree.h: Likewise.
2994
2995 2002-12-18  Jason Merrill  <jason@redhat.com>
2996
2997         Handle anonymous unions at the tree level.
2998         C++ ABI change: Mangle anonymous unions using the name of their
2999         first named field (by depth-first search).  Should not cause
3000         binary compatibility problems, though, as the compiler previously
3001         didn't emit anything for affected unions.
3002         * cp-tree.def (ALIAS_DECL): New tree code.
3003         * decl2.c (build_anon_union_vars): Build ALIAS_DECLs.  Return the
3004         first field, not the largest.
3005         (finish_anon_union): Don't mess with RTL.  Do set DECL_ASSEMBLER_NAME,
3006         push the decl, and write it out at namespace scope.
3007         * decl.c (lookup_name_real): See through an ALIAS_DECL.
3008         (pushdecl): Add namespace bindings for ALIAS_DECLs.
3009         * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
3010         of a decl which doesn't have one.
3011         * typeck.c (build_class_member_access_expr): Don't recurse if
3012         we already have the type we want.
3013
3014 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3015
3016         PR c++/8099
3017         * friend.c (make_friend_class): Allow partial specialization
3018         when declaration is not a template friend.
3019
3020 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3021
3022         PR c++/3663
3023         * pt.c (lookup_template_class): Copy TREE_PRIVATE and
3024         TREE_PROTECTED to created decl nodes.
3025
3026 2002-12-18  Mark Mitchell  <mark@codesourcery.com>
3027
3028         * class.c (build_base_field): Do not set DECL_PACKED on the
3029         FIELD_DECL.
3030
3031 2002-12-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3032
3033         * cp-tree.h (struct tree_srcloc): Use location_t.
3034         (SOURCE_LOCUS): New.
3035         (SRCLOC_FILE, SRCLOC_LINE): Adjust.
3036
3037 2002-12-17  Jason Merrill  <jason@redhat.com>
3038
3039         * decl.c (finish_function): Also complain about no return in
3040         templates.
3041         * semantics.c (finish_return_stmt): Also call check_return_expr in
3042         templates.
3043         * typeck.c (check_return_expr): In a template, just remember that we
3044         saw a return.
3045
3046 2002-12-16  Jason Merrill  <jason@redhat.com>
3047
3048         * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
3049         of the CALL_EXPR.
3050
3051         * semantics.c (do_pushlevel): Call pushlevel after adding the
3052         SCOPE_STMT.
3053         (do_poplevel): Call poplevel before adding the SCOPE_STMT.
3054         * parse.y (function_body): Go back to using compstmt.
3055         * decl.c (pushdecl): Skip another level to get to the parms level.
3056
3057         * call.c (build_new_method_call): Use is_dummy_object to determine
3058         whether or not to evaluate the object parameter to a static member
3059         function.
3060
3061 2002-12-14  Jason Merrill  <jason@redhat.com>
3062
3063         * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
3064         return slot for normal functions.  Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
3065         * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
3066         don't bother with an AGGR_INIT_EXPR.
3067         (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
3068         just generate a new decl normally.  Take return slot parm.
3069         * cp-tree.h: Adjust prototype.
3070
3071 2002-12-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3072
3073         PR C++/8031
3074         * cvt.c (convert_to_pointer_force): Don't try comparing against
3075         erronous type.
3076
3077 2002-12-13  Geoffrey Keating  <geoffk@apple.com>
3078
3079         * cp-tree.h: Have the multiple-include guards around
3080         the entire file.
3081
3082 2002-12-10  David Edelsohn  <edelsohn@gnu.org>
3083
3084         * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
3085         for SPEW_DEBUG.
3086         (snarf_method): Same.
3087         (snarf_defarg): Same.
3088
3089 2002-12-10  Mark Mitchell  <mark@codesourcery.com>
3090
3091         PR c++/8372
3092         * pt.c (tsubst_copy): Handle destructor names more correctly.
3093
3094 2002-12-10  Matt Austern   <austern@apple.com>
3095
3096         * cp-tree.h: get rid of needs_virtual_reinit bit.
3097
3098 2002-12-09  Mark Mitchell  <mark@codesourcery.com>
3099
3100         * NEWS: Document removal of in-class initialization extension for
3101         static data members of non-arithmetic, non-enumeration type.
3102         * decl.c (check_static_variable_definition): Do not allow that
3103         extension.
3104         * decl2.c (grokfield): Do not call digest_init when processing
3105         templates.
3106
3107 2002-12-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3108
3109         * error.c (dump_expr): Fix format specifier warning.
3110
3111 2002-12-04  Geoffrey Keating  <geoffk@apple.com>
3112
3113         * class.c (finish_struct_1): Correct comment.
3114         * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
3115
3116 2002-12-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3117
3118         PR C++/8799
3119         * error.c (dump_expr): Don't ever try to dump a non-existent
3120         expression.
3121
3122 2002-12-03  Nathan Sidwell  <nathan@codesourcery.com>
3123
3124         Implement covariant returns.
3125         * cp-tree.h (IS_AGGR_TYPE_2): Remove.
3126         (struct lang_decl_flags): Add this_thunk_p flag.
3127         Rename vcall_offset to virtual_offset.
3128         (struct lang_decl): Rename delta to fixed_offset.
3129         (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
3130         (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
3131         (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
3132         (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
3133         (make_thunk): Add this_adjusting arg.
3134         (finish_thunk): Declare.
3135         (mangle_thunk): Add this_adjusting arg.
3136         * class.c (get_vcall_index): Use base function for lookup.
3137         (update_vtable_entry_for_fn): Generate covariant thunk.
3138         (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
3139         (build_vtbl_initializer): Use base function for lookup.
3140         Finish covariant thunk here. Adjust thunk generation.
3141         * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
3142         Adjust thunk dumping.
3143         * mangle.c (mangle_call_offset): New function.
3144         (mangle_thunk): Adjust for covariant thunks.
3145         * method.c (make_thunk): Adjust. Do not set name here.
3146         (finish_thunk): New function. Set name here.
3147         (use_thunk): Generate covariant thunks too.
3148         (thunk_adjust): New function.
3149         * search.c (covariant_return_p): Remove. Fold into ...
3150         (check_final_overrider): ... here. Simplify.
3151         * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
3152
3153 2002-12-03  Jason Merrill  <jason@redhat.com>
3154
3155         PR c++/8674
3156         * call.c (build_over_call): Check specifically for TARGET_EXPR
3157         when eliding.
3158
3159         PR c++/8461, c++/8625
3160         * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
3161         (cp_convert_parm_for_inlining): Remove.
3162         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
3163         Remove.
3164         * cp-tree.h (ADDR_IS_INVISIREF): Remove.
3165         * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
3166
3167         * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
3168         an ambiguous conversion.
3169
3170 2002-12-03  Mark Mitchell  <mark@codesourcery.com>
3171
3172         PR c++/8688
3173         * decl.c (reshape_init): Handle erroneous initializers.
3174
3175 2002-12-02  Mark Mitchell  <mark@codesourcery.com>
3176
3177         PR c++/8720
3178         * spew.c (remove_last_token): Make sure that last_chunk is set
3179         correctly.
3180
3181         PR c++/8615
3182         * error.c (dump_expr): Handle character constants with
3183         TREE_OVERFLOW set.
3184
3185 2002-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3186
3187         DR 180
3188         * decl.c (grokdeclarator): Require class-key for all friend class.
3189         Output the correct type and context in the error message.
3190
3191 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
3192
3193         PR c++/5919
3194         * pt.c (unify): Use variably_modified_type_p to test validity of
3195         template argument types.
3196
3197         PR c++/8727
3198         * cp-tree.h (lang_type_class): Add typeinfo_var.
3199         (CLASSTYPE_TYPEINFO_VAR): New macro.
3200         * rtti.c (get_tinfo_decl): Use it.
3201
3202         PR c++/8663
3203         * init.c (expand_member_init): Always get the main variant of a
3204         base class.
3205
3206 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
3207
3208         PR c++/8332
3209         PR c++/8493
3210         * decl.c (cxx_init_decl_processing): Use size_type_node, not
3211         c_size_type_node.
3212         * decl2.c (coerce_new_type): Likewise.
3213         * except.c (do_allocate_exception): Likewise.
3214
3215 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
3216
3217         * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
3218         dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
3219         lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
3220         repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
3221         typeck2.c: Include coretypes.h and tm.h.
3222         * Make-lang.in: Update dependencies.
3223
3224 2002-11-30  Mark Mitchell  <mark@codesourcery.com>
3225
3226         PR c++/8227
3227         * decl.c (layout_var_decl): Deal gracefully with erroneous types.
3228         (check_initializer): Validate the type of the initialized
3229         variable, even if the initializer is absent.
3230         * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
3231
3232         PR c++/8214
3233         * typeck.c (convert_for_assignment): Do not use
3234         decl_constant_value on the operand.
3235
3236         PR c++/8511
3237         * pt.c (instantiate_decl): Handle template friends defined outside
3238         of the class correctly.
3239
3240 2002-11-29  Joe Buck <jbuck@synopsys.com>
3241
3242         * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
3243         anonymous structs.
3244
3245 2002-11-29  Mark Mitchell  <mark@codesourcery.com>
3246
3247         * class.c (walk_subobject_offsets): Recur on binfos as well as on
3248         types.
3249         (layout_nonempty_base_or_field): Pass it a binfo when processing a
3250         base class.
3251         (layout_empty_base): Likewise.
3252         (build_base_field): Likewise.
3253
3254 2002-11-27  Mark Mitchell  <mark@codesourcery.com>
3255
3256         * class.c (build_base_field): Make sure we get the canonical base
3257         when descending through primary bases.
3258
3259 2002-11-26  Geoffrey Keating  <geoffk@apple.com>
3260
3261         * decl.c (check_initializer): Don't error on initialisation of
3262         a scalar with a brace-enclosed expression.
3263
3264 2002-11-26  Nathan Sidwell  <nathan@codesourcery.com>
3265
3266         * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
3267         (template_parms_equal): Remove prototype.
3268         * typeck.c (buuld_indirect_ref): Reformat.
3269
3270 2002-11-25  Jason Merrill  <jason@redhat.com>
3271
3272         * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
3273         and a DO_STMT.
3274
3275 2002-11-25  Mark Mitchell  <mark@codesourcery.com>
3276
3277         * tree.c (cp_build_qualified_type_real): Correct handling of
3278         array types.
3279         * class.c (walk_subobject_offsets): Fix thinko.
3280         (build_base_field): Record offsets of empty bases in primary
3281         virtual bases.
3282         (layout_class_type): Record offsets of empty bases in fields.
3283
3284         * search.c (is_subobject_of_p_1): Fix thinko.
3285         (lookup_field_queue_p): Likewise.
3286
3287 2002-11-24  Mark Mitchell  <mark@codesourcery.com>
3288
3289         * class.c (layout_class_type): Reuse tail padding when laying out
3290         virtual bases.
3291
3292 2002-11-22  Mark Mitchell  <mark@codesourcery.com>
3293
3294         * rtti.c (qualifier_flags): Fix thinko.
3295
3296 2002-11-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3297
3298         Remove traditional C constructs 1/n.
3299         * cp-tree.h (init_method, set_mangled_name_for_decl,
3300         build_opfncall, hack_identifier, make_thunk, use_thunk,
3301         synthesize_method, implicitly_declare_fn,
3302         skip_artificial_parms_for, optimize_function, calls_setjmp_p,
3303         maybe_clone_body): Remove use of PARAMS.
3304
3305         * method.c (do_build_assign_ref, do_build_copy_constructor,
3306         synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
3307         Likewise.
3308         (synthesize_method): Use 'bool' type and constants instead of
3309         'int'.
3310         (locate_copy): Likewise.
3311         (implicitly_declare_fn): Likewise.
3312
3313         * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
3314         Remove old-style declaration.
3315         (maybe_clone_body): Use 'bool' type and constants.
3316
3317 2002-11-21  Glen Nakamura  <glen@imodulo.com>
3318
3319         PR c++/8342
3320         * typeck.c (get_member_function_from_ptrfunc): Make sure that a
3321         SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
3322         of the branches of a COND_EXPR.
3323
3324 2002-11-19  Mark Mitchell  <mark@codesourcery.com>
3325
3326         * pt.c (for_each_template_parm): Free allocated memory.
3327         * search.c (is_subobject_of_p_1): New function.
3328         (is_subobject_of_p): Avoid walking virtual bases multiple times.
3329
3330 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
3331
3332         * g++spec.c (lang_specific_spec_functions): New.
3333
3334 2002-11-15  Kazu Hirata  <kazu@cs.umass.edu>
3335
3336         * ChangeLog: Follow spelling conventions.
3337         * class.c: Likewise.
3338         * decl2.c: Likewise.
3339
3340 2002-11-14  Zack Weinberg  <zack@codesourcery.com>
3341
3342         * search.c (dfs_push_decls): Do not try to reorder elements
3343         3..n of method_vec if method_vec has only two elements.
3344         Reverse order of two tests to avoid accessing unallocated
3345         memory.
3346
3347 2002-11-14  Mark Mitchell  <mark@codesourcery.com>
3348
3349         * class.c (dfs_find_final_overrider): Adjust so that the most
3350         derived object is a binfo, rather than a class type.
3351         (find_final_overrider): Likewise.
3352         (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
3353         (add_vcall_offset): Likewise.
3354
3355 2002-11-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3356
3357         PR c++/8389
3358         * pt.c (instantiate_template): Push class scope for member
3359         functions.
3360         (get_mostly_instantiated_function_type): Likewise.  Don't call
3361         tsubst on context.  Remove CONTEXTP and TPARMSP parameters.
3362         * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
3363         * mangle.c (write_encoding, write_unqualified_name): Adjust.
3364
3365 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
3366
3367         * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
3368         vcall offfsets.  Split out ...
3369         (add_vcall_offset): ... new function.
3370
3371         PR c++/8338
3372         * pt.c (for_each_template_parm): Add htab parameter.
3373         (process_partial_specialization): Adjust call.
3374         (push_template_decl_real): Likewise.
3375         (pair_fn_data): Add visited.
3376         (for_each_template_parm_r): Avoid walking duplicates more than
3377         once.
3378         (uses_template_parms): Adjust call to for_each_template_parm.
3379
3380 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
3381
3382         * class.c (add_implicitly_declared_members): Put implicitly
3383         declared functions at the end of TYPE_METHODs when -fabi-version
3384         is at least 2.
3385
3386 2002-11-05  Geoffrey Keating  <geoffk@apple.com>
3387
3388         * decl2.c (finish_file): Correct spelling.
3389
3390 2002-11-03  Mark Mitchell  <mark@codesourcery.com>
3391
3392         * call.c (build_special_member_call): Do not try to lookup VTTs by
3393         name.
3394         * class.c (vtbl_init_data): Add generate_vcall_entries.
3395         (get_vtable_decl): Do not look up virtual tables by name.
3396         (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
3397         (set_primary_base): Do not set CLASSTYPE_RTTI.
3398         (determine_primary_base): Likewise.
3399         (get_matching_virtual): Remove.
3400         (get_vcall_index): New function.
3401         (update_vtable_entry_for_fn): Do not try to use virtual thunks
3402         when they are not required.  Assign vcall indices at this point.
3403         (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
3404         Do update dynamic_classes.
3405         (build_vtt): Do not add VTTs to the symbol table.
3406         (build_ctor_vtbl_group): Likewise.
3407         (build_vtbl_initializer): Simplify handling of vcall indices.
3408         (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
3409         for the most derived class.
3410         (add_vcall_offset_vtbl_entries_1): But do not actually add them to
3411         the vtable.
3412         * cp-tree.h (dynamic_classes): New macro.
3413         (lang_type_class): Remove rtti.  Add vtables.  Add vcall_indices.
3414         (CLASSTYPE_RTTI): Remove.
3415         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
3416         (CLASSTYPE_VCALL_INDICES): New macro.
3417         (CLASSTYPE_VTABLES): Likewise.
3418         (BV_USE_VCALL_INDEX_P): Remove.
3419         (build_vtable_path): Remove.
3420         * decl2.c (finish_vtable_vardecl): Remove.
3421         (key_method): Remove #if 0'd code.
3422         (finish_vtable_vardecl): Rename to ...
3423         (maybe_emit_vtables): ... this.
3424         (finish_file): Use it.
3425         * search.c (look_for_overrides_here): Update comment.
3426
3427 2002-11-01  Zack Weinberg  <zack@codesourcery.com>
3428
3429         PR c/7353 redux
3430         * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
3431
3432 2002-10-30  Jason Merrill  <jason@redhat.com>
3433
3434         PR c++/8186
3435         * cp-tree.h (ADDR_IS_INVISIREF): New macro.
3436         * call.c (convert_for_arg_passing): Set it.
3437         * except.c (stabilize_throw_expr): Recurse for such an arg.
3438
3439 2002-10-31  Mark Mitchell  <mark@codesourcery.com>
3440
3441         * cp-tree.h (lang_decl_flags): Remove init_priority.
3442         (lang_decl): Add delta.
3443         (GLOBAL_INIT_PRIORITY): Remove.
3444         (THUNK_DELTA): Revise definition.
3445         * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
3446         * dump.c (cp_dump_tree): Don't dump it.
3447
3448 2002-10-30  Mark Mitchell  <mark@codesourcery.com>
3449
3450         PR c++/8160
3451         * typeck2.c (process_init_constructor): Call complete_array_type.
3452
3453         PR c++/8149
3454         * decl.c (make_typename_type): Issue errors about invalid results.
3455
3456 2002-10-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3457
3458         Core issue 287, PR c++/7639
3459         * cp-tree.h (lang_type_class): Add decl_list field.
3460         (CLASSTYPE_DECL_LIST): New macro.
3461         (maybe_add_class_template_decl_list): Add declaration.
3462         * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
3463         (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
3464         (maybe_add_class_template_decl_list): New function.
3465         (add_implicitly_declared_members): Use it.
3466         * decl.c (maybe_process_template_type_declaration): Likewise.
3467         (pushtag): Likewise.
3468         * friend.c (add_friend): Likewise.
3469         (make_friend_class): Likewise.
3470         * semantics.c (finish_member_declaration): Likewise.
3471         (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
3472         * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
3473         to process members and friends in the order of declaration.
3474
3475 2002-10-29  Mark Mitchell  <mark@codesourcery.com>
3476
3477         PR c++/8287
3478         * decl.c (finish_destructor_body): Create the label to jump to
3479         when returning from a destructor here.
3480         (finish_function_body): Rather than here.
3481
3482 2002-10-25  Zack Weinberg  <zack@codesourcery.com>
3483
3484         PR c++/7266
3485         * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
3486         SCOPE_REF is not null before dereferencing it.
3487
3488 2002-10-25  Mark Mitchell  <mark@codesourcery.com>
3489
3490         * call.c (build_over_call): Use DECL_CONTEXT, not
3491         DECL_VIRTUAL_CONTEXT.
3492         * class.c (modify_vtable_entry): Don't mess with
3493         DECL_VIRTUAL_CONTEXT.
3494         (set_vindex): Remove.
3495         (set_primary_base): Remove vfuns_p parameter.
3496         (determine_primary_base): Likewise.
3497         (modify_all_vtables): Likewise.
3498         (layout_class_type): Likewise.  Adjust calls to other functions
3499         accordingly.
3500         (finish_struct_1): Adjust calls to modified functions.  Set
3501         DECL_VINDEX here.
3502         * cp-tree.h (lang_type_class): Remove vsize.
3503         (CLASSTYPE_VSIZE): Remove.
3504         (lang_decl): Remove thunks.
3505         (DECL_THUNKS): Adjust.
3506         (DECL_VIRTUAL_CONTEXT): Remove.
3507         (duplicate_decls): Don't copy it.
3508         * pt.c (build_template_decl): Don't set it.
3509         (tsubst_decl): Likewise.
3510         * typeck.c (expand_ptrmemfunc_cst): Don't use it.
3511
3512         * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
3513         (build_vtable_entry): Remove.
3514         * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
3515         (lang_decl): Add thunks.
3516         (DECL_THUNKS): New macro.
3517         * decl.c (duplicate_decls): Copy it.
3518         * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
3519         * semantics.c (emit_associated_thunks): Simplify.
3520
3521 2002-10-24  David Edelsohn  <edelsohn@gnu.org>
3522
3523         PR c++/7228
3524         * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
3525         lang_type structure exists before accessing field.
3526         (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
3527         (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
3528         (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
3529         * class.c (check_field_decls): Use new macros.
3530         * typeck2.c (process_init_constructor): Remove redundant check for
3531         existence of lang_type structure.
3532
3533 2002-10-24  Mark Mitchell  <mark@codesourcery.com>
3534
3535         * class.c (end_of_base): New method.
3536         (end_of_class): Use it.  Check indirect virtual bases.
3537
3538         * class.c (check_field_decls): Fix typo.
3539
3540 2002-10-23  Mark Mitchell  <mark@codesourcery.com>
3541
3542         PR c++/8067
3543         * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
3544         related variables.
3545
3546         PR c++/7679
3547         * spew.c (next_token): Do not return an endless stream of
3548         END_OF_SAVED_INPUT tokens.
3549         (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
3550         the cached token stream.
3551         (snarf_defarg): Likewise.
3552
3553 2002-10-23  Zack Weinberg  <zack@codesourcery.com>
3554
3555         * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
3556         variably_modified_type_p.
3557         * cp-tree.h: Remove prototype of variably_modified_type_p.
3558         * tree.c (variably_modified_type_p): Remove; now implemented
3559         in language-independent code.
3560
3561 2002-10-22  Mark Mitchell  <mark@codesourcery.com>
3562
3563         PR c++/6579
3564         * spew.c (snarf_parenthesized_expression): New function.
3565         (snarf_block): Use it.
3566
3567 2002-10-22  Richard Henderson  <rth@redhat.com>
3568
3569         * method.c (use_thunk): Always compute vcall_value; assert that
3570         it is not zero.  Use can_output_mi_thunk; use output_mi_thunk
3571         for vcall thunks as well.
3572
3573 2002-10-21  Mark Mitchell  <mark@codesourcery.com>
3574
3575         * class.c (empty_base_at_nonzero_offset_p): New function.
3576         (layout_nonempty_base_or_field): Do not check for conflicts when
3577         laying out a virtual base using the GCC 3.2 ABI.
3578         (build_base_field): Correct checking for presence of empty classes
3579         at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
3580
3581         * class.c (include_empty_classes): Use normalize_rli.
3582         (layout_class_type): Likewise.
3583
3584         * decl.c (reshape_init): Tweak handling of character arrays.
3585
3586         PR c++/8218
3587         * cp-tree.h (lang_type_class): Add contains_empty_class_p.
3588         (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
3589         * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
3590         (check_field_decls): Likewise.
3591         (layout_class_type): Likewise.
3592         (finish_struct_1): Initialize it.
3593         (walk_subobject_offsets): Use it to prune searches.
3594
3595 2002-10-20  Mark Mitchell  <mark@codesourcery.com>
3596
3597         * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
3598         * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
3599         TARGET_ASM_OUTPUT_MI_THUNK in comments.
3600
3601 2002-10-18  Zack Weinberg  <zack@codesourcery.com>
3602
3603         * decl.c (start_decl): Point users of the old initialized-
3604         typedef extension at __typeof__.
3605
3606 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
3607
3608         * Make-lang.in (method.o): Depend on TARGET_H.
3609         * method.c (target.h): Include it.
3610         (use_thunk): Use target hooks.  Use vcall thunks, if available.
3611
3612 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
3613
3614         * class.c (base_derived_from): Make sure return value is a bool.
3615
3616 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
3617
3618         * class.c (find_final_overrider_data_s): Remove overriding_fn and
3619         overriding_base.
3620         (dfs_base_derived_from): New function.
3621         (base_derived_from): Likewise.
3622         (dfs_find_final_overrider): Use base_derived_from.
3623         (find_final_overrider): Adjust.
3624
3625 2002-10-18  Jason Merrill  <jason@redhat.com>
3626
3627         PR c++/8080
3628         * semantics.c (finish_for_cond, finish_while_cond): Don't mess
3629         with condition decls in a template.
3630
3631 2002-10-17  Nathan Sidwell  <nathan@codesourcery.com>
3632
3633         * class.c (add_method): Compare template parms too.
3634
3635 2002-10-17  Mark Mitchell  <mark@codesourcery.com>
3636
3637         PR c++/7584
3638         * class.c (handle_using_decl): Allow the declaration used to be
3639         from an ambiguous base.
3640
3641         * pt.c (convert_template_argument): Revert this change:
3642                 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
3643                 * pt.c (convert_template_argument): Do not fold non-type
3644                 template rguments when inside a template.
3645
3646         * init.c (expand_default_init): Handle brace-enclosed initializers
3647         correctly.
3648
3649 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
3650
3651         * mangle.c (write_expression): Correct handling of enumeration
3652         constants.
3653         (write_template_arg): Likewise.
3654         * pt.c (convert_template_argument): Do not fold non-type template
3655         arguments when inside a template.
3656
3657         PR c++/7478
3658         * cvt.c (convert_to_reference): Allow references as the incoming
3659         type.
3660
3661 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
3662
3663         PR c++/7524
3664         * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
3665         build_qualified_type.
3666
3667 2002-10-15  Richard Henderson  <rth@redhat.com>
3668
3669         * error.c (dump_expr): Use real_to_decimal directly, and with
3670         the new arguments.
3671
3672 2002-10-15  Mark Mitchell  <mark@codesourcery.com>
3673
3674         * decl.c (reshape_init): Fix typo.
3675
3676         * cp-tree.h (operator_name_info_t): Add arity.
3677         * lex.c (init_operators): Initialize it.
3678         * mangle.c (write_conversion_operator_name): New function.
3679         (write_unqualified_name): Use it.
3680         (write_template_args): Accept template arguments as a TREE_LIST.
3681         (write_expression): Adjust handling of qualified names to match
3682         specification.
3683
3684 2002-10-15  Jason Merrill  <jason@redhat.com>
3685
3686         * call.c (call_builtin_trap): New fn.
3687         (convert_arg_to_ellipsis): Use it.  Downgrade error to warning.
3688         (build_call): Don't set current_function_returns_abnormally outside
3689         a function.
3690
3691 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
3692
3693         * class.c (check_field_decls): Remove empty_p parameter.  Instead,
3694         clear CLASSTYPE_EMPTY_P.
3695         (build_base_field): Likewise.
3696         (build_base_fields): Likewise.
3697         (check_bases_and_members): Likewise.
3698         (create_vtbl_ptr): Likewise.
3699         (layout_class_type): Likewise.  Ensure that empty classes have
3700         size zero when used as base classes in the 3.2 ABI.
3701         (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
3702         CLASSTYPE_NEARLY_EMPTY_P.  Adjust calls to avoid passing empty_p
3703         parameter.
3704         (is_empty_class): Correct definition when using post-3.2 ABI.
3705         * cp-tree.h (lang_type_class): Add empty_p.
3706         (CLASSTYPE_EMPTY_P): New macro.
3707
3708 2002-10-12  Nathan Sidwell  <nathan@codesourcery.com>
3709
3710         * init.c (build_delete): Do not apply save_expr for arrays.
3711         (build_vec_delete): Likewise.
3712
3713 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
3714
3715         * decl.c (layout_var_decl): Call layout_decl even for variables
3716         whose type is an array with unspecified bounds.
3717
3718         PR c++/7176
3719         * lex.c (do_identifier): Add another option for the parsing
3720         parameter.
3721         * parse.y (do_id): Use it.
3722
3723 2002-10-11  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3724
3725         PRs C++/6803, C++/7721 and C++/7803
3726         * decl.c (grokdeclarator): Gracefully handle template-name as
3727         decl-specifier.
3728
3729 2002-10-11  Jason Molenda  <jmolenda@apple.com>
3730
3731         * init.c (build_field_list): Provide uses_unions_p with a default
3732         value.
3733
3734 2002-10-11  Mark Mitchell  <mark@codesourcery.com>
3735
3736         PR c++/5661
3737         * cp-tree.h (variably_modified_type_p): New function.
3738         (grokdeclarator) Tighten check for variably modified types as
3739         fields.
3740         * pt.c (convert_template_argument): Do not allow variably modified
3741         types as template arguments.
3742         * tree.c (variably_modified_type_p): New function.
3743
3744         * NEWS: Document removal of "new X = ..." extension.
3745         * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
3746         brace-enclosed initializers.
3747         * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
3748         (initialize_local_var): Remove declaration.
3749         (expand_static_init): Likewise.
3750         * decl.c (next_initializable_field): New function.
3751         (reshape_init): Likewise.
3752         (check_initializer): Use them.  Build dynamic initializer for
3753         aggregates here too.
3754         (initialize_local_var): Simplify, and incorporate cleanup
3755         insertion code as well.
3756         (destroy_local_var): Remove.
3757         (cp_finish_decl): Tidy.
3758         (expand_static_init): Fold checks for whether or not a variable
3759         needs initialization into this function.  Simplify.
3760         * decl2.c (do_static_initialization): Simplify.
3761         * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
3762         be done for us automatically.
3763         (expand_default_init): Handle brace-enclosed initializers
3764         correctly.
3765         (expand_aggr_init_1): Remove RTL-generation code.
3766         (build_vec_init): Remove "new X = ..." support.
3767         * parse.y (new_initializer): Likewise.
3768         * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
3769         brace-enclosed initializer.
3770         (create_pseudo_type_info): Likewise.
3771         * typeck2.c (store_init_value): Don't try to handle digest_init
3772         being called more than once.
3773         (digest_init): Tidy handling of brace-enclosed initializers.
3774
3775 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3776
3777         * decl.c (typename_hash): Use htab_hash_pointer.
3778
3779 2002-10-10  Jim Wilson  <wilson@redhat.com>
3780
3781         * decl.c (duplicate_decls): Don't call decl_attributes.
3782
3783 2002-10-09  Zack Weinberg  <zack@codesourcery.com>
3784
3785         PR c/7353
3786         * decl.c (start_decl): Unconditionally issue error for
3787         'typedef foo = bar'.
3788         (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
3789         (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
3790
3791 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3792
3793         * decl2.c (prune_vtable_vardecl): Delete unused function.
3794
3795 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
3796
3797         PR c++/7754
3798         * decl2.c (finish_anon_union): Do not expand anonymous unions when
3799         procesing template functions.
3800         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
3801         type. Call layout_decl.
3802         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
3803
3804 2002-10-07  Richard Henderson  <rth@redhat.com>
3805
3806         * decl2.c, pt.c: Revert c++/7754 fix.
3807
3808 2002-10-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3809
3810         PR c++/7804
3811         * error.c (dump_expr) [REAL_CST]: Output in decimal format.
3812
3813 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
3814
3815         PR c++/7931
3816         * pt.c (for_each_template_parm_r): Handle BASELINKs.
3817
3818         PR c++/7754
3819         * decl2.c (finish_anon_union): Do not expand anonymous unions when
3820         procesing template functions.
3821         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
3822         type. Call layout_decl.
3823         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
3824
3825 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
3826
3827         PR c++/8006
3828         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
3829         template parameters.
3830         (globals): Add entity and need_abi_warning.
3831         (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
3832         CLASSTYPE_TEMPLATE_INFO.
3833         (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
3834         TYPE_TI_TEMPLATE.
3835         (write_prefix): Handle typename types correctly.
3836         (write_template_prefix): Handle template template parameters
3837         correctly.
3838         (start_mangling): Add entity parameter.
3839         (finish_mangling): Warn about names whose mangling will change.
3840         (mangle_decl_string): Adjust.
3841         (mangle_type_string): Likewise.
3842         (mangle_special_for_type): Likewise.
3843         (mangle_ctor_vtbl_for_type): Likewise.
3844         (mangle_thunk): Likewise.
3845         (mangle_guard_variable): Likewise.
3846         (mangle_ref_init_variable): Likewise.
3847
3848 2002-10-02  Mark Mitchell  <mark@codesourcery.com>
3849
3850         PR c++/7188.
3851         * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
3852         * cp-tree.h (emit_base_init): Rename to ....
3853         (emit_mem_initializers): ... this.
3854         (expand_member_init): Change prototype.
3855         * init.c (perform_member_init): Compute explicit, rather than
3856         requiring it as a parameter.
3857         (sort_member_init): Rename to ...
3858         (sort_mem_initializers): ... this.  Process bases and data members
3859         together.
3860         (sort_base_init): Remove.
3861         (emit_base_init): Rename to ...
3862         (emit_mem_initializers): ... this.
3863         (expand_aggr_vbase_init_1): Remove.
3864         (construct_virtual_bases): Rename to ...
3865         (construct_virtual_base): ... this.
3866         (expand_member_init): Rework handling of base initializers.
3867         * method.c (do_build_copy_constructor): Use
3868         finish_mem_initializers.
3869         * parse.y (member_init): Adjust calls to expand_member_init.
3870         * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
3871         (tsubst_initializer_list): Use expand_member_init.
3872         * semantics.c (finish_mem_intiailizers): Simplify.
3873
3874 2002-10-02  Matt Austern  <austern@apple.com>
3875         * decl.c (walk_vtables_r): Fixed typo that caused result to
3876         never get a nonzero value.
3877
3878 2002-10-02  Roger Sayle  <roger@eyesopen.com>
3879
3880         PR optimization/6627
3881         * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
3882         from here, and move it to tree.h.
3883         * decl.c (cxx_init_decl_processing): If storing the vbit
3884         in function pointers, ensure that force_align_functions_log
3885         is atleast one.
3886
3887 2002-10-02  Matt Austern  <austern@apple.com>
3888
3889         * class.c (check_field_decls): Changed warning about const member
3890         variables so that it doesn't get issued for a class aggregate.
3891
3892 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
3893
3894         * decl.c (cp_finish_decl): Make sure array types are laid out,
3895         even if the array bounds are unknown.
3896
3897 2002-10-01  Steve Ellcey  <sje@cup.hp.com>
3898
3899         * class.c (build_vtbl_initializer): Change build_c_cast
3900         to build1.
3901
3902 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
3903
3904         * decl.c (cp_finish_decl): Make sure array types are laid out,
3905         even if the array bounds are unknown.
3906
3907         * decl.c (cp_finish_decl): Correct check for dynamic
3908         initialization of thread-local storage.
3909
3910 2002-09-30  Nathan Sidwell  <nathan@codesourcery.com>
3911
3912         * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
3913         overloaded.
3914
3915 2002-09-30  Steve Ellcey  <sje@cup.hp.com>
3916
3917         * class.c (build_vtbl_initializer): Add cast.
3918         (add_vcall_offset_vtbl_entries_1):
3919         Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
3920
3921 2002-09-30  Mark Mitchell  <mark@codesourcery.com>
3922
3923         * class.c (walk_subobject_offsets): Correct the calculation of
3924         offsets for virtual bases.  Correct the counting of array
3925         elements.
3926         (layout_nonempty_base_or_field): Simplify.  Correct the
3927         calculation of offsets to be propagated through the binfo
3928         hierarchy.
3929         (build_base_field): Avoid creating a FIELD_DECL for empty bases.
3930         Add the FIELD_DECL to TYPE_FIELDS.
3931         (build_base_fields): Adjust accordingly.
3932         (layout_virtual_bases): Use build_base_field.
3933         (end_of_class): Return a tree, not an integer.
3934         (warn_about_ambiguous_direct_bases): Rename to ...
3935         (warn_about_ambiguous_bases): ... this.
3936         (include_empty_classes): New function.
3937         (layout_class_type): Create an alternative version of the type to
3938         be used when as a base class type.  Do not call
3939         finish_record_layout until we are done laying out the class.
3940         * cp-tree.h (lang_type_class): Remove size, size_unit.  Add
3941         as_base.
3942         (CLASSTYPE_SIZE): Reimplement.
3943         (CLASSTYPE_SIZE_UNIT): Likewise.
3944         (CLASSTYPE_ALIGN): Likweise.
3945         (CLASSTYPE_USER_ALIGN): Likewise.
3946         (CLASSTYPE_AS_BASE): New macro.
3947         (DECL_INITIALIZED_P): Likewise.
3948         (extract_init): Remove prototype.
3949         (build_forced_zero_init): Rename to ...
3950         (build_zero_init): ... this.
3951         (force_store_init_value): Remove.
3952         * decl.c (obscure_complex_init): Remove.
3953         (duplicate_decls): Copy DECL_INITIALIZED_P.
3954         (check_initializer): Do not leave junk in DECL_INITIAL.
3955         (cp_finish_decl): Handle zero-initialization of entities with
3956         static storage duration.
3957         * expr.c (extract_init): Remove.
3958         * init.c (build_forced_zero_init): Remove.
3959         (build_zero_init): New function.
3960         (build_default_init): Use it.
3961         (build_field_list): Skip FIELD_DECLs for base subobjects.
3962         (push_base_cleanups): Likewise.
3963         * method.c (do_build_assign_ref): Likewise.
3964         (synthesize_exception_spec): Likewise.
3965         * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
3966         (regenerate_decl_from_template): To not set DECL_INITIAL for a
3967         static data member whose initialization took place in its class.
3968         (instantiate_decl): Do not pass an initializer to cp_finish_decl
3969         in that situation.
3970         * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
3971         (dfs_unuse_fields): Likewise.
3972         * tree.c (pod_type_p): Handle error_mark_node.
3973         (zero_init_p): Likewise.
3974         * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
3975         subobjects.
3976         * typeck2.c (store_init_value): Remove #if 0'd code.
3977         (force_store_init_value): Remove.
3978         (process_init_constructor): Use build_zero_init.
3979
3980 2002-09-29  Nathan Sidwell  <nathan@codesourcery.com>
3981
3982         PR c++/7788
3983         * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
3984
3985 2002-09-29  Kazu Hirata  <kazu@cs.umass.edu>
3986
3987         * cp-tree.h: Fix comment typos.
3988         * decl.c: Likewise.
3989         * pt.c: Likewise.
3990
3991 2002-09-25  Mark Mitchell  <mark@codesourcery.com>
3992
3993         * cp/class.c (contains_empty_class_p): New method.
3994         (walk_subobject_offsets): Correct computation of field offset.
3995         (layout_empty_base): Correct placement of emtpy base classes.
3996         (layout_class_type): Warn about ABI changes.
3997
3998 2002-09-23  Mark Mitchell  <mark@codesourcery.com>
3999
4000         * cp/class.c (layout_virtual_bases): Do not round the size of the
4001         type to a multiple of the alignment before laying out virtual bases.
4002         (layout_class_type): Correct handling of bit-fields that are wider
4003         than their type inside unions.  Round the size of the type to a
4004         even number of bytes when computing the size without virtual
4005         bases.
4006         * cp/cp-tree.h (abi_version_at_least): New macro.
4007
4008 2002-09-21  Kazu Hirata  <kazu@cs.umass.edu>
4009
4010         * ChangeLog: Follow spelling conventions.
4011         * ChangeLog.2: Likewise.
4012         * call.c: Likewise.
4013         * class.c: Likewise.
4014         * cp-tree.h: Likewise.
4015         * cvt.c: Likewise.
4016         * decl.c: Likewise.
4017         * decl2.c: Likewise.
4018         * except.c: Likewise.
4019         * friend.c: Likewise.
4020         * g++spec.c: Likewise.
4021         * init.c: Likewise.
4022         * lex.c: Likewise.
4023         * mangle.c: Likewise.
4024         * method.c: Likewise.
4025         * operators.def: Likewise.
4026         * optimize.c: Likewise.
4027         * pt.c: Likewise.
4028         * rtti.c: Likewise.
4029         * search.c: Likewise.
4030         * semantics.c: Likewise.
4031         * spew.c: Likewise.
4032         * tree.c: Likewise.
4033         * typeck.c: Likewise.
4034
4035 2002-09-18  Devang Patel  <dpatel@apple.com>
4036
4037         * cp/cp-tree.h: New prototype for walk_vtabls().
4038         * cp/decl.c (walk_vtables_r): New function.
4039         (struct cp_binding_level): Add new members, namespaces,
4040         names_size and vtables.
4041         (add_decl_to_level): Add decl in namespaces or vtables
4042         chain, if conditions match.
4043         (walk_vtables): New function.
4044         (walk_namespaces_r): Travers separate namespace chain
4045         for namespace decls.
4046         (wrapup_globals_for_namespace): Use names_size instead
4047         of list_length().
4048         * cp/decl2.c (finish_file): Use walk_vtables() instead of
4049         walk_globals() to walk vtable decls.
4050
4051 2002-09-18  Nathan Sidwell  <nathan@codesourcery.com>
4052
4053         * decl.c (grokdeclarator): Use assert, not internal_error. Don't
4054         ICE with invalid pointers & references.
4055
4056 2002-09-17  Zack Weinberg  <zack@codesourcery.com>
4057
4058         * Make-lang.in: Remove all references to the demangler.
4059         * cxxfilt.c: Moved to binutils.
4060
4061 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
4062
4063         PR c++/7718
4064         * pt.c (tsubst_decl): Remove assert.
4065
4066         Remove DR 295 implementation.
4067         * pt.c (check_cv_quals_for_unify): Disable function & method cases.
4068         * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
4069         about ignoring volatile qualifiers.
4070
4071         * search.c (lookup_member): Correct documentation.
4072
4073 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
4074
4075         * cp-tree.h (union lang_tree_node): Add chain_next option.
4076
4077 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
4078
4079         * parse.y (parse_finish_call_expr): Check lookup_member result.
4080
4081         PR c++/7015
4082         * semantic.c (finish_asm_stmt): Fix operand/output_operands
4083         thinko.
4084         * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
4085
4086 2002-09-15  Nathan Sidwell  <nathan@codesourcery.com>
4087
4088         PR c++/7919
4089         * call.c (build_over_call): Convert this pointer for fns found by
4090         using decls.
4091
4092 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
4093
4094         * ChangeLog: Follow spelling conventions.
4095         * ChangeLog.1: Likewise.
4096
4097 2002-09-14  Nathan Sidwell  <nathan@codesourcery.com>
4098
4099         PR c++/7768
4100         * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
4101
4102 2002-09-14  Kazu Hirata  <kazu@cs.umass.edu>
4103
4104         * error.c: Fix comment formatting.
4105         * except.c: Likewise.
4106         * expr.c: Likewise.
4107         * friend.c: Likewise.
4108         * g++spec.c: Likewise.
4109         * init.c: Likewise.
4110         * lex.c: Likewise.
4111         * mangle.c: Likewise.
4112         * method.c: Likewise.
4113         * optimize.c: Likewise.
4114         * pt.c: Likewise.
4115         * rtti.c: Likewise.
4116         * search.c: Likewise.
4117         * semantics.c: Likewise.
4118         * spew.c: Likewise.
4119         * tree.c: Likewise.
4120         * typeck.c: Likewise.
4121         * typeck2.c: Likewise.
4122
4123 2002-09-13  Matt Austern  <austern@apple.com>
4124
4125         PR C++/7828
4126         * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
4127         * cp/call.c: Change call-by-const-reference mechanism to use
4128         non_cast_lvalue_p when deciding whether the create a temporary.
4129         We need a temporary when passing, e.g. (long) x by const ref.
4130
4131 2002-09-13  Nathan Sidwell  <nathan@codesourcery.com>
4132
4133         * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
4134
4135 2002-09-13  Kazu Hirata  <kazu@cs.umass.edu>
4136
4137         * decl.c: Fix comment formatting.
4138         * decl2.c: Likewise.
4139
4140 2002-09-12  Kazu Hirata  <kazu@cs.umass.edu>
4141
4142         * call.c: Fix comment formatting.
4143         * class.c: Likewise.
4144         * cp-lang.c: Likewise.
4145         * cp-tree.h: Likewise.
4146         * cvt.c: Likewise.
4147
4148 2002-09-11  Zack Weinberg  <zack@codesourcery.com>
4149
4150         * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
4151         and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
4152         * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
4153         minor adjustments (use version_string, eliminate yet another
4154         duplicate of xmalloc)
4155
4156 2002-09-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4157
4158         * cp-tree.h (require_complete_eh_spec_types): Add prototype.
4159
4160 2002-09-05  Jason Merrill  <jason@redhat.com>
4161
4162         * typeck2.c (add_exception_specifier): Only pedwarn for an
4163         incomplete type.
4164         (require_complete_eh_spec_types): New fn.
4165         (cxx_incomplete_type_diagnostic): Also support pedwarning.
4166         * typeck.c (complete_type_or_diagnostic): Likewise.
4167         * call.c (build_call): Call require_complete_eh_spec_types.
4168         * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
4169         on an incomplete type.
4170
4171 2002-09-04  Jakub Jelinek  <jakub@redhat.com>
4172
4173         * decl.c (start_cleanup_fn): Clear interface_only before
4174         start_function, restore it afterwards.
4175
4176 2002-09-02  Nathan Sidwell  <nathan@codesourcery.com>
4177
4178         * cp-tree.h (finish_builtin_type): Remove.
4179         * decl2.c (finish_builtin_type): Move to common code.
4180         * decl.c (build_ptrmemfunc_type): Adjust.
4181         * rtti.c (create_pseudo_type_info): Adjust.
4182         (create_tinfo_types): Adjust.
4183
4184 2002-08-31  Jason Merrill  <jason@redhat.com>
4185
4186         * cp-lang.c (cp_expr_size): Allow initialization from a
4187         CONSTRUCTOR.
4188
4189 2002-08-30  Richard Henderson  <rth@redhat.com>
4190
4191         PR opt/7515
4192         * tree.c: Include target.h.
4193         (cp_cannot_inline_tree_fn): Don't auto-inline functions that
4194         don't bind locally.
4195         * Makefile.in (tree.o): Update.
4196
4197 2002-08-27  Mark Mitchell  <mark@codesourcery.com>
4198
4199         * class.c (layout_virtual_bases): Warn about bugs in G++ that
4200         result in incorrect object layouts.
4201         (layout_class_type): Likewise.
4202
4203 2002-08-24  Matt Austern  <austern@apple.com>
4204
4205         * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
4206         are allowable.
4207         (real_lvalue_p): Update caller.
4208         (lvalue_p): Ditto.
4209         (non_cast_lvalue_or_else): New.
4210         * tree.h: Declare it.
4211         * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
4212
4213 2002-08-22  Mark Mitchell  <mark@codesourcery.com>
4214
4215         * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
4216         and COND_EXPR specially; fix error message output.
4217
4218 2002-08-22  Jason Merrill  <jason@redhat.com>
4219
4220         * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
4221         * semantics.c (nullify_returns_r): Likewise.
4222
4223 2002-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4224
4225         Fix PR/7621
4226         * typeck.c (finish_class_member_access_expr): Diagnose cases where
4227         name lookup finds nothing.
4228
4229 2002-08-15  Jason Merrill  <jason@redhat.com>
4230
4231         * semantics.c (finish_then_clause): Remove redundant assignment.
4232         (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
4233         extra binding level outside the if/switch statement.
4234         (finish_while_cond, finish_for_cond): Rewrite complex condition
4235         into the loop body.
4236
4237 2002-08-15  Alexandre Oliva  <aoliva@redhat.com>
4238
4239         * parse.y (sizeof, alignof, typeof): New non-terminals to
4240         increment skip_evaluation.  Replace terminals with them and
4241         decrement skip_evaluation at the end of rules using them.
4242         * decl2.c (mark_used): Don't assemble_external if
4243         skipping evaluation.
4244
4245 2002-08-15  Gabriel Dos Reis  <gdr@nerim.net>
4246
4247         Fix PR/7504
4248         * parse.y (parse_finish_call_expr): Handle incomplete
4249         type used to name a scope.
4250
4251 2002-08-15  Nathan Sidwell  <nathan@codesourcery.com>
4252
4253         PR c++/7598
4254         * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
4255         regression caused by my 2002-08-08 patch.
4256
4257 2002-08-13  Mark Mitchell  <mark@codesourcery.com>
4258
4259         * decl.c (pushdecl_class_level): Honor requests to bind names to
4260         OVERLOADs.
4261
4262 2002-08-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4263
4264         * decl2.c (build_call_from_tree): Fix uninitialized variable.
4265         * parse.y (parse_finish_call_expr): Likewise.
4266         * repo.c (old_args, old_dir, old_main): Const-ify.
4267
4268 2002-08-11  Gabriel Dos Reis  <gdr@nerim.net>
4269
4270         * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
4271         DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
4272         * optimize.c (maybe_clone_body): Likewise.
4273         * pt.c (tsubst_enum): Likewise.
4274         (lookup_template_class): Likewise.
4275         * tree.c (cp_copy_res_decl_for_inlining): Likewise.
4276
4277 2002-08-10  Neil Booth  <neil@daikokuya.co.uk>
4278
4279         * lang-specs.h: Remove -ansi.
4280
4281 2002-08-10  Nathan Sidwell  <nathan@codesourcery.com>
4282
4283         * tree.c (maybe_dummy_object): Replace // with /* */
4284
4285 2002-08-09  Mark Mitchell  <mark@codesourcery.com>
4286
4287         * call.c (standard_conversion): Use build_ptrmem_type.
4288         * cp-tree.h (build_ptrmem_type): New function.
4289         (adjust_result_of_qualified_name_lookup): Likewise.
4290         * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
4291         static data members.
4292         (build_ptrmem_type): New function.
4293         (grokdeclarator): Do not use build_offset_type when encountering a
4294         qualified name.
4295         * parse.y (parse_finish_call_expr): Use
4296         adjust_result_of_qualified_name_lookup.
4297         * search.c (adjust_result_of_qualified_name_lookup): New function.
4298         * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
4299         accessing OFFSET_TYPEs directly.
4300
4301 2002-08-08  Mike Stump  <mrs@apple.com>
4302
4303         * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
4304         (type_decays_to): Likewise.
4305         * class.c (find_final_overrider): Likewise.
4306         (maybe_note_name_used_in_class): Likewise.
4307         * decl.c (current_tmpl_spec_kind): Likewise.
4308         (add_binding): Likewise.
4309         (push_class_binding): Likewise.
4310         (duplicate_decls): Likewise.
4311         (layout_var_decl): Likewise.
4312         (grokfndecl): Likewise.
4313         (grokdeclarator): Likewise.
4314         (check_default_argument): Likewise.
4315         * decl2.c (handle_class_head): Likewise.
4316         * error.c (dump_template_decl): Likewise.
4317         * init.c (build_offset_ref): Likewise.
4318         * pt.c (check_specialization_scope): Likewise.
4319         (determine_specialization): Likewise.
4320         (check_explicit_specialization): Likewise.
4321         (maybe_check_template_type): Likewise.
4322         (process_partial_specialization): Likewise.
4323         (check_default_tmpl_args): Likewise.
4324         (push_template_decl_real): Likewise.
4325         (convert_template_argument): Likewise.
4326         (try_class_unification): Likewise.
4327         (get_bindings_real): Likewise.
4328         (do_decl_instantiation): Likewise.
4329         * semantics.c (begin_function_definition): Likewise.
4330         (finish_member_declaration): Likewise.
4331         (check_multiple_declarators): Likewise.
4332         * typeck.c (comp_array_types): Likewise.
4333         (comptypes): Likewise.
4334         (expr_sizeof): Likewise.
4335         (build_binary_op): Likewise.
4336         (dubious_conversion_warnings): Likewise.
4337         (check_return_expr): Likewise.
4338
4339 2002-08-08  Mark Mitchell  <mark@codesourcery.com>
4340
4341         * typeck.c (build_class_member_access_expr): Do not return
4342         error_mark_node when no error has occurred.
4343
4344 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
4345
4346         * typeck.c (build_component_addr): Remove.
4347         (build_unary_op): Just check it's not a bitfield, and then build
4348         an ADDR_EXPR.
4349
4350 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
4351
4352         * class.c (convert_to_base): Correct check for error_mark_node.
4353         (create_vtable_ptr): Remove unused VFUNS_P parm.
4354
4355 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
4356
4357         * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
4358
4359 2002-08-07  Mark Mitchell  <mark@codesourcery.com>
4360
4361         Rework build_component_ref.
4362         * call.c (build_vfield_ref): Do not go through build_component_ref.
4363         (build_field_call): Use build_class_member_access_expr.
4364         (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
4365         (build_object_call): Likewise.
4366         * class.c (convert_to_base): New function.
4367         (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
4368         (instantiate_type): Handle BASELINKs.
4369         * cp-tree.def (BASELINK): New tree code.
4370         * cp-tree.h (BASELINK_P): Reimplement.
4371         (SET_BASELINK_P): Remove.
4372         (BASELINK_BINFO): Reimplement.
4373         (BASELINK_FUNCTIONS): Likewise.
4374         (BASELINK_ACCESS_BINFO): Likewise.
4375         (BASELINK_OPTYPE): Likewise.
4376         (convert_to_base): New function.
4377         (name_p): Likewise.
4378         (build_object_ref): Remove.
4379         (build_component_ref_1): Likewise.
4380         (build_component_ref): Likewise.
4381         (build_x_component_ref): Likewise.
4382         (build_class_member_access_expr): New function.
4383         (finish_class_member_access_expr): Likewise.
4384         (build_ptrmemfunc_access_expr): Likewise.
4385         * decl.c (grokdeclarator): Handle BASELINKs.
4386         * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
4387         finish_class_member_access_expr.
4388         (arg_assoc): Handle BASELINKs.
4389         (do_class_using_decl): Likewise.
4390         * error.c (dump_decl): Likewise.
4391         (dump_expr): Use build_ptrmemfunc_access_expr.
4392         * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
4393         destructors.
4394         (build_throw): Use BASELINK_FUNCTIONS.
4395         * init.c (perform_member_init): Use
4396         build_class_member_access_expr.
4397         (build_offset_ref): Handle BASELINKs.  Use
4398         build_class_member_access_expr.
4399         * method.c (hack_identifier): Likewise.
4400         * parse.y (do_id): Use BASELINK, not TREE_LIST.
4401         (primary): Remove uses of build_object_ref.
4402         * pt.c (lookup_template_function): Handle BASELINKs.
4403         (resolve_overloaded_unification): Likewise.
4404         * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
4405         (lookup_field): Use BASELINK, not TREE_LIST.
4406         (lookup_fnfiels): Likewise.
4407         (setup_class_bindings): Likewise.
4408         * semantics.c (finish_object_call_expr): Do not use
4409         build_method_call when we already know what function is being
4410         called.
4411         * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
4412         * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
4413         TREE_CHAIN.
4414         (name_p): New function.
4415         * typeck.c (build_object_ref): Remove.
4416         (build_component_ref_1): Likewise.
4417         (build_x_component_ref): Likewise.
4418         (build_class_member_access_expr): New function.
4419         (finish_class_member_access_expr): Likewise.
4420         (build_ptrmemfunc_access_expr): Likewise.
4421         (get_member_function_from_ptrfunc): Use
4422         build_ptrmemfunc_access_expr.
4423         (build_binary_op): Likewise.
4424         (build_unary_op): Likewise.
4425         (build_ptrmemfunc): Likewise.
4426         (pfn_from_ptrmemfunc): Likewise.
4427         * typeck2.c (build_m_component_ref): Adjust comment.
4428
4429 2002-08-07  Neil Booth  <neil@daikokuya.co.uk>
4430
4431         * Make-lang.in (CXX_C_OBJS): Update.
4432         * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
4433         * cp-tree.h (cxx_decode_option): Remove.
4434         * decl2.c (compare_options, lang_f_options, unsupported_options,
4435         cxx_decode_option): Remove.
4436
4437 2002-08-06  Gabriel Dos Reis  <gdr@nerim.net>
4438
4439         * typeck.c (build_x_unary_op): Handle pointer-to-member.
4440
4441 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
4442
4443         * class.c: Don't include obstack.h.
4444         (popclass):
4445         * decl2.c: Delete bogus comment.
4446         * error.c: Don't include obstack.h.
4447         * except.c: Likewise.
4448         (dump_type): Correct comment.
4449         * method.c: Don't include obstack.h.
4450         * tree.c: Likewise.
4451
4452 2002-08-04  Gabriel Dos Reis  <gdr@nerim.net>
4453
4454         Fix PR/2213
4455         * cvt.c (cp_convert_to_pointer): Reject conversions from integral
4456         expressions to pointer-to-data-member of pointer-to-member-functions.
4457
4458 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
4459
4460         * cvt.c (ocp_convert): Delete obsolete code.
4461         * parse.y (permanent_obstack): Delete declaration.
4462         * pt.c (permanent_obstack): Delete declaration.
4463         * repo.c (permanent_obstack): Delete declaration.
4464         (open_repo_file): Use xmalloc instead of permanent_obstack.
4465         (init_repo): Use xstrdup instead of permanent_obstack.
4466
4467 2002-08-04  Nathan Sidwell  <nathan@codesourcery.com>
4468
4469         * cp-tree.h (VF_DERIVED_VALUE): Remove.
4470         * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
4471
4472 2002-08-03  Nathan Sidwell  <nathan@codesourcery.com>
4473
4474         PR 7470.
4475         C++ ABI change - vfunc ordering.
4476         * class.c (add_virtual_function): Remove.
4477         (dfs_modify_all_vtables): Take list of all declared
4478         virtuals. Assign all that are not in primary base.
4479         (check_for_override): Adjust comments.
4480         (create_vtable_ptr): Take single list of virtuals. Build chain
4481         of declared virtuals here.
4482         (layout_class_type): Take single list of virtuals. Adjust.
4483         (finish_struct_1): Keep virtuals on single list. Adjust.
4484
4485 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
4486
4487         * init.c (build_member_call): Use build_new_method_call, not
4488         build_method_call.
4489
4490 2002-08-02  Krister Walfridsson  <cato@df.lth.se>
4491
4492         * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
4493
4494 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
4495
4496         * call.c (build_method_call): Issue a more helpful error message
4497         about ambiguous method names.
4498
4499 2002-08-02  Nathan Sidwell  <nathan@codesourcery.com>
4500
4501         * tree.c (build_shared_int_cst): Make cache file scope, and
4502         GTY it.
4503
4504 2002-08-02  Jason Merrill  <jason@redhat.com>
4505
4506         * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
4507         (cp_expr_size): New fn.
4508         * call.c (build_over_call): Lose empty class hackery.
4509         (convert_arg_to_ellipsis): Promote non-POD warning to error.
4510         * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
4511
4512         * semantics.c (expand_body): Do tree optimization in the function
4513         context, too.
4514
4515 2002-08-01  Neil Booth  <neil@daikokuya.co.uk>
4516
4517         * cp-tree.h: Move all warning and flag declarations to c-common.h.
4518         * decl.c: Move all warning and flag variables to c-common.c.
4519         * decl2.c: Move all warning and flag variables to c-common.c.
4520         * lex.c (flag_digraphs): Remove.
4521         (warn_traditional): Now in c-common.c.
4522
4523 2002-07-31  Mark Mitchell  <mark@codesourcery.com>
4524
4525         * call.c (build_field_call): Do not look up the field by name.
4526         (build_method_call): Simplify.
4527         (struct z_candidate): Add access_path and conversion_path.  Remove
4528         basetype_path.
4529         (convert_class_to_reference): Adjust use of
4530         add_function_candidate.
4531         (add_candidate): Add conversion_path argument.
4532         (add_function_candidate): Use it.
4533         (add_conv_dndidate): Likewise.
4534         (build_builtin_candidate): Likewise.
4535         (add_template_candidate_real): Add conversion_path argument.
4536         (add_template_conv_candidate): Likewise.
4537         (add_template_candidate): Likewise.
4538         (build_user_type_conversion_1): Use it.
4539         (build_new_function_call): Remove name lookup code.  Adjust use of
4540         add_template_candidate and add_function_candidate.
4541         (build_new_op): Likewise.
4542         (convert_like_real): Use build_special_member_call.
4543         (build_over_call): Use cand->conversion_path.
4544         (build_special_member_call): New method.
4545         (build_new_method_call): Remove name lookup code.
4546         * cp-tree.def (OFFSET_REF): Update documentation.
4547         (TEMPLATE_ID_EXPR): Likewise.
4548         * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
4549         (BASELINK_OPTYPE): Likewise.
4550         (build_new_method_call): Adjust prototype.
4551         (build_special_member_call): New method.
4552         (build_baselink): New method.
4553         (build_offset_ref_call_from_tree): Likewise.
4554         (build_call_from_tree): Likewise.
4555         (finish_qualified_call_expr): Remove.
4556         (finish_call_expr): Adjust prototype.
4557         (build_x_function_call): Remove.
4558         * cvt.c (ocp_convert): Use build_special_member_call.
4559         * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
4560         (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
4561         CALL_EXPR.
4562         (build_offset_ref_call_from_tree): New function.
4563         (build_call_from_tree): Likewise.
4564         * init.c (expand_cleanup): Use build_special_member_call.
4565         (expand_default_init): Likewise.
4566         (build_member_call): Use finish_call_expr.
4567         (build_new_1): Use build_special_member_call.
4568         (push_base_cleanups): Likewise.
4569         * method.c (do_build_assign_ref): Likewise.
4570         * parse.y (template_id): Do not pass a COMPONENT_REF to
4571         lookup_template_function.
4572         (primary): Use parse_finish_call_epxr, not finish_call_expr.
4573         (parse_finish_call_expr): New function.
4574         * pt.c (lookup_template_function): Add assertions.
4575         * search.c (lookup_base): Allow T to be a binfo.
4576         (build_baselink): New function.
4577         (lookup_member): Use it.
4578         * semantics.c (finish_call_expr): Do not do name lookup.
4579         (finish_object_call_expr): Remove #if 0'd code.
4580         (finish_qualified_call_expr): Remove.
4581         * typeck.c (build_x_function_call): Remove.
4582         (build_static_case): Use build_special_member_call.
4583         * typeck2.c (build_functional_cast): Likewise.
4584
4585 2002-07-30  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
4586
4587         * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
4588
4589 2002-07-30  Gabriel Dos Reis  <gdr@nerim.net>
4590
4591         * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
4592
4593 2002-07-30  Nathan Sidwell  <nathan@codesourcery.com>
4594
4595         * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
4596         documentation.
4597
4598 2002-07-29  Alan Modra  <amodra@bigpond.net.au>
4599
4600         * cp-tree.h: Comment typo fix.
4601
4602 2002-07-29  Richard Earnshaw  <rearnsha@arm.com>
4603
4604         * spew.c (space_for_token): Allocate zeroed memory for a new token
4605         chunk.
4606
4607 2002-07-27  Roger Sayle  <roger@eyesopen.com>
4608
4609         * decl.c (builtin_function_1): No need to explicitly mark
4610         BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
4611
4612 2002-07-27  Roger Sayle  <roger@eyesopen.com>
4613
4614         * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
4615
4616 2002-07-26  Jason Merrill  <jason@redhat.com>
4617
4618         * call.c (build_over_call): Likewise.
4619         (cp_convert_parm_for_inlining): New fn.
4620         (convert_for_arg_passing): New fn.
4621         (convert_default_arg, build_over_call): Use it.
4622         (type_passed_as): New fn.
4623         * pt.c (tsubst_decl): Use it.
4624         * decl2.c (cp_build_parm_decl): New fn.
4625         (build_artificial_parm): Use it.
4626         (start_static_storage_duration_function): Likewise.
4627         * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
4628         (grokparms): Don't mess with DECL_ARG_TYPE.
4629         * typeck.c (convert_arguments): Use convert_for_arg_passing.
4630         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
4631         Define.
4632         * cp-tree.h: Declare new fns.
4633
4634 2002-07-26  Neil Booth  <neil@daikokuya.co.uk>
4635
4636         * cp-tree.h (flag_operator_names): Remove.
4637         * decl2.c (flag_operator_names): Remove.
4638         (lang_f_options): Remove operator-names.
4639         * lex.c (D_OPNAME): Remove.
4640         (reswords): Remove operator names.
4641         (rid_to_yy): Remove operator names.
4642         (init_reswords): No need to handle D_OPNAME.
4643         * spew.c (read_process_identifier): There are no operator
4644         names.
4645
4646 2002-07-26  Jason Merrill  <jason@redhat.com>
4647
4648         * dump.c (cp_dump_tree): Call c_dump_tree.
4649         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
4650
4651 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
4652
4653         * error.c (print_whitespace): Remove.
4654         * g++spec.c (LIBUNWIND): Move.
4655         * mangle.c (mangled_position, write_signed_number): Remove.
4656
4657 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
4658
4659         * decl2.c (cxx_decode_option): Similarly.
4660
4661 2002-07-25  Gabriel Dos Reis  <gdr@nerim.net>
4662
4663         * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
4664         (cxx_sizeof_or_alignof_type): Take a third argument.
4665         (cxx_sizeof): Adjust definition.
4666         (cxx_alignof): Likewise.
4667         * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
4668         * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
4669         complaining.
4670         (c_sizeof_nowarn): Remove definition.
4671         (build_unary_op): Use cxx_sizeof_nowarn.
4672
4673 2002-07-24  Geoffrey Keating  <geoffk@redhat.com>
4674
4675         * tree.c (cp_build_qualified_type_real): When copying
4676         pointer-to-method types, unshare the record that holds
4677         the cached pointer-to-member-function type.
4678
4679 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
4680
4681         * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
4682
4683 2002-07-23  Gabriel Dos Reis  <gdr@nerim.net>
4684
4685         Fix PR/7363:
4686         * typeck.c (cxx_sizeof_or_alignof_type): New function.
4687         (c_sizeof): Remove definition.
4688         (expr_sizeof): Use cxx_sizeof.
4689         * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
4690         * decl.c (finish_destructor_body): Use cxx_sizeof.
4691         * semantics.c (finish_alignof): Likewise.
4692         (finish_alignof): Use cxx_alignof.
4693         * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
4694         (cxx_sizeof_or_alignof_type): Declare.
4695         (my_friendly_assert): Move to ../c-common.h.
4696
4697 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
4698
4699         * class.c, method.c, pt.c, search.c: Don't define obstack macros.
4700
4701 2002-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4702
4703         PR c++/7347, c++/7348
4704         * cp-tree.h (tsubst_flags_t): Add tf_parsing.
4705         * decl.c (make_typename_type): Use it.
4706         (make_unbound_class_template): Likewise.
4707         (lookup_name_real): Don't call type_access_control if scope is
4708         template parameter dependent.
4709         * parse.y (template_arg): Call make_unbound_class_template with
4710         tf_parsing set.
4711         (nest_name_specifier): Call make_typename_type with tf_parsing set.
4712         (typename_sub0): Likewise.
4713         (typename_sub1): Likewise.
4714         (instantiate_decl): Push class scope.
4715         * pt.c (regenerate_decl_from_template): Call pushclass and popclass
4716         for both static variable and member function template.
4717         (instantiate_decl) Call pushclass and popclass when tsubst'ing type
4718         and arguments.
4719         * search.c (type_access_control): Do type access for TEMPLATE_DECL
4720         too.
4721
4722 2002-07-20  Roger Sayle  <roger@eyesopen.com>
4723
4724         * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
4725         test by using positive_option.  Make whitespace consistent.
4726
4727 2002-07-20  Gabriel Dos Reis  <gdr@nerim.net>
4728
4729         * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
4730         members with 'locus'.  Adjust use throughout.
4731         (struct feed):  Likewise.
4732         (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
4733         Adjust use.
4734         (snarf_defarg): Use error(), not error_with_file_and_line().
4735
4736 2002-07-19  Chris Demetriou  <cgd@broadcom.com>
4737
4738         * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
4739         cpp_options is included.
4740
4741 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4742
4743         PR c++/2862, c++/2863
4744         * pt.c (determine_specialization): Compare the length of
4745         TYPE_ARG_TYPES.  Tidy.
4746
4747 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4748
4749         PR c++/3797
4750         * decl.c (duplicate_decls): Don't propagate inlining parameters from
4751         olddecl to newdecl when newdecl is a specialization of the
4752         instantiation olddecl.
4753
4754 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4755
4756         PR c++/4802, c++/5387
4757         * decl.c (make_typename_type): Use enforce_access.
4758
4759 2002-07-17  Scott Snyder <snyder@fnal.gov>
4760
4761         PR c++/7320
4762         * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
4763
4764 2002-07-12  Mark Mitchell  <mark@codesourcery.com>
4765
4766         * class.c (add_method): Correct handling of conversion operators.
4767
4768 2002-07-11  Mark Mitchell  <mark@codesourcery.com>
4769
4770         PR c++/7224
4771         * class.c (add_method): Simplify.
4772
4773 2002-07-11  Jason Merrill  <jason@redhat.com>
4774
4775         PR c++/7279
4776         * tree.c (cp_copy_res_decl_for_inlining): Also copy
4777         TREE_ADDRESSABLE.
4778
4779 2002-07-10  Graham Stott  <graham.stott@btinternet.com>
4780
4781         * pt.c (template_parm_this_level_p, push_template_decl_real):
4782         Pass depth as int pointer.
4783
4784 2002-07-11  Tim Josling  <tej@melbpc.org.au>
4785
4786         Remove front end hard coding from gengtype.c.
4787
4788         * config-lang.in (gtfiles): Add files needed for this front end.
4789
4790 2002-07-10  Mark Mitchell  <mark@codesourcery.com>
4791
4792         * cp-tree.h (unqualified_name_lookup_error): Declare it.
4793         (begin_function_definition): Adjust prototype.
4794         * lex.c (unqualified_name_lookup_error): New function, split out
4795         from ...
4796         (do_identifier): ... here.
4797         * parse.y (parse_begin_function_definition): New function.
4798         (fn.def1): Use it.
4799         * semantics.c (begin_function_definition): Accept decl-specifiers
4800         and attributes as separate parameters.
4801
4802 2002-07-10  Jason Merrill  <jason@redhat.com>
4803
4804         PR c++/6255
4805         * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
4806         modifying the old one.
4807
4808 2002-07-09  Mark Mitchell  <mark@codesourcery.com>
4809
4810         * cp-tree.h (constructor_name_p): Declare it.
4811         (check_template_template_default_arg): Likewise.
4812         * class.c (handle_using_decl): Use constructor_name_p.
4813         * decl.c (grokdeclarator): Likewise.
4814         * decl2.c (constructor_name_p): Define it.
4815         * init.c (build_member_call): Use constructor_name_p.
4816         * parse.y (template_parm): Use check_template_template_default_arg.
4817         * pt.c (check_explicit_specialization): Use constructor_name_p.
4818         * semantics.c (check_template_template_default_arg): New function.
4819
4820 2002-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4821
4822         * pt.c (can_complete_type_without_circularity): Add static to
4823         function definition.
4824
4825 2002-07-08  Mark Mitchell  <mark@codesourcery.com>
4826
4827         * cp-tree.h (have_extern_spec): Declare it
4828         * decl.c (have_extern_spec): Define it.
4829         (start_decl): Eliminate use of used_extern_spec.
4830         (start_function): Likewise.
4831         * parse.y (have_extern_spec): Remove declaration.
4832         (used_extern_spec): Likewise.
4833         (frob_specs): Eliminate use of used_extern_spec.
4834         (.hush_warning): Likewise.
4835
4836 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
4837
4838         * Make-lang.in (cp/parse.o): Depend on decl.h.
4839         * cp-tree.h (do_decl_instantiation): Change prototype.
4840         * parse.y: Include decl.h.
4841         (parse_decl_instantiation): New function.
4842         (explicit_instantiation): Use it.
4843         * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
4844         and DECLSPECS.
4845
4846 2002-07-07  Roger Sayle  <roger@eyesopen.com>
4847
4848         * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
4849         constructor and destructor tests when passed a TEMPLATE_DECL.
4850
4851 2002-07-05  Jason Merrill  <jason@redhat.com>
4852
4853         * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
4854         pointers.
4855
4856         PR optimization/7145
4857         * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
4858
4859 2002-07-05  Nathan Sidwell  <nathan@codesourcery.com>
4860
4861         Repair damage on weak-impared targets caused by my previous patch.
4862         * cp-tree.h (import_export_tinfo): Add parameter.
4863         * decl2.c (import_export_tinfo): Add parameter, post adjust
4864         DECL_COMDAT.
4865         * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
4866         import_export_tinfo.
4867
4868 2002-07-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4869
4870         PR c++/6944
4871         * init.c (build_aggr_init): Remove qualifiers of init before calling
4872         build_vec_init.
4873         (build_vec_init): Flatten multi-dimensional array during cleanup.
4874         (build_vec_delete_1): Abort if the type of each element is array.
4875
4876 2002-07-03  Graham Stott  <graham.stott@btinternet.com>
4877
4878         * pt.c (instantiate_class_template): Fix typo.
4879
4880 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4881
4882         * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
4883         by CVS conflict in my last patch.
4884
4885 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4886
4887         PR c++/6716
4888         * pt.c (can_complete_type_without_circularity): New function.
4889         (instantiate_class_template): Use it.
4890         * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
4891         message due to incomplete fields.
4892
4893 2002-07-01  Mark Mitchell  <mark@codesourcery.com>
4894
4895         PR c++/7112
4896         * mangle.c (write_expression): Add mangling for sizeof when
4897         applied to a type.
4898         * operators.def: Remove stale comment.
4899
4900 2002-06-30  Nathan Sidwell  <nathan@codesourcery.com>
4901
4902         * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
4903         (CPTI_TYPE_INFO_PTR_TYPE): ... this.
4904         (tinfo_decl_type): Replace with ...
4905         (type_info_ptr_type): ... this.
4906         (import_export_tinfo): Declare.
4907         (tinfo_decl_p): Rename to ...
4908         (unemitted_tinfo_decl_p): ... this.
4909         * decl2.c (import_export_decl): Break out tinfo handling into ...
4910         (import_export_tinfo): ... here. New function.
4911         (finish_file): Adjust.
4912         * rtti.c (TINFO_REAL_NAME): New macro.
4913         (init_rtti_processing): Create the tinfo types.
4914         (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
4915         (get_tinfo_decl): Adjust.
4916         (get_tinfo_ptr): New function.
4917         (get_type_id): Use it.
4918         (tinfo_base_init): Create vtable decl here, if it doesn't exist.
4919         (ptr_initializer): Use get_tinfo_ptr.
4920         (ptm_initializer): Likewise.
4921         (synthesize_tinfo_var): Break into ...
4922         (get_pseudo_ti_init): ... this. Just create the initializer.
4923         (get_pseudo_ti_desc): .. and this.
4924         (create_real_tinfo_var): Remove.
4925         (create_pseudo_type_info): Don't create the vtable decl here.
4926         (get_vmi_pseudo_type_info): Remove.
4927         (create_tinfo_types): Adjust.
4928         (tinfo_decl_p): Rename to ...
4929         (unemitted_tinfo_decl_p): ... here. Adjust.
4930         (emit_tinfo_decl): Adjust. Create the initializer.
4931
4932 2002-06-27  Mark Mitchell  <mark@codesourcery.com>
4933
4934         PR c++/6695
4935         * pt.c (tsubst_friend_class): Substitute into the context of the
4936         friend before using it.
4937
4938 2002-06-26  Mark Mitchell  <mark@codesourcery.com>
4939
4940         * cp-tree.h (xref_tag): Change prototype.
4941         (handle_class_head): Likewise.
4942         (build_x_component_ref): Likewise.
4943         * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
4944         (xref_tag): Take attributes as a separate parameter.
4945         (xref_tag_from_type): Adjust call to xref_tag.
4946         * decl2.c (build_expr_from_tree): Adjust call to
4947         build_x_component_ref.
4948         (handle_class_head): Take attributes as a separate parameter.
4949         * parse.y (parse_xref_tag): New function.
4950         (parse_handle_class_head): Likewise.
4951         (primary): Use parse_xref_tag.
4952         (class_head_decl): Use parse_handle_class_head.
4953         (class_head_defn): Likewise.
4954         * rtti.c (init_rtti_processing): Adjust call to xref_tag.
4955         (build_dynamic_cast_1): Likewise.
4956         (create_pseudo_type_info): Likewise.
4957         (emit_support_tinfos): Likewise.
4958         * typeck.c (build_object_ref): Adjust call to
4959         build_x_component_ref.
4960         (build_x_component_ref): Remove protect parameter.
4961
4962 2002-06-25  Mark Mitchell  <mark@codesourcery.com>
4963
4964         * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
4965         * class.c (handle_using_decl): Likewise.
4966         (instantiate_type): Likewise.
4967         * cp-tree.h (BASELINK_FUNCTIONS): New macro.
4968         (xref_basetypes): Change prototype.
4969         (begin_mem_initializers): New function.
4970         (get_overloaded_fn): Likewise.
4971         * decl.c (xref_basetypes): Simplify.
4972         * error.c (dump_expr): Use BASELINK_FUNCTIONS.
4973         * init.c (build_offset_ref): Likewise.
4974         * parse.y (base_init): Use begin_mem_initializers().
4975         (structsp): Adjust call to xref_basetypes.
4976         * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
4977         (instantiate_class_template): Adjust call to xref_basetypes.
4978         * semantics.c (begin_mem_initializers): New function.
4979         * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
4980         (really_overlaoded_fn): Likewise.
4981         (get_overloaded_fn): New function.'
4982         (get_first_fn): USe BASELINK_FUNCTIONS.
4983
4984 2002-06-24  Mark Mitchell  <mark@codesourcery.com>
4985
4986         * cp-tree.h (SCALAR_TYPE_P): New macro.
4987         (check_for_out_of_scope_variable): New function.
4988         (at_class_scope_p): Likewise.
4989         (finish_fname): Likewise.
4990         * class.c (finish_struct): Use at_function_scope_p.
4991         * decl.c (check_for_out_of_scope_variable): New function, split
4992         out from do_identifier.
4993         (finish_enum): Use at_function_scope_p.
4994         * lex.c (do_identifier): Use check_for_out_of_scope_variable.
4995         * parse.y (VAR_FUNC_NAME): Give it <ttype>.  Use finish_fname.
4996         (primary): Use at_function_scope_p.
4997         * search.c (at_class_scope_p): New function.
4998         * semantics.c (finish_fname): Likewise.
4999         (check_multiple_declarators): Use at_function_scope_p.
5000
5001 2002-06-23  Mark Mitchell  <mark@codesourcery.com>
5002
5003         * parse.y (parse_scoped_id): New function.
5004         (primary): Use it.
5005         * cp-tree.h (do_scoped_id): Adjust declaration.
5006         * lex.c (do_scoped_id): Remove call to yylex.
5007         * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
5008         * typeck2.c (add_exception_specifier): Use tree_cons, rather than
5009         expanding it inline.
5010
5011 2002-06-23  Matt Thomas  <matt@3am-software.com>
5012
5013         * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
5014         "#if VMS_TARGET".
5015
5016 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5017
5018         * mangle.c (integer_type_codes): Const-ify.
5019
5020 2002-06-20  Richard Henderson  <rth@redhat.com>
5021
5022         PR c++/6747
5023         * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
5024         Call put_var_into_stack.
5025
5026 2002-06-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5027
5028         * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
5029         array size calculation.
5030
5031 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5032
5033         PR c++/6892
5034         * pt.c (tsubst_expr): Handle FILE_STMT.
5035
5036 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5037
5038         PR c++/6723
5039         * pt.c (lookup_template_class): Don't build complete argument of
5040         BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
5041         argument.
5042
5043 2002-06-19  Akim Demaille  <akim@epita.fr>
5044
5045         * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
5046         decl.h's TYPENAME.
5047         * spew.c, lex.c: Adjust.
5048         * parse.y (explicit_instantiation): Add empty action to override
5049         the default $$ = $1 where it introduces a type clash.
5050
5051 2002-06-14  Jason Merrill  <jason@redhat.com>
5052
5053         * semantics.c (begin_for_stmt): Push the 'for' scope before
5054         adding the FOR_STMT.
5055
5056         C++ ABI changes.
5057         * class.c (build_base_field): Set DECL_PACKED.
5058         (layout_class_type): Don't use tail padding of PODs.
5059         * mangle.c (write_unqualified_name): Fix template conversion op
5060         mangling.
5061
5062 2002-06-16  Richard Henderson  <rth@redhat.com>
5063
5064         PR opt/6793
5065         * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
5066         after template instantiation.
5067
5068 2002-06-16  Richard Henderson  <rth@redhat.com>
5069
5070         * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
5071
5072 2002-06-15  Gabriel Dos Reis  <gdr@codesourcery.com>
5073
5074         * cp-tree.h (compiler_error): Remove declaration.
5075         * lex.c (compiler_error): Remove definition.
5076
5077 2002-06-14  Steve Ellcey  <sje@cup.hp.com>
5078
5079         * g++spec.c (LIBUNWIND): New.
5080         (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
5081
5082 2002-06-13  Jessica Han  <jessica@cup.hp.com>
5083
5084         * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
5085         (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
5086         (build_vbase_offset_vtbl_entries): Likewise.
5087         * rtti.c (build_headof): Likewise.
5088         (get_tinfo_decl_dynamic): Likewise.
5089         (create_pseudo_type_info): Likewise.
5090
5091 2002-06-12  Stan Shebs  <shebs@apple.com>
5092
5093         * mpw-config.in: Remove file, no longer used.
5094         * mpw-make.sed: Ditto.
5095
5096 2002-06-07  Zack Weinberg  <zack@codesourcery.com>
5097
5098         * decl2.c: Update call to cpp_handle_option.
5099
5100 2002-06-07  H.J. Lu  (hjl@gnu.org)
5101
5102         * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
5103
5104 2002-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
5105
5106         * error.c (cp_error_at): Fix typo.
5107
5108 2002-06-04  Gabriel Dos Reis  <gdr@codesourcery.com>
5109
5110         * error.c (cp_diagnostic_starter): Adjust call.
5111         (maybe_print_instantiation_context): Change prototype to take a
5112         'diagnostic_info *'.
5113         (print_instantiation_full_context): Likewise.
5114         (print_instantiation_partial_context): Likewise.
5115         (cp_diagnostic_starter): Likewise.
5116         (cp_diagnostic_finalizer): Likewise.
5117         (cp_print_error_function): Likewise.
5118         (cp_printer): Take a secondary parameter as a 'text_info *'.
5119         Remove output_state savings.  Adjust calls.
5120
5121 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
5122
5123         * pt.c (inline_parm_levels): Mark for GC.
5124
5125         * mangle.c (start_mangling): Allocate G.substitutions here...
5126         (init_mangle): ... rather than here.
5127         (finish_mangling): Clear the varray pointer when done with it.
5128         * spew.c (yylexstring): Don't use VARRAY_FREE.
5129         * search.c (bfs_walk): Don't use VARRAY_FREE.
5130         * decl2.c (pending_statics): Use gengtype to mark.
5131         (deferred_fns): Likewise.
5132         (ssdf_decls): Likewise.
5133         (init_decl2): Delete.
5134         * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
5135         (cxx_init_decl_processing): Don't call init_decl2.
5136         (cxx_pop_function_context): Don't use VARRAY_FREE.
5137         * cp-tree.h (struct saved_scope): No need for special marking
5138         of varrays.
5139         (struct language_function): Likewise.
5140         (local_classes): Use gengtype to mark.
5141         (init_decl2): Delete prototype.
5142         * class.c (init_class_processing): Don't use
5143         ggc_add_tree_varray_root.
5144         (build_vtbl_initializer): Don't use VARRAY_FREE.
5145
5146         * decl.c (typename_compare): Don't use same_type_p.
5147
5148         * decl.c: Include hashtab.h instead of hash.h.
5149         (typename_hash): Update to use htab_h.
5150         (typename_compare): Likewise.
5151         (typename_htab): Use gengtype to mark.
5152         (build_typename_type): Update to use htab_h.
5153         * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
5154
5155         * Make-lang.in (gt-cp-tree.h): New rule.
5156         (cp/tree.o): Depend on gt-cp-tree.h.
5157         * config-lang.in (gtfiles): Add cp/tree.c.
5158         * tree.c: Include gt-cp-tree.h.
5159         (list_hash_table): Use gengtype to mark.
5160         (init_tree): Use gengtype to mark trees.
5161
5162         * Make-lang.in (cp/decl.o): Add debug.h dependency.
5163         * call.c (struct z_candidate): Use gengtype.
5164         (USER_CONV_CAND): Use WRAPPER_ZC.
5165         (convert_class_to_reference): Use build_zc_wrapper.
5166         (build_type_conversion_1): Likewise.
5167         (build_over_call): Use WRAPPER_ZC.
5168         (add_warning): Use build_zc_wrapper.
5169         * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
5170         * cp-tree.h (struct lang_identifier): Use gengtype.
5171         (struct template_parm_index_s): Likewise.
5172         (struct ptrmem_cst): Likewise.
5173         (struct tree_binding): Likewise.
5174         (struct tree_overload): Likewise.
5175         (struct tree_srcloc): Likewise.
5176         (struct tree_wrapper): Likewise.  Also modify to have a pointer
5177         to struct z_candidate rather than void.
5178         (enum cp_tree_node_structure_enum): New.
5179         (union lang_tree_node): New.
5180         (cxx_mark_tree): Delete prototype.
5181         (cp_tree_node_structure): New prototype.
5182         (build_ptr_wrapper): Delete prototype.
5183         (build_int_wrapper): Delete prototype.
5184         (build_zc_wrapper): New prototype.
5185         * decl.c: Include debug.h
5186         (cxx_mark_tree): Delete.
5187         (cp_tree_node_structure): New.
5188         * tree.c (build_ptr_wrapper): Delete.
5189         (build_int_wrapper): Delete.
5190         (build_zc_wrapper): New.
5191
5192         * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
5193         Correct typo.  Patch from k_fukui@highway.ne.jp.
5194
5195         * semantics.c (current_stmt_tree): Update for change to
5196         struct language_function.
5197         (finish_mem_initializers): Likewise.
5198         * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
5199         * cp-tree.h (struct language_function): Rename from
5200         cp_language_function.  Change all uses.
5201         (cp_function_chain): Don't need to cast.
5202
5203         * class.c (duplicate_tag_error): Reset discriminator.
5204         (check_bases_and_members): Update for data structure changes.
5205         * cp-tree.h (struct lang_id2): Use gengtype.
5206         (flagged_type_tree): Likewise.
5207         (SET_LANG_ID): Use GGC on struct lang_id2.
5208         (struct cp_language_function): Use gengtype.  Remove field
5209         'x_vcalls_possible_p'.
5210         (current_vcalls_possible_p): Delete.
5211         (struct lang_type_header): New.
5212         (struct lang_type_class): Rename from struct lang_type.  Include
5213         struct lang_type_header.
5214         (struct lang_type_ptrmem): New.
5215         (struct lang_type): New.
5216         (LANG_TYPE_CLASS_CHECK): New.  Use it in all the appropriate macros.
5217         (LANG_TYPE_PTRMEM_CHECK): New.  Use it in all the appropriate macros.
5218         (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
5219         (struct lang_decl_flags): Use gengtype.  Add discriminators.
5220         (struct lang_decl): Use gengtype.  Add and use discriminators.
5221         Update the macros that reference moved fields.
5222         (LANG_DECL_U2_CHECK): New function.  Use it when appropriate.
5223         (SET_DECL_THUNK_P): Set discriminator too.
5224         (clear_inline_text_obstack): Delete prototype.
5225         (finish_inline_definitions): Delete prototype.
5226         (mark_pending_inlines): Delete prototype.
5227         (lang_check_failed): New prototype.
5228         * decl.c (struct named_label_use_list): Use gengtype.
5229         (struct named_label_list): Likewise.
5230         (mark_binding_level): Delete.
5231         (mark_named_label_lists): Delete.
5232         (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
5233         (cxx_init_decl_processing): Use generated marker routine.
5234         (begin_destructor_body): Delete dead set to
5235         current_vcalls_possible_p.
5236         (mark_lang_function): Delete.
5237         (mark_cp_function_context): Delete.
5238         (lang_mark_tree): Use generated marker routines.
5239         * decl2.c (start_objects): Set discriminator when setting
5240         GLOBAL_INIT_PRIORITY.
5241         * lex.c (retrofit_lang_decl): Set discriminators.
5242         (copy_lang_type): Update for changes to lang_type structure.
5243         (cp_make_lang_type): Set discriminator.
5244         * parse.y: Use gengtype on YYLVAL.  Don't use dots in identifiers.
5245         * search.c: Include ggc.h.
5246         * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
5247         (finish_inline_definitions): Delete.
5248         * spew.c (struct token): Use gengtype.
5249         (struct token_chunk): New.
5250         (struct unparsed_text): Use gengtype.  Store tokens in chunks.
5251         (struct feed): Use gengtype.
5252         (feed_obstack): Delete.
5253         (feed): Mark as GC root.
5254         (pending_inlines): Mark as GC root.
5255         (pending_inlines_tail): Likewise.
5256         (processing_these_inlines): Likewise.
5257         (token_obstack): Make static.
5258         (first_token): Likewise.
5259         (init_spew): Don't initialize deleted things; use gengtype for roots.
5260         (clear_inline_text_obstack): Delete.
5261         (feed_input): Use GC for struct feed.  Update for changes to
5262         struct unparsed_text.
5263         (mark_pending_inlines): Delete.
5264         (next_token): Rename from add_token.  Change all callers.  Update
5265         for changes to struct unparsed_text.
5266         (space_for_token): New.
5267         (remove_last_token): New.
5268         (alloc_unparsed_text): New.
5269         (snarf_block): Take an unparsed_text.  Update for changes to struct
5270         unparsed_text.
5271         (snarf_method): Update for changes to struct unparsed_text.
5272         (snarf_defarg): Update for changes to struct unparsed_text.
5273         * tree.c (lang_check_failed): New.
5274
5275         * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
5276         gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
5277         (cp/spew.o): Add dependency on gt-<filename>.h.
5278         (cp/decl2.o): Add dependency on gt-<filename>.h.
5279         (cp/call.o): Add dependency on gt-<filename>.h.
5280         (cp/pt.o): Add dependency on gt-<filename>.h.
5281         (cp/repo.o): Add dependency on gt-<filename>.h.
5282         (cp/parse.o): Add dependency on gt-<filename>.h.
5283         * call.c: Use gengtype for roots.
5284         * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
5285         decl2.c parse.y pt.c repo.c spew.c.
5286         * cp-tree.h: Use gengtype for roots.
5287         (struct saved_scope): Use GGC, gengtype.
5288         (cp_parse_init): Delete prototype.
5289         (init_pt): Delete prototype.
5290         * decl.c: Use gengtype for roots.
5291         (mark_saved_scope): Delete.
5292         (cxx_init_decl_processing): Don't call deleted initilisation
5293         routines.
5294         (signed_size_zero_node): Delete, unused.
5295         * decl.h: Use gengtype for roots.
5296         * decl2.c: Use gengtype for roots.
5297         * lex.h: Use gengtype for roots.
5298         * parse.y: Use gengtype for roots.
5299         (cp_parse_init): Delete.
5300         * pt.c: Use gengtype for roots.
5301         (init_pt): Delete.
5302         * repo.c: Use gengtype for roots.
5303         * spew.c: Use gengtype for roots.
5304
5305         * Make-lang.in: Allow for filename changes.  Add gtype-cp.h.
5306         (cp/decl.o): Add dependency on gtype-cp.h.
5307         * decl.c: Remove use of add_deletable_root, use GTY marker instead.
5308         Include gtype-cp.h.  Allow for filename changes.
5309
5310         * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
5311         (cp/decl.o): Add cp/gt-decl.h dependency.
5312         * config-lang.in (gtfiles): New.
5313         * tree.h: Rename struct binding_level to struct cp_binding_level.
5314         * decl.c: Rename struct binding_level to struct cp_binding_level.
5315         Include cp/gt-decl.h.
5316         (struct cp_binding_level): Use gengtype.
5317         (make_binding_level): Use GGC on struct cp_binding_level.
5318         (mark_binding_level): Use gt_ggc_m_cp_binding_level.
5319         (cxx_init_decl_processing): Mark free_binding_level as
5320         deletable.
5321
5322         * decl.c (mark_cp_function_context): Update calling sequence.
5323
5324         * decl.c (start_function): Don't free 'struct
5325         cp_language_function'.
5326         (pop_cp_function_context): Likewise.
5327         (save_function_data): Allocate it using GC.
5328         * semantics.c (genrtl_start_function): Don't free 'struct
5329         cp_language_function'.
5330
5331 2002-05-31  Matthew Woodcraft  <mattheww@chiark.greenend.org.uk>
5332
5333         * lang-specs.h: Use cpp_debug_options.
5334
5335 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
5336
5337         * mangle.c, tree.c: Include real.h.
5338         * Make-lang.in: Update dependency lists.
5339
5340 2002-05-25  Neil Booth  <neil@daikokuya.demon.co.uk>
5341
5342         * lex.c: Don't include c-lex.h.
5343         * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
5344
5345 2002-05-23  Neil Booth  <neil@daikokuya.demon.co.uk>
5346
5347         * spew.c (yyungetc, snarf_block): Remove indent_level handling.
5348
5349 2002-05-22  Richard Henderson  <rth@redhat.com>
5350
5351         * decl.c (obscure_complex_init): Check for VAR_DECL
5352         before using DECL_THREAD_LOCAL.
5353
5354 2002-05-22  Richard Henderson  <rth@redhat.com>
5355
5356         * decl.c (check_tag_decl): Handle RID_THREAD.
5357         (obscure_complex_init): Reject run-time init of tls.
5358         (grokvardecl, grokdeclarator): Handle RID_THREAD.
5359         * lex.c (reswords): Add __thread.
5360         (rid_to_yy): Map RID_THREAD to SCSPEC.
5361
5362 2002-05-22  Neil Booth  <neil@daikokuya.demon.co.uk>
5363
5364         * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
5365         * cp-tree.h (cxx_post_options): Kill.
5366         * cp-lex.c (cxx_post_options): Kill.
5367
5368 2002-05-21  Richard Henderson  <rth@redhat.com>
5369
5370         * lex.c (rid_to_yy): Add RID_THREAD.
5371
5372 2002-05-21  Alexandre Oliva  <aoliva@redhat.com>
5373
5374         * init.c (build_vec_init): Test for trivial copy-assignment when
5375         copy-assigning arrays.
5376
5377 2002-05-20  Andreas Jaeger  <aj@suse.de>
5378
5379         * init.c (build_default_init): Remove unused variable.
5380
5381 2002-05-20  Alexandre Oliva  <aoliva@redhat.com>
5382
5383         * call.c (any_strictly_viable): New.
5384         (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
5385
5386 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5387
5388         * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
5389
5390 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5391
5392         PR c++/186, DR 259
5393         * pt.c (do_decl_instantiation): Don't complain explicit
5394         instantiation after explicit specialization.
5395         (do_type_instantiation): Likewise.
5396
5397 2002-05-19  Alexandre Oliva  <aoliva@redhat.com>
5398
5399         * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
5400         renamed from...
5401         (complete_type_or_else): ... this.  Redefined as macro.
5402         (cxx_incomplete_type_diagnostic): Declare.
5403         (cxx_incomplete_type_error): Define as macro.
5404         * init.c (build_delete): Warn about incomplete types other than
5405         void, and use the built-in operator delete for them.
5406         * typeck.c (complete_type_or_diagnostic): Renamed from
5407         complete_type_or_else.  Added warn_only argument, passed to...
5408         * typeck2.c (cxx_incomplete_type_diagnostic): ... this.  Print
5409         warnings or errors depending on new warn_only argument.  Renamed
5410         from...
5411         (cxx_incomplete_type_error): ... this.  New implementation in
5412         terms of cxx_incomplete_type_diagnostic.
5413
5414 2002-05-18  Jason Merrill  <jason@redhat.com>
5415
5416         PR c++/6611
5417         * decl2.c (import_export_decl): If we clear
5418         DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
5419
5420 2002-05-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5421
5422         PR c++/6620
5423         * pt.c (verify_class_unification): Don't check if PARM is template
5424         parameter dependent.  Simplify.
5425         (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
5426         parameter dependent expression.
5427
5428 2002-05-14  Jason Merrill  <jason@redhat.com>
5429
5430         * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
5431         Do set DECL_COMDAT.
5432         (synthesize_tinfo_var): Take the public decl.
5433         (create_real_tinfo_var): Likewise.  Check DECL_COMDAT.
5434         (emit_tinfo_decl): Adjust.  Call import_export_decl.
5435         * decl2.c (import_export_decl): Simplify tinfo decl handling.
5436
5437 2002-05-14  Alexandre Oliva  <aoliva@redhat.com>
5438
5439         * cp-tree.h (struct lang_type): Added non_zero_init.
5440         (CLASSTYPE_NON_ZERO_INIT_P): New macro.
5441         (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
5442         * class.c (check_field_decls): Test non_zero_init.
5443         * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
5444         zero-to-NULL conversions.
5445         * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
5446         type that needs zero-initialization without zeros.
5447         (check_initializer_decl): Compute zero-initializer for types
5448         that require a non-trivial one.
5449         * init.c (build_forced_zero_init): New function.
5450         (build_default_init): Use it.
5451         * tree.c (zero_init_p): New function.
5452         * typeck2.c (force_store_init_value): New function.
5453         (process_init_constructor): Create non-trivial zero-initializers
5454         for array members and class fields.
5455
5456 2002-05-14  Neil Booth  <neil@daikokuya.demon.co.uk>
5457
5458         * lang-specs.h: Remove redundant -lang-c++.
5459
5460 2002-05-13  Jason Merrill  <jason@redhat.com>
5461
5462         * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
5463         (fixed_type_or_null): See through reference vars.
5464         (build_base_path): Vtable contents are constant.
5465         * typeck.c (get_member_function_from_ptrfunc): Likewise.
5466
5467 2002-05-12  Jason Merrill  <jason@redhat.com>
5468
5469         * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
5470         structs are safe.
5471
5472 2002-05-09  Neil Booth  <neil@daikokuya.demon.co.uk>
5473
5474         * cp-tree.h (flag_ansi): Remove.
5475         * decl2.c (flag_ansi): Remove.
5476         (cxx_decode_option): Set flag_iso and flag_undef.
5477
5478 2002-05-09  Jason Merrill  <jason@redhat.com>
5479
5480         * typeck.c (get_member_function_from_ptrfunc): Reorganize.
5481         Use subtraction rather than a bitmask to get the index.
5482         * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
5483
5484         * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
5485
5486 2002-05-07  Neil Booth  <neil@daikokuya.demon.co.uk>
5487
5488         * Make-lang.in (decl2.o): Update.
5489         * cp-tree.h (warn_multichar): Remove.
5490         * decl2.c: Include c-common.h.
5491         (warn_multichar): Remove.
5492
5493 2002-05-03  Jason Merrill  <jason@redhat.com>
5494
5495         * tree.c (build_cplus_array_type): Only const and volatile get
5496         special handling.
5497
5498         * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
5499
5500 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
5501
5502         ABI change, returning simple classes from functions.
5503         * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
5504         TYPE_HAS_TRIVIAL_INIT_REF is false or
5505         TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
5506
5507 2002-04-30  Jason Merrill  <jason@redhat.com>
5508
5509         PR debug/6436
5510         * decl.c (grokdeclarator): Don't override TYPE_NAME of an
5511         anonymous class with a typedef if there are attributes.
5512
5513 2002-04-29  Paul Eggert  <eggert@twinsun.com>
5514
5515         * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
5516
5517 2002-04-29  Jakub Jelinek  <jakub@redhat.com>
5518
5519         PR c++/6477
5520         * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
5521         non-NULL first.
5522
5523 2002-04-29  Mark Mitchell  <mark@codesourcery.com>
5524
5525         PR c++/6492
5526         * pt.c (tsubst_friend_class): If the friend has an explicit scope,
5527         enter that scope before name lookup.
5528
5529         PR c++/6486
5530         * method.c (do_build_copy_constructor): Avoid building
5531         cv-qualified reference types.
5532
5533 2002-04-29  Nathan Sidwell  <nathan@codesourcery.com>
5534
5535         PR c++/5719
5536         * decl.c (grok_op_properties): Assignment ops don't have to return
5537         by value. operator% should.
5538
5539 2002-04-28  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
5540
5541         PR c/6343
5542         * decl.c (duplicate_decls): Call merge_weak.
5543
5544 2002-04-26  Richard Henderson  <rth@redhat.com>
5545
5546         * parse.y (malloced_yyss, malloced_yyvs): New.
5547         (yyoverflow): Re-add.  Set them.
5548         (free_parser_stacks): New.
5549
5550 2002-04-26  Mark Mitchell  <mark@codesourcery.com>
5551
5552         PR c++/6497
5553         * method.c (do_build_assign_ref): Pass a derivation to
5554         build_method_call when calling base class assignment operators.
5555
5556 2002-04-26  Richard Henderson  <rth@redhat.com>
5557
5558         * parse.y (yyoverflow): Revert.
5559
5560 2002-04-26  Richard Henderson  <rth@redhat.com>
5561
5562         PR c/3581
5563         * parse.y (string): Remove.  Update all uses to use STRING
5564         instead, and not call combine_strings.
5565         * rtti.c (tinfo_name): Use fix_string_type.
5566         * semantics.c (finish_asm_stmt): Don't call combine_strings.
5567         * spew.c (yylexstring): New.
5568         (read_token): Use it.
5569
5570 2002-04-25  Richard Henderson  <rth@redhat.com>
5571
5572         PR c/2161
5573         * parse.y (yyoverflow): New.
5574
5575 2002-04-25  Jason Merrill  <jason@redhat.com>
5576
5577         PR c++/5607
5578         * search.c (check_final_overrider): No longer static.
5579         * class.c (update_vtable_entry_for_fn): Call it.
5580         * cp-tree.h: Adjust.
5581
5582 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
5583
5584         * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
5585         * cp-tree.h (cxx_set_yydebug): Die.
5586         * lex.c (YYDEBUG): Get from c-lex.h.
5587         (cxx_set_yydebug): Remove.
5588         * parse.y: Include c-lex.h.
5589         (YYDEBUG): Get from c-lex.h.
5590
5591 2002-04-24  Mark Mitchell  <mark@codesourcery.com>
5592
5593         PR c++/6438.
5594         * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
5595         void.
5596
5597 2002-04-24  Neil Booth  <neil@daikokuya.demon.co.uk>
5598
5599         * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
5600         LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
5601         Redefine.
5602         * cp-tree.h (cp_attribute_table): Rename.
5603         * decl.c (lang_attribute_table): Remove declaration.
5604         (cxx_init_decl_processing): Don't set it.
5605         * tree.c (cp_attribute_table): Rename.
5606
5607 2002-04-24  Jason Merrill  <jason@redhat.com>
5608
5609         PR c++/6331
5610         * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
5611         * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
5612         The pedwarn for array assignment is now unconditional.
5613         * tree.c (build_cplus_array_type_1): Still process simple array types
5614         normally in templates.
5615
5616         PR c++/6395
5617         * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
5618         stuff for comdats.
5619
5620 2002-04-23  Jakub Jelinek  <jakub@redhat.com>
5621
5622         * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
5623         node with attributes.
5624
5625 2002-2-23  David O'Brien  <obrien@FreeBSD.org>
5626
5627         * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
5628         Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
5629
5630 2002-04-23  Mark Mitchell  <mark@codesourcery.com>
5631
5632         PR c++/6256:
5633         * pt.c (tsubst_friend_class): Handle templates with explicit
5634         nested names.
5635
5636         PR c++/6331:
5637         * typeck.c (merge_types): Remember the cv-qualification of pointer
5638         types when merging them.
5639
5640 2002-04-20  Neil Booth  <neil@daikokuya.demon.co.uk>
5641
5642         * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
5643         LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
5644         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
5645         cxx_mark_function_context): New.
5646         * decl.c (push_cp_function_context, pop_cp_function_context,
5647         mark_cp_function_context): Rename for consistency.
5648         (cxx_init_decl_processing): Don't set old hooks.
5649
5650 2002-04-19  Neil Booth  <neil@daikokuya.demon.co.uk>
5651
5652         * call.c (convert_type_from_ellipsis): Rename, update.
5653         * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
5654         * cp-tree.h (convert_type_from_ellipsis): Rename.
5655         * decl.c (cxx_init_decl_processing): Don't set hook.
5656
5657 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
5658
5659         * call.c (build_new_method_call): Update.
5660         * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
5661         * cp-tree.h (cxx_incomplete_type_error): New.
5662         * decl.c (grokdeclarator, grokparms): Update.
5663         * decl2.c (check_classfn): Update.
5664         * pt.c (tsubst): Update.
5665         * typeck.c (complete_type_or_else, expr_sizeof,
5666         decay_conversion): Update.
5667         * typeck2.c (incomplete_type_error): Rename.
5668         (add_exception_specifier): Update.
5669
5670 2002-04-18  Jason Merrill  <jason@redhat.com>
5671
5672         PR c++/5658
5673         * search.c (setup_class_bindings): A class template qualifies as a
5674         type binding.
5675
5676 2002-04-17  Jakub Jelinek  <jakub@redhat.com>
5677
5678         PR c++/6316
5679         * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
5680         before expanding.
5681
5682 2002-04-16  Mark Mitchell  <mark@codesourcery.com>
5683
5684         * init.c (begin_init_stmts): Remove commented out code.
5685         (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
5686         * semantics.c (begin_gobal_stmt_expr): Adjust call to
5687         expand_start_stmt_expr.
5688
5689 2002-04-15  Mark Mitchell  <mark@codesourcery.com>
5690
5691         * decl.c (register_dtor_fn): Pass the address of dso_handle, not
5692         dso_handle itself, to __cxa_atexit.
5693
5694 2002-04-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
5695
5696         * error.c (cxx_print_error_function): Adjust call to macros.
5697
5698 2002-04-14  Jakub Jelinek  <jakub@redhat.com>
5699
5700         * class.c (layout_virtual_bases): Do all dsize computation on trees.
5701
5702 2002-04-14  Jason Merrill  <jason@redhat.com>
5703
5704         * typeck.c (get_member_function_from_ptrfunc): Don't do
5705         gratuitious division and multiplication on
5706         ptrmemfunc_vbit_in_delta targets.
5707
5708 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
5709
5710         PR c++/5373.
5711         * semantics.c (finish_expr_stmt): Remember the type of the
5712         expression before any conversions are performed.
5713
5714 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
5715
5716         PR c++/5189.
5717         * call.c (add_template_candidate_real): Do not treat member
5718         templates as copy constructors.
5719
5720 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
5721
5722         * decl.c (duplicate_decls): Do not copy the RTL for a variable
5723         declaration if the old variable had an incomplete type and the new
5724         variable does not.
5725         (complete_vars): Do not call layout_decl for completed variables.
5726
5727 2002-04-12  Richard Sandiford  <rsandifo@redhat.com>
5728
5729         * decl.c (duplicate_decls): Don't try to unify an implicit typedef
5730         with an explicit one.
5731         (follow_tag_typedef): New.
5732         (lookup_tag): Use it to extract the tag of an explicit typedef.
5733         (xref_tag): Likewise.
5734
5735 2002-04-11  Andrew Haley  <aph@redhat.com>
5736
5737         * typeck.c (type_after_usual_arithmetic_conversions):
5738         If two types have the same variant, return immediately.
5739         When two floating-point operands are the same precision:
5740           convert to float if one of the operands is float;
5741           if neither operand is one of the standard types, return the type
5742           of the first operand.
5743
5744 2002-04-10  Nathan Sidwell  <nathan@codesourcery.com>
5745
5746         PR c++/5507
5747         * decl.c (make_typename_type): Remove implicit typenameness.
5748
5749 2002-04-09  Jason Merrill  <jason@redhat.com>
5750
5751         PR optimization/6189
5752         * semantics.c (genrtl_start_function): Don't free
5753         DECL_SAVED_FUNCTION_DATA for inline functions.
5754
5755         * init.c (build_member_call): For now, don't convert to
5756         intermediate base if it would cause an error.
5757
5758 2002-04-08  Paolo Carlini  <pcarlini@unitus.it>
5759
5760         * parse.y (namespace_qualifier, maybe_identifier,
5761         begin_explicit_instantiation, end_explicit_instantiation,
5762         apparent_template_type, .finish_template_type,
5763         do_id, maybe_init, defarg_again, component_decl_1):
5764         Add ending ';', in accordance with POSIX.
5765
5766 2002-04-06  Mark Mitchell  <mark@codesourcery.com>
5767
5768         PR c++/5571
5769         * class.c (layout_class_type): Remember incomplete static
5770         variables.
5771         (finish_struct_1): Call complete_vars, not
5772         hack_incomplete_structures.
5773         * cp-tree.h (hack_incomplete_structures): Rename to ...
5774         (complete_vars): ... this.
5775         (struct saved_scope): Remove incomplete.
5776         (namespace_scope_incomplete): Remove.
5777         * decl.c (struct binding_level): Remove incomplete.
5778         (incomplete_vars): New variable.
5779         (mark_binding_level): Don't mark incomplete.
5780         (print_binding_level): Don't print it.
5781         (mark_saved_scope): Don't mark incomplete.
5782         (pushdecl): Use maybe_register_incopmlete_var.
5783         (cxx_init_decl_processing): Register incomplete_vars for GC.
5784         (start_decl_1): Clarify error message.
5785         (hack_incomplete_vars): Remove.
5786         (maybe_register_incomplete_var): New function.
5787         (complete_vars): Likewise.
5788
5789 2002-04-06  Jason Merrill  <jason@redhat.com>
5790
5791         PR c++/4934
5792         * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
5793         set before checking it.
5794
5795         PR c++/525
5796         * init.c (build_member_call): Use build_scoped_ref.
5797         (resolve_offset_ref): Likewise.
5798         * call.c (build_scoped_method_call): Likewise.
5799         * tree.c (maybe_dummy_object): Kludge around current_class_type being
5800         wrong.
5801         * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
5802         * cp-tree.h: Adjust.
5803
5804         * init.c (push_base_cleanups): Just use build_scoped_method_call.
5805
5806         PR c++/6179
5807         * method.c (implicitly_declare_fn): Pass unqualified type to
5808         synthesize_exception_spec.
5809
5810 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
5811
5812         * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
5813         * cvt.c: Update comment.
5814         * init.c (expand_cleanup_for_base): Update.
5815         * semantics.c (finish_parenthesized_expr): Update.
5816         * typeck.c (cp_truthvalue_conversion): Update.
5817
5818 2002-04-04  Jason Merrill  <jason@redhat.com>
5819
5820         * semantics.c (finish_eh_cleanup): New fn.
5821         * cp-tree.h: Add prototype.
5822         * init.c (perform_member_init, expand_cleanup_for_base): Use
5823         finish_eh_cleanup.
5824         * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
5825         * cp-tree.h: Remove references.
5826         * decl.c (begin_constructor_body, end_constructor_body): Likewise.
5827         * dump.c (cp_dump_tree): Likewise.
5828         * pt.c (tsubst_expr): Likewise.
5829         * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
5830         (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
5831         * tree.c (cp_statement_code_p): Likewise.
5832
5833         * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
5834
5835         PR c++/5636
5836         * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
5837         cleanup for nrv.
5838
5839         PR c++/5104
5840         * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
5841         specifiers.
5842         [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
5843
5844 2002-04-03  Richard Henderson  <rth@redhat.com>
5845
5846         * cp-lang.c (cxx_warn_unused_global_decl): New.
5847         (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
5848
5849 2002-04-03  Neil Booth  <neil@daikokuya.demon.co.uk>
5850
5851         * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
5852         * tree.c (init_tree): Don't set hook.
5853
5854 2002-04-03  Roger Sayle  <roger@eyesopen.com>
5855
5856         PR c++/5998:
5857         * decl.c (duplicate_decls): Don't mess with assembler names when
5858         redeclaring builtin functions as static.
5859
5860 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
5861
5862         * call.c (build_addr_func): Update.
5863         * class.c (resolve_address_of_overloaded_function): Update.
5864         * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
5865         * cp-tree.h (cxx_mark_addressable): New.
5866         * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
5867         * decl2.c (build_cleanup): Update.
5868         * except.c (build_throw): Update.
5869         * init.c (resolve_offset_ref): Update.
5870         * pt.c (convert_nontype_argument): Update.
5871         * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
5872         * typeck.c (decay_conversion, build_array_ref, build_unary_op,
5873         unary_complex_lvalue): Update.
5874         (mark_addressable): Rename.
5875
5876 2002-04-01  Roger Sayle  <roger@eyesopen.com>
5877
5878         PR c++/5998:
5879         * decl.c (duplicate_decls):  Overwrite the RTL when (and only
5880         when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
5881         but follow the SET_DECL_RTL idiom used elsewhere in the function.
5882
5883 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
5884
5885         * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
5886         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
5887         * decl.c (grokdeclarator): Update.
5888         * mangle.c (write_integer_cst): Update.
5889         * typeck.c (build_binary_op): Update.
5890
5891 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
5892
5893         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
5894         * lex.c (cxx_init): Don't set hook.
5895
5896 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
5897
5898         * Make-lang.in (error.o): Update.
5899         * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
5900         * cp-tree.h (struct diagnostic_context): Predeclare.
5901         (cxx_print_error_function): New.
5902         * error.c: Include langhooks-def.h.
5903         (lang_print_error_function): Rename.  Update.
5904         (init_error): Don't set hook.
5905
5906 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
5907
5908         * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
5909         Redefine.
5910         * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
5911         * decl.c (finish_enum): Similarly.
5912         * error.c (dump_type): Similarly.
5913         * lex.c (cxx_init): Similarly.
5914         * mangle.c (write_builtin_type): Similarly.
5915         * typeck.c (comptypes): Similarly.
5916
5917 2002-03-28  Roger Sayle  <roger@eyesopen.com>
5918
5919         PR c++/5998:
5920         * decl.c (cxx_init_decl_processing): Re-enable built-in functions
5921         in the g++ front-end.
5922         (duplicate_decl): Allow redefinition of anticipated built-ins.
5923         Fix inlining problem by over-writing the old DECL_RTL.
5924         (lookup_namespace_name): Fail to find an identifier in the
5925         specified namespace if its still anticipated.
5926         (builtin_function_1): New function split out from builtin_function
5927         to create a builtin in the current namespace with given context.
5928         (builtin_function): Call builtin_function_1 to define the
5929         appropriate builtins in both the std and global namespaces.
5930         (select_decl): Don't test for anticipated decls here.
5931         (unqualified_namespace_lookup): Instead ignore them whilst
5932         searching through scopes and namespaces.
5933         * decl2.c (do_nonmember_using_decl): If a using declaration
5934         specifies an anticipated built-in function, mark it as no longer
5935         anticipated in that scope.
5936         (ambiguous_decl):  Avoid resolving to an anticipated decl.
5937         * lex.c (do_scoped_id): Fail to find an identifier in the global
5938         namespace if its still anticipated.
5939
5940 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
5941
5942         * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
5943         * cp-tree.h (cp_make_lang_type): Rename.
5944         * lex.c (cp_make_lang_type): Rename.
5945         (make_aggr_type): Update.
5946         * tree.c (init_tree): Don't set make_lang_type_fn.
5947
5948 2002-03-29  Jakub Jelinek  <jakub@redhat.com>
5949
5950         PR c++/6073
5951         * class.c (finish_struct_1): Update static field's DECL_MODE even
5952         if its type is a variant of t.
5953
5954 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
5955
5956         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
5957         * cp-tree.h (cxx_insert_default_attributes): New.
5958         * decl.c (insert_default_attributes): Rename.
5959
5960 2002-03-27  Mark Mitchell  <mark@codesourcery.com>
5961
5962         PR c++/4884
5963         * call.c (build_op_delete_call): Allow for the fact the placement
5964         may be a COMPOUND_EXPR.
5965
5966 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
5967
5968         * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
5969         * cp-tree.h (init_cplus_expand): Remove.
5970         (cxx_expand_expr): New.
5971         * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
5972         fix prototype.
5973         (init_cplus_expand): Remove.
5974         * lex.c (cxx_init): Don't call init_cplus_expand.
5975
5976 2002-03-26  Mark Mitchell  <mark@codesourcery.com>
5977
5978         PR c++/4884.
5979         * init.c (build_new_1): Allow for the fact the result of
5980         build_function_call may be a COMPOUND_EXPR.
5981
5982 2002-03-26  Nathan Sidwell  <nathan@codesourcery.com>
5983
5984         PR c++/5682
5985         * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
5986         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
5987         (dfs_skip_nonprimary_vbases_markedp): Remove.
5988         * search.c (get_shared_vbase_if_not_primary): Remove.
5989         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
5990         (dfs_skip_nonprimary_vbases_markedp): Remove.
5991         (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
5992         (dfs_marked_real_bases_queue_p): Likewise.
5993
5994 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
5995
5996         * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
5997         * cp-tree.h (cxx_mark_tree): New.
5998         * decl.c (lang_mark_tree): Rename cxx_mark_tree.
5999
6000 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
6001
6002         * cp-tree.h (cxx_maybe_build_cleanup): New.
6003         * decl.c (destroy_local_var, hack_incomplete_structures): Update.
6004         (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
6005         * tree.c (build_target_expr): Update.
6006         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
6007
6008 2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
6009
6010         * decl2.c (cxx_decode_option): Handle -E.
6011         * lang-specs.h (default_compilers): Preprocess with cc1plus.
6012         * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
6013
6014 2002-03-23  Jakub Jelinek  <jakub@redhat.com>
6015
6016         PR c++/6037
6017         * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
6018
6019 2002-03-23  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
6020
6021         * error.c (dump_type): Be careful about implicit typenames.
6022
6023 2002-03-21  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
6024
6025         PR C++/3656
6026         * semantics.c (finish_base_specifier): Handle erronous base
6027         classes.
6028
6029 2002-03-22  Zack Weinberg  <zack@codesourcery.com>
6030
6031         * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
6032         REAL_IS_NOT_DOUBLE.
6033
6034 2002-03-22  Jeff Knaggs  <jknaggs@redhat.com>
6035
6036         * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
6037         an index into the vtable_entry array regardless of
6038         TARGET_PTRMEMFUNC_VBIT_LOCATION.
6039
6040 2002-03-21  Aldy Hernandez  <aldyh@redhat.com>
6041
6042         * tree.c (cp_cannot_inline_tree_fn): Same.
6043
6044 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
6045
6046         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
6047         insert_block, getdecls, global_bindings_p): New.
6048
6049 2002-03-20  Nathan Sidwell  <nathan@codesourcery.com>
6050
6051         PR c++/4361
6052         * mangle.c (struct globals) Add internal_mangling_p member.
6053         (write_template_param): Do internal mangling, if needed.
6054         (mangle_conv_op_name_for_type): Request internal mangling.
6055
6056 2002-03-20  Jason Merrill  <jason@redhat.com>
6057
6058         PR c++/2136
6059         * init.c (build_delete): Check access for a member op delete here.
6060         * decl2.c (delete_sanity): Not here.
6061
6062 2002-03-19  Jason Merrill  <jason@redhat.com>
6063
6064         PR c++/5118
6065         * class.c (get_vfield_name): Use the constructor_name.
6066
6067 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
6068
6069         * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
6070         * cp-tree.h (lang_printable_name): Rename.
6071         * error.c (lang_decl_name): Use new hook.
6072         * lex.c (cxx_init): Remove old hook.
6073         * pt.c (tsubst_decl): Use new hook.
6074         * tree.c (lang_printable_name): Rename.
6075
6076 2002-03-18  Eric Botcazou  <ebotcazou@multimania.com>
6077
6078         PR c++/3882
6079         * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
6080         (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
6081         only after recording the declaration.
6082
6083 2002-03-18  Jason Merrill  <jason@redhat.com>
6084
6085         PR c++/2039
6086         * init.c (resolve_offset_ref): Hand off to build_component_ref.
6087
6088         PR c++/4222, c++/5995
6089         * call.c (build_over_call): Fix empty class logic.
6090
6091         PR c++/3870
6092         * cp-tree.h (struct saved_scope): Add last_parms field.
6093         * decl.c (maybe_push_to_top_level): Save last_function_parms.
6094         (pop_from_top_level): Restore it.
6095
6096         PR c++/4377
6097         * mangle.c (write_expression): Strip NOP_EXPRs sooner.  Also strip
6098         NON_LVALUE_EXPRs.
6099
6100         PR c++/4003
6101         * pt.c (tsubst_friend_function): Use decl_namespace_context.
6102
6103         PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
6104         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
6105         type with a nontrivial destructor.
6106
6107 2002-03-17  Jason Merrill  <jason@redhat.com>
6108
6109         PR c++/4460
6110         * class.c (build_base_path): Virtual base layout is fixed in
6111         in-charge [cd]tors.
6112
6113 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
6114
6115         * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
6116         * parse.y (yyparse): Remove macro.
6117
6118 2002-03-17  Jason Merrill  <jason@redhat.com>
6119
6120         PR c++/5757
6121         * init.c (build_new_1): Pass the right pointer to op delete.
6122
6123 2002-03-16  Nathan Sidwell  <nathan@codesourcery.com>
6124
6125         PR c++/4361
6126         * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
6127         conversion operators go.
6128         (struct lang_decl_flags): Add template_conv_p and unused
6129         bitfields.
6130         (DECL_TEMPLATE_CONV_FN_P): New macro.
6131         * call.c (build_user_type_conversion_1): Don't check second type
6132         conversion of overload set first.
6133         * class.c (add_method): Make sure templated conversion operators
6134         all end up on slot 2.
6135         * lex.c (do_identifier): A conversion operator token might be
6136         satisfied by a templated conversion operator.
6137         * pt.c (check_explicit_specialization): Use
6138         CLASSTYPE_FIRST_CONVERSION_SLOT.
6139         (template_parm_this_level_p): New function.
6140         (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
6141         * search.c (lookup_fnfields_1): Template conversions will be on
6142         the first slot.
6143         * typeck.c (build_component_ref): Preserve the type of an
6144         conversion operator name on the overload type.
6145         (build_x_function_call): Retrieve the conversion operator name.
6146
6147 2002-03-15  Richard Henderson  <rth@redhat.com>
6148
6149         * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
6150
6151 2002-03-15  Mark Mitchell  <mark@codesourcery.com>
6152
6153         * cp-tree.h (CLEANUP_DECL): Remove.
6154         (CLEANUP_EXPR): Likewise.
6155         * decl.c (destroy_local_var): Simplify.
6156         (maybe_build_cleanup): Tidy.
6157         * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
6158         * semantics.c (cp_expand_stmt): Likewise.
6159         * cp/tree.c (cp_statement_code_p): Likewise.
6160
6161 2002-03-15  Jason Merrill  <jason@redhat.com>
6162
6163         PR c++/5857
6164         * decl.c (duplicate_decls): Use merge_types instead of common_type.
6165         * typeck.c (common_type): Just hand off to
6166         type_after_usual_arithmetic_conversions and
6167         composite_pointer_type.
6168         (merge_types): New fn.
6169         (commonparms): Use it instead of common_type.
6170         (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
6171         (composite_pointer_type): Also handle attributes.
6172         * cp-tree.h: Declare merge_types.
6173
6174         * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
6175         variables.
6176         * decl2.c (maybe_make_one_only): Also mark the decl as needed.
6177
6178 2002-03-14  Richard Henderson  <rth@redhat.com>
6179
6180         * decl.c: Include c-pragma.h.
6181         (start_decl, start_function): Invoke maybe_apply_pragma_weak.
6182         * Make-lang.in: Update dependencies.
6183
6184 2002-03-14  Jakub Jelinek  <jakub@redhat.com>
6185
6186         PR c++/5908
6187         * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
6188         * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
6189
6190 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
6191
6192         * mangle.c (write_builtin_type): Handle 128-bit integers even if
6193         they are not a standard integer type.
6194
6195 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
6196
6197         * cp-tree.h (init_init_processing): Remove declaration.
6198         * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
6199         * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
6200
6201 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6202
6203         * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
6204         Define.
6205         * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
6206         tree_code_length.
6207         * lex.c (cplus_tree_code_type, cplus_tree_code_length,
6208         cplus_tree_code_name): Delete.
6209         (cxx_init): Don't call add_c_tree_codes, instead set
6210         lang_unsafe_for_reeval.  Don't try to copy into the various
6211         tree_code arrays.
6212
6213 2002-03-12  Nathan Sidwell  <nathan@codesourcery.com>
6214
6215         PR c++/5659
6216         * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
6217         * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
6218         definitions.
6219
6220 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
6221
6222         Revert 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>,
6223         DR209 is now not a defect.
6224         * cp-tree.h (skip_type_access_control): Remove.
6225         * decl.c (grokdeclarator): Do type access control for friend
6226         declarations.
6227         * semantics.c (decl_type_access_control): Don't reset
6228         current_type_lookups.
6229         (save_type_access_control): Always save the lookups.
6230         (skip_type_access_control): Remove.
6231         (finish_class_definition): Don't change type_lookups.
6232
6233 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
6234
6235         Revert 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>,
6236         It is incorrect.
6237         * typeck.c (build_static_cast): Compare non-qualified types
6238         with pointer to member conversions.
6239
6240 2002-03-11  Dan Nicolaescu  <dann@ics.uci.edu>
6241             Daniel Berlin  <dan@dberlin.org>
6242
6243         * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
6244         (cxx_get_alias_set): Use it.
6245
6246 2002-03-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6247
6248         * cp-tree.h (stabilize_expr): Prototype.
6249
6250 2002-03-08  Craig Rodrigues  <rodrigc@gcc.gnu.org>
6251
6252         * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
6253         conditional return void.
6254
6255 2002-03-08  Neil Booth  <neil@daikokuya.demon.co.uk>
6256
6257         * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
6258         * cp-tree.h (cxx_unsave): New.
6259         * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
6260         (init_tree): Update.
6261
6262 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6263
6264         * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
6265         explicit sizeof/sizeof.
6266         * decl2.c (cxx_decode_option): Likewise.
6267         * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
6268
6269 2002-03-02  Nathan Sidwell  <nathan@codesourcery.com>
6270
6271         PR c++/775
6272         * decl.c (lookup_tag): Only reject enum/class mismatch, not
6273         class/union mismatch.
6274         * parse.y (check_class_key): New function.
6275         (structsp): Call it.
6276
6277 2002-03-01  Michael Matz  <matz@suse.de>
6278
6279         * typeck.c (cp_pointer_int_sum): Complete inner type which is
6280         used later by size_in_bytes().
6281
6282 2002-03-01  Phil Edwards  <pme@gcc.gnu.org>
6283
6284         * cp-tree.h:  Require __GNUC__ to be #defined.
6285         (build_init):  Add missing prototype.
6286
6287 2002-03-01  Jason Merrill  <jason@redhat.com>
6288
6289         * except.c: Don't include decl.h or obstack.h.  Do include
6290         tree-inline.h.
6291         (build_throw): Destroy temporaries from the thrown
6292         expression before calling __cxa_throw.  Construct a thrown
6293         temporary directly into the exception object.
6294         (stabilize_throw_expr): New function.
6295         (wrap_cleanups_r): New function.
6296         * tree.c (stabilize_expr): New function.
6297         * init.c (build_init): New function.
6298         * Make-lang.in (cp/except.o): Adjust .h deps.
6299
6300 2002-02-28  Jason Merrill  <jason@redhat.com>
6301
6302         * search.c (lookup_base_r): Don't clear is_non_public just because
6303         we found a friendly scope.
6304
6305         * decl.c (finish_function): Only warn about missing return
6306         statement with -Wreturn-type.
6307
6308 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
6309
6310         * class.c (build_clone): Update.
6311         * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
6312         * cp-tree.h (cxx_dup_lang_specific_decl): New.
6313         * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
6314         (copy_decl): Update.
6315         * method.c (make_thunk): Update.
6316
6317 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
6318
6319         * decl2.c: Delete traditional-mode-related code copied from
6320         the C front end but not used, or used only to permit the
6321         compiler to link.
6322
6323 2002-02-24 Craig Rodrigues  <rodrigc@gcc.gnu.org>
6324
6325         PR c++/4093
6326         * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
6327         to void.
6328
6329 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
6330
6331         PR other/5746
6332         * semantics.c (finish_switch_cond): Don't call get_unwidened
6333         if error_mark_node.
6334
6335 2002-02-22  Nathan Sidwell  <nathan@codesourcery.com>
6336
6337         PR c++/2645, DR 295
6338         * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
6339         tf_keep_type_decl.
6340         (make_typename_type): Use tsubst_flags_t.
6341         * decl.c (make_typename_type): Adjust. Return non-artificial
6342         TYPE_DECLs, if required.
6343         (grokdeclarator): Simplify CVR qualification handling. Allow bad
6344         qualifiers on typedef types.
6345         * decl2.c (handle_class_head): Adjust make_typename_type call.
6346         * parse.y (nested_name_specifier): Likewise.
6347         (typename_sub0): Likewise.
6348         (typename_sub1): Likewise.
6349         * pt.c (convert_template_argument): Adjust make_typename_type
6350         return value.
6351         (tsubst): Adjust cp_build_qualified_type_real calls.
6352         (check_cv_quals_for_unify): Cope with allowing bad qualifications
6353         on template type parms.
6354         (instantiate_decl): Recheck substitutions to give warnings on bad
6355         qualifications.
6356         * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
6357
6358 2002-02-21  Aldy Hernandez  <aldyh@redhat.com>
6359
6360         * cp/decl.c (duplicate_decls): Merge always_inline attribute.
6361
6362         * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
6363         unless DECL_ALWAYS_INLINE.
6364
6365 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
6366
6367         * typeck.c (cp_pointer_int_sum): Renamed from
6368         pointer_int_sum, call pointer_int_sum.
6369
6370 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
6371
6372         * decl.c (duplicate_decls): Return 0 if issued error about
6373         redeclaration.
6374
6375 2002-02-19  Jason Merrill  <jason@redhat.com>
6376
6377         ABI change: Mangle `void (A::*)() const' as
6378         M1AKFvvE, not MK1AFvvE.
6379         * mangle.c (write_function_type): Write cv-quals for member
6380         function type here.
6381         (write_pointer_to_member_type): Not here.
6382
6383 2002-02-18  Jason Merrill  <jason@redhat.com>
6384
6385         * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
6386         (do_decl_instantiation): Likewise.
6387
6388 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
6389
6390         PR c++/5685
6391         * decl.c (duplicate_decls): Make warning unconditional
6392         if duplicate default argument declarations are present.
6393
6394 2002-02-17  Jakub Jelinek  <jakub@redhat.com>
6395
6396         * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
6397         shortening.
6398
6399 2002-02-15  Nathan Sidwell  <nathan@codesourcery.com>
6400
6401         * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
6402         remove incorrect comment. Move #if 0'd code to common path. Use
6403         IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
6404
6405 2002-02-13  Jason Merrill  <jason@redhat.com>
6406
6407         * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
6408         (finish_function): Don't warn if current_function_returns_null.
6409
6410         * typeck2.c (digest_init): Do handle values of vector type.
6411
6412         * typeck2.c (digest_init, process_init_constructor): Treat vectors
6413         like arrays.
6414
6415 2002-02-11  Jason Merrill  <jason@redhat.com>
6416
6417         * parse.y (reserved_declspecs): Don't handle attributes.
6418         (reserved_typespecquals): Handle them here.
6419         * Make-lang.in (parse.c): Adjust expected conflicts.
6420
6421 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
6422
6423         * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
6424         instead of compstmt.
6425         (compstmt_or_stmtexpr): Renamed from compstmt.
6426         (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
6427
6428 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
6429
6430         Rename instantiate_type_flags to tsubst_flags_t & expand use.
6431         * cp-tree.h (instantiate_type_flags): Rename to ...
6432         (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
6433         add tf_warning flag.
6434         (instantiate_type): Adjust prototype.
6435         (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
6436         do_type_instantiation, cp_build_qualified_type_real): Likewise.
6437         cp_build_qualified_type: Adjust.
6438         * class.c (instantiate_type): Adjust parameter. Rename itf_* to
6439         tf_*.
6440         * call.c (standard_conversion): Rename itf_* to tf_*.
6441         (reference_binding): Likewise.
6442         (convert_like_real): Likewise.
6443         * cvt.c (cp_convert_to_pointer): Likewise.
6444         (convert_to_reference): Likewise.
6445         * decl.c (lookup_namespace_name): Use tf_* flags.
6446         (make_typename_type): Likewise.
6447         (grokdeclarator): Likewise.
6448         * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
6449         (coerce_template_template_parms, convert_template_argument,
6450         coerce_template_parms, maybe_get_template_decl_from_type_decl,
6451         lookup_template_class, tsubst_friend_function, tsubst_friend_class,
6452         instantiate_class_template, tsubst_template_arg_vector,
6453         tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
6454         tsubst_decl, tsubst_arg_types, tsubst_function_type,
6455         tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
6456         instantiate_template, fn_type_unification,
6457         resolve_overloaded_unification, verify_class_unification,
6458         unify, get_bindings_real, do_type_instantiation,
6459         regenerate_decl_from_template, instantiate_decl,
6460         tsubst_initializer_list, tsubst_enum,
6461         get_mostly_instantiated_function_type,
6462         invalid_nontype_parm_type_p): Likewise.
6463         * tree.c (cp_build_qualified_type_real): Likewise.
6464         * typeck.c (build_binary_op): Rename itf_* to tf_*.
6465         (build_ptrmemfunc): Likewise.
6466         (convert_for_assignment): Likewise.
6467
6468 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
6469
6470         PR c++/109
6471         * decl.c (grokdeclarator): Allow friend declarations from
6472         dependent types.
6473         * decl2.c (handle_class_head): Don't push into template parm contexts.
6474         * pt.c (push_template_decl_real): Template parm contexts are never
6475         being defined.
6476
6477 2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
6478
6479         * class.c: Include target.h.
6480         (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
6481         BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
6482         bit-field layout.
6483         * Make-lang.in: Adjust deps.
6484
6485 2002-02-05  Jason Merrill  <jason@redhat.com>
6486
6487         * error.c (dump_type): Be more helpful about VECTOR_TYPE.
6488
6489 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
6490
6491         * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
6492         (finish_switch_cond): Set SWITCH_TYPE.
6493
6494 2002-02-04  Richard Henderson  <rth@redhat.com>
6495
6496         * method.c (use_thunk): Always initialize the block tree.  Reindent.
6497         * semantics.c (expand_body): Emit thunks after function, not before.
6498
6499 2002-02-04  Jason Merrill  <jason@redhat.com>
6500
6501         * decl.c (start_function): Call cplus_decl_attributes immediately
6502         after grokdeclarator.
6503
6504         * decl.c (start_function): Combine DECL_RESULT handling code.
6505
6506 2002-02-03  Jason Merrill  <jason@redhat.com>
6507
6508         * xref.c: Remove.
6509         * Make-lang.in (CXX_OBJS): Remove cp/xref.o
6510         (cp/xref.o): Remove dependencies.
6511         * class.c (finish_struct_1, check_methods): Don't call xref fns.
6512         (finish_struct_1): Likewise.
6513         * friend.c (make_friend_class): Likewise.
6514         * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
6515         * spew.c (read_process_identifier): Likewise.
6516
6517 2002-02-01  Jason Merrill  <jason@redhat.com>
6518
6519         PR c++/4872
6520         * decl.c (finish_function): Warn about a non-void function with
6521         no return statement and no abnormal exit.
6522         * cp-tree.h (struct cp_language_function): Add returns_abnormally.
6523         (current_function_returns_abnormally): New macro.
6524         * call.c (build_call): Set it.
6525
6526         * typeck.c (build_component_ref): Always complain about offsetof
6527         constructs on non-PODs.  Only make it an error for members of
6528         virtual bases.
6529
6530         * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
6531         (dump_function_decl): Always dump parms.
6532
6533         * decl2.c (finish_static_data_member_decl): Complain about a local
6534         class with a static data member.
6535
6536         PR c++/4286
6537         * search.c (lookup_field_1): Don't xref a static data member
6538         just because we looked it up.
6539
6540 2002-01-31  Jason Merrill  <jason@redhat.com>
6541
6542         * Make-lang.in (parse.c): Handle .output file.
6543
6544         PR c++/3395
6545         * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
6546         not TREE_TYPE.
6547         * semantics.c (finish_class_definition): Adjust.
6548
6549         Allow attributes in parms and casts.
6550         * parse.y (named_parm): Don't strip attrs.
6551         (declmods): Remove 'attributes' production.
6552         (nonempty_cv_qualifiers): Accept attributes.
6553         (ATTRIBUTE): Give precedence.
6554         * decl.c (groktypename): Handle attributes.
6555         (grokparms): Likewise.
6556
6557 2002-01-29  Jakub Jelinek  <jakub@redhat.com>
6558
6559         * decl2.c (cxx_decode_option): Pass 0 as last argument to
6560         cpp_handle_option.
6561         * lang-specs.h: Use cpp_unique_options instead of cpp_options
6562         when used together with cc1_options.
6563
6564 2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
6565
6566         PR c++/5132
6567         * typeck2.c (digest_init): Make sure non-array core type is
6568         instantiated.
6569         * decl2.c (reparse_absdcl_as_casts): Just store the type in the
6570         constructor, rather than build a new one.
6571         (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
6572         PURPOSE of constructor elts.
6573
6574 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
6575
6576         * Make-lang.in (parse.c): Adjust expected number of
6577         shift-reduce conflicts.
6578         (decl.o): Depend on diagnostic.h.
6579         * decl.c: Include diagnostic.h.
6580         (grokdeclarator): Check for null pointer.
6581         (finish_function): Don't abort when
6582         current_binding_level->parm_flag != 1, if errors have
6583         occurred; throw away the statement tree and extra binding
6584         levels, and continue.
6585         * lex.c (note_list_got_semicolon): Check for null pointer.
6586         * method.c (hack_identifier): Just return error_mark_node if
6587         value is error_mark_node.
6588         * parse.y (primary: TYPEID(type_id)): No need to use
6589         TYPE_MAIN_VARIANT here.
6590         (handler_seq): Accept an empty list of catch clauses and
6591         generate a fake handler block to avoid later crashes.
6592         (ansi_raise_identifier): Accept the error token too.
6593         * semantics.c (begin_class_definition,
6594         finish_class_definition): Check for error_mark_node.
6595
6596 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
6597
6598         * typeck2.c (friendly_abort): Delete definition.
6599         * cp-tree.h (friendly_abort): Don't prototype.
6600         (my_friendly_assert): Use fancy_abort.
6601
6602 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
6603
6604         * cp-tree.h (my_friendly_abort): Remove.
6605
6606 2002-01-23  Jakub Jelinek  <jakub@redhat.com>
6607
6608         * spew.c (pending_inlines, pending_inlines_tail,
6609         processing_these_inlines): Make static.
6610         (mark_pending_inlines): Remove static.
6611         (begin_parsing_inclass_inline): If in function, save pi
6612         for GC to cp_function_chain->unparsed_inlines instead.
6613         (process_next_inline): Likewise.
6614         * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
6615         (mark_pending_inlines): Add prototype.
6616         * decl.c (spew_debug): Remove unused extern.
6617         (mark_lang_function): Call mark_pending_inlines.
6618
6619 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
6620
6621         * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
6622         init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
6623         semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
6624         Change my_fancy_abort() to abort().
6625
6626 2002-01-23  Jason Merrill  <jason@redhat.com>
6627
6628         PR c++/5453
6629         * class.c (fixed_type_or_null): Fix thinko.
6630
6631         PR c++/3331
6632         * init.c (resolve_offset_ref): Use build_indirect_ref.
6633
6634         * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
6635
6636 2002-01-22  Jason Merrill  <jason@redhat.com>
6637
6638         * parse.y (function_body): Suppress the block for the outermost
6639         curly braces.
6640         * decl.c (pushdecl): Don't try to skip it.
6641         (begin_function_body): Keep the block we create, not the next one.
6642         * init.c (emit_base_init): Don't mess with keep_next_level.
6643
6644         * class.c (build_base_path): Tweak formatting.
6645
6646 2002-01-19  Nathan Sidwell  <nathan@codesourcery.com>
6647
6648         Fix regression introduced with patch for c++/775
6649         * parse.y (class_head_defn): Check for template specializations
6650         with a different class-key.
6651
6652 2002-01-17  Jason Merrill  <jason@redhat.com>
6653
6654         * decl.c (begin_constructor_body, begin_destructor_body): New fns.
6655         (begin_function_body): Call them and keep_next_level.
6656         * init.c (emit_base_init): Call keep_next_level.
6657         * semantics.c (setup_vtbl_ptr): Lose.
6658         * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
6659         (vtbls_set_up_p): Lose.
6660         * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
6661         * method.c (do_build_copy_constructor): Likewise.
6662         (synthesize_method): Call finish_mem_initializers.
6663         * parse.y (nodecls): Likewise.
6664
6665         * error.c (dump_type_suffix): Print the exception specs before
6666         recursing.
6667         (dump_function_decl): Here, too.
6668
6669         * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
6670
6671 2002-01-10  Ira Ruben   <ira@apple.com>
6672
6673         PR c++/907
6674         * decl.c (start_method): Handle attrlist.
6675
6676 2002-01-10  Jakub Jelinek  <jakub@redhat.com>
6677
6678         * decl2.c (max_tinst_depth): Increase default limit to 500.
6679
6680 2002-01-10  Graham Stott  <grahams@redhat.com>
6681
6682         * spew.c (YYCHAR): Uppercase macro parameter and add
6683         parenthesis.
6684         (YYCODE): Likewise.
6685         (NAME): Uppercase macro parameter.
6686
6687 2002-01-09  Graham Stott  <grahams@redhat.com>
6688
6689         * decl.h (grokdeclarator): Wrap long line.
6690
6691         * semantics.c (FINISH_COND): Uppercase macro paramaters and
6692         add parenthesis.
6693
6694 2002-01-08  Graham Stott  <grahams@redhat.com>
6695
6696         * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
6697         (PALLOC): Uppercase macro parameter and whitespace.
6698         (SALLOC): Uppercase macro parameter.
6699         (SFREE): Uppercase macros parameter, add parenthese and
6700         whitespace.
6701         (STREQL): Uppercase macro parameter and whitespace.
6702         (STRNEQ): Likewise.
6703         (STRLSS): Likewise.
6704         (STRLEQ): Likewise.
6705         (STRGTR): Likewise.
6706         (STRGEQ): Likewise.
6707
6708         * call.c (convert_like): Add parenthesis and wrap.
6709         (convert_like_with_context): Likewise.
6710         (ICS_RANK): Whitespace.
6711         (NEED_TEMPORARY_P): Remove parenthesis.
6712
6713         * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
6714         whitespace.
6715         (VTT_MARKED_BINFO_P): Likewise.
6716
6717         * decl.c (BINDING_LEVEL): Add parenthesis.
6718         (DEF_OPERATOR): Likewise.
6719
6720         * mangle.c (MANGLE_TRACE): Add parenthesis.
6721         (MANGLE_TRACE_TREE): Likewise.
6722         (write_signed_number): Likewise.
6723         (write_unsigned_number): Likewise.
6724
6725         * pt.c (ccat): Uppercase macro parameter.
6726         (cat): Likewise
6727
6728         * search.c (SET_BINFO_ACCESS): Add parenthesis.
6729
6730 2002-01-07  Jason Merrill  <jason@redhat.com>
6731
6732         * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
6733         to pedwarn.
6734
6735         PR c++/3536
6736         * method.c (make_thunk): If !flag_weak, give the thunk the
6737         function's linkage.
6738         (use_thunk): Here, too.
6739
6740 2002-01-07  Graham Stott  <grahams@redhat.com>
6741
6742         * error.c: Update copyright date.
6743         (print_scope_operator): Add parenthesis.
6744         (print_left_paren): Likewise.
6745         (print_right_paren): Likewise.
6746         (print_left_bracket): Likewise.
6747         (print_right_bracket): Likewise.
6748         (print_template_argument_list_start): Likewise.
6749         (print_template_argument_list_end): Likewise.
6750         (print_non_consecutive_character): Likewise.
6751         (print_tree_identifier): Likewise.
6752         (print_identifier): Likewise.
6753         (NEXT_CODE): Uppercase macro parameter.
6754         (ident_fndecl): Delete unused.
6755         (GLOBAL_THING): Likewise.
6756
6757 2002-01-06  Graham Stott  <grahams@redhat.com>
6758
6759         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
6760         (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
6761         (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
6762         (RECORD_OR_UNION_TYPE_CHECK): Likewise.
6763         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
6764         (C_IS_RESERVED_WORD): Uppercase macro parameter.
6765         (C_RID_YYCODE) Likewise.
6766         (ptrmem_cst): Use rtx.
6767         (LOCAL_BINDING_P): Add whitespace.
6768         (INHERITED_VALUE_BINDING_P): Likewise.
6769         (BINDING_SCOPE): Wrap long line.
6770         (BINDING_HAS_LEVEL_P): Remove parenthesis.
6771         (BINDING_VALUE): Wrap long line.
6772         (BINDING_TYPE): Whitespace.
6773         (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
6774         (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
6775         (IDENTIFIER_NAMESPACE_VALUE): Likewise.
6776         (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
6777         (same_type_p): Uppercase macro parameters.
6778         (same_type_ignoring_top_level_qualifiers_p): Likewise.
6779         (OVL_FUNCTION): Wrap long line.
6780         (OVL_CHAIN): Whitespace.
6781         (OVL_CURRENT): Add parenthesis and whitespace.
6782         (OVL_NEXT): Whitespace.
6783         (OVL_USED): Likewise.
6784         (IDENTIFIER_TYPE_VALUE): Likewise.
6785         (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
6786         (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
6787         (LANG_ID_FIELD): Whitespace.
6788         (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
6789         (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
6790         (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
6791         (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
6792         (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
6793         (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
6794         (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
6795         (IDENTIFIER_VIRTUAL_P): Likewise.
6796         (IDENTIFIER_OPNAME_P): Likewise.
6797         (IDENTIFIER_TYPENAME_P): Remove parenthesis.
6798         (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
6799         (C_SET_EXP_ORIGINAL_CODE): Likewise.
6800         (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
6801         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
6802         (IS_AGGR_TYPE): Uppercase macro parameter.
6803         (CLASS_TYPE_P): Likewise.
6804         (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
6805         (IS_AGGR_TYPE_2): Whitespace.
6806         (TAGGED_TYPE_P): Uppercase macro parameter.
6807         (TYPE_BUILT_IN): Whitespace.
6808         (TYPE_FOR_JAVA): Likewise.
6809         (FUNCTION_ARG_CHAIN): Remove parenthesis.
6810         (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
6811         (FUNCTION_FIRST_USER_PARAM): Likewise.
6812         (PROMOTES_TO_AGGR_TYPE): Whitespace.
6813         (DERIVED_FROM_P): Add parenthesis and wrap.
6814         (UNIQUELY_DERIVED_FROM_P): Likewise.
6815         (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
6816         (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
6817         (CLASSTYPE_USE_TEMPLATE): Whitespace.
6818         (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
6819         (TYPE_GETS_DELETE): Add parenthesis.
6820         (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
6821         (TYPE_HAS_ASSIGN_REF): Likewise,
6822         (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
6823         (TYPE_HAS_INIT_REF): Likewise.
6824         (TYPE_HAS_CONST_INIT_REF): Likewise.
6825         (TYPE_BEING_DEFINED): Likewise.
6826         (TYPE_LANG_SPECIFIC): Likewise.
6827         (CLASSTYPE_RTTI): Likewise.
6828         (TYPE_OVERLOADS_CALL_EXPR): Likewise.
6829         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
6830         (TYPE_OVERLOADS_ARROW): Likewise.
6831         (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
6832         (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
6833         (CLASSTYPE_METHOD_VEC): Likewise.
6834         (CLASSTYPE_MARKED_N): Likewise.
6835         (CLASSTYPE_MARKED): Likewise.
6836         (CLASSTYPE_MARKED2): Likewise.
6837         (CLASSTYPE_MARKED3): Likewise.
6838         (CLASSTYPE_MARKED4): Likewise.
6839         (CLASSTYPE_MARKED5): Likewise.
6840         (CLASSTYPE_MARKED6): Likewise.
6841         (SET_CLASSTYPE_MARKED): Whitespace.
6842         (CLEAR_CLASSTYPE_MARKED): Likewise.
6843         (SET_CLASSTYPE_MARKED2): Likewise.
6844         (CLEAR_CLASSTYPE_MARKED2): Likewise.
6845         (SET_CLASSTYPE_MARKED3): Likewise.
6846         (CLEAR_CLASSTYPE_MARKED3): Likewise.
6847         (SET_CLASSTYPE_MARKED4): Likewise.
6848         (CLEAR_CLASSTYPE_MARKED4): Likewise.
6849         (SET_CLASSTYPE_MARKED5): Likewise.
6850         (CLEAR_CLASSTYPE_MARKED5): Likewise.
6851         (SET_CLASSTYPE_MARKED6): Likewise.
6852         (CLEAR_CLASSTYPE_MARKED6): Likewise.
6853         (CLASSTYPE_TAGS): Likewise.
6854         (CLASSTYPE_VSIZE): Likewise.
6855         (CLASSTYPE_VBASECLASSES): Likewise.
6856         (CANONICAL_BINFO): Add parenthesis.
6857         (CLASSTYPE_SIZE(NODE): Likewise.
6858         (CLASSTYPE_SIZE_UNIT): Likewise.
6859         (CLASSTYPE_ALIGN(NODE): Likewise.
6860         (CLASSTYPE_USER_ALIGN): Likewise.
6861         (TYPE_JAVA_INTERFACE): Likewise.
6862         (CLASSTYPE_PURE_VIRTUALS): Likewise.
6863         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
6864         (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
6865         (CLASSTYPE_HAS_MUTABLE): Likewise.
6866         (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
6867         (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
6868         (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
6869         (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
6870         (CLASSTYPE_INTERFACE_ONLY): Likewise.
6871         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
6872         (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
6873         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
6874         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
6875         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
6876         (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
6877         (BINFO_UNSHARED_MARKED): Whitespace.
6878         (BINFO_MARKED): Whitespace and wrap.
6879         (SET_BINFO_MARKED): Likewise.
6880         (CLEAR_BINFO_MARKED): Likewise.
6881         (BINFO_VTABLE_PATH_MARKED): Likewise.
6882         (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
6883         (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
6884         (BINFO_SUBVTT_INDEX): Remove parenthesis.
6885         (BINFO_VPTR_INDEX): Likewise.
6886         (BINFO_PRIMARY_BASE_OF): Likewise,
6887         (CLASSTYPE_VFIELDS): Whitespace.
6888         (VF_DERIVED_VALUE): Wrap long line.
6889         (NAMESPACE_LEVEL): Whitespace.
6890         (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
6891         (DEFARG_POINTER): Whitespace.
6892         (DECL_NEEDED_P): Remove parenthesis.
6893         (DECL_LANGUAGE): Whitespace.
6894         (SET_DECL_LANGUAGE): Add parenthesis.
6895         (DECL_CONSTRUCTOR_P): Whitespace and wrap.
6896         (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
6897         (DECL_IN_AGGR_P): Whitespace.
6898         (DECL_FRIEND_P): Likewise.
6899         (DECL_BEFRIENDING_CLASSES): Likewise.
6900         (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
6901         (DECL_NONCONVERTING_P): Whitespace.
6902         (DECL_PURE_VIRTUAL_P): Likewise.
6903         (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
6904         (DECL_PENDING_INLINE_INFO): Whitespace.
6905         (DECL_SORTED_FIELDS): Likewise.
6906         (DECL_DEFERRED_FN): Likewise.
6907         (DECL_TEMPLATE_INFO): Likewise.
6908         (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
6909         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
6910         (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
6911         (TMPL_ARGS_LEVEL): Likewise.
6912         (SET_TMPL_ARGS_LEVEL): Likewise.
6913         (INNERMOST_TEMPLATE_PARMS): Whitespace.
6914         (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
6915         (INTEGRAL_CODE_P(CODE): Add parenthesis.
6916         (CP_INTEGRAL_TYPE_P): Remove parenthesis.
6917         (TYPE_HAS_CONSTRUCTOR): Whitespace.
6918         (TREE_HAS_CONSTRUCTOR): Likewise.
6919         (TYPE_HAS_DESTRUCTOR): Likewise.
6920         (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
6921         (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
6922         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
6923         (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
6924         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
6925         (TYPE_PTRMEMFUNC_P): Likewise.
6926         (TYPE_PTRMEMFUNC_FLAG): Likewise.
6927         (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
6928         (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
6929         (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
6930         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
6931         (DECL_ACCESS): Whitespace.
6932         (DECL_GLOBAL_CTOR_P): Remove parenthesis.
6933         (DECL_GLOBAL_DTOR_P): Likewise.
6934         (GLOBAL_INIT_PRIORITY): Likewise.
6935         (DECL_TEMPLATE_PARMS): Likewise.
6936         (DECL_TEMPLATE_RESULT): Likewise.
6937         (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
6938         (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
6939         (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
6940         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
6941         (PRIMARY_TEMPLATE_P): Add parenthesis.
6942         (DECL_USE_TEMPLATE): Whitespace.
6943         (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
6944         (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
6945         (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
6946         (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
6947         (CALL_DECLARATOR_PARMS): Remove parenthesis.
6948         (CALL_DECLARATOR_QUALS): Likewise.
6949         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
6950         (TEMP_NAME_P): Wrap.
6951         (VFIELD_NAME_P): Likewise.
6952         (B_SET): Uppercase macro parameters and add parenthesis.
6953         (B_CLR): Likewise.
6954         (B_TST): Likewise.
6955         (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
6956         (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
6957         (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
6958         (same_or_base_type_p): Likewise.
6959         (cp_deprecated): Likewise.
6960
6961 2002-01-05  Richard Henderson  <rth@redhat.com>
6962
6963         * semantics.c (expand_body): Revert last change.
6964
6965 2002-01-04  Jason Merrill  <jason@redhat.com>
6966
6967         PR c++/4122
6968         * class.c (update_vtable_entry_for_fn): Set delta to zero for a
6969         lost primary.
6970
6971         * class.c (build_vtbl_initializer): Check for a lost primary
6972         before calculating the vtable entry to throw away.
6973
6974 2002-01-02  Jason Merrill  <jason@redhat.com>
6975
6976         * semantics.c (expand_body): Call outlining_inline_function when
6977         emitting an inline function out of line.
6978
6979 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6980
6981         PR c++/5116, c++/764 reversion
6982         * call.c (build_new_op): Revert the instantiations. They are
6983         incorrect.
6984
6985 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6986
6987         PR c++/5089
6988         * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
6989
6990 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6991
6992         PR c++/3716
6993         * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
6994         (tsubst, case POINTER_TYPE): Handle pmfs here.
6995         (tsubst, case OFFSET_TYPE): Check it is not an offset to
6996         reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
6997
6998 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6999
7000         PR c++/35
7001         * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
7002         (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
7003         * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
7004         PARM_DECL.
7005         (tsubst_template_parms): Break up loop statements.
7006         (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
7007         parm PARM_DECLs don't get promoted.
7008
7009 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
7010
7011         PR c++/5123
7012         * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
7013         (build_x_function_call): Cope with a COMPONENT_REF containing a
7014         TEMPLATE_ID_EXPR.
7015
7016 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
7017
7018         PR c++/5213
7019         * pt.c (convert_template_argument): Be more careful determining
7020         when RECORD_TYPE templates are or are not templates.
7021
7022 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
7023
7024         PR c++/775
7025         * cp-tree.h (handle_class_head): Adjust prototype.
7026         * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
7027         parameters. Use for all class heads.
7028         * parse.y (named_class_head_sans_basetype, named_class_head,
7029         named_complex_class_head_sans_basetype,
7030         named_class_head_sans_basetype_defn,
7031         unnamed_class_head): Remove.
7032         (class_head, class_head_apparent_template): Recognize class heads
7033         (class_head_decl, class_head_defn): New reductions. Process class
7034         heads.
7035         (structsp): Adjust class definition and class declaration
7036         reductions.
7037         (maybe_base_class_list): Give diagnostic on empty list.
7038
7039 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
7040
7041         PR c++/4379
7042         * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
7043         single non-static member.
7044         (unary_complex_lvalue): If it cannot be a pointer to member, don't
7045         make it so. Check it is not pointer to reference.
7046
7047 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
7048
7049         PR c++/5132
7050         * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
7051         are processing a template decl.
7052
7053 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
7054
7055         PR c++/5116, c++/764
7056         * call.c (build_new_op): Make sure template class operands are
7057         instantiated. Simplify arglist construction.
7058
7059 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
7060
7061         * call.c (build_user_type_conversion_1): Use my_friendly_assert
7062         rather than if ... abort.
7063         * cvt.c (convert_to_reference): Likewise.
7064         * semantics.c (setup_vtbl_ptr): Likewise.
7065         * pt.c (lookup_template_class): Comment typo.
7066
7067 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
7068
7069         PR c++/5125
7070         * pt.c (push_template_decl_real): Make sure DECL has
7071         DECL_LANG_SPECIFIC.
7072
7073 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
7074
7075         PR c++/335
7076         * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
7077         for non-reference fields.
7078         * typeck.c (require_complete_type): Use resolve_offset_ref).
7079
7080 2001-12-26  Nathan Sidwell  <nathan@codesourcery.com>
7081
7082         PR c++/196
7083         * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
7084
7085 2001-12-24  Nathan Sidwell  <nathan@codesourcery.com>
7086
7087         PR c++/160
7088         * typeck.c (build_modify_expr): Remove old unreachable code & tidy
7089         up. Don't stabilize_references when initializing a reference.
7090
7091 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7092
7093         * decl2.c (lang_f_options): Const-ify.
7094
7095 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
7096
7097         * config-lang.in (diff_excludes): Remove.
7098
7099 2001-12-19  Nathan Sidwell  <nathan@codesourcery.com>
7100
7101         PR c++/90
7102         * typeck.c (build_function_call_real): Use original function
7103         expression for errors.
7104
7105 2001-12-18  Jason Merrill  <jason@redhat.com>
7106
7107         PR c++/3242
7108         * class.c (add_method): Do compare 'this' quals when trying to match a
7109         used function.  Don't defer to another used function.
7110
7111 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
7112
7113         * pt.c (instantiate_clone): Remove, fold into ...
7114         (instantiate_template): ... here. Simplify by removing mutual
7115         recursion.
7116         * typeck2.c (build_m_component_ref): Don't cv qualify the function
7117         pointed to by a pointer to function.
7118         * class.c (delete_duplicate_fields_1): Typo.
7119
7120 2001-12-18  Jason Merrill  <jason@redhat.com>
7121
7122         C++ ABI change: destroy value arguments in caller.
7123         * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
7124         create an extra binding level for the parameters.
7125         * decl.c (store_parm_decls): Don't do parameter cleanups.
7126
7127 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
7128
7129         * call.c (build_new_method_call): Use '%#V'.
7130         * error.c (cv_to_string): Use V parameter to determine padding.
7131
7132 2001-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
7133
7134         * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
7135         spellings in messages.
7136
7137 2001-12-17  Zack Weinberg  <zack@codesourcery.com>
7138
7139         * cp-tree.h: Delete #defines for cp_error, cp_warning,
7140         cp_pedwarn, and cp_compiler_error.
7141         * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
7142         except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
7143         rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
7144         typeck2.c: Change calls to the above macros to use their
7145         language-independent equivalents: error, warning, pedwarn, and
7146         internal_error respectively.
7147
7148 2001-12-16  Neil Booth  <neil@daikokuya.demon.co.uk>
7149
7150         * decl2.c (finish_file): Remove back_end_hook.
7151
7152 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
7153
7154         * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
7155         cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
7156         pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
7157
7158 2001-12-15  Joseph S. Myers  <jsm28@cam.ac.uk>
7159
7160         * lang-options.h: Use American spelling in messages.
7161
7162 2001-12-13  Jason Merrill  <jason@redhat.com>
7163
7164         * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
7165
7166         Use cleanups to run base and member destructors.
7167         * init.c (push_base_cleanups): New function, split out from...
7168         (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
7169         * decl.c (finish_destructor_body): Move vbase destruction code to
7170         push_base_cleanups.
7171         (begin_function_body, finish_function_body): New fns.
7172         (finish_function): Move [cd]tor handling and call_poplevel to
7173         finish_function_body.
7174         (pushdecl): Skip the new level.
7175         * semantics.c (genrtl_try_block): Don't call end_protect_partials.
7176         (setup_vtbl_ptr): Call push_base_cleanups.
7177         * method.c (synthesize_method): Call {begin,end}_function_body.
7178         * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
7179         * cp-tree.h: Declare new fns.
7180         * parse.y (function_body, .begin_function_body): New nonterminals.
7181         (fndef, pending_inline, function_try_block): Use function_body.
7182         (ctor_initializer_opt, function_try_block): No longer has a value.
7183         (base_init): Remove .set_base_init token.
7184         (.set_base_init, compstmt_or_error): Remove.
7185         * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
7186
7187         * optimize.c (maybe_clone_body): Fix parameter updating.
7188
7189 2001-12-12  Jason Merrill  <jason@redhat.com>
7190
7191         * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
7192         * semantics.c (genrtl_start_function): Don't pass
7193         parms_have_cleanups or push an extra binding level.
7194         (genrtl_finish_function): Lose cleanup_label cruft.
7195
7196         * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
7197         (ctor_label): Remove.
7198         * semantics.c (finish_return_stmt): Lose ctor_label support.
7199         * decl.c (finish_constructor_body, mark_lang_function): Likewise.
7200         * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
7201         dtor_label.
7202
7203         * call.c (build_new_method_call): Let resolves_to_fixed_type_p
7204         check for [cd]tors.
7205         * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
7206
7207         * decl.c (finish_function): Check VMS_TARGET, not VMS.
7208
7209         * decl.c (start_cleanup_fn): Remove redundant pushlevel.
7210         (end_cleanup_fn): And poplevel.
7211
7212         * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
7213         if we're in a template.
7214
7215 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
7216
7217         * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
7218         ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
7219         THIS_NAME_P): Delete.
7220         * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
7221         THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
7222         with internal naming scheme.
7223         * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
7224
7225 2001-12-12  Nathan Sidwell  <nathan@codesourcery.com>
7226
7227         * decl.c (grokdeclarator): Deprecated implicit typename use.
7228
7229 2001-12-11  Nathan Sidwell  <nathan@codesourcery.com>
7230
7231         PR g++/51
7232         * parse.y (frob_specs): Indicate it is a language linkage which
7233         contained the extern.
7234         * decl.c (grokdeclarator): Allow extern language linkage with
7235         other specifiers.
7236
7237 2001-12-10  Nathan Sidwell  <nathan@codesourcery.com>
7238
7239         PR g++/72
7240         * decl.c (add_binding): Don't reject duplicate typedefs involving
7241         template parameters.
7242
7243 2001-12-10  Neil Booth  <neil@daikokuya.demon.co.uk>
7244
7245         * parse.y, semantics.c: Similarly.
7246
7247 2001-12-09  Nathan Sidwell  <nathan@codesourcery.com>
7248
7249         PR g++/87
7250         * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
7251         (copy_args_p): Rename to ...
7252         (copy_fn_p): ... here.
7253         (grok_special_member_properties): New function.
7254         (grok_op_properties): Lose VIRTUALP parameter.
7255         (copy_assignment_arg_p): Remove.
7256         * call.c (build_over_call): Use copy_fn_p.
7257         * decl.c (grokfndecl): Reformat. Adjust call to
7258         grok_op_properties.
7259         (copy_args_p): Rename to ...
7260         (copy_fn_p): ... here. Reject template functions. Check for pass
7261         by value.
7262         (grok_special_member_properties): Remember special functions.
7263         (grok_ctor_properties): Don't remember them here, just check.
7264         (grok_op_properties): Likewise.
7265         (start_method): Call grok_special_member_properties.
7266         * decl2.c (grokfield): Likewise.
7267         (copy_assignment_arg_p): Remove.
7268         (grok_function_init): Don't remember abstract assignment here.
7269         * pt.c (instantiate_class_template): Call
7270         grok_special_member_properties.
7271         (tsubst_decl): Adjust grok_op_properties call.
7272
7273 2001-12-08  Aldy Hernandez  <aldyh@redhat.com>
7274
7275         * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
7276         RID_TYPES_COMPATIBLE_P.
7277
7278 2001-12-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7279
7280         * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
7281         call to build_aggr_init.
7282         * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
7283
7284 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
7285
7286         * parse.y: Replace uses of the string non-terminal with STRING.
7287         Don't perform string concatentaion here.
7288         (string): Remove non-terminal.
7289         * semantics.c (finish_asm_stmt): Don't concatenate strings here.
7290
7291 2001-12-05  Jason Merrill  <jason@redhat.com>
7292
7293         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
7294         (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
7295         * tree.c (cp_start_inlining, cp_end_inlining): New fns.
7296         * pt.c (push_tinst_level): No longer static.
7297         * cp-tree.h: Declare them.
7298
7299         * init.c (resolve_offset_ref): Don't check access for the base
7300         conversion to access a FIELD_DECL.
7301
7302         * cp-tree.h (TYPE_REFFN_P): New macro.
7303         * decl.c (bad_specifiers): Check it, too.
7304
7305         * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
7306         on the __*_type_info type if we haven't seen a definition.
7307
7308 2001-12-05  Neil Booth  <neil@daikokuya.demon.co.uk>
7309
7310         * decl.c: Include c-common.h.
7311         (shadow_warning): Move to c-common.c.
7312
7313 2001-12-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7314
7315         * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
7316
7317 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
7318
7319         * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
7320
7321 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
7322
7323         PR g++/164
7324         * init.c (sort_base_init): Allow binfos to be directly specified.
7325         * method.c (do_build_copy_constructor): Explicitly convert to the
7326         base instance.
7327         (do_build_assign_ref): Likewise.
7328
7329 2001-12-03  Hans-Peter Nilsson  <hp@bitrange.com>
7330
7331         * decl.c (xref_basetypes): Don't use C99 construct in tag_code
7332         declaration and initialization.
7333
7334 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
7335
7336         * typeck2.c: Remove leading capital from diagnostic messages, as
7337         per GNU coding standards.
7338
7339 2001-12-03  Mumit Khan  <khan@nanotech.wisc.edu>
7340
7341         PR c++/3394
7342         * decl.c (xref_basetypes): Handle attributes between
7343         'class' and name.
7344
7345 2001-12-03  Nathan Sidwell  <nathan@codesourcery.com>
7346
7347         PR g++/3381
7348         * parse.y (named_complex_class_head_sans_basetype): Add new
7349         reduction.
7350         * Make-lang.in (parse.c): Adjust expected conflict count.
7351
7352 2001-12-03  Jason Merrill  <jason@redhat.com>
7353
7354         * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
7355         immediate binfos for our virtual bases.
7356
7357 2001-12-02  Neil Booth  <neil@daikokuya.demon.co.uk>
7358
7359         * call.c (build_java_interface_fn_ref): Similarly.
7360         * except.c (is_admissible_throw_operand): Similarly.
7361         * init.c (build_java_class_ref): Similarly.
7362         * xref.c (open_xref_file): Similarly.
7363
7364 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
7365
7366         * class.c (finish_struct): Remove trailing periods from messages.
7367         * decl.c (check_tag_decl): Similarly.
7368         * lex.c (cxx_set_yydebug): Similarly.
7369         * typeck2.c (friendly_abort): Similarly.
7370
7371 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
7372
7373         PR c++/3048
7374         * cp-tree.h (ovl_member): Remove.
7375         * decl2.c (merge_functions): Handle extern "C" functions
7376         specially.
7377         * tree.c (ovl_member): Remove.
7378
7379 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
7380
7381         PR c++/4842
7382         * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
7383         FUNCTION_DECL, as input.
7384         (mark_overriders): Remove.
7385         (warn_hidden): Rework for the new ABI.
7386
7387 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
7388
7389         PR c++/3471
7390         * call.c (convert_like_real): Do not build additional temporaries
7391         for rvalues of class type.
7392
7393 2001-11-28  Nathan Sidwell  <nathan@codesourcery.com>
7394
7395         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
7396         (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
7397         (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
7398         (DERIVED_FROM_P): Likewise.
7399         (enum base_access): Renumber, add ba_quiet bit mask.
7400         (get_binfo): Remove.
7401         (get_base_distance): Remove.
7402         (binfo_value): Remove.
7403         (ACCESSIBLY_DERIVED_FROM_P): Remove.
7404         * call.c (standard_conversion): Use lookup_base.
7405         * class.c (strictly_overrides): Likewise.
7406         (layout_virtual_bases): Likewise.
7407         (warn_about_ambiguous_direct_bases): Likewise.
7408         (is_base_of_enclosing_class): Likewise.
7409         (add_vcall_offset_vtbl_entries_1): Likewise.
7410         * cvt.c (build_up_reference): Adjust comment.
7411         * init.c (build_member_call): Reformat.
7412         * search.c (get_binfo): Remove.
7413         (get_base_distance_recursive): Remove.
7414         (get_base_distance): Remove.
7415         (lookup_base_r): Tweak.
7416         (lookup_base): Add ba_quiet control. Complete the types here.
7417         (covariant_return_p): Use lookup_base.
7418         * tree.c (binfo_value): Remove.
7419         (maybe_dummy_object): Use lookup_base.
7420         * typeck.c (build_static_cast): Use lookup_base.
7421         (get_delta_difference): Likewise.
7422         * typeck2.c (binfo_or_else): Use lookup_base.
7423         (build_scoped_ref): Add back error_mark_check.
7424         (build_m_component_ref): Use lookup_base.
7425
7426 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
7427
7428         * Make-lang.in (c++.generated-manpages): New dummy target.
7429
7430 2001-11-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7431
7432         * Make-lang.in (cp-lang.o): Depends on c-common.h.
7433         * cp-lang.c (c-common.h): Include.
7434         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
7435         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
7436         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
7437
7438 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
7439
7440         * decl2.c (c_language): Move to c-common.c.
7441         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
7442         functions.
7443         (cxx_init): Update.
7444
7445 2001-11-26  Jason Merrill  <jason@redhat.com>
7446
7447         * call.c (joust): Remove COND_EXPR hack.
7448
7449 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
7450
7451         * search.c (lookup_base_r): Declare bk in variable declaration
7452         space.
7453
7454 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
7455
7456         PR g++/3145
7457         * class.c (build_vbase_pointer): Remove.
7458         (build_vbase_path): Remove.
7459         (build_base_path): New function.
7460         * cp-tree.h (base_access, base_kind): New enumerations.
7461         (build_base_path): Declare.
7462         (convert_pointer_to_real): Remove.
7463         (convert_pointer_to): Remove.
7464         (lookup_base): Declare.
7465         (convert_pointer_to_vbase): Remove.
7466         * call.c (build_scoped_method_call): Use lookup_base &
7467         build_base_path instead of convert_pointer_to_real,
7468         get_base_distance & get_binfo.
7469         (build_over_call): Likewise.
7470         * cvt.c (cp_convert_to_pointer): Likewise.
7471         (convert_to_pointer_force): Likewise.
7472         (build_up_reference): Likewise.
7473         (convert_pointer_to_real): Remove.
7474         (convert_pointer_to): Remove.
7475         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
7476         instead of convert_pointer_to_vbase & build_vbase_path.
7477         (emit_base_init): Use build_base_path instead of
7478         convert_pointer_to_real.
7479         (expand_virtual_init): Lose unrequired conversions.
7480         (resolve_offset_ref): Use lookup_base and build_base_path
7481         instead of convert_pointer_to.
7482         * rtti.c (build_dynamic_cast_1): Use lookup_base &
7483         build_base_path instead of get_base_distance & build_vbase_path.
7484         * search.c (get_vbase_1): Remove.
7485         (get_vbase): Remove.
7486         (convert_pointer_to_vbase): Remove.
7487         (lookup_base_r): New function.
7488         (lookup_base): New function.
7489         * typeck.c (require_complete_type): Use lookup_base &
7490         build_base_path instead of convert_pointer_to.
7491         (build_component_ref): Likewise.
7492         (build_x_function_call): Likewise.
7493         (get_member_function_from_ptrfunc): Likewise.
7494         (build_component_addr): Likewise.
7495         * typeck2.c (build_scoped_ref): Likewise.
7496
7497 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7498
7499         * cp-tree.h (CP_TYPE_QUALS): Removed.
7500         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
7501         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
7502         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
7503         * dump.c (cp_dump_tree): Use void* dump_info argument to match
7504         lang-hooks prototype.
7505         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
7506         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
7507         CP_TYPE_QUALS changed to cp_type_quals.
7508         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
7509         (CXX_C_OBJS): Remove c-dump.o.
7510
7511 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
7512
7513         PR c++/3637
7514         * pt.c (lookup_template_class): Ensure that all specializations
7515         are registered on the list corresponding to the most general
7516         template.
7517
7518 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
7519
7520         * call.c (non_reference): Add documentation.
7521         (convert_class_to_reference): Do not strip reference types
7522         from conversion operators.
7523         (maybe_handle_ref_bind): Simplify.
7524         (compare_ics): Correct handling of references.
7525
7526 2001-11-19  John Wilkinson <johnw@research.att.com>
7527
7528         * dump.c (dump_op): New function.
7529         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
7530         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
7531         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
7532
7533 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
7534
7535         PR4629
7536         * semantics.c (finish_sizeof): Make sure that expression created
7537         while processing a template do not have a type.
7538         (finish_alignof): Likewise.
7539         * typeck.c (c_sizeof): Likewise.
7540         (expr_sizeof): Likewise.
7541
7542 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
7543
7544         * lex.c (cxx_finish): Call c_common_finish.
7545         (finish_parse): Remove.
7546
7547 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7548
7549         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
7550         when displaying error message about missing array bounds.
7551
7552 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7553
7554         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
7555         CONST_CAST_EXPR.
7556         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
7557
7558 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
7559
7560         * cp-tree.h (print_class_statistics): Restore.
7561
7562 2001-11-15  Jason Merrill  <jason@redhat.com>
7563
7564         * method.c (use_thunk): Don't emit debugging information for thunks.
7565
7566         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
7567         * decl.c (make_typename_type): Handle getting a class template.
7568         * search.c (lookup_field_r): A class template is good enough for
7569         want_type.
7570
7571         * call.c (convert_like_real): Only use cp_convert for the bad part.
7572         (standard_conversion): Also allow bad int->enum.
7573         * typeck.c (ptr_reasonably_similar): Also allow functions to
7574         interconvert.  Pointers to same-size integers are reasonably
7575         similar.
7576
7577         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
7578         give it void type.
7579
7580 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
7581
7582         PR g++/3154
7583         * init.c (sort_base_init): Remove unreachable code.
7584         (expand_member_init): Adjust comment to reflect reality. Simplify
7585         and remove unreachable code.
7586
7587 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
7588
7589         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
7590         (cxx_init): Update prototype.
7591         * decl.c (init_decl_processing): Rename.  Move null node init
7592         to its creation time.
7593         * lex.c (cxx_init_options): Update.
7594         (cxx_init): Combine with old init_parse; also call
7595         cxx_init_decl_processing.
7596
7597 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
7598
7599         * decl.c (check_initializer): Try to complete the type of an
7600         array element before checking whether it's complete.  Don't
7601         complain about arrays with complete element types but an
7602         unknown size.
7603         (cp_finish_decl): Build the hierarchical constructor before
7604         calling maybe_deduce_size_from_array_init.
7605
7606 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
7607
7608         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
7609
7610 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
7611
7612         PR g++/4206
7613         * parse.y (already_scoped_stmt): Remove.
7614         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
7615
7616 2001-11-12  H.J. Lu <hjl@gnu.org>
7617
7618         * cvt.c (ocp_convert): Don't warn the address of a weak
7619         function is always `true'.
7620
7621 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
7622
7623         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
7624         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
7625         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
7626         * cp-tree.h (print_class_statistics): Remove.
7627         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
7628         cxx_print_identifier, cxx_set_yydebug): New.
7629         * lex.c (set_yydebug): Rename c_set_yydebug.
7630         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
7631         lang_print_xnode): Rename.
7632         * tree.c (print_lang_statistics): Rename.
7633
7634 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7635
7636         * class.c (dump_array): Fix format specifier warning.
7637
7638 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
7639
7640         * cp-lang.c (LANG_HOOKS_NAME): Override.
7641         (struct lang_hooks): Constify.
7642         * lex.c (cxx_init_options): Update.
7643         (lang_identify): Remove.
7644         * parse.y (language_string): Remove.
7645
7646 2001-11-08  Andreas Franck  <afranck@gmx.de>
7647
7648         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
7649         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
7650         suggested by autoconf.
7651         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
7652         (c++.install-common): Use the transformed target alias names.
7653
7654 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
7655
7656         * Make-lang.in: Update.
7657         * cp-lang.c: Include langhooks-def.h.
7658
7659 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7660
7661         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
7662
7663 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7664
7665         * lex.c (copy_lang_type): Add static prototype.
7666
7667 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7668
7669         * pt.c (unify): Handle SCOPE_REF.
7670
7671 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
7672
7673         * tree.c (cp_copy_res_decl_for_inlining): Adjust
7674         DECL_ABSTRACT_ORIGIN for the return variable.
7675
7676 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
7677
7678         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
7679
7680 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
7681
7682         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
7683         semantics.c, spew.c: Fix spelling errors.
7684
7685 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7686
7687         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
7688
7689 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
7690
7691         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
7692         pop_everything.
7693
7694 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7695
7696         * cp-lang.c (cxx_get_alias_set): New function.
7697         Point LANG_HOOKS_GET_ALIAS_SET to it.
7698
7699 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7700
7701         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
7702         * cp-tree.h (make_unbound_class_template): Prototype new function.
7703         * decl.c (make_unbound_class_template): New function.
7704         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
7705         * error.c (dump_type): Likewise.
7706         * mangle.c (write_type): Likewise.
7707         * parse.y (template_parm): Likewise.
7708         (template_argument): Use make_unbound_class_template.
7709         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
7710         (tsubst): Likewise.
7711         (tsubst_copy): Likewise.
7712         (unify): Likewise.
7713         * tree.c (walk_tree): Likewise.
7714         * typeck.c (comptypes): Likewise.
7715
7716 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7717
7718         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
7719         extra calls into fewer ones.
7720
7721 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
7722
7723         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
7724         Warn when merging inline with attribute noinline.
7725         (start_decl, start_function): Warn if inline and attribute
7726         noinline appear in the same declaration.
7727
7728 2001-10-16  H.J. Lu <hjl@gnu.org>
7729
7730         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
7731         for tree checking disabled.
7732
7733 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
7734
7735         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
7736         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
7737
7738 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
7739
7740         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
7741         (unify): Only handle MINUS_EXPR specially if the above flag is set
7742         and the subtracted constant is 1.  Clear the flag on recursive calls.
7743         Set it when unifying the maximum value in an INTEGER_TYPE's range.
7744
7745 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
7746
7747         * decl.c (bad_specifiers): Don't allow exception specifications
7748         on any typedefs.
7749
7750 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
7751
7752         * cp/lex.c (init_cp_pragma): Similarly.
7753
7754 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7755
7756         * pt.c (lookup_template_class): Build complete template arguments
7757         for BOUND_TEMPLATE_TEMPLATE_PARM.
7758
7759 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7760
7761         * cp-tree.h (TYPE_BINFO): Update comment.
7762         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
7763         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
7764         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
7765         (copy_type): Prototype new function.
7766         * lex.c (copy_lang_decl): Gather tree node statistics.
7767         (copy_lang_type): New function.
7768         (copy_type): Likewise.
7769         (cp_make_lang_type): Create lang_type for
7770         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
7771         and BOUND_TEMPLATE_TEMPLATE_PARM.
7772         * pt.c (tsubst): Use copy_type instead of copy_node.
7773         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
7774
7775 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7776
7777         * pt.c (determine_specialization): Ignore functions without
7778         DECL_TEMPLATE_INFO.
7779
7780 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
7781
7782         PR g++/4476
7783         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
7784
7785 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
7786
7787         * typeck2.c (store_init_value): Don't re-digest a bracketed
7788         initializer.
7789
7790         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
7791         ANON_AGGR_TYPE_P.
7792
7793 2001-10-11  Richard Henderson  <rth@redhat.com>
7794
7795         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
7796         of an asm statement.
7797         (build_vtbl_ref_1): Split out from build_vtbl_ref.
7798         (build_vfn_ref): Use it to handle vtable descriptors before
7799         calling build_vtable_entry_ref.
7800         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
7801
7802 2001-10-10  Richard Henderson  <rth@redhat.com>
7803
7804         * parse.y (asm_operand): Allow named operands.
7805         * semantics.c (finish_asm_stmt): Tweek for changed location
7806         of the operand constraint.
7807
7808 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
7809
7810         * call.c (standard_conversion): Add bad conversion between
7811         integers and pointers.
7812         (convert_like_real): Don't use convert_for_initialization for bad
7813         conversions; complain here and use cp_convert.
7814         (build_over_call): Don't handle bad conversions specially.
7815         (perform_implicit_conversion): Allow bad conversions.
7816         (can_convert_arg_bad): New fn.
7817         * cp-tree.h: Declare it.
7818         * typeck.c (convert_for_assignment): Use it.
7819         (ptr_reasonably_similar): Any target type is similar to void.
7820
7821 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
7822
7823         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
7824         (cp/cp-lang.o): New rule.
7825         * cp-tree.h: Declare hooks.
7826         * tree.c: Make hooks non-static.
7827         (init_tree): Don't initialize hooks here.
7828         * lex.c: Likewise.  Move definition of lang_hooks to...
7829         * cp-lang.c: ... new file.
7830
7831 2001-10-08  Richard Henderson  <rth@redhat.com>
7832
7833         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
7834         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
7835
7836 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7837
7838         * class.c (build_vtable_entry_ref): Const-ify.
7839         * decl.c (predefined_identifier,
7840         initialize_predefined_identifiers): Likewise.
7841         * init.c (build_new_1): Likewise.
7842         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
7843         Likewise.
7844
7845 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
7846
7847         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
7848         (INSNS_PER_STMT): Likewise.
7849         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
7850         (copy_body, initialize_inlined_parameters): Likewise.
7851         (declare_return_variable, inlinable_function_p): Likewise.
7852         (expand_call_inline, expand_calls_inline): Likewise.
7853         (optimize_inline_calls, clone_body): Likewise.
7854         * tree.c (walk_tree): Moved to ../tree-inline.c.
7855         (walk_tree_without_duplicates): Likewise.
7856         (copy_tree_r, remap_save_expr): Likewise.
7857
7858 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
7859
7860         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
7861         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
7862         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
7863         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
7864         (flag_inline_trees): Moved declaration to ../tree-inline.h.
7865         (walk_tree): Moved declaration to ../tree-inline.h.
7866         (walk_tree_without_duplicates, copy_tree_r): Likewise.
7867         (remap_save_expr): Likewise.
7868         * decl.c: Include tree-inline.h.
7869         (lang_mark_tree): Don't mark inlined_fns.
7870         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
7871         * optimize.c: Include tree-inline.h.
7872         (optimize_inline_calls): Move declaration to ../tree.h, as
7873         non-static.
7874         (remap_decl): Use language-independent constructs and hooks.
7875         (remap_block, copy_body_r, declare_return_variable): Likewise.
7876         (inlinable_function_p): Likewise.  Don't test for
7877         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
7878         no longer language-specific.
7879         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
7880         call of dump_function to...
7881         (optimize_function): Here...
7882         (clone_body): New function, extracted from...
7883         (maybe_clone_body): ... here.  Build decl_map locally and pass
7884         it on to clone_body.
7885         * pt.c, semantics.c: Include tree-inline.h.
7886         * tree.c: Likewise.
7887         (cp_walk_subtrees): New language-specific hook for tree inlining.
7888         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
7889         cp_is_overload_p, cp_auto_var_in_fn_p,
7890         cp_copy_res_decl_for_inlining): Likewise.
7891         (walk_tree): Move language-specific constructs into...
7892         (cp_walk_subtrees): this new function.
7893         (copy_tree_r): Use language-independent constructs and hooks.
7894         (init_tree): Initialize tree inlining hooks.
7895         (remap_save_expr): Adjust prototype so that the declaration
7896         does not require the definition of splay_tree.
7897
7898 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7899
7900         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
7901         to build the declaration instead of the declaration itself.
7902
7903 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
7904
7905         * decl2.c (cxx_decode_option): Add 'else'.
7906
7907         * spew.c (end_input): No longer static.
7908         * cp-tree.h: Declare it.
7909         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
7910
7911 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
7912
7913         * call.c (build_over_call), typeck.c (build_function_call_real):
7914         Pass type attributes to check_function_format rather than name or
7915         assembler name.  Don't require there to be a name or assembler
7916         name to check formats.
7917
7918 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
7919
7920         * decl.c (init_decl_processing): Don't call
7921         init_function_format_info.  Initialize lang_attribute_table
7922         earlier.
7923         (builtin_function): Call decl_attributes.
7924         (insert_default_attributes): New.
7925
7926 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
7927
7928         * decl.c (grokdeclarator): Copy array typedef handling from C
7929         frontend.
7930
7931         * decl.c (grokdeclarator): Copy too-large array handling from C
7932         frontend.
7933
7934 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
7935
7936         * config-lang.in (target_libs): Added target-gperf, so that we
7937         don't try to build it if C++ is disabled.
7938
7939 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
7940
7941         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
7942         (cp/errfn.o): Delete rule.
7943         (cp/error.o): Depend on flags.h.
7944         * errfn.c: Delete file.
7945         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
7946         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
7947         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
7948         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
7949         internal_error respectively.  Make cp_deprecated into a macro.
7950         Don't define cp_printer typedef or declare cp_printers.
7951         * error.c: Include flags.h.
7952         Delete: struct tree_formatting_info, print_function_argument_list,
7953         print_declaration, print_expression, print_function_declaration,
7954         print_function_parameter, print_type_id, print_cv_qualifier_seq,
7955         print_type_specifier_seq, print_simple_type_specifier,
7956         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
7957         print_parameter_declaration_clause, print_exception_specification,
7958         print_nested_name_specifier, and definition of cp_printers.
7959         (locate_error): New function.
7960         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
7961         rewritten in terms of locate_error and diagnostic.c.
7962         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
7963         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
7964         (init_error): Adjust to match.
7965
7966 2001-09-22  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7967
7968         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
7969
7970 2001-09-21  Richard Henderson  <rth@redhat.com>
7971
7972         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
7973         (build_vtbl_initializer): Likewise.
7974         (build_vfn_ref): New.
7975         * cp-tree.h: Declare it.
7976         * call.c (build_over_call): Use it.
7977         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
7978         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
7979
7980 2001-09-21  J"orn Rennecke <amylaar@redhat.com>
7981
7982         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
7983
7984 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
7985
7986         Table-driven attributes.
7987         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
7988         * decl2.c (cplus_decl_attributes): Only take one attributes
7989         parameter.
7990         * cp-tree.c (cplus_decl_attributes): Update prototype.
7991         * class.c (finish_struct), decl.c (start_decl, start_function),
7992         decl2.c (grokfield), friend.c (do_friend), parse.y
7993         (parse_bitfield): Update calls to cplus_decl_attributes.
7994         * decl.c (grokdeclarator): Take a pointer to a single ordinary
7995         attribute list.
7996         * decl.h (grokdeclarator): Update prototype.
7997         * decl2.c (grokfield): Take a single ordinary attribute list.
7998         * friend.c (do_friend): Likewise.
7999         * decl.c (shadow_tag, groktypename, start_decl,
8000         start_handler_parms, grokdeclarator, grokparms, start_function,
8001         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
8002         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
8003         (process_template_parm, do_decl_instantiation): Pass single
8004         ordinary attribute lists around.
8005         * decl.c (grokdeclarator): Correct handling of nested attributes.
8006         Revert the patch
8007         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
8008                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
8009                 not the left.
8010         .
8011         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
8012         (cp_attribute_table): Declare.
8013         * decl.c (valid_lang_attribute): Don't define.
8014         (lang_attribute_table): Define.
8015         (init_decl_processing): Initialize lang_attribute_table instead of
8016         valid_lang_attribute.
8017         * tree.c (cp_valid_lang_attribute): Remove.
8018         (handle_java_interface_attribute, handle_com_interface_attribute,
8019         handle_init_priority_attribute): New functions.
8020         (cp_attribute_table): New array.
8021         * decl2.c (import_export_class): Don't use
8022         targetm.valid_type_attribute.
8023
8024 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
8025
8026         * Make-lang.in (cp/error.o): Depend on real.h
8027         * error.c: #include "real.h"
8028
8029 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8030
8031         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
8032         xmalloc/strcpy/strcat.
8033
8034 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8035
8036         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
8037         Const-ification.
8038         * pt.c (tsubst_decl): Likewise.
8039
8040 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8041
8042         * decl2.c (lang_f_options): Const-ification.
8043         * lex.c (cplus_tree_code_name): Likewise.
8044         * spew.c (yyerror): Likewise.
8045
8046 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
8047
8048         PR c++/3986
8049         * class.c (force_canonical_binfo_r): Check & move an indirect
8050         primary base first.
8051         (force_canonical_binfo): Check that it's not already
8052         canonical.
8053         (mark_primary_virtual_base): Remove BINFO parameter.
8054         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
8055
8056 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
8057
8058         Remove TYPE_NONCOPIED_PARTS.
8059         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
8060         CLASSTYPE_PURE_VIRTUALS.
8061         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
8062         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
8063         (layout_class_type): Don't call fixup_inline_methods here ...
8064         (finish_struct_1): ... call it here.
8065
8066 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
8067
8068         * decl.c (duplicate_decls): Remove code deadling with
8069         DECL_SAVED_INSNS.
8070         * decl2.c (finish_file): Likewise.
8071         * pt.c (instantiate_decl): Likewise.
8072         * semantics.c (expand_body): Don't defer local functions if
8073         they wouldn't be deferred for some other reason.  Don't
8074         generate RTL for functions that will not be emitted.
8075         (genrtl_start_function): Remove code deadling with
8076         DECL_SAVED_INSNS.
8077         (genrtl_finish_function): Likewise.
8078
8079 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
8080
8081         PR c++/4203
8082         * call.c (build_over_call): Do not optimize any empty base
8083         construction.
8084
8085 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8086
8087         * error.c (dump_template_decl): Output template parameters
8088         together with their specifiers.
8089         Output `class' prefix for template template parameter.
8090         (dump_decl): Fix formatting.
8091
8092 2001-08-30  Kurt Garloff  <garloff@suse.de>
8093
8094         * optimize.c (inlinable_function_p): Allow only smaller single
8095         functions. Halve inline limit after reaching recursive limit.
8096
8097 2001-08-30  Joern Rennecke <amylaar@redhat.com>
8098             Jason Merrill  <jason_merrill@redhat.com>
8099
8100         * class.c (build_vtable_entry_ref): Subtract in char*, not
8101         ptrdiff_t.
8102
8103 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
8104
8105         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
8106         (build_cplus_array_type): Use cp_build_qualified_type, not
8107         TYPE_MAIN_VARIANT, to get an unqualified version.
8108
8109         * decl2.c (grok_alignof): Lose.
8110         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
8111         * typeck.c (c_alignof): Lose.
8112         * semantics.c (finish_sizeof, finish_alignof): New.
8113         * parse.y: Use them.
8114         * cp-tree.h: Declare them.
8115
8116 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
8117
8118         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
8119         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
8120         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
8121
8122 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
8123
8124         * typeck2.c (add_exception_specifier): Only require complete type if
8125         not in processing template declaration.
8126
8127 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8128
8129         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
8130         GNU_xref_start_scope and GNU_xref_end_scope.
8131
8132         * tree.c (TYPE_HASH): Moved to ../tree.h.
8133
8134 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
8135
8136         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
8137         on COMPOUND_EXPRs.
8138
8139 2001-08-14  Richard Henderson  <rth@redhat.com>
8140
8141         * class.c, cp-tree.h (build_vfn_ref): Remove.
8142         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
8143
8144 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
8145
8146         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
8147         empty class assignment as having side-effects to avoid
8148         spurious warnings.
8149
8150 2001-08-13  Zack Weinberg  <zackw@panix.com>
8151
8152         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
8153         * except.c: Include libfuncs.h.
8154
8155 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
8156
8157         * decl.c (grokdeclarator): Clarify diagnostic message.
8158
8159 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8160
8161         * decl2.c (do_nonmember_using_decl): Replace using directive
8162         with using declaration in the error message.
8163
8164 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8165
8166         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
8167         criterion to avoid rebuilding expression tree instead of
8168         processing_template_decl.
8169
8170 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
8171
8172         Support named return value optimization for inlines, too.
8173         * decl.c (finish_function): Nullify returns here.
8174         * semantics.c (genrtl_start_function): Not here.
8175         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
8176         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
8177         Also nullify the CLEANUP_STMT for the nrv.
8178         * cp-tree.h: Declare it.
8179         * optimize.c (declare_return_variable): Replace the nrv with the
8180         return variable.
8181         * typeck.c (check_return_expr): Be more flexible on alignment check.
8182         Ignore cv-quals when checking for a matching type.
8183
8184 2001-08-09  Richard Henderson  <rth@redhat.com>
8185
8186         * decl2.c (finish_objects): Use target hooks instead of
8187         assemble_constructor and assemble_destructor.
8188
8189 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
8190
8191         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
8192
8193 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
8194
8195         PR c++/3820
8196         Stop using TYPE_NONCOPIED_PARTS.
8197         * call.c (build_over_call): Be careful when copy constructing
8198         or assigning to an empty class.
8199         * class.c (check_bases_and_members): It has a
8200         COMPLEX_ASSIGN_REF if it has a vptr.
8201         (layout_class_type): Don't add empty class padding to
8202         TYPE_NONCOPIED_PARTS.
8203         (finish_struct_1): Don't add the VFIELD either.
8204         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
8205         initialization.
8206
8207 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
8208
8209         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
8210
8211 2001-08-06  Richard Henderson  <rth@redhat.com>
8212
8213         * decl2.c (finish_objects): Pass a symbol_ref and priority to
8214         assemble_{constructor,destructor}.  Remove priority handling.
8215
8216 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
8217
8218         Don't allow template-id in using-declaration.
8219         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
8220         (do_class_using_decl): Likewise.
8221
8222 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
8223
8224         * cp/spew.c (read_token): No need to pop buffers.
8225
8226 2001-08-02  Stan Shebs  <shebs@apple.com>
8227
8228         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
8229         (fnaddr_from_vtable_entry): Remove decl.
8230         * method.c (use_thunk): Update comment.
8231
8232 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
8233
8234         * repo.c (get_base_filename): Change return value to const char
8235         pointer.
8236
8237 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
8238
8239         Kill -fhonor-std.
8240         * NEWS: Document.
8241         * cp-tree.h (flag_honor_std): Remove.
8242         (CPTI_FAKE_STD): Remove.
8243         (std_node): Remove comment about it being NULL.
8244         (fake_std_node): Remove.
8245         * decl.c (in_fake_std): Remove.
8246         (walk_namespaces_r): Remove fake_std_node check.
8247         (push_namespace): Remove in_fake_std code.
8248         (pop_namespace): Likewise.
8249         (lookup_name_real): Remove fake_std_node check.
8250         (init_decl_processing): Always create std_node. Always add
8251         std:: things there.
8252         (builtin_function): Always put non '_' fns in std.
8253         * decl2.c (flag_honor_std): Remove.
8254         (lang_f_options): Remove honor-std.
8255         (unsupported_options): Add honor-std.
8256         (set_decl_namespace): Remove fake_std_node check.
8257         (validate_nonmember_using_decl): Likewise.
8258         (do_using_directive): Likewise.
8259         (handle_class_head): Likewise.
8260         * dump.c (cp_dump_tree): Likewise.
8261         * except.c (init_exception_processing): Adjust.
8262         * init.c (build_member_call): Remove fake_std_node check.
8263         (build_offset_ref): Likewise.
8264         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
8265         * rtti.c (init_rtti_processing): Adjust.
8266
8267 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
8268
8269         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
8270         operand while calling cp_tree_equal.
8271
8272 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
8273
8274         The 3.0 ABI no longer has vbase pointer fields.
8275         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
8276         FORMAT_VBASE_NAME): Remove.
8277         * method.c (do_build_copy_constructor): Adjust.
8278         (do_build_assign_ref): Adjust.
8279         * search.c (lookup_field_r): Adjust.
8280         * typeck.c (build_component_ref): Adjust.
8281
8282         The 3.0 ABI always has a vtable pointer at the start of every
8283         polymorphic class.
8284         * rtti.c (build_headof_sub): Remove.
8285         (build_headof): Adjust.
8286         (get_tinfo_decl_dynamic): No need to check flag_rtti
8287         here. Adjust.
8288         (create_real_tinfo_var): Explain why we need a hidden name.
8289
8290 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
8291
8292         PR c++/3631
8293         * class.c (update_vtable_entry_for_fn): The fixed adjustment
8294         of a virtual thunk should be from declaring base.
8295
8296 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
8297
8298         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
8299         the shared virtual base, so preserving inheritance graph order.
8300
8301 2001-07-30  Andreas Jaeger  <aj@suse.de>
8302
8303         * decl2.c: Remove unused var global_temp_name_counter.
8304
8305 2001-07-28  Richard Henderson  <rth@redhat.com>
8306
8307         * method.c (pending_inlines): Remove.
8308
8309 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
8310
8311         * class.c (mark_primary_virtual_base): Don't adjust base
8312         offsets here.
8313         (dfs_unshared_virtual_bases): Adjust them here.
8314         (mark_primary_bases): Explain why we adjust at the end.
8315
8316 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
8317
8318         * class.c (finish_struct_1): When copying the primary base's
8319         VFIELD, make sure we find it is at offset zero.
8320
8321 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8322
8323         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
8324         tsubst_expr for default template arguments.
8325
8326 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
8327
8328         PR c++/3621
8329         * spew.c (yylex): Only copy the token's lineno, if it is
8330         nonzero.
8331
8332 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
8333
8334         PR c++/3624
8335         * call.c (resolve_args): Simplify, call
8336         convert_from_reference.
8337         (build_new_op): Resolve and convert from reference ARG1
8338         earlier. Adjust ARG2 & ARG3 resolve and conversion.
8339
8340 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
8341
8342         * decl.c (last_function_parm_tags): Remove.
8343         (current_function_parm_tags): Remove.
8344         (init_decl_processing): Adjust.
8345         (start_function): Adjust.
8346         (store_parm_decls): Adjust.
8347
8348         PR c++/3152
8349         * decl.c (grokdeclarator): Detect when a function typedef is
8350         declaring a function, and create last_function_parms correctly.
8351
8352 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
8353
8354         * call.c (joust): Only prefer a non-builtin candidate to a builtin
8355         one if they have the same signature.
8356
8357         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
8358         it rather than toplevel_bindings_p.  Give it a mangled name if static.
8359         (convert_to_reference): Adjust.
8360         * decl2.c (get_temp_name): Lose.
8361         * mangle.c (mangle_ref_init_variable): New fn.
8362         (mangle_guard_variable): Strip the ref-init header.
8363         * cp-tree.h: Adjust.
8364         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
8365         initializer.
8366         (grok_reference_init): Always use DECL_INITIAL.
8367
8368 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
8369
8370         PR c++/3416
8371         * call.c (build_conditional_expr): Recheck args after
8372         conversions.
8373         * cp-tree.h (build_conditional_expr): Move to correct file.
8374         * typeck.c (decay_conversion): Diagnose any unknown types
8375         reaching here.
8376         (build_binary_op): Don't do initial decay or default
8377         conversions on overloaded functions.
8378         (build_static_cast): Don't do a decay conversion here.
8379
8380 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
8381
8382         PR c++/3543
8383         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
8384         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
8385
8386 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
8387
8388         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
8389         (create_vtbl_ptr): ... here.
8390
8391 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
8392
8393         * class.c (build_vbase_offset_vbtl_entries): Look for
8394         non-primary base of which we are a sub vtable.
8395
8396 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
8397
8398         * semantics.c (finish_this_expr):  Remove unused code.
8399
8400 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
8401
8402         Simplify rtti, now we've only one ABI.
8403         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
8404         CPTI_TINFO_VAR_ID.
8405         (tinfo_decl_id, tinfo_var_id): Remove.
8406         (get_typeid_1): Remove.
8407         * rtti.c
8408         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
8409         (typeid_ok_p): New function.
8410         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
8411         (get_tinfo_decl): Remove old abi documentation.
8412         (tinfo_from_decl): Remove.
8413         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
8414         (get_typeid_1): Remove.
8415         (get_base_offset): Remove.
8416         (synthesize_tinfo_var): Absorb get_base_offset.
8417         (create_real_tinfo_var): Don't use tinfo_decl_id.
8418
8419 2001-07-23  Graham Stott  <grahams@redhat.com>
8420
8421         * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
8422         variable has_two_argument_delete_p.
8423
8424 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
8425
8426         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
8427         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
8428         (CPTI_INDEX_IDENTIFIER): Remove.
8429         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
8430         (delta2_identifier): Remove.
8431         (index_identifier): Remove.
8432         (pfn_or_delta2_identifier): Remove.
8433         (flag_vtable_thunks): Remove.
8434         (VTABLE_DELTA2_NAME): Remove.
8435         (VTABLE_INDEX_NAME): Remove.
8436         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
8437         (vfunc_ptr_type_node): Adjust.
8438         (VTABLE_NAME_PREFIX): Adjust.
8439         (build_vfn_ref): Lose first parameter.
8440         (fixup_all_virtual_upcast_offsets): Remove.
8441         * decl.c (initialize_predefined_identifiers): Remove
8442         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
8443         (init_decl_processing): Remove no-vtable-thunk code.
8444         * decl2.c (flag_vtable_thunks): Remove.
8445         (mark_vtable_entries): Remove no-vtable-thunk code.
8446         * error.c (dump_decl): Remove no-vtable-thunk code.
8447         (dump_expr): Adjust ptr to member function code.
8448         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
8449         code.
8450         * rtti.c (build_headof): Remove no-vtable-thunk code.
8451         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
8452         * search.c (get_base_distance): Remove expand_upcast_fixups case.
8453         (virtual_context) Remove.
8454         (expand_upcast_fixups): Remove.
8455         (fixup_virtual_upcast_offsets): Remove.
8456         (fixup_all_virtual_upcast_offsets): Remove.
8457         * typeck.c (get_member_function_from_ptrfunc): Remove
8458         no-vtable-thunk code.
8459         * call.c (build_over_call): Adjust call to build_vfn_ref.
8460         * class.c (build_vfn_ref): Lose first parameter. Remove
8461         no-vtable-thunk code.
8462         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
8463         (build_vtable_entry): Remove no-vtable-thunk code.
8464
8465 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
8466
8467         Remove old-abi remnants. Remove comments about old abi
8468         behavior. Remove references to 'new-abi' in comments.
8469         * cp-tree.h: Adjust comments.
8470         (vbase_offsets_in_vtable_p): Delete.
8471         (vcall_offsets_in_vtable_p): Delete.
8472         (vptrs_present_everywhere_p): Delete.
8473         (all_overridden_vfuns_in_vtables_p): Delete.
8474         (merge_primary_and_secondary_vtables_p): Delete.
8475         (TYPE_CONTAINS_VPTR_P): Adjust.
8476         (VTT_NAME_PREFIX): Remove.
8477         (CTOR_VTBL_NAME_PREFIX): Remove.
8478         (init_vbase_pointers): Remove.
8479         * class.c: Adjust coments.
8480         (build_vbase_pointer_fields): Delete.
8481         (build_vbase_pointer): Remove old-abi code.
8482         (build_secondary_vtable): Likewise.
8483         (modify_all_vtables): Likewise.
8484         (create_vtable_ptr): Likewise.
8485         (layout_class_type): Likewise.
8486         (finish_struct_1): Likewise.
8487         (finish_vtbls): Likewise.
8488         (dfs_finish_vtbls): Delete.
8489         (build_vbase_offset_vtbl_entries): Remove old-abi code.
8490         * cvt.c: Adjust comments.
8491         * decl.c: Adjust comments.
8492         * decl2.c: Adjust comments.
8493         * init.c: Adjust comments.
8494         (construct_virtual_bases): Remove old-abi code.
8495         * lang-specs.h: Remove -fno-new-abi.
8496         * mangle.c: Adjust comments.
8497         * rtti.c: Adjust comments.
8498         (get_base_offset): Remove old-abi-code.
8499         * search.c: Adjust comments.
8500         (dfs_init_vbase_pointers): Remove.
8501         (dfs_vtable_path_unmark): Remove.
8502         (init_vbase_pointers): Remove.
8503         * semantics.c: Adjust comments.
8504         (emit_associated_thunks): Remove old-abi code.
8505         * typeck.c: Adjust comments.
8506
8507 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
8508
8509         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
8510         params.h.
8511
8512 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
8513
8514         * class.c (finish_struct_anon): Forbid nested classes.
8515
8516 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
8517
8518         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
8519         * optimize.c: Include debug.h.
8520         (maybe_clone_body): Use debug hook.
8521         * semantics.c: Include debug.h.
8522         (expand_body): Use debug hook.
8523
8524 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
8525
8526         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
8527
8528 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
8529
8530         * class.c (type_requires_array_cookie): New function.
8531         (check_methods): Don't try to figure out whether the type needs a
8532         cookie here.
8533         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
8534         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
8535         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
8536         * pt.c (instantiate_class_template): Don't set
8537         TYPE_VEC_DELETE_TAKES_SIZE.
8538         * NEWS: Document ABI changes from GCC 3.0.
8539
8540 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
8541             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
8542
8543         * NEWS (Changes in GCC 3.0): Fix typo.
8544
8545 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
8546
8547         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
8548         which attributes are to be attached, and a flags argument.  Update
8549         call to decl_attributes.
8550         (grokfield): Update call to decl_attributes.
8551         * class.c (finish_struct): Update call to cplus_decl_attributes.
8552         * cp-tree.h (cplus_decl_attributes): Update prototype.
8553         * decl.c (start_decl, grokdeclarator, start_function): Update
8554         calls to decl_attributes and cplus_decl_attributes.
8555         * friend.c (do_friend): Update call to cplus_decl_attributes.
8556         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
8557
8558 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
8559
8560         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
8561         for `register' variables with an asm-specification.
8562
8563 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
8564
8565         * semantics.c (finish_asm_stmt): Mark the output operands
8566         to an asm addressable, if necessary.
8567
8568 2001-07-11  Ben Elliston  <bje@redhat.com>
8569
8570         * Revert this change -- there is a subtle bug.
8571
8572         PR c++/80
8573         * decl.c (finish_enum): New "attributes" argument; pass it to
8574         cplus_decl_attributes.  Use a narrower type if the enum is packed.
8575         * cp-tree.h (finish_enum): Adjust prototype.
8576         * parse.y (enum_head): New non-terminal.
8577         (structsp): Use it. Enums now may be preceded or followed by
8578         optional attributes -- pass their chained tree to finish_enum().
8579         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
8580
8581 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
8582
8583         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
8584         variables.
8585
8586 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
8587
8588         * semantics.c (cp_expand_stmt): Fix for null
8589         current_function_return_value.
8590
8591 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
8592
8593         * call.c (build_op_delete_call): Initialize fn.
8594         (convert_like_real): Delete conditional.
8595         (joust): Initialize *w and *l.
8596         * class.c: Add prototype for binfo_ctor_vtable.
8597         (get_primary_binfo): Initialize result.
8598         * init.c (build_java_class_ref): Initialize name.
8599
8600 2001-07-09  Erik Rozendaal  <dlr@acm.org>
8601
8602         * typeck.c (unary_complex_lvalue): Do not duplicate the
8603         argument to modify, pre-, or post-increment when used as an
8604         lvalue and when the argument has side-effects.
8605
8606 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
8607
8608         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
8609         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
8610         cplus_decl_attributes even if attrs is NULL.
8611         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
8612
8613 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
8614
8615         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
8616         calls to decl_attributes.
8617
8618 2001-07-06  Ira Ruben   <ira@apple.com>
8619
8620         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
8621         be DECL_TEMPLATE_RESULT.
8622
8623 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8624
8625         * cp-tree.h (copy_template_template_parm): Rename to ...
8626         (bind_template_template_parm): ... here.
8627         * tree.c (copy_template_template_parm): Rename to ...
8628         (bind_template_template_parm): ... here.  Remove the case when
8629         NEWARGS is NULL_TREE.
8630         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
8631         BOUND_TEMPLATE_TEMPLATE_PARM.
8632         * pt.c (lookup_template_class): Adjust.
8633
8634 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
8635
8636         * cvt.c (convert_lvalue): New fn.
8637         * cp-tree.h: Declare it.
8638         * method.c (do_build_assign_ref): Use it.
8639         (do_build_copy_constructor): Convert parm to base types
8640         before calling base constructors.
8641
8642         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
8643         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
8644         optimize.
8645         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
8646
8647 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
8648
8649         * optimize.c (optimize_inline_calls): New function, broken out
8650         of ...
8651         (optimize_function): ... here. Call it. Don't inline if it is
8652         a thunk.
8653         (dump_function): Print name of dump flag causing this dump.
8654         * semantics.c (expand_body): Move thunk inline check to
8655         optimize_function.
8656
8657 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
8658
8659         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
8660         (comptypes): Use target.comp_type_attributes.
8661
8662 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
8663
8664         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
8665
8666 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
8667
8668         * error.c (lang_print_error_function): Add a `diagnostic_context *'
8669         parameter. Tweak.
8670
8671 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
8672
8673         * decl2.c (import_export_class): Update.
8674
8675 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
8676
8677         * error.c (init_error): Adjust settings.
8678
8679 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
8680
8681         * error.c (init_error): Adjust settings.
8682
8683 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
8684
8685         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
8686         return pointers to data members by reference rather than by value.
8687
8688 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
8689
8690         Implement the Named Return Value optimization.
8691         * cp-tree.h (struct cp_language_function): Add x_return_value.
8692         (current_function_return_value): Now a macro.
8693         * decl.c: Don't define it.
8694         (define_label, finish_case_label): Don't clear it.
8695         (init_decl_processing): Don't register it with GC.
8696         * semantics.c (genrtl_finish_function): Don't check it for
8697         no_return_label.  Copy the RTL from the return value to
8698         current_function_return_value and walk, calling...
8699         (nullify_returns_r): ...this new fn.
8700         * typeck.c (check_return_expr): Set current_function_return_value.
8701
8702 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
8703
8704         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
8705         sharing a ctor vtable with.  Merge code for cases 1 and 2.
8706         (binfo_ctor_vtable): New fn.
8707         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
8708
8709 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
8710
8711         * class.c (dfs_find_final_overrider): Fix logic.
8712
8713         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
8714         virtual thunk instead of non-virtual.
8715         (get_matching_virtual): Uncomment.
8716
8717         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
8718         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
8719         PARM, not ARG.
8720
8721 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
8722
8723         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
8724         we've not emerged from the hierarchy of RTTI_BINFO on reaching
8725         a non-virtual base.
8726
8727 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
8728
8729         * NEWS: Update release number.
8730
8731 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
8732
8733         PR c++/3130, c++/3131, c++/3132
8734         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
8735         * class.c (force_canonical_binfo_r): Move
8736         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
8737         virtual bases unless they're primary and what they're primary
8738         too has been moved.
8739         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
8740         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
8741         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
8742         derived binfo.
8743         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
8744         (layout_nonempty_base_or_field): Add most derived type
8745         parameter. Adjust.
8746         (layout_empty_base): Likewise.
8747         (build_base_field): Likewise.
8748         (build_base_fields): Likewise.
8749         (propagate_binfo_offsets): Add most derived type
8750         parameter. Skip non canonical virtual bases too.
8751         (dfs_set_offset_for_unshared_vbases): Don't skip primary
8752         bases. Do skip canonical bases.
8753         (layout_virtual_bases): Adjust.
8754         (layout_class_type): Adjust.
8755         (dfs_get_primary_binfo): Build list of virtual primary base
8756         candidates.
8757         (get_primary_binfo): Check that the shared virtual primary
8758         base candidate was found first.
8759         (accumulate_vtbl_inits): Don't do anything for non-vptr
8760         containing binfos. For case 1 primary virtual bases, keep
8761         checking that we've not emerged from the hierarchy of RTTI_BINFO.
8762
8763 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
8764
8765         PR c++/3089
8766         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
8767         hierarchy looking for primary bases for a ctor
8768         vtable. Recursively call oneself, if we meet our primary via
8769         this route and haven't met it yet via inheritance graph order.
8770
8771 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
8772
8773         * lang-options.h: Emit documentation for -fno-honor-std, not
8774         -fhonor-std.
8775
8776 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
8777
8778         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
8779         Don't clobber delta.
8780         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
8781
8782 2001-06-10  Mark Mitchell <mark@codesourcery.com>
8783             Gabriel Dos Reis  <gdr@codesourcery.com>
8784
8785         * Make-lang.in (cp/call.o): Depend on diagnostic.h
8786         (cp/typeck.o): Depend on diagnostic.h
8787         (cp/typeck2.o): Depend on diagnostic.h
8788         (cp/repo.o): Depend on dignostic.h
8789         * typeck.c: #include diagnostic.h
8790         (convert_for_initialization): Remove extern declaration for
8791         warningcount and errorcount.
8792
8793         * call.c: #include diagnostic.h
8794         (convert_like_real): Remove extern declaration for warnincount and
8795         errorcount.
8796
8797         * repo.c: #include diagnostic.h
8798         * typeck2.c: #include diagnostic.h
8799
8800 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
8801
8802         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
8803         in previous change.
8804
8805 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
8806
8807         PR c++/2929
8808         * friend.c (do_friend): Use push_decl_namespace for classes at
8809         namespace scope.
8810
8811 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
8812             Jason Merrill <jason_merrill@redhat.com>
8813
8814         PR c++/3061
8815         * class.c (build_secondary_vtable): Use assert, rather than an error
8816         message.
8817         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
8818         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
8819         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
8820         Don't set BINFO_VTABLE for a primary virtual base.
8821
8822 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
8823
8824         * decl.c (duplicate_decls): Update source position information
8825         when a template function is defined.
8826
8827 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
8828
8829         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
8830
8831 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
8832
8833         PR c++/2914
8834         * decl.c (pushtag): Don't push into a complete type's scope.
8835
8836 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
8837
8838         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
8839         (struct lang_decl_flags): Lose generate_with_vtable_p.
8840         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
8841         * class.c (copy_virtuals): Adjust.
8842         * decl2.c (mark_vtable_entries): Adjust.
8843         * method.c (make_thunk, build_vtable_entry): Adjust.
8844         * class.c (update_vtable_entry_for_fn): Only look as far as the
8845         first defining class.
8846         (build_vtbl_initializer): Put nothing in the slot for a function only
8847         defined in a lost primary virtual base.
8848         (add_vcall_offset_vtbl_entries_1): Use the same code for
8849         the lost primary case and the normal case.
8850         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
8851         (get_vfield_offset, get_derived_offset): Lose.
8852         (dfs_find_final_overrider): Use look_for_overrides_here.
8853         (get_matching_virtual): New fn.
8854         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
8855         not BV_VCALL_INDEX.
8856         * search.c (look_for_overrides_here): Split out from...
8857         (look_for_overrides_r): Here.
8858
8859         * class.c (find_final_overrider): Return error_mark_node on error.
8860
8861         * decl2.c (key_method): #if 0 accidental change.
8862
8863 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
8864
8865         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
8866         (build_over_call): Likewise.
8867         * decl.c (grokparms): Likewise.
8868         * pt.c (tsubst_decl): Likewise.
8869         * typeck.c (convert_arguments): Likewise.
8870
8871 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
8872
8873         * semantics.c (begin_class_definition): Robustify.
8874
8875         * pt.c (instantiate_decl): Tell the repository code about the
8876         clones, not the cloned functions.
8877         * repo.c (repo_template_used): Explicitly instantiate the cloned
8878         function, not the clones.
8879
8880 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
8881
8882         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
8883         ICS_BAD_FLAG on created conversion.
8884         (compare_ics): Break out rank.
8885
8886 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
8887
8888         * decl.c (xref_tag): Remove extraneous %s on dependent name
8889         lookup warning.
8890
8891 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
8892
8893         * class.c (layout_vtable_decl): Fix off by one error on
8894         build_index_type.
8895         (build_vtt): Likewise.
8896         (build_ctor_vtbl_group): Likewise.
8897
8898 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
8899
8900         * class.c (maybe_indent_hierarchy): New function.
8901         (dump_class_hierarchy_r): Add flags. Dump extra binfo
8902         information, if enabled. Use maybe_indent_hierarchy. Adjust
8903         output format.
8904         (dump_class_hierarchy): Adjust prototype. Adjust output format.
8905         (dump_array, dump_vtable, dump_vtt): New functions.
8906         (finish_struct_1): Adjust hierarchy dumping.
8907         (initialize_vtable): Call dump_vtable.
8908         (build_vtt): Call dump_vtt.
8909         (build_ctor_vtbl_group): Call dump_vtable.
8910         * decl2.c (flag_dump_class_layout): Remove.
8911         (cxx_decode_option): Remove dump translation unit
8912         and dump class hierarchy check. Call dump_switch_p.
8913         (finish_file): Adjust dumping.
8914         (dump.c): Only dump base classes if not TDF_SLIM.
8915         Only dump namespace members if not TDF_SLIM.
8916         * optimize.c (dump_function): New function.
8917         (optimize_function): Call dump_function.
8918         * semantics.c (expand_body): Use dump_enabled_p.
8919
8920 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
8921
8922         PR g++/2936
8923         Part missed from first commit
8924         * decl2.c (finish_anon_union): Copy context.
8925
8926 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
8927
8928         PR g++/2936
8929         * optimize.c (remap_decl): Remap anonymous aggregate members too.
8930
8931 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
8932
8933         PR g++/2823
8934         * semantics.c (expand_body): Don't optimize thunks.
8935
8936 2001-05-25  Sam TH  <sam@uchicago.edu>
8937
8938         * cp-tree.h lex.h: Fix header include guards.
8939
8940 2001-05-25  Mark Mitchell <mark@codesourcery.com>
8941
8942         * decl.c (init_decl_processing): Tweak.
8943
8944 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
8945
8946         * decl.c (duplicate_decls): Tidy.
8947         (init_decl_processing): Always set flag_no_builtin.
8948
8949 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
8950
8951         PR c++/2184
8952         * decl2.c (do_local_using_decl): Push the decls, even in a
8953         template.
8954
8955 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
8956
8957         * optimize.c (initialize_inlined_parameters): Don't set
8958         TREE_READONLY for a VAR_DECL taking the place of an inlined
8959         PARM_DECL.
8960
8961 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
8962
8963         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
8964         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
8965         attribute.
8966
8967 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
8968
8969         * parse.y: Refer to compound literals as such, not as
8970         constructor-expressions.
8971
8972 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
8973
8974         * call.c (build_op_delete_call): Ignore exception-specifications
8975         when looking for matching delete operators.
8976         * init.c (build_new_1): Compute whether or not the allocation
8977         function used is a placement allocation function or not, and
8978         communicate this information to build_op_delete_call.
8979
8980 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
8981
8982         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
8983         (build_vtbl_ref): Adjust.
8984         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
8985         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
8986         Re-add vtable-gc.
8987         (unsupported_options): Correspondingly.
8988
8989         * decl2.c (maybe_make_one_only): Check flag_weak, not
8990         supports_one_only().
8991
8992         * cp-tree.def (START_CATCH_STMT): Lose.
8993         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
8994         * tree.c (cp_statement_code_p): Don't case it.
8995         * semantics.c (cp_expand_stmt): Likewise.
8996         * cp-tree.h (START_CATCH_TYPE): Lose.
8997         (HANDLER_TYPE): New.
8998         * except.c (expand_start_catch_block): Don't start any blocks.
8999         Return the type.
9000         (expand_end_catch_block): Don't end any blocks.
9001         * parse.y (handler): Don't pass anything from finish_handler_parms
9002         to finish_handler.
9003         * pt.c (tsubst_expr): Likewise.
9004         * semantics.c (begin_handler): Call note_level_for_catch here.
9005         (finish_handler_parms): Don't return anything.
9006         (genrtl_catch_block, begin_catch_block): Lose.
9007         (genrtl_handler): Call expand_start_catch here.
9008
9009 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
9010
9011         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
9012         (get_vtable_decl, build_vtt): Not here.
9013
9014 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
9015
9016         PR c++/2781
9017         * optimize.c (update_cloned_parm): Copy addressability and other
9018         flags.
9019
9020 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9021
9022         * pt.c (determine_specialization): Ignore artificial functions.
9023
9024 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
9025
9026         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
9027         (C_RID_CODE): Remove.
9028         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
9029         (init_parse): Don't do it here.
9030
9031 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
9032
9033         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
9034         function declaration to avoid stripping the symbol's attributes.
9035
9036 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
9037
9038         * decl.c (pushdecl): Adjust error string.
9039         (xref_tag): Adjust friend class injection warning. Remove the
9040         inherited name from the class shadowed scope.
9041
9042 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
9043
9044         * except.c (cp_protect_cleanup_actions): New function.
9045         (init_exception_processing): Don't set protect_cleanup_actions
9046         here.  Do set lang_protect_cleanup_actions.
9047
9048 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
9049
9050         * spew.c (read_token): Call yyerror on all unexpected tokens.
9051
9052 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
9053
9054         * init.c (member_init_ok_or_else): Take a tree rather than
9055         string for name.
9056         (expand_member_init): Adjust.
9057
9058 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
9059
9060         * decl.c (duplicate_decls): Suppress warning about duplicate
9061         decls if the first decl is a friend.
9062
9063 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
9064
9065         * except.c (choose_personality_routine): Export.  Add
9066         explanatory comment.  Take an enum languages, not a boolean.
9067         (initialize_handler_parm): Adjust to match.
9068         * cp-tree.h: Prototype choose_personality_routine.
9069         * lex.c (handle_pragma_java_exceptions): New function.
9070         (init_cp_pragma): Register #pragma GCC java_exceptions.
9071
9072 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
9073
9074         * method.c (build_mangled_C99_name): Remove unused prototype.
9075
9076 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
9077
9078         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
9079         * typeck.c (get_member_function_from_ptrfunc,
9080         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
9081         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
9082
9083         Reverted Geoff Keating's 2001-05-03's patch.
9084
9085 2001-05-11  Ira Ruben   <ira@apple.com>
9086
9087         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
9088
9089 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
9090
9091         * cp-tree.h (finish_label_expr, lookup_label): Delete.
9092         * parse.y: Update for '&&'; don't issue warning here.
9093         * semantics.c (finish_label_expr): Delete.
9094
9095 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
9096
9097         * splay-tree.h (splay_tree_max): New function.
9098         (splay_tree_min): Likewise.
9099
9100 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
9101
9102         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
9103         (pfn_vflag_identifier): Define.
9104         Update comment about layout of pointer functions.
9105         (build_ptrmemfunc1): Update prototype.
9106         (expand_ptrmemfunc_cst): Update prototype.
9107         * decl.c (initialize_predefined_identifiers): Initialize
9108         pfn_vflag_identifier.
9109         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
9110         an extra field to the type.
9111         * expr.c (cplus_expand_constant): Pass 'flag' between
9112         expand_ptrmemfunc_cst and build_ptrmemfunc1.
9113         * typeck.c (get_member_function_from_ptrfunc): When
9114         FUNCTION_BOUNDARY < 16, look at additional field to determine
9115         if a pointer-to-member is a real pointer or a vtable offset.
9116         (build_ptrmemfunc1): Add new parameter to contain extra field.
9117         (build_ptrmemfunc): Pass the extra field around.
9118         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
9119         (pfn_from_ptrmemfunc): Ignore the extra field.
9120
9121 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
9122
9123         * cp-tree.h (flag_inline_trees): Update documentation.
9124         * decl.c (init_decl_processing): Adjust handling of
9125         flag_inline_functions and flag_inline_trees to support -O3.
9126         (grokfndecl): Set DECL_INLINE on all functions if that's what
9127         the user requested.
9128         (save_function_data): Clear DECL_INLINE in
9129         current_function_cannot_inline is non-NULL.
9130         * decl2.c (flag_inline_trees): Update documentation.
9131
9132 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
9133
9134         * dump.c (cp_dump_tree, USING_STMT case): New case.
9135         * tree.c (cp_statement_code_p): Add USING_STMT.
9136         * decl2.c (do_using_directive): Add the using directive statement.
9137
9138         * tree.c (walk_tree): Reformat an if block.
9139
9140 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
9141
9142         * decl.c (compute_array_index_type): Don't try to do anything with
9143         the indices when processing a template.
9144
9145 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9146
9147         * call.c: NULL_PTR -> NULL.
9148         * class.c: Likewise.
9149         * cvt.c: Likewise.
9150         * decl.c: Likewise.
9151         * decl2.c: Likewise.
9152         * except.c: Likewise.
9153         * init.c: Likewise.
9154         * rtti.c: Likewise.
9155         * search.c: Likewise.
9156         * tree.c: Likewise.
9157         * typeck.c: Likewise.
9158         * typeck2.c: Likewise.
9159
9160 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
9161
9162         * decl2.c (do_using_directive): Revert previous patch.
9163
9164 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
9165
9166         * cp-tree.def (USING_STMT): New statement node.
9167         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
9168         * decl2.c (do_using_directive): Add USING_STMT to statement
9169         tree. Don't emit errors when processing template decl.
9170         * pt.c (tsubst_expr, USING_STMT case): New case.
9171         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
9172
9173 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
9174
9175         * call.c (build_new_op): Convert args from reference here.
9176         (build_conditional_expr): Don't convert here.
9177
9178 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
9179
9180         * spew.c (last_token_id): New static variable.
9181         (read_token): Set it here.
9182         (yyerror): Use it here.
9183
9184 2001-04-30  Richard Henderson  <rth@redhat.com>
9185
9186         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
9187         * decl.c: Likewise.
9188
9189 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
9190
9191         * gxxint.texi: Remove.
9192         * Make-lang.in: Remove all traces of gxxint.texi.
9193
9194 2001-04-30  Mark P Mitchell  <mark@codesourcery.com>
9195
9196         * decl2.c (start_static_initialization_or_destruction): Correct
9197         logic to handle the -fno-use-cxa-atexit case.
9198
9199 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
9200
9201         * optimize.c (update_cloned_parm): New function.
9202         (maybe_clone_body): Use it.  Update the `this' parameter too.
9203
9204 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
9205
9206         * decl2.c (unsupported_options): Add new-abi.
9207         * lang-options.h: Remove no longer supported options.
9208
9209 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
9210
9211         * except.c (can_convert_eh): Don't check template parms,
9212         typename types etc.
9213
9214 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
9215
9216         * optimize.c (maybe_clone_body): Copy parameter names and locations.
9217
9218 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
9219
9220         * cp-tree.h (adjust_clone_args): Prototype new function.
9221         * class.c (adjust_clone_args): New function.
9222         * decl.c (start_function): Call it for in charge ctors.
9223
9224 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
9225
9226         * method.c (use_thunk): Make sure that thunks really are emitted
9227         when requested.
9228
9229 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
9230
9231         * mangle.c (write_chars): New macro.
9232         (hwint_to_ascii): New function
9233         (write_number): Use it.
9234         (write_integer_cst): Deal with really big numbers.
9235
9236 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
9237
9238         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
9239         the clone.
9240
9241 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
9242
9243         * decl.c (grokdeclarator): Set context of namespace scope
9244         TYPE_DECLS.
9245
9246 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
9247
9248         * cp/optimize.c: Include hashtab.h.
9249         (struct inline_data): Add tree_pruner.
9250         (expand_call_inline, expand_calls_inline): Use it when calling
9251         walk_tree.
9252         (optimize_function): Initialize and free tree_pruner.
9253
9254 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
9255
9256         Lazy __FUNCTION__ generation.
9257         * cp-tree.def (FUNCTION_NAME): Remove.
9258         * cp-tree.h (function_name_declared_p): Remove.
9259         (cp_fname_init): Prototype.
9260         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
9261         don't call declare_function_name. Call start_fname_decls.
9262         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
9263         clobber the line number.
9264         (cp_fname_init): New function.
9265         (start_function): Call start_fname_decls.
9266         (finish_function): Call finish_fname_decls.
9267         * lex.c (reswords): Add slots for __FUNCTION__ et al.
9268         (rid_to_yy): Add mappings for __FUNCTION__ et al.
9269         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
9270         * parse.y (VAR_FUNC_NAME): New token.
9271         (primary): Add VAR_FUNC_NAME.
9272         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
9273         generation.
9274         (tsubst, FUNCTION_NAME case): Remove.
9275         (tsubst_copy, FUNCTION_NAME case): Remove.
9276         (tsubst_expr, DECL_STMT case): Be careful with a
9277         DECL_PRETTY_FUNCTION_P.
9278         (instantiate_decl): Remove function_name_declared_p.
9279         * semantics.c (begin_compound_statement): Don't call
9280         declare_function_name here.
9281         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
9282         (finish_translation_unit): Call finish_fname_decls.
9283         (expand_body): Remove function_name_declared_p.
9284         * typeck2.c (digest_init): Allow any ERROR_MARK.
9285
9286 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
9287
9288         * pt.c (tsubst_decl): Use VOID_TYPE_P.
9289         * semantics.c: Fix some typos.
9290
9291 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
9292
9293         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
9294
9295 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9296
9297         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
9298
9299 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
9300
9301         * except.c (build_throw): Wrap the initialization of the exception
9302         object in a MUST_NOT_THROW_EXPR.
9303         (do_free_exception): #if 0.
9304
9305 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
9306
9307         * cp-tree.h (finish_enum): Change prototype.
9308         * decl.c (finish_enum): Reorganize.
9309         * parse.y (structsp): Adjust calls to finish_enum.
9310
9311 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
9312
9313         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
9314         't' case.
9315
9316 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
9317
9318         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
9319         (layout_empty_base): Return at end flag.
9320         (build_base_field): Likewise.
9321         (build_base_fields): Likewise.
9322         (layout_virtual_bases): Don't add 1 to eoc value.
9323         (end_of_class): Use full size for empty bases.
9324         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
9325         empty bases. Don't add 1 to eoc value. Only add trailing padding
9326         if we're an empty class with no empty bases.
9327         (dump_class_hierarchy): Dump size and alignment.
9328
9329 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
9330
9331         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
9332         ICS_BAD_FLAG.
9333
9334 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
9335
9336         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
9337         is found, look first if name does not match the structure name.
9338
9339 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
9340
9341         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
9342         set.
9343         (SET_DECL_LANGUAGE): New macro.
9344         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
9345         (pushdecl): Likewise.
9346         (build_library_fn_1): Likewise.
9347         (build_cp_library_fn): Likewise.
9348         (grokfndecl): Likewise.
9349         (grokvardecl): Mark `extern "C"' variables as having C linkage.
9350         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
9351         * lex.c (retrofit_lang_decl): Likewise.
9352         * mangle.c (mangle_decl_string): Don't mangle the names of
9353         variables declared with C language linkage.
9354         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
9355
9356 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
9357
9358         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
9359         flag_access_control from uninitialized storage.
9360
9361 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
9362
9363         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
9364         * mangle.c (write_pointer_to_member_type): Fix mangling of
9365         pointers to cv-qualified member function types.
9366
9367         * init.c (build_delete): Create a SAVE_EXPR for the address if
9368         we're going to use it more than once.
9369
9370 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
9371
9372         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
9373         (expand_ptremfunc_cst): Change prototype.
9374         (delta2_from_ptrmemfunc): Remove.
9375         * expr.c (cplus_expand_constant): Adjust call to
9376         expand_ptrmemfunc_cst.
9377         * typeck.c (build_ptrmemfunc1): Simplify.
9378         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
9379         results in a constant.
9380         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
9381         (delta2_from_ptrmemfunc): Remove.
9382         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
9383
9384 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
9385
9386         * cp-tree.h (decl_namespace_list): New macro.
9387         (struct saved_scope): Add decl_ns_list.
9388         * decl.c (mark_saved_scope): Mark it.
9389         * decl2.c: Lose static decl_namespace_list.
9390         (init_decl2): Don't save it.
9391
9392 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9393
9394         * cp-tree.h (warn_return_type, yylex): Delete redundant
9395         declarations.
9396
9397         * decl.c (current_class_depth, global_namespace): Likewise.
9398
9399         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
9400
9401         * repo.c (flag_use_repository): Likewise.
9402
9403 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9404
9405         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
9406         set_block, pushdecl, getdecls, gettags, init_decl_processing,
9407         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
9408         lvalue_or_else, print_lang_statistics, comp_target_types,
9409         unsigned_type, signed_type, signed_or_unsigned_type,
9410         build_function_call, mark_addressable, incomplete_type_error):
9411         Delete redundant declarations.
9412
9413 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
9414
9415         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
9416         (TYPE_ANONYMOUS_P): New macro.
9417         (TAGGED_TYPE_P): New macro.
9418         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
9419         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
9420         * tree.c (no_linkage_helper): Likewise.
9421         * semantics.c (begin_class_definition): Likewise.
9422         * pt.c (convert_template_argument): Likewise.
9423         * lex.c (check_for_missing_semicolon): Likewise.
9424
9425 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
9426
9427         * class.c (dfs_unshared_virtual_bases): New function.
9428         (mark_primary_bases): Call it.
9429         (check_bases): Ignore virtual bases when determining
9430         nearly-emptiness.
9431
9432 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
9433
9434         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
9435
9436 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
9437
9438         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
9439         cloned function to the clone.
9440
9441 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9442
9443         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
9444
9445         * semantics.c: Include expr.h.
9446
9447 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
9448
9449         * method.c (implicitly_declare_fn): Commonize code for copy ctor
9450         and assignment op. Set TREE_USED for parameter.
9451
9452 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
9453
9454         * class.c (find_final_overrider_data): Add `candidates'.
9455         (dfs_find_final_overrider): Don't issue error messages
9456         prematurely.
9457         (find_final_overrider): Issue error messages here.
9458         (build_base_field): Don't warn about amgibuous direct bases here.
9459         (warn_about_ambiguous_direct_bases): New function.
9460         (layout_class_type): Use it.
9461
9462 2001-04-10  Richard Henderson  <rth@redhat.com>
9463
9464         * typeck.c (build_array_ref): Push the array reference inside
9465         COMPOUND_EXPR and COND_EXPR.
9466
9467 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
9468
9469         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
9470         * decl.c (duplicate_decls): Adjust accordingly.
9471         (maybe_commonize_var): Likewise.
9472         (grokfndecl): Likewise.
9473         (start_function): Likewise.
9474         (start_method): Likewise.
9475         * decl2.c (key_method): Likewise.
9476         (import_export_decl): Likewise.
9477         * method.c (implicitly_declare_fn): Likewise.
9478         * optimize.c (maybe_clone_body): Likewise.
9479
9480 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
9481
9482         * lang-specs.h: Add __DEPRECATED.
9483
9484 2001-04-05  J"orn Rennecke <amylaar@redhat.com>
9485
9486         * search.c (get_dynamic_cast_base_type): When building a new
9487         constant, set its type to ssizetype.
9488
9489 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
9490
9491         * optimize.c (expand_call_inline): Only add newly inlined statements
9492         into inlined_stmts.
9493
9494 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
9495
9496         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
9497         (OPERATOR_FORMAT): Likewise.
9498         (OPERATOR_TYPENAME_FORMAT): Likewise.
9499         * operators.def: Remove old name-mangling information.
9500         * decl.c (grok_op_properties): Adjust accordingly.
9501         * lex.c (init_operators): Likewise.
9502         * rtti.c (get_tinfo_decl): Issue error messages about types that
9503         have variable size.
9504
9505 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
9506
9507         * decl2.c (import_export_decl): Don't call import_export_class
9508         when processing an inline member function.
9509         * semantics.c (expand_body): Call import_export_decl before
9510         emitting inline functions.
9511
9512 2001-03-28  Richard Henderson  <rth@redhat.com>
9513
9514         IA-64 ABI Exception Handling:
9515         * cp-tree.def (EH_SPEC_BLOCK): New.
9516         (MUST_NOT_THROW_EXPR): New.
9517         * cp-tree.h: Update changed function declarations.
9518         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
9519         (CPTI_CALL_UNEXPECTED): New.
9520         (struct cp_language_function): Rename x_eh_spec_try_block
9521         to x_eh_spec_block.
9522         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
9523         * decl.c (current_binding_level): If no current function
9524         bindings, revert to scope_chain.
9525         (initialize_predefined_identifiers): Remove __cp_push_exception.
9526         (store_parm_decls): Use begin_eh_spec_block.
9527         (finish_function): Use finish_eh_spec_block.
9528         (mark_lang_function): Update for name changes.
9529         * decl2.c (finish_file): No mark_all_runtime_matches.
9530         * dump.c (cp_dump_tree): Handle new tree codes.
9531         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
9532         * except.c (catch_language_init, catch_language): Remove.
9533         (init_exception_processing): Don't set language code.
9534         Initialize call_unexpected_node, protect_cleanup_actions,
9535         eh_personality_libfunc, lang_eh_runtime_type.
9536         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
9537         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
9538         (prepare_eh_type): Split out type canonicalizations ...
9539         (build_eh_type_type): ... from here.
9540         (build_eh_type_type_ref): Remove.
9541         (mark_all_runtime_matches): Remove.
9542         (build_exc_ptr): New.
9543         (do_begin_catch, do_end_catch): New.
9544         (do_pop_exception): Remove.
9545         (build_terminate_handler): Remove.
9546         (choose_personality_routine): Split out language choice from ...
9547         (initialize_handler_parm): ... here.
9548         Use MUST_NOT_THROW_EXPR.
9549         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
9550         exception object handling.
9551         (expand_start_eh_spec, expand_end_eh_spec): Remove.
9552         (expand_exception_blocks, alloc_eh_object): Remove.
9553         (begin_eh_spec_block, finish_eh_spec_block): New.
9554         (do_allocate_exception, do_free_exception): New.
9555         (expand_throw): Merge into ...
9556         (build_throw): ... here.  Update for abi.
9557         * expr.c (cplus_expand_expr): No expand_internal_throw.
9558         Handle MUST_NOT_THROW_EXPR.
9559         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
9560         * semantics.c (*) Update for except.h name changes.
9561         (genrtl_try_block): No protect_with_terminate.
9562         (genrtl_eh_spec_block): New.
9563         (genrtl_handler): Don't emit the goto here.
9564         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
9565         (genrtl_finish_function): Don't expand_exception_blocks.
9566         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
9567
9568 2001-03-28  Richard Henderson  <rth@redhat.com>
9569
9570         * decl.c (struct named_label_list): Rename eh_region to
9571         in_try_scope, add in_catch_scope.
9572         (struct binding_level): Rename eh_region to is_try_scope,
9573         add is_catch_scope.
9574         (note_level_for_try): Rename from note_level_for_eh.
9575         (note_level_for_catch): New.
9576         (poplevel): Copy both is_try_scope and is_catch_scope to
9577         the named_label_list struct.
9578         (check_previous_goto_1): Don't check for catch block via
9579         DECL_ARTIFICIAL; use in_try_scope instead.
9580         (check_goto): Likewise.
9581         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
9582         * except.c (expand_start_catch_block): Call note_level_for_catch.
9583         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
9584
9585 2001-03-27  Richard Henderson  <rth@redhat.com>
9586
9587         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
9588         exceptions_via_longjmp.
9589
9590 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
9591
9592         * pt.c (check_default_tmpl_args):  Make error messages clearer.
9593
9594 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
9595
9596         * error.c:  Also undefine 'A' macro used for cp_printers definition.
9597
9598 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9599
9600         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
9601
9602 2001-03-26  Mike Yang <yang@research.att.com>
9603             Mark Mitchell  <mark@codesourcery.com>
9604
9605         * dump.c (dump_access): New function.
9606         (cp_dump_tree): Use it.  Dump basetype information for class
9607         types.
9608
9609 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
9610
9611         * Makefile.in (optimize.o): Depend on params.h.
9612         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
9613         (init_decl_processing): Set flag_no_inline when doing
9614         inlining-on-trees.
9615         * optimize.c: Include params.h.
9616         (struct inline_data): Improve documentation of FNS.  Add
9617         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
9618         (INSNS_PER_STMT): New macro.
9619         (remap_block): Use CLONING_P.
9620         (inlinable_function_p): Don't inline big functions.
9621         (expand_call_inline): Keep track of how much inlining we've done.
9622         (optimize_function): Set FIRST_INLINED_FN.
9623         (maybe_clone_body): Set CLONING_P.
9624         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
9625         tree nodes.
9626         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
9627         rest_of_compilation.  Clear DECL_RTL for local variables
9628         afterwards.
9629         (clear_decl_rtl): New function.
9630
9631 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
9632
9633         Implement DR 209
9634         * cp-tree.h (skip_type_access_control,
9635         reset_type_access_control): Prototype.
9636         * decl.c (grokdeclarator): Access of friends is not checked.
9637         * parse.y (component_decl_list): Reset type access control.
9638         * semantics.c (decl_type_access_control): Clear
9639         current_type_lookups.
9640         (save_type_access_control): Don't save if not deferring.
9641         (skip_type_access_control, reset_type_access_control): New
9642         functions.
9643         (begin_class_definition): Do type access control for basetypes.
9644         Start deferred access control.
9645         (finish_class_definition): Resume immediate access control if
9646         this is a local class.
9647
9648 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9649
9650         * class.c (add_method): Use memcpy/memmove, not bcopy.
9651
9652         * decl.c (duplicate_decls): Likewise.
9653
9654 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
9655
9656         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
9657         not `_'.
9658
9659 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
9660
9661         * decl.c (local_names): Define.
9662         (push_local_name): New.
9663         (grok_reference_init): Return init if initializing static reference
9664         variable with non-constant instead of emitting it.
9665         Move expand_static_init call to cp_finish_decl.
9666         (layout_var_decl): Call push_local_name.
9667         (maybe_commonize_var): Allow inlining functions even if they have
9668         static local variables, use comdat_linkage for them if flag_weak.
9669         (check_initializer): Call obscure_complex_init if
9670         grok_reference_init returned nonzero.
9671         (save_function_data): Clear x_local_names.
9672         (pop_cp_function_context): Free x_local_names.
9673         (mark_inlined_fns): Remove.
9674         (mark_lang_function): Mark x_local_names.
9675         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
9676         Mark inlined_fns as tree, remove call to mark_inlined_fns.
9677         * class.c (alter_access): Ensure DECL_ACCESS is never set if
9678         DECL_DISCRIMINATOR_P.
9679         * cp-tree.h (cp_language_function): Add x_local_names.
9680         (lang_decl_flags): Add discriminator into u2.
9681         (lang_decl_inlined_fns): Remove.
9682         (lang_decl): inlined_fns is now a TREE_VEC.
9683         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
9684         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
9685         TREE_VEC, not a custom structure.
9686         (optimize_function): Likewise.
9687         * mangle.c (discriminator_for_local_entity): Discriminate among
9688         VAR_DECL local entities.
9689         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
9690         is not valid.
9691
9692 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
9693
9694         Add support for Java interface method calls.
9695         * cp-tree.h (struct lang_type): Add java_interface flag.
9696         (TYPE_JAVA_INTERFACE): New macro.
9697         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
9698         by setting TYPE_JAVA_INTERFACE.
9699         * call.c (java_iface_lookup_fn): New static.
9700         (build_over_call): If calling a method declared in a
9701         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
9702         expression which resolves the function address.
9703         (build_java_interface_fn_ref): New function.
9704
9705 2001-03-22  Richard Henderson  <rth@redhat.com>
9706
9707         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
9708         * except.c: Don't include it.
9709
9710 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
9711             based on an idea from Joe Buck <jbuck@synopsys.com>
9712
9713         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
9714         New nonterminals.
9715         (data_def, component_decl): Add reductions to bad_decl.
9716
9717 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
9718
9719         * method.c (do_build_assign_ref): Don't use build_modify_expr for
9720         anonymous aggregates, since they don't have assignment operator
9721         method.
9722         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
9723         assignment operators for anonymous structure fields.
9724
9725 2001-03-21  Jason Merrill  <jason@redhat.com>
9726
9727         * pt.c (instantiate_decl): Abort if we see a member constant
9728         instantiation that doesn't already have its initializer.
9729         Downgrade explicit instantiation without definition to pedwarn.
9730
9731         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
9732         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
9733         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
9734
9735         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
9736         (pending_vtables): Remove.
9737         * decl2.c (pending_vtables): Remove.
9738         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
9739         CLASSTYPE_VTABLE_NEEDS_WRITING.
9740         (import_export_class): Likewise.
9741         (init_decl2): Don't mark pending_vtables.
9742         * lex.c (handle_pragma_vtable): Just sorry.
9743         * pt.c (instantiate_class_template): Don't mess with
9744         CLASSTYPE_VTABLE_NEEDS_WRITING.
9745         (mark_class_instantiated): Likewise.
9746         * ptree.c (print_lang_type): Don't print it.
9747         * semantics.c (begin_class_definition): Don't set it.
9748
9749         * pt.c (template_tail): Replace with last_pending_template.
9750         (maybe_templates, maybe_template_tail): Remove.
9751         (add_pending_template): Adjust.
9752         (instantiate_pending_templates): Adjust.
9753
9754         * cp-tree.h (struct saved_scope): Remove lang_stack field.
9755         (current_lang_stack): Remove.
9756         * decl.c (maybe_push_to_top_level): Don't initialize it.
9757         (duplicate_decls): Use current_lang_depth.
9758         (xref_basetypes): Likewise.
9759         * class.c (current_lang_depth): New fn.
9760         (push_lang_context): Use more varray functionality.
9761         (pop_lang_context): Likewise.
9762
9763         * error.c (GLOBAL_THING): Always use '__'.
9764
9765 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
9766
9767         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
9768
9769         * mangle.c (mangle_decl_string): Mangle the names of overloaded
9770         operators, even when they have `extern "C"' linkage.
9771
9772 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
9773
9774         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
9775         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
9776         where it's not necessary.
9777         (add_method): Remove optimization involving comparison of
9778         DECL_ASSEMBLER_NAME.
9779         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
9780         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
9781         where it's not necessary.
9782         (check_methods): Likewise.
9783         (build_clone): Likewise.
9784         (built_vtt): Likewise.
9785         * cp-tree.h (DECL_NEEDED_P): Likewise.
9786         * decl.c (pushtag): Likewise.
9787         (duplicate_decls): Likewise.
9788         (pushdecl): Likewise.
9789         (builtin_function): Likewise.
9790         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
9791         (build_cp_library_fn): Likewise.
9792         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
9793         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
9794         where it's not necessary.
9795         (make_rtl_for_nonlocal_decl): Likewise.
9796         (cp_finish_decl): Likewise.
9797         (grokfndecl): Likewise.
9798         (grokvardecl): Likewise.
9799         (grokdeclarator): Likewise.
9800         (start_function): Likewise.
9801         (cp_missing_return_ok_p): Likewise.
9802         * decl2.c (grokclassfn): Likewise.
9803         (check_classfn): Likewise.
9804         (finish_static_data_member_decl): Likewise.
9805         (grokfield): Likewise.
9806         * error.c (GLOBAL_IORD_P): Remove.
9807         (dump_global_iord): Improve output.
9808         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
9809         * except.c (nothrow_libfn_p): Summarily reject any function not in
9810         namespace-scope.
9811         * init.c (build_java_class_ref): Don't explicitly set
9812         DECL_ASSEMBLER_NAME after calling mangle_decl.
9813         * mangle.c (mangle_decl_string): Handle extern "C" functions.
9814         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
9815         * method.c (set_mangled_name_for_decl): Don't explicitly set
9816         DECL_ASSEMBLER_NAME after calling mangle_decl.
9817         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
9818         IDENTIFIER_GLOBAL_VALUE for the thunk.
9819         * pt.c (set_mangled_name_for_template_decl): Remove.
9820         (check_explicit_specialization): Don't use it.
9821         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
9822         (tsubst_friend_function): Likewise.
9823         (tsubst_decl): Likewise.
9824         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
9825         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
9826         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
9827         where it's not necessary.
9828         (tinfo_base_init): Likewise.
9829         (create_real_tinfo_var): Likewise.
9830         * search.c (looup_field_1): Likewise.
9831         * semantics.c (finish_named_return_value): Likewise.
9832         * tree.c (init_tree): Set lang_set_decl_assembler_name.
9833
9834 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
9835
9836         Correct semantics restrictions checking in throw-expression.
9837         * except.c (is_admissible_throw_operand): New function.
9838         (build_throw): Use it.
9839
9840 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
9841
9842         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
9843         and its ilk.
9844
9845 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
9846
9847         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
9848         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
9849         * decl.c (duplicate_decls): Likewise.
9850         (builtin_function): Likewise.
9851         (build_library_fn): Likewise.
9852         (build_cp_library_fn): Likewise.
9853         (check_initializer): Likewise.
9854         (cp_finish_decl): Likewise.
9855         * decl2.c (grokfield): Likewise.
9856         (grok_function_init): Remove #if 0'd code.
9857         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
9858         * friend.c (do_friend): Likewise.
9859         * init.c (get_temp_regvar): Likewise.
9860         * method.c (make_thunk): Likewise.
9861         * pt.c (tsubst_friend_function): Likewise.
9862         (tsubst_decl): Likewise.
9863         (regenerate_decl_from_template): Likewise.
9864         * semantics.c (genrtl_named_return_value): Likewise.
9865         (expand_body): Likewise.
9866         (genrtl_finish_function): Likewise.
9867         * tree.c (cp_tree_equal): Likewise.
9868
9869 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
9870
9871         * call.c (convert_like_real): Add extra semantics to INNER
9872         parameter. Don't convert to temporary if a user conversion
9873         gives us an lvalue that we're about to bind to a reference.
9874         Set INNER to indicate pending reference binding on recursive
9875         calls.
9876
9877 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
9878
9879         * cp/lex.c: Delete duplicate pending_lang_change.
9880
9881 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
9882
9883         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
9884         Similarly.
9885         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
9886         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
9887
9888 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
9889
9890         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
9891
9892 2001-03-08  Stan Shebs  <shebs@apple.com>
9893
9894         * cp-tree.h (set_identifier_local_value): Remove unused decl.
9895
9896 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
9897
9898         * spew.c: Remove references to CPP_OSTRING.
9899
9900 2001-03-06  Andrew Haley  <aph@redhat.com>
9901
9902         * typeck.c (convert_arguments): Check that we have an fndecl.
9903
9904 2001-03-05  Andrew Haley  <aph@redhat.com>
9905
9906         * typeck.c (convert_arguments): Don't do ellipsis conversion for
9907         __built_in_constant_p.
9908
9909 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
9910
9911         * typeck.c (build_static_cast): Allow enum to enum conversions
9912         as per DR 128.
9913
9914 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
9915
9916         * class.c (check_field_decls): Pointers to member do not a
9917         non-pod struct make, as per DR 148.
9918
9919 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
9920
9921         * call.c (joust): cp_pedwarn when using gnu extension concerning
9922         worst conversion sequences.
9923
9924 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
9925
9926         * decl.c: Replace all uses of 'boolean' with 'bool'.
9927
9928 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
9929
9930         * lang-specs.h: Add zero initializer for cpp_spec field to
9931         all array elements that need one.  Don't put an #ifdef inside
9932         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
9933         use it.
9934
9935 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
9936
9937         Implement using decls inside template functions.
9938         * decl2.c (validate_nonmember_using_decl): Don't special case
9939         fake_std_node in the global namespace. Don't reject early when
9940         processing a template.
9941         (do_local_using_decl): Add to statement tree. Don't do further
9942         processing when building a template.
9943         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
9944
9945 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
9946
9947         * decl2.c (do_nonmember_using_decl): Don't complain if we find
9948         same function. Do complain about ambiguating extern "C"
9949         declarations.
9950
9951 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
9952
9953         Remove floating point and complex type template constant parms.
9954         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
9955         COMPLEX_TYPE extensions.
9956         (invalid_nontype_parm_type_p): Likewise.
9957
9958 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
9959
9960         * except.c (call_eh_info): Revert "match_function"'s type.
9961
9962 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
9963
9964         Fix ctor vtable vcall offsets.
9965         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
9966         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
9967         (get_matching_base): Remove.
9968         (get_original_base): New function.
9969         (build_vtbl_initializer): Initialize vid.rtti_binfo.
9970         Use a virtual thunk for a ctor vtable with an index
9971         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
9972         primary base within a constructor vtable. Only set
9973         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
9974         when primary base has been lost.
9975         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
9976
9977 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
9978
9979         * call.c (joust): Ensure more_specialized()'s argument length
9980         parameter has correct value for constructors.
9981
9982 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
9983
9984         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
9985
9986         * decl.c (mark_inlined_fns): Prototype.
9987
9988 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
9989
9990         * spew.c (yylex): Correct handling of friends.
9991
9992 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
9993
9994         * mangle.c (write_encoding): Pass write_function_type the
9995         FUNCTION_DECL for the function being encoded.
9996         (write_function_type): Pass it along to write_bare_function_type.
9997         (write_bare_function_type): Pass it along to write_method_parms.
9998         (write_method_parms): Don't mangle the compiler-generated
9999         parameters to a constructor or destructor.
10000
10001 2001-02-22  Andreas Jaeger  <aj@suse.de>
10002
10003         * optimize.c: Include toplev.h for
10004         note_deferral_of_defined_inline_function prototype.
10005
10006 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
10007
10008         * cp-tree.h (struct lang_decl_inlined_fns): New.
10009         (struct lang_decls): Add inlined_fns.
10010         (DECL_INLINED_FNS): New macro.
10011         * optimize.c (struct inline_data): Add inlined_fns.
10012         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
10013         (inlinable_function_p): Likewise, fix typo in comment,
10014         function is not inlinable if it already inlined function currently
10015         being optimized.
10016         (expand_call_inline): Add fn to inlined_fns if necessary.
10017         (optimize_function): Initialize inlined_fns.
10018         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
10019         * decl.c (mark_inlined_fns): New function.
10020         (lang_mark_tree): Call it.
10021
10022 2001-02-21  Jason Merrill  <jason@redhat.com>
10023
10024         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
10025         (DECL_UNINLINABLE): Move to middle-end.
10026
10027         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
10028         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
10029         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
10030         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
10031         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
10032
10033         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
10034         second parm of op=.
10035
10036 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
10037
10038         * decl2.c (set_decl_namespace): Allow explicit instantiations in
10039         any namespace.
10040
10041 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10042
10043         * optimize.c (expand_call_inline): Don't walk subtrees of type
10044         nodes.
10045
10046 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
10047
10048         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
10049         for a destructor.
10050
10051 2001-02-18  Jason Merrill  <jason@redhat.com>
10052
10053         Do put the VTT parameter in DECL_ARGUMENTS.
10054         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
10055         (current_vtt_parm): New macro.
10056         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
10057         (DECL_HAS_VTT_PARM_P): New macro.
10058         (DECL_VTT_PARM): Remove.
10059         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
10060         * decl.c (duplicate_decls): Only copy the operator code if
10061         appropriate.
10062         (start_function): Set current_vtt_parm.
10063         (lang_mark_tree): Don't mark vtt_parm.
10064         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
10065         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
10066         * class.c (build_clone): Maybe remove the VTT parm.
10067         * optimize.c (maybe_clone_body): Set up the VTT parm.
10068         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
10069         * call.c (build_over_call): Just allow the VTT arg.
10070         * method.c (make_thunk): Don't set DECL_VTT_PARM.
10071         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
10072         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
10073         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
10074         * error.c (dump_function_decl): Likewise.
10075         * call.c (build_user_type_conversion_1, convert_like_real): Abort
10076         if we try to call a constructor with in-charge or VTT parms.
10077         * method.c (skip_artificial_parms_for): New fn.
10078         * call.c (add_function_candidate, build_over_call): Call it.
10079         * call.c (build_new_method_call): Use current_vtt_parm.
10080         * init.c (expand_virtual_init): Likewise.
10081         * class.c (same_signature_p): No longer static.
10082         * cp-tree.h: Declare it.
10083         * search.c (look_for_overrides_r): Use it.
10084
10085 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
10086
10087         * cp-tree.h (new_abi_rtti_p): Remove.
10088         (name_mangling_version): Likewise.
10089         (flag_do_squangling): Likewise.
10090         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
10091         * decl.c (grokfndecl): Likewise.
10092         * decl2.c (name_mangling_version): Remove.
10093         (flag_do_squangling): Likewise.
10094         (lang_f_options): Remove `squangle'.
10095         (unsupported_options): Add `squangle'.
10096         (cxx_decode_option): Issue a warning about uses of
10097         -fname-mangling-version.
10098         (finish_file): Remove old ABI support.
10099         * pt.c (check_explicit_specialization): Likewise.
10100         (tsubst_decl): Likewise.
10101         * rtti.c (init_rtti_processing): Likewise.
10102         (build_headof): Likewise.
10103         (get_tinfo_decl_dynamic): Likewise.
10104         (tinfo_from_decl): Likewise.
10105         (build_dynamic_cast_1): Likewise.
10106         (synthesize_tinfo_var): Likewise.
10107         * init.c (build_new): Allow enumeration types for the array-bounds
10108         in a direct-new-declarator.
10109
10110         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
10111
10112         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
10113         TREE_PROTECTED from the template being specialized.
10114
10115 2001-02-17  Jason Merrill  <jason@redhat.com>
10116
10117         * decl2.c (build_artificial_parm): Set TREE_READONLY.
10118
10119         * decl.c (bad_specifiers): Allow throw specs on things with
10120         pointer-to-function or -member-function type.
10121         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
10122         a pmf.
10123
10124 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
10125
10126         * call.c (check_dtor_name): Handle template names correctly.
10127
10128 2001-02-16  Jason Merrill  <jason@redhat.com>
10129
10130         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
10131         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
10132         * optimize.c (maybe_clone_body): Don't substitute it.
10133         * call.c (build_new_method_call): Check in_chrg instead.
10134         * init.c (expand_virtual_init): Likewise.
10135
10136 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
10137
10138         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
10139         class-type introduces at least a type-name.
10140
10141 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
10142
10143         * call.c (convert_like_real): Create a temporary for non-lvalue.
10144
10145 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
10146
10147         * cp-tree.h: Fix typos in comments.
10148
10149 2001-02-16  Jason Merrill  <jason@redhat.com>
10150
10151         * optimize.c (remap_block): If we're compiling a clone, pass the
10152         new block to insert_block.
10153
10154 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
10155
10156         * semantics.c (finish_asm_stmt): Robustify.
10157
10158 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
10159
10160         * pt.c (push_template_decl_real): Don't remangle the name of a
10161         class template.
10162
10163 2001-02-15  Jim Meyering  <meyering@lucent.com>
10164
10165         * Make-lang.in (c++.install-common): Depend on installdirs.
10166         (c++.install-info): Likewise.
10167         (c++.install-man): Likewise.
10168
10169 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
10170
10171         * typeck2.c (build_m_component_ref): Robustify.
10172
10173 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
10174
10175         * friend.c (do_friend): Don't take the nested [template] class
10176         into account when deciding whether to warn about the friend
10177         function not referring to a template function.
10178
10179 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
10180
10181         * typeck.c (build_unary_op): Clarify error message.
10182
10183 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
10184
10185         * parse.y (component_constructor_declarator): allow optional
10186         parentheses around constructor class name.
10187
10188 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
10189
10190         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
10191         section.
10192         * init.c (emit_base_init): Remove incorrect comment about
10193         virtual bases.
10194         * method.c (make_thunk): Fix comment alignment.
10195
10196 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
10197
10198         Kill remnants of this is variable.
10199         * cp-tree.h (flag_this_is_variable): Remove.
10200         * decl2.c (flag_this_is_variable): Remove.
10201         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
10202         (build_vbase_path): The path is non-static, even in a cdtor.
10203         (resolves_to_fixed_type_p): Add additional return value.
10204         * search.c (init_vbase_pointers): Adjust.
10205         * tree.c (lvalue_p_1): Adjust.
10206         * typeck.c (mark_addressable): Adjust.
10207
10208 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
10209
10210         * pt.c (unify): Don't check cv quals of array types.
10211
10212 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
10213
10214         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
10215         check whether we already have the type.
10216
10217 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
10218
10219         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
10220         * call.c (build_op_delete_call): Simplify to remove duplicate
10221         code.
10222         * class.c (clone_function_decl): Don't build the deleting variant
10223         of a non-virtual destructor.
10224         * decl.c (finish_destructor_body): Don't call delete if this is a
10225         non-virtual destructor.
10226         * init.c (build_delete): Explicitly call `operator delete' when
10227         deleting an object with a non-virtual destructor.
10228
10229 2001-02-13  Jason Merrill  <jason@redhat.com>
10230
10231         * lang-specs.h: Add more __EXCEPTIONS.
10232
10233 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
10234
10235         * typeck2.c (process_init_constructor): Check
10236         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
10237
10238 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
10239
10240         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
10241         Remove spurious information in comment. Allow further
10242         adjustments of REFERENCE_TYPE args.
10243
10244 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
10245
10246         * errfn.c (cp_deprecated): Tweak diagnostic text.
10247         * parse.y (new_initializer): Deprecate initializer lists
10248         extension.
10249
10250 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
10251
10252         Remove old ABI support.
10253
10254 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
10255
10256         * decl2.c (flag_vtable_thunks): Always set it to 1.
10257         (flag_new_abi): Likewise.
10258         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
10259
10260         * Makefile.in (g++spec.o): Fix typo.
10261
10262 2001-02-09  Jason Merrill  <jason@redhat.com>
10263
10264         * lang-specs.h: Restore definition of __EXCEPTIONS.
10265
10266 2001-02-08  Jason Merrill  <jason@redhat.com>
10267
10268         * search.c (shared_member_p): New function.
10269         (lookup_field_r): Use it.
10270         * cp-tree.h (SHARED_MEMBER_P): Remove.
10271
10272         * method.c (process_overload_item): Handle template-dependent array
10273         bounds.
10274         * pt.c (type_unification_real): If we end up with undeduced nontype
10275         parms, try again.
10276
10277         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
10278         types.
10279
10280         * typeck2.c (friendly_abort): Don't say anything if we have
10281         earlier errors or sorries.
10282
10283         * decl.c (check_tag_decl): Notice attempts to redefine bool and
10284         wchar_t.  Ignore if in_system_header.
10285
10286         * decl.c (maybe_push_cleanup_level): New fn...
10287         (start_decl_1): ...split out from here.
10288         * cvt.c (build_up_reference): Use it.
10289         * cp-tree.h: Declare it.
10290
10291 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
10292
10293         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
10294         spec.
10295
10296 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
10297
10298         * pt.c (lookup_template_class): Make sure it's a primary
10299         template or template_template_parm when called from the parser.
10300         (instantiate_template_class): Add assertion.
10301
10302 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
10303
10304         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
10305         from error_mark_node.
10306
10307 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
10308
10309         Fix specification and implementation bugs in V3 ABI
10310         construction vtables.
10311         * cp-tree.h (flag_dump_class_layout): New flag.
10312         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
10313         (BINFO_LOST_PRIMARY_P): New flag.
10314         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
10315         (BINFO_PRIMARY_MARKED_P): Rename to ...
10316         (BINFO_PRIMARY_P): ... here.
10317         (binfo_via_virtual): New prototype.
10318         * decl2.c (flag_dump_class_layout): New flag.
10319         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
10320         use `=' as a file name separator.
10321         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
10322         bases.
10323         (build_vtbl_address): If this is a virtual primary base, then
10324         get the vtbl of what it is ultimately primary for.
10325         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
10326         for BINFO_PRIMARY_P.
10327         (dfs_skip_nonprimary_vbases_markedp): Likewise.
10328         (get_shared_vbase_if_not_primary): Likewise.
10329         (dfs_get_pure_virtuals): Likewise.
10330         (expand_upcast_fixups): Likewise.
10331         (fixup_virtual_upcast_offsets): Likewise.
10332         (dfs_find_vbase_instance): Likewise.
10333         (find_vbase_instance): Likewise.
10334         (binfo_from_vbase): Adjust comment to reflect reality.
10335         (binfo_via_virtual): New function.
10336         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
10337         for binfo walking during VTT construction.
10338         (dfs_mark_primary_bases): Remove.
10339         (force_canonical_binfo_r): New function.
10340         (force_canonical_binfo): New function.
10341         (mark_primary_virtual_base): New function.
10342         (mark_primary_bases): Walk in inheritance graph order, use
10343         mark_primary_virtual_base.
10344         (determine_primary_base): Use some more intermediate variables.
10345         (dfs_find_final_overrider): Don't check for overriding along a
10346         virtual path.
10347         (dfs_modify_vtables): Walk into primary virtual bases too.
10348         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
10349         (build_base_fields): Likewise.
10350         (dfs_set_offset_for_unshared_vbases): Likewise.
10351         (layout_virtual_bases): Likewise.
10352         (end_of_class): Likewise.
10353         (finish_struct_1): Call dump_class_hierarchy, if requested.
10354         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
10355         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
10356         (dump_class_hierarchy): Add file parameter. Append to file, if
10357         required.
10358         (finish_vtbls): Adjust accumulate_vtbl_inits call.
10359         Use canonical base for virtual bases.
10360         (build_vtt): Add more comments. Adjust build_vtt_inits call.
10361         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
10362         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
10363         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
10364         virtual VTTs.
10365         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
10366         from DATA.  We want virtual primary bases and all bases via virtual.
10367         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
10368         virtual base when not a construction vtable.
10369         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
10370         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
10371         Use canonical bases when processing virtual bases.
10372         (accumulate_vtbl_inits): We're interested in any base via a
10373         virtual path.
10374         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
10375         within a construction vtable, determine what is being overridden.
10376         (build_vtbl_initializer): Add more comments
10377         (add_vcall_offset_vtbl_entries_1): Adjust comment.
10378         (build_rtti_vtbl_entries): Check if the base has lost its
10379         primary.
10380
10381 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
10382
10383         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
10384
10385 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10386
10387         * decl.c (pushdecl): Call abort instead of fatal.
10388         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
10389         * init.c (build_new_1): Likewise.
10390         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
10391         * decl.c (build_typename_type): hash_table_init now returns void.
10392         decl.c (init_decl_processing): Make an error non-fatal.
10393
10394 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
10395
10396         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
10397         Document.
10398         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
10399         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
10400         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10401         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
10402         * decl.c (maybe_commonize_var): Use the new name-mangling where
10403         appropriate.
10404         * decl2.c (comdat_linkage): Enhance comments.  Make all
10405         compiler-generated things static, if COMDAT is not available.
10406         (get_tinfo_decl): Do not make typeinfo objects that belong in the
10407         library COMDAT.
10408         (tinfo_base_init): Use the correct mangled name for typeinfo
10409         strings, and push them into the global scope.
10410         (typeinfo_in_lib_p): New function.
10411         (synthesize_tinfo_var): Use it.
10412         (create_real_tinfo_var): Likewise.
10413
10414 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
10415
10416         * decl.c (push_class_binding): Use context_for_name_lookup instead
10417         of CP_DECL_CONTEXT.
10418         * search.c (context_for_name_lookup): Remove static.  Check for NULL
10419         context in the loop.
10420         * cp-tree.h (context_for_name_lookup): Add prototype.
10421
10422 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
10423
10424         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
10425         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
10426         Remove.
10427         * call.c (convert_class_to_reference, build_user_type_conversion_1,
10428         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
10429
10430 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
10431
10432         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
10433         of macros used when compiling g++spec.c.
10434         * g++spec.c (lang_specific_driver): Link with the shared
10435         libgcc by default.
10436
10437 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
10438
10439         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
10440         make_reference_declarator, make_call_declarator), method.c
10441         (implicitly_declare_fn), parse.y (namespace_using_decl,
10442         notype_unqualified_id, expr_or_declarator, new_type_id,
10443         after_type_declarator, direct_after_type_declarator,
10444         notype_declarator, complex_notype_declarator,
10445         complex_direct_notype_declarator, qualified_id,
10446         notype_qualified_id, overqualified_id, direct_new_declarator,
10447         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
10448         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
10449         instead of build_parse_node.
10450
10451 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10452
10453         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
10454         (minus_one_node): Moved to top level gcc directory.  Renamed
10455         to integer_minus_one_node.
10456
10457         * init.c (init_init_processing): Don't set minus_one_node.
10458         (build_vec_init): Use integer_minus_one_node.
10459
10460         * rtti.c (get_tinfo_decl_dynamic): Likewise.
10461
10462 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
10463
10464         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
10465         identical and they would be replaced with constant, remove
10466         MODIFY_EXPR from the tree.
10467
10468 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10469
10470         * Make-lang.in: Remove all dependencies on defaults.h.
10471         * call.c: Don't include defaults.h.
10472         * decl.c: Likewise.
10473         * decl2.c: Likewise.
10474         * except.c: Likewise.
10475         * pt.c: Likewise.
10476         * rtti.c: Likewise.
10477         * tree.c: Likewise.
10478         * typeck.c: Likewise.
10479
10480 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
10481
10482         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
10483         operators even in "C" linkage.
10484         * method.c (set_mangled_name_for_decl): Likewise.
10485         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
10486         overloaded operators in "C" linkage.
10487
10488 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
10489
10490         * pt.c (tsubst_decl): Remove IN_DECL parameter.
10491         (tsubst_arg_types): Check parameter is not void.
10492         (tsubst): Adjust tsubst_decl call.
10493
10494 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
10495
10496         * call.c (add_builtin_candidate): Quote std properly, from
10497         previous change.
10498
10499 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10500
10501         * pt.c (check_explicit_specialization): Clone constructors and
10502         destructors.
10503
10504 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
10505
10506         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
10507         indicates anything special about template depth. Make sure we
10508         only count the user visible template classes.
10509
10510 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
10511
10512         * call.c (build_conv): Typo in comment.
10513         (add_builtin_candidate): Add more explanation.
10514         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
10515         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
10516         when we have enumeral types.
10517         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
10518         candidates for relops and eqops.
10519         (joust): Simplify control flow. Allow a non-template user
10520         function to hide a builtin.
10521
10522 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
10523
10524         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
10525         (more_specialized): Add deduction parameter.
10526         * call.c (joust): Adjust more_specialized call.
10527         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
10528         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
10529         (get_bindings_order): Remove.
10530         (get_bindings_real): Add DEDUCE parameter.
10531         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
10532         REFERENCE_TYPE jig for DEDUCE_ORDER.
10533         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
10534         maybe_adjust_types_for_deduction.
10535         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
10536         directly.
10537         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
10538         (check_cv_quals_for_unify): Use new unify qualifier flags.
10539         (unify): Clear new unify qualifier flags.
10540         (get_bindings_real): Add DEDUCE parameter.
10541         (get_bindings): Adjust call to get_bindings_real.
10542         (get_bindings_overload): Likewise.
10543         (most_specialized_instantiation): Adjust call to
10544         more_specialized.
10545
10546 2001-01-19  Jason Merrill  <jason@redhat.com>
10547
10548         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
10549
10550         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
10551         -fnew-abi.
10552
10553 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
10554
10555         * decl2.c (arg_assoc_class): Fix double iteration logic.
10556
10557 2001-01-19  Jason Merrill  <jason@redhat.com>
10558
10559         * init.c (build_delete): Always call convert_force to strip cv-quals.
10560
10561         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
10562         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
10563         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
10564
10565 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
10566
10567         * search.c (get_vbase_1): Count only virtual bases.
10568
10569 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
10570
10571         * class.c (duplicate_tag_error): Robustify flag clearing.
10572
10573 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
10574
10575         * cp-tree.h (lookup_template_class): Add complain parm.
10576         * decl.c (lookup_namespace_name): Adjust call to
10577         lookup_template_class.
10578         (make_typename_type): Likewise.
10579         * semantics.c (finish_template_type): Likewise.
10580         * pt.c (lookup_template_class): Add complain parm. Adjust.
10581         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
10582         (tsubst): Likewise.
10583
10584 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
10585
10586         * pt.c (copy_default_args_to_explicit_spec): Preserve
10587         object's CV quals. Reorganize.
10588
10589 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
10590
10591         * typeck.c (build_modify_expr): Say `initialization' for
10592         INIT_EXPRs.
10593         * init.c (build_default_init): Convert to enumeral type, if
10594         needed.
10595
10596 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
10597
10598         * parse.y (nomods_initdcl0): Properly set things up for
10599         initdcl0_innards.
10600
10601 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
10602
10603         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
10604         (type_unification_real): Set it.
10605         (unify): Use it.
10606
10607 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
10608
10609         * decl.c (finish_destructor_body): Convert to vbase pointer here.
10610
10611 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
10612
10613         * semantics.c (begin_class_definition): Check we're not inside a
10614         template parm list.
10615
10616 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
10617
10618         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
10619         BASELINK_P.
10620
10621 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10622
10623         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
10624         * call.c (build_over_call): Add comment.
10625
10626 2001-01-16 Daniel Berlin <dberlin@redhat.com>
10627
10628         * cvt.c (ocp_convert): Handle vector type conversion
10629         * typeck2.c (digest_init): Handle vector type initializations
10630
10631 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
10632
10633         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
10634           was given.
10635
10636 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
10637
10638         * pt.c (check_nontype_parm): Rename to ...
10639         (invalid_nontype_parm_type_p): ... here.
10640         (process_template_parm): Adjust.
10641         (convert_template_argument): Adjust.
10642
10643 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
10644
10645         * pt.c (check_nontype_parm): New function.
10646         (process_template_parm): Use it.
10647         (convert_template_argument): Use it.
10648         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
10649         member.
10650
10651 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
10652
10653         * tree.c: Add defaults.h
10654         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
10655         * Make-lang.in (cp/tree.o): Add defaults.h.
10656
10657 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
10658
10659         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
10660
10661 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
10662
10663         * g++.1: Change to be ".so man1/gcc.1".
10664
10665 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
10666
10667         * Make-lang.in (c++.info, c++.install-info): Build and install g++
10668         internals info.
10669         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
10670         ($(srcdir)/cp/g++int.info): New target.
10671         * gxxint.texi: Add info directory entry.  Use @@ in email address.
10672         * .cvsignore: Update.
10673
10674 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
10675
10676         * typeck.c (build_c_cast): Do template processing earlier.
10677         Always pedwarn on array casts.
10678
10679 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
10680
10681         * friend.c (make_friend_class): Make sure a templated class is
10682         actually a template.
10683
10684 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
10685
10686         * decl2.c (get_guard): Set linkage from guarded decl.
10687
10688 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
10689
10690         * call.c (convert_default_arg): Check for unprocessed
10691         DEFAULT_ARG.
10692         * cp-tree.h (replace_defarg): Move to spew.c.
10693         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
10694         spew.c, which is where they really are.
10695         (done_pending_defargs): Declare.
10696         (unprocessed_defarg_fn): Declare.
10697         * decl.c (replace_defarg): Move to spew.c
10698         * parse.y (structsp): Call done_pending_defargs.
10699         * spew.c (defarg_fns): Rearrange list structure.
10700         (defarg_fnsdone): New static variable.
10701         (defarg_depfns): New static variable.
10702         (init_spew): Adjust.
10703         (add_defarg_fn): Store the type in TREE_TYPE.
10704         (do_pending_defargs): Detect and deal with ordering constraints
10705         and circularity.
10706         (done_pending_defargs): New function.
10707         (unprocessed_defarg_fn): New function.
10708         (replace_defarg): Moved from decl.c. Robustify. Don't save
10709         if circularity detected.
10710
10711 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
10712
10713         * pt.c (unify): Check array has a domain, before checking
10714         whether it is variable sized.
10715
10716 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
10717
10718         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
10719         parameters with pointers to arrays of unknown bound.
10720
10721 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
10722
10723         * parse.y (template_parm_header, template_spec_header): New
10724         reductions. Split out from ...
10725         (template_header): ... here. Use them.
10726         (template_template_parm): Use template_parm_header.
10727         * semantics.c (finish_template_template_parm): Add assert.
10728
10729 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
10730
10731         * mangle.c (write_builtin_type): Fix thinko.
10732
10733         * pt.c (copy_default_args_to_explicit_spec_1): New function.
10734         (copy_default_args_to_explicit_spec): Likewise.
10735         (check_explicit_specialization): Use it.
10736
10737         * class.c (finish_struct_1):  Remove last argument in call to
10738         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
10739         * decl.c (builtin_function): Likewise.
10740         (build_cp_library_fn): Likewise.
10741         (check_initializer): Likewise.
10742         (make_rtl_for_nonlocal_decl): Likewise.
10743         (cp_finish_decl): Likewise.
10744         (start_function): Likewise.
10745         * decl2.c (finish_anon_union): Likewise.
10746         * friend.c (do_friend): Likewise.
10747         * init.c (build_java_class_ref): Likewise.
10748         * method.c (make_thunk): Likewise.
10749         * pt.c (tsubst_friend_function): Likewise.
10750         * semantics.c (expand_body): Likewise.
10751
10752 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
10753
10754         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
10755         looking at DECL_CLONED_FUNCTION for non-functions.
10756
10757 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
10758
10759         * error.c (dump_template_parameter): Use parm to determine how
10760         to print default value.
10761
10762 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
10763
10764         * class.c (duplicate_tag_error): Clear more flags.
10765
10766 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
10767
10768         * call.c (build_new_method_call): Use binfo_for_vbase.
10769
10770 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
10771
10772         * cp-tree.h (flag_cond_mismatch): Don't declare.
10773         * decl2.c (flag_cond_mismatch): Don't define.
10774         (lang_f_options): Remove cond-mismatch.
10775         (unsupported_options): Add cond-mismatch.
10776
10777 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
10778
10779         * class.c (handle_using_decl): Reject using of constructor name
10780         of sourcing class. Allow injecting of a method with same name as
10781         nested class. Fixup error messages.
10782
10783 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
10784
10785         * decl2.c (lang_decode_option): Handle -Wformat=2.
10786
10787 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
10788
10789         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
10790         initialized_in_class.
10791         (DECL_DEFINED_IN_CLASS_P): Rename to ...
10792         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
10793         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
10794         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
10795         * pt.c (check_default_tmpl_args): Adjust for
10796         DECL_INITIALIZED_IN_CLASS_P.
10797         (instantiate_class_template): Likewise.
10798         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
10799
10800         * class.c (finish_struct): Constify saved_filename.
10801
10802 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
10803
10804         * class.c (duplicate_tag_error): Adjust diagnostic.
10805         (finish_struct): Locally set location to start of struct.
10806         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
10807
10808 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
10809
10810         * decl.c (struct binding_level): Adjust class_shadowed comments
10811         to reflect reality.
10812         (push_class_level_binding): Adjust comments to reflect reality.
10813         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
10814         Don't set TREE_VALUE on the class_shadowed list.
10815
10816 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10817
10818         * decl2.c (acceptable_java_type): Allow references too.
10819         * init.c (build_java_class_ref): When using the new ABI, search
10820         `class$' and have it mangled with `mangle_decl.'
10821         * mangle.c (write_java_integer_type_codes): New function.
10822         (write_builtin_type): Detect and mangle Java integer and real
10823         types.
10824
10825 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
10826
10827         * decl2.c (grokfield): Don't accept `asm' specifiers for
10828         non-static data members.
10829
10830 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10831
10832         * expr.c (cplus_expand_expr): Don't reset `target'.
10833
10834 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
10835
10836         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
10837
10838 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
10839
10840         * parse.y (template_datadef): Check for error_mark_node.
10841
10842 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
10843
10844         * cp-tree.def (DEFAULT_ARG): Make `x' class.
10845
10846 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
10847
10848         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
10849         (record_builtin_type): Make non-static.
10850         (flag_short_double): Don't declare.
10851         (init_decl_processing): Remove the creation of many tree nodes now
10852         in c_common_nodes_and_builtins.
10853         (build_void_list_node): New function.
10854         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
10855         * cp-tree.h (flag_short_wchar): Don't declare.
10856
10857 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
10858
10859         * call.c (build_conv): Don't use build1 for USER_CONV.
10860         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
10861
10862 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
10863
10864         * lex.c (lang_init): Call c_common_lang_init.
10865
10866 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
10867
10868         * search.c (lookup_fnfields_here): Remove.
10869         (look_for_overrides_r): Use lookup_fnfields_1.
10870         Ignore functions from using declarations.
10871
10872 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
10873
10874         Implement exceptions specifiers for implicit member functions.
10875         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
10876         * method.c (synthesize_exception_spec): New function.
10877         (locate_dtor, locate_ctor, locate_copy): New functions.
10878         (implicitly_declare_fn): Generate the exception spec too.
10879         * search.c (check_final_overrider): Check artificial functions
10880         too.
10881         * typeck2.c (merge_exception_specifiers): New function.
10882
10883 2001-01-03  Jason Merrill  <jason@redhat.com>
10884
10885         * init.c (build_default_init): New fn.
10886         (perform_member_init): Split out from here.
10887         (build_new_1): Use it.  Simplify initialization logic.
10888         (build_vec_init): Take an array, rather than a pointer and maxindex.
10889         Speed up simple initializations.  Don't clean up if we're assigning.
10890         * cp-tree.h: Adjust.
10891         * decl2.c (do_static_initialization): Remove TREE_VEC case.
10892         * parse.y (new_initializer): Return void_zero_node for ().
10893         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
10894         * typeck2.c (digest_init): Only complain about user-written
10895         CONSTRUCTORs.
10896
10897 2000-12-22  Mike Stump  <mrs@wrs.com>
10898
10899         * decl2.c: (max_tinst_depth): Increase to 50.
10900
10901 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
10902
10903         * class.c (invalidate_class_lookup_cache): Zero the
10904         previous_class_values.
10905         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
10906         TREE_INT_CST_HIGH.
10907         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
10908         * decl.c (free_bindings): New variable.
10909         (push_binding): Don't create a new binding if we have one on the
10910         free list.
10911         (pop_binding): Put old bindings on the free list.
10912         (init_decl_processing): Use size_int, not build_int_2.
10913         Register free_bindings as a GC root.
10914         (cp_make_fname_decl): Use size_int, not build_int_2.
10915         (push_inline_template_parms_recursive): Likewise.
10916         (end_template_parm_list): Likewise.
10917         (for_each_template_parm): Do not use walk_tree_without_duplicates.
10918         (tsubst_template_parms): Use size_int, not build_int_2.
10919         (tsubst): Likewise.
10920         * rtti.c (get_vmi_pseudo_type_info): Likewise.
10921
10922 2001-01-02  Richard Henderson  <rth@redhat.com>
10923
10924         * parse.y (asm): Set ASM_INPUT_P.
10925
10926 2001-01-02  Jason Merrill  <jason@redhat.com>
10927
10928         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
10929         for v3 ABI.
10930
10931         * typeck.c (cp_truthvalue_conversion): New fn.
10932         * cvt.c (ocp_convert): Use it.
10933
10934         * cp-tree.h: Lose c-common.c decls.
10935
10936         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
10937         * cvt.c (convert_to_void): Use type_unknown_p.
10938
10939         * typeck.c (strip_all_pointer_quals): Also strip quals from
10940         pointer-to-member types.
10941
10942         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
10943         parse.y as C.
10944
10945         * call.c (build_new_method_call): Do evaluate the object parameter
10946         when accessing a static member.
10947         * typeck.c (build_component_ref): Likewise.
10948
10949 2001-01-02  Andreas Jaeger  <aj@suse.de>
10950
10951         * decl.c (cp_missing_noreturn_ok_p): New.
10952         (init_decl_processing): Set lang_missing_noreturn_ok_p.
10953
10954 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
10955
10956         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
10957
10958 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
10959
10960         * class.c (pushclass): Remove #if 0'd code.
10961         * cp-tree.h (overload_template_name): Remove.
10962         * decl.c (store_bindings): Simplify.
10963         (pop_from_top_level): Likewise.
10964         * pt.c (overload_template_name): Remove.
10965         (instantiate_decl): Don't call push_to_top_level if it's not
10966         needed.
10967
10968 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
10969
10970         * pt.c (register_local_specialization): Don't return a value.
10971         (lookup_template_class): Use move-to-front heuristic when looking
10972         up template instantiations.
10973         (instantiate_decl): Only push_to_top_level when we're actually
10974         going to instantiate the template.
10975
10976 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
10977
10978         * search.c (binfo_for_vtable): Return least derived class, not
10979         most.  Handle secondary vtables.
10980
10981 2000-12-22  Jason Merrill  <jason@redhat.com>
10982
10983         * pt.c (more_specialized): Don't optimize len==0.
10984         (fn_type_unification): If we're adding the return type, increase len.
10985
10986         * typeck.c (build_binary_op): Fix pmf comparison logic.
10987
10988         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
10989         DECL_STATIC_FUNCTION_P.
10990
10991         * semantics.c (genrtl_finish_function): Don't try to jump to
10992         return_label unless it exists.
10993
10994         In partial ordering for a call, ignore parms for which we don't have
10995         a real argument.
10996         * call.c (joust): Pass len to more_specialized.
10997         (add_template_candidate_real): Strip 'this', pass len.
10998         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
10999         (get_bindings_order): New fn.  Pass len down.
11000         (get_bindings_real): Strip 'this', pass len.
11001         (fn_type_unification): Likewise.
11002         (type_unification_real): Succeed after checking 'len' args.
11003         (most_specialized_instantiation): Lose explicit_args parm.
11004         * class.c (resolve_address_of_overloaded_function): Strip 'this',
11005         pass len.
11006
11007 2000-12-21  Jason Merrill  <jason@redhat.com>
11008
11009         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
11010         DECL_TEMPLATE_RESULT.
11011
11012         * search.c (lookup_field_r): Call lookup_fnfields_1, not
11013         lookup_fnfields_here.
11014
11015         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
11016
11017         * call.c (build_object_call): Also allow conversions that return
11018         reference to pointer to function.
11019         (add_conv_candidate): Handle totype being ref to ptr to fn.
11020         (build_field_call): Also allow members of type reference to function.
11021         Lose support for calling pointer to METHOD_TYPE fields.
11022
11023         * error.c (dump_expr): Handle *_CAST_EXPR.
11024
11025         * typeck2.c (build_scoped_ref): Always convert to the naming class.
11026
11027         * tree.c (break_out_cleanups): Lose.
11028         * cp-tree.h: Remove prototype.
11029         * typeck.c (build_component_ref): Don't break_out_cleanups.
11030         (build_compound_expr): Likewise.
11031         * semantics.c (finish_expr_stmt): Likewise.
11032
11033 2000-12-20  Richard Henderson  <rth@redhat.com>
11034
11035         * cp-tree.h: Update declarations.
11036         * decl.c (finish_case_label): Return the new stmt node.
11037         * semantics.c (finish_goto_stmt): Likewise.
11038         (finish_expr_stmt, finish_return_stmt): Likewise.
11039         (finish_break_stmt, finish_continue_stmt): Likewise.
11040         (finish_asm_stmt): Likewise.
11041         * parse.y (already_scoped_stmt): Set STMT_LINENO.
11042         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
11043         (simple_if, simple_stmt): Return the new stmt node.
11044         (save_lineno): New.
11045
11046 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
11047
11048         * cp-tree.h: Don't declare warn_long_long.
11049
11050 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11051
11052         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
11053         IS_AGGR_TYPE.
11054
11055 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11056
11057         * pt.c (unify): Handle when both ARG and PARM are
11058         BOUND_TEMPLATE_TEMPLATE_PARM.
11059
11060 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11061
11062         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
11063         DECL_TEMPLATE_PARM_P.
11064
11065 2000-12-15  Jason Merrill  <jason@redhat.com>
11066
11067         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
11068
11069         * init.c (build_new_1): Don't strip quals from type.
11070
11071         * decl.c (pushdecl): Don't check for linkage on a non-decl.
11072
11073         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
11074
11075         * call.c (build_new_function_call): Lose space before paren in
11076         error message.
11077         (build_new_method_call): Likewise.
11078
11079         * typeck2.c (build_m_component_ref): Propagate quals from datum.
11080
11081 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11082
11083         * pt.c (check_explicit_specialization): Propagate default
11084         function arguments to explicit specializations.
11085
11086 2000-12-13  DJ Delorie  <dj@redhat.com>
11087
11088         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
11089         and <? operators.
11090
11091 2000-12-08  Jason Merrill  <jason@redhat.com>
11092
11093         * error.c (dump_function_name): Don't let the user see __comp_ctor.
11094
11095         Clean up copy-initialization in overloading code.
11096         * call.c (build_user_type_conversion_1): Die if we are asked to
11097         convert to the same or a base type.
11098         (implicit_conversion): Avoid doing so.  Lose reference binding code.
11099         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
11100         direct-initialization.  Also do direct-init part of copy-init.
11101         (build_user_type_conversion): Don't provide context to convert_like.
11102         * cvt.c (ocp_convert): build_user_type_conversion will now provide
11103         the constructor call for copy-init.
11104
11105         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
11106         instantiation of a member template.
11107         (do_decl_instantiation): Not here.
11108
11109 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
11110
11111         * class.c (check_field_decls): Don't special case anonymous
11112         fields in error messages.
11113         (note_name_declared_in_class): Use %D on diagnostic.
11114
11115         * tree.c (pod_type_p): Use strip_array_types.
11116         (cp_valid_lang_attribute): Likewise.
11117         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
11118         multiple evaluations.
11119         (cp_has_mutable_p): Use strip_array_types.
11120
11121 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
11122
11123         * cp-tree.h (sufficient_parms_p): Declare new function.
11124         * call.c (sufficient_parms_p): New function, broken out of ...
11125         (add_function_candidate): ... here. Use it.
11126         (add_conv_candidate): Use it.
11127         * decl.c (grok_ctor_properties): Use it.
11128
11129 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
11130
11131         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
11132
11133 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
11134
11135         * decl2.c (lang_decode_option): Handle -Wformat-security.
11136
11137 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11138
11139         * pt.c (verify_class_unification): New function.
11140         (get_class_bindings): Use it.
11141         (try_class_unification): Tidy.
11142         (unify): Handle when argument of a template-id is not
11143         template parameter dependent.
11144         (template_args_equal): Handle when TREE_CODE's do not match.
11145
11146 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
11147
11148         * lang-specs.h (c++): When invoking the stand-alone preprocessor
11149         for -save-temps, pass all relevant -Defines to it, and then don't
11150         pass them to cc1plus.
11151
11152 2000-12-05  Will Cohen  <wcohen@redhat.com>
11153
11154         * decl.c (finish_case_label): Cleared
11155         more_cleanups_ok in surrounding function scopes.
11156         (define_label): Likewise.
11157
11158 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
11159
11160         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
11161         (get_matching_virtual): Remove.
11162         (look_for_overrides): Declare new function.
11163         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
11164         DECL_VINDEX here.
11165         * class.c (check_for_override): Move base class iteration code
11166         to look_for_overrides.
11167         * search.c (next_baselink): Remove.
11168         (get_virtuals_named_this): Remove.
11169         (get_virtual_destructor): Remove.
11170         (tree_has_any_destructors_p): Remove.
11171         (struct gvnt_info): Remove.
11172         (check_final_overrider): Remove `virtual' from error messages.
11173         (get_matching_virtuals): Remove. Move functionality to ...
11174         (look_for_overrides): ... here, and ...
11175         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
11176         to be overriding.
11177
11178 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
11179
11180         * typeck.c (get_delta_difference): If via a virtual base,
11181         return zero.
11182         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
11183         adjustment.
11184
11185 2000-12-04  Richard Henderson  <rth@redhat.com>
11186
11187         * error.c (dump_tree): Use output_add_string not OB_PUTS.
11188
11189 2000-12-04  Jason Merrill  <jason@redhat.com>
11190
11191         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
11192         (write_builtin_type): Pass intSI_type_node and the like through
11193         type_for_mode.
11194         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
11195         Pass intSI_type_node and the like through type_for_mode.
11196         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
11197         * pt.c (tsubst, unify): Likewise.
11198         * tree.c (walk_tree): Likewise.
11199         * error.c (dump_type): Likewise.
11200         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
11201
11202         * Make-lang.in: Tweak top comment for emacs.
11203         (cp/TAGS): Restore.
11204
11205         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
11206
11207         * class.c (clone_function_decl): Robustify.
11208
11209 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
11210
11211         * decl.c (store_bindings): Only search in the non modified
11212         old_bindings for duplicates.
11213
11214 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
11215
11216         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
11217         TYPE_POLYMORPHIC_P.
11218
11219         * typeck.c (build_static_cast): Remove unused variable.
11220
11221 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11222
11223         * pt.c: Fix typo in comment.
11224
11225 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
11226
11227         * decl2.c (warn_format): Remove definition.
11228         (lang_decode_option): Handle -Wformat-nonliteral,
11229         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
11230
11231 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
11232
11233         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
11234         (init_decl_processing): Don't create string_type_node,
11235         const_string_type_node, wint_type_node, intmax_type_node,
11236         uintmax_type_node, default_function_type, ptrdiff_type_node and
11237         unsigned_ptrdiff_type_node.  Adjust position of call to
11238         c_common_nodes_and_builtins.
11239         (identifier_global_value): New function.
11240
11241 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
11242
11243         * call.c (standard_conversion): Reject pointer to member
11244         conversions from ambiguous, inaccessible or virtual bases.
11245         * typeck.c (build_static_cast): Don't check pointers to members
11246         specially.
11247
11248 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
11249
11250         * method.c (do_build_copy_constructor): Preserve cv
11251         qualifications when accessing source object members.
11252         (do_build_assign_ref): Likewise. Remove separate diagnostics for
11253         unnamed fields.
11254
11255 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
11256
11257         * method.c (do_build_assign_ref): Construct appropriately
11258         CV-qualified base reference. Don't allow const casts in base
11259         conversion.
11260
11261 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
11262
11263         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
11264         incomplete return type.
11265
11266 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
11267
11268         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
11269         * semantics.c (finish_base_specifier): Accept a _TYPE not a
11270         _DECL.
11271
11272 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
11273
11274         * spew.c (yyerror): Cope if yylval.ttype is NULL.
11275
11276 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
11277
11278         * decl.c (grokdeclarator): Diagnose undefined template contexts.
11279
11280 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
11281
11282         * decl.c (grokdeclarator): Do type access control on friend
11283         class.
11284
11285 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
11286
11287         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
11288         bison parser ickiness.
11289         * pt.c (tsubst_friend_function): Enter namespace scope when
11290         tsubsting the function name.
11291         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
11292
11293 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
11294
11295         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
11296         * cvt.c (cp_convert_to_pointer): Add force parameter.
11297         Allow conversions via virtual base if forced.
11298         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
11299         (ocp_convert): Likewise.
11300         * search.c (binfo_from_vbase): Return the virtual base's binfo.
11301         * typeck.c (get_delta_difference): Adjust handling of virtual
11302         bases.
11303
11304 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
11305
11306         * tree.c (struct list_hash): Remove.
11307         (list_hash_table): Make it be an htab.
11308         (struct list_proxy): New type.
11309         (list_hash_eq): New function.
11310         (list_hash_pieces): Renamed from ...
11311         (list_hash): ... this.
11312         (list_hash_lookup): Remove.
11313         (list_hash_add): Remove.
11314         (hash_tree_cons): Use the generic hashtable.
11315         (mark_list_hash): Remove.
11316         (init_tree): Create the hashtable.
11317
11318 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
11319
11320         * method.c (build_mangled_C9x_name): Rename to
11321         build_mangled_C99_name.  Change C9X references in comments to
11322         refer to C99.
11323
11324 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
11325
11326         * parse.y (unary_expr): Move VA_ARG from here ...
11327         (primary): ... to here.
11328
11329 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
11330
11331         * semantics.c (finish_id_expr): If type is error_mark, return
11332         error_mark.
11333
11334 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
11335
11336         * pt.c (lookup_template_class): Simplify loop exit constructs.
11337         Cope when there is no partial instantiation of a template
11338         template member.
11339
11340 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
11341
11342         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
11343
11344 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
11345
11346         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
11347         prefix.
11348
11349         * pt.c (do_decl_instantiate): Explicitly clone constructors and
11350         destructors that haven't already been cloned.
11351
11352 2000-11-20  Richard Henderson  <rth@redhat.com>
11353
11354         * parse.y (yyparse_1): Rename the parser entry point.
11355
11356 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
11357
11358         * mangle.c (write_name): Use <unscoped-name> for names directly in
11359         function scope.
11360         (write_unscoped_name): Accept names directly in function scope.
11361
11362 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
11363
11364         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
11365         * parse.y (extdef): Add EXPORT reduction.
11366         * spew.c (yylex): Don't skip export here.
11367
11368 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
11369
11370         * decl.c (init_decl_processing): Correct name of pure virtual
11371         function under the new ABI.
11372         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
11373         (throw_bad_typeid): Likewise for bad typeid function.
11374
11375 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
11376
11377         * decl.c (grokparms): Don't even function types of `void' type,
11378         either.
11379         * mangle.c (write_type): Don't crash when confronted with the
11380         error_mark_node.
11381
11382         * decl.c (grokparms): Don't create parameters of `void' type.
11383
11384 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
11385
11386         * lex.c (mark_impl_file_chain): Delete.
11387         (init_parse): Remove call to ggc_add_string_root.  No need to
11388         ggc_strdup a string constant.  Do not add impl_file_chain to GC
11389         roots.
11390         (handle_pragma_implementation): No need to ggc_strdup main_filename.
11391
11392 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
11393
11394         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
11395
11396 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
11397
11398         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
11399         * decl.c (grokdeclarator): Don't reject void parms here.
11400         (require_complete_types_for_parms): Simplify, use
11401         complete_type_or_else.
11402         (grokparms): Remove bitrot. Remove funcdef parm.
11403         Deal with ellipsis parm lists here.
11404         * semantics.c (finish_parmlist): Don't append void_list_node
11405         here. Set PARMLIST_ELLIPSIS_P.
11406
11407 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
11408
11409         * typeck2.c (incomplete_type_error): Reorganize to avoid
11410         excessive diagnostics.
11411
11412 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
11413
11414         * lex.c (struct impl_files, internal_filename): Constify a char *.
11415
11416 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
11417
11418         * mangle.c (write_special_name_constructor): Don't generate
11419         assembler junk when confronted with an old-style constructor.
11420         (write_special_name_destructor): Likewise.
11421         (mangle_decl_string): Do it here instead.
11422
11423 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
11424
11425         * call.c (op_error): Make error messages clearer.
11426
11427 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
11428
11429         * decl.c (wrapup_globals_for_namespace): Don't mark things
11430         TREE_ASM_WRITTEN when they're not.
11431
11432 2000-11-15  Jason Merrill  <jason@redhat.com>
11433
11434         * typeck2.c (friendly_abort): Uncount the error before handing
11435         off to fancy_abort.
11436
11437 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
11438
11439         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
11440
11441 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
11442
11443         * class.c (build_vtbl_initializer): Fix typo in comment.
11444         * typeck.c (expr_sizeof): Don't crash on errors.
11445
11446 2000-11-14  Jim Wilson  <wilson@redhat.com>
11447
11448         * lang-specs.h: Add %2 after %(cc1_options).
11449
11450 2000-11-14  Richard Henderson  <rth@redhat.com>
11451
11452         * typeck.c (c_sizeof): Be strict about casting result value
11453         back to c_size_type_node.
11454         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
11455
11456 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
11457
11458         * typeck.c (build_unary_op): Use boolean_increment from
11459         c-common.c, moving the relevant code there.
11460
11461 2000-11-11  Jason Merrill  <jason@redhat.com>
11462
11463         * typeck.c (mark_addressable): Don't call put_var_into_stack.
11464
11465         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
11466         in inlines.
11467
11468 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11469
11470         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
11471         * lex.c (copy_lang_decl): Likewise.
11472
11473 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
11474
11475         * dump.c (cp_dump_tree): Don't dump function bodies here.
11476
11477         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
11478         (dump.o): Update dependency list.
11479         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
11480         (flag_dump_translation_unit): Likewise.
11481         (CP_TYPE_QUALS): Adjust definition.
11482         (DECL_C_BIT_FIELD): Remove.
11483         (SET_DECL_C_BIT_FIELD): Likewise.
11484         (CLEAR_DECL_C_BIT_FIELD): Likewise.
11485         (add_maybe_template): Likewise.
11486         (strip_array_types): Likewise.
11487         (dump_node_to_file): Likewise.
11488         (cp_dump_tree): New function.
11489         * decl.c (init_decl_processing): Set lang_dump_tree.
11490         * decl2.c (flag_dump_translation_unit): Remove.
11491         * dump.c: Move most of it to ../c-dump.c.
11492         (cp_dump_tree): New function.
11493         * pt.c (add_maybe_template): Remove.
11494         * typeck.c (strip_array_types): Likewise.
11495
11496 2000-11-07  Eric Christopher  <echristo@redhat.com>
11497
11498         * decl.c (init_decl_processing): Change definition of
11499         __wchar_t to wchar_t.  Remove artificial declaration of
11500         wchar_t.
11501         * lex.c: Change instances of __wchar_t to wchar_t.
11502
11503 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
11504
11505         * lex.c (do_identifier): Don't lookup_name for operators.
11506         * parse.y (operator): Save looking_for_typename.
11507         (unoperator): Restore it.
11508         * spew.c (frob_opname): Use nth_token for lookahead.
11509
11510 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
11511
11512         * decl.c (grok_op_properties): Always use coerce_new_type and
11513         coerce_delete_type.
11514         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
11515         exception specification. Tidy up.
11516         (coerce_delete_type): Preserve exception specification. Tidy up.
11517
11518 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
11519
11520         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
11521         (push_binding_level), error.c (cp_tree_printer), pt.c
11522         (process_partial_specialization, tsubst_template_arg_vector),
11523         search.c (lookup_member): Use memset () instead of bzero ().
11524
11525 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
11526
11527         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
11528
11529 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
11530
11531         * Make-lang.in (c++.distdir): Remove.
11532
11533 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
11534
11535         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
11536         declarations from different namespaces to be combined.
11537
11538 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
11539
11540         * decl.c: Include tm_p.h.
11541
11542 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
11543
11544         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
11545
11546 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
11547
11548         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
11549         (build_overload_value), repo.c (open_repo_file), xref.c
11550         (open_xref_file): Use strchr () and strrchr () instead of index ()
11551         and rindex ().
11552
11553 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
11554
11555         * call.c (build_over_call): Call fold on the CALL_EXPR.
11556
11557 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
11558
11559         * error.c (dump_template_decl): Separate template hearders with
11560         space not comma.
11561
11562 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
11563
11564         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
11565         TS_* flags with corresponding TFF_*.  Adjust prototypes of
11566         functions (which used to take a tree_string_flags) to take an int.
11567
11568         * cp-tree.h (enum tree_string_flags): Remove
11569         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
11570         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
11571         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
11572         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
11573         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
11574         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
11575         (type_as_string, decl_as_string, expr_as_string,
11576         context_as_string): Adjust prototype.
11577
11578         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
11579         instead of TS_PLAIN.
11580
11581         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
11582         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
11583         plain `0'.
11584
11585 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
11586
11587         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
11588         (linkage_kind): New enumeration.
11589         (decl_linkage): New function.
11590         * decl2.c (comdat_linkage): Extend comment.
11591         * error.c (dump_function_decl): Print the arguments used to
11592         instantiate a template, even when not printing the type of the
11593         function.
11594         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
11595         not TREE_PUBLIC, to test for external linkage.
11596         * tree.c (decl_linkage): New function.
11597
11598 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
11599
11600         * pt.c (instantiate_decl): Always instantiate static data members
11601         initialized in-class.
11602
11603 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
11604
11605         * Make-lang.in: Move all build rules here from Makefile.in,
11606         adapt to new context.  Wrap all rules that change the current
11607         directory in parentheses.  Expunge all references to $(P).
11608         When one command depends on another and they're run all at
11609         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
11610         all object-file generation rules.  Delete obsolete variables.
11611
11612         * Makefile.in: Delete.
11613         * config-lang.in: Delete outputs= line.
11614
11615 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
11616
11617         * error.c (dump_function_decl): Print no space between
11618         `ptr-operator' the `type-specifier' of the return type.
11619         (dump_type_prefix): Make sure we put space at the appropriate
11620         place.
11621
11622 2000-10-23  Jason Merrill  <jason@redhat.com>
11623
11624         * call.c (equal_functions): Also call decls_match for extern "C" fns.
11625
11626 2000-10-22  Jason Merrill  <jason@redhat.com>
11627
11628         * call.c (build_conditional_expr): Use ocp_convert to force
11629         rvalue conversion.
11630
11631 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
11632
11633         * call.c (standard_conversion): Use RVALUE_CONVs for all
11634         expressions that satisfy lvalue_p, not just those that satisfy
11635         real_lvalue_p.
11636
11637         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
11638
11639         * typeck.c (c_sizeof): Return an expression of `size_t' type,
11640         not one with TYPE_IS_SIZETYPE set.
11641         (dubious_conversion_warnings): Remove special-case code.
11642
11643 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
11644
11645         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
11646         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
11647         (dump_type_prefix): Print vector-of-int as 'int vector'.
11648         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
11649         * tree.c (walk_tree): Handle VECTOR_TYPE.
11650
11651         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
11652
11653 2000-10-21  Jason Merrill  <jason@redhat.com>
11654
11655         * parse.y (operator): Set got_object from got_scope.
11656         Set looking_for_typename.
11657         * decl.c (lookup_name_real): Clear val after setting from_obj.
11658         Reorganize diagnostic.
11659
11660 2000-10-20  Jason Merrill  <jason@redhat.com>
11661
11662         * tree.c (walk_tree): Don't walk into default args.
11663
11664         * error.c (dump_expr): Use host_integerp.
11665
11666 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
11667
11668         * typeck2.c (abstract_virtuals_error): Use "because" instead of
11669         "since" in error message.
11670
11671 2000-10-20  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11672
11673         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
11674
11675 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
11676
11677         * decl.c (revert_static_member_fn): Fixed typo.
11678
11679 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
11680
11681         * class.c (subobject_offset_fn): New type.
11682         (dfs_record_base_offsets): Remove.
11683         (record_base_offsets): Likewise.
11684         (dfs_search_base_offsets): Likewise.
11685         (record_subobject_offset): New function.
11686         (check_subobject_offset): Likewise.
11687         (walk_subobject_offsets): Likewise.
11688         (record_subobject_offsets): Likewise.
11689         (layout_conflict_p): Reimplement.
11690         (layout_nonempty_base_or_field): Correct handling of type
11691         conflicts during layout.
11692         (layout_empty_base): Likewise.
11693         (build_base_field): Adjust to handle new representation of empty
11694         base offset table.
11695         (build_base_fields): Likewise.
11696         (layout_virtual_bases): Likewise.
11697         (splay_tree_compare_integer_csts): New function.
11698         (layout_class_type): Use a splay_tree, rather than a varray, to
11699         represent the offsets of empty bases.
11700
11701         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
11702         * decl.c (select_decl): Don't return declarations that are
11703         DECL_ANTICIPATED.
11704
11705 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
11706
11707         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
11708         (fake_std_node): New macro.
11709         * decl.c (in_std): Rename to ...
11710         (in_fake_std): ... this.
11711         (flag_no_builtin): Remove.
11712         (flag_no_nonansi_builtin): Likewise.
11713         (walk_namespaces_r): Use fake_std_node.
11714         (push_namespace): Use std_identifier.
11715         (pop_namespace): Use in_fake_std.
11716         (lookup_name_real): Use fake_std_node.
11717         (init_decl_processing): When -fhonor-std, create the `std'
11718         namespace.  Don't create a dummy fake_std_node in that case.
11719         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
11720         (builtin_function): Put builtins whose names don't begin
11721         with `_' in the std namespace.
11722         * decl2.c (flag_no_builtin): Remove.
11723         (flag_no_nonansi_builtin): Likewise.
11724         (set_decl_namespace): Use fake_std_node.
11725         (validate_nonmember_using_decl): Likewise.
11726         (do_using_directive): Likewise.
11727         (handle_class_head): Likewise.
11728         * dump.c (dequeue_and_dump): Likewise.
11729         * except.c (init_exception_processing): Use std_identifier.
11730         * init.c (build_member_call): Use fake_std_node.
11731         * rtti.c (init_rtti_processing): Use std_identifier.
11732
11733 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
11734
11735         * cp-tree.h (back_end_hook): Remove declaration.
11736         * decl2.c (back_end_hook): Remove definition.
11737
11738         * dump.c (dequeue_and_dump): Dump TREE_USED.
11739
11740 2000-10-17  Brad Lucier <lucier@math.purdue.edu>
11741
11742         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
11743
11744 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
11745
11746         * decl.c (WINT_TYPE): Define.
11747         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
11748         c_size_type_node, signed_size_type_node and wint_type_node.
11749
11750 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
11751
11752         * decl2.c (warn_missing_format_attribute): New variable.
11753         (lang_decode_option): Decode -Wmissing-format-attribute.
11754
11755 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
11756
11757         * typeck.c (qualify_type): Remove.
11758         (composite_pointer_type): Fix handling of conversions to `cv void*'.
11759
11760 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11761
11762         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
11763
11764 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11765
11766         * Makefile.in (parse.c, parse.h): Create atomically.
11767
11768 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
11769
11770         * class.c (current_obstack): Remove.
11771         * decl.c (ggc_p): Remove.
11772         (start_decl): Don't use decl_tree_cons.
11773         (grokdeclarator): Don't use build_decl_list.
11774         (start_function): Don't use decl_tree_cons.
11775         (finish_function): Don't mess with obstacks.
11776         * decl2.c (grok_x_components): Don't use build_decl_list.
11777         * lex.c (make_call_declarator): Don't call decl_tree_cons.
11778         (implicitly_declare_fn): Don't call build_decl_list.
11779         * parse.y (frob_specs): Don't call build_decl_list or
11780         decl_tree_cons.
11781         (expr_or_declarator_intern): Don't call decl_tree_cons.
11782         (primary): Don't call build_decl_list.
11783         (fcast_or_absdcl): Likewise.
11784         (typed_declspecs): Don't call decl_tree_cons.
11785         (reserved_declspecs): Don't call build_decl_list.
11786         (declmods): Likewise.
11787         (reserved_typespecquals): Likewise.
11788         (aggr): Likewise.
11789         (new_type_id): Likewise.
11790         (cv_qualifiers): Likewise.
11791         (after_type_declarator_intern): Likewise.
11792         (notype_declarator_intern): Likewise.
11793         (absdcl_intern): Likewise.
11794         (named_parm): Likewise.
11795         * pt.c (most_specialized_class): Likewise.
11796         * repo.c (temporary_obstack): Make it a structure, not a pointer.
11797         (init_repo): Initialize it.
11798         * search.c (current_obstack): Remove.
11799         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
11800
11801 2000-10-09  Richard Henderson  <rth@cygnus.com>
11802
11803         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
11804         (c++ language support bits for libgcc): Remove.
11805         (c++.clean): Remove cplib2.txt cleanup.
11806         * config-lang.in (headers, lib2funcs): Remove.
11807
11808         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
11809         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
11810         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
11811         * inc/new.h, inc/typeinfo: Remove files.
11812
11813 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
11814
11815         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
11816         defined.
11817         (init_decl_processing): Initialize intmax_type_node and
11818         uintmax_type_node.
11819
11820 2000-10-06  Richard Henderson  <rth@cygnus.com>
11821
11822         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
11823         (original_result_rtx): Remove.
11824         * decl.c (save_function_data): Don't clear x_result_rtx.
11825         (mark_lang_function): Don't mark it either.
11826         * expr.c (fixup_result_decl): Remove.
11827         * semantics.c (genrtl_named_return_value): Frob the return decl
11828         before calling emit_local_var.
11829         (genrtl_finish_function): Don't call fixup_result_decl.
11830         Always emit the jump to return_label.
11831
11832 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
11833
11834         * pt.c (lookup_template_class): Set current access for enum.
11835         (tsubst_enum): Set file & line for enum decl.
11836
11837         * spew.c (yylex): Remove unused variable.
11838
11839 2000-10-05  Richard Henderson  <rth@cygnus.com>
11840
11841         * semantics.c (genrtl_finish_function): Don't init or check
11842         can_reach_end; remove noreturn and return value checks.
11843
11844 2000-10-05  Tom Tromey  <tromey@cygnus.com>
11845
11846         * init.c (build_java_class_ref): Use `build_static_name' with a
11847         suffix, not a prefix, to build the class object's name.
11848
11849 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
11850
11851         * cp-tree.h (access_kind): Fix comment typo.
11852         * decl2.c (grokfield): Fix diagnostic typo.
11853         * semantics.c (finish_template_type): Fix comment typo.
11854         (finish_qualified_object_call_expr): Likewise.
11855
11856 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
11857
11858         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
11859         tsubsting fails.
11860
11861 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
11862
11863         * spew.c (frob_id): New static function.
11864         (frob_opname): Use it.
11865         (yylex): Use it.
11866
11867 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
11868
11869         * decl.c (lang_mark_false_label_stack): Remove.
11870         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
11871
11872 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
11873
11874         * gxxint.texi: Use @email for formatting email addresses.
11875
11876 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
11877
11878         * error.c: Remove direct obstack manipulation.  Replace with
11879         output_buffer-based formatting.  Adjust calls to removed macros.
11880         (obstack_chunk_alloc, obstack_chunk_free): Remove.
11881         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
11882         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
11883
11884 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
11885
11886         * ir.texi: Move to ../c-tree.texi.
11887
11888 2000-09-20  Jason Merrill  <jason@redhat.com>
11889
11890         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
11891
11892 2000-09-21  Andreas Jaeger  <aj@suse.de>
11893
11894         * errfn.c: Move declaration of cp_printer and cp_printers to ...
11895         * cp-tree.h: ... here.
11896
11897         * error.c: Remove declaration of cp_printer.
11898
11899 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
11900
11901         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
11902
11903 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
11904
11905         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
11906         users.
11907
11908 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
11909
11910         * decl.c (start_function): Robustify.
11911
11912 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11913
11914         * cp-tree.h (check_function_format): Accept a `status' parameter.
11915
11916         * call.c, typeck.c: Updates calls to `check_function_format'.
11917
11918 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
11919
11920         * decl2.c (handle_class_head): Always push some scope even
11921         in the error case.
11922
11923 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
11924
11925         * cp-tree.h (struct cp_language_function): Remove
11926         x_scope_stmt_stack and name_declared.
11927         (current_scope_stmt_stack): Remove.
11928         (function_name_declared_p): New macro.
11929         (struct lang_decl_flags): Use c_lang_decl as a base class.
11930         (context): Remove.
11931         (struct lang_decl): Replace saved_tree with context.
11932         (DECL_FRIEND_CONTEXT): Adjust accordingly.
11933         (SET_DECL_FRIEND_CONTEXT): Likewise.
11934         (DECL_VIRTUAL_CONTEXT): Likewise.
11935         (DECL_SAVED_TREE): Remove.
11936         (C_DECLARED_LABEL_FLAG): Likewise.
11937         (cplus_expand_expr_stmt): Don't declare.
11938         (add_decl_stmt): Likewise.
11939         (add_scope_stmt): Likewise.
11940         * decl.c (mark_stmt_tree): Remove.
11941         (case_compare): Likewise.
11942         (finish_case_label): Use c_add_case_label.
11943         (init_decl_processing): Set more language-specific hooks.
11944         (build_enumerator): Fix typo in comment.
11945         (cplus_expand_expr_stmt): Remove.
11946         (mark_lang_function): Use mark_c_language_function.
11947         (lang_mark_tree): Use c_mark_lang_decl.
11948         * decl2.c: Change order of inclusion.
11949         * except.c: Likewise.
11950         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
11951         back on c_expand_expr.
11952         * friend.c: Include expr.h.
11953         * init.c: Change order of inclusion.
11954         * Makefile.in: Update dependencies.
11955         * lex.h (free_lang_decl_chain): Remove.
11956         * optimize.c (maybe_clone_body): Use function_name_declared_p.
11957         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
11958         it doesn't exist.
11959         (instantiate_decl): Use function_name_declared_p.
11960         * semantics.c (lang_expand_expr_stmt): Remove.
11961         (set_current_function_name_declared): Likewise.
11962         (current_function_name_declared): Likewise.
11963         (begin_compound_stmt): Use function_name_declared_p.
11964         (add_decl_stmt): Remove.
11965         (setup_vtbl_ptr): Use function_name_declared_p.
11966         (add_scope_stmt): Remove.
11967         (current_scope_stmt_stack): New function.
11968         (cp_expand_stmt): Don't handle SCOPE_STMTs.
11969         (expand_body): Use function_name_declared_p.
11970         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
11971         * typeck.c: Change order of includes.
11972         (convert_sequence): Remove.
11973
11974 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
11975
11976         * lex.c (reswords): Add _Complex.
11977
11978 2000-09-14  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11979
11980         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
11981
11982 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
11983
11984         * init.c (begin_init_stmts): Don't use // comments.
11985
11986 2000-09-12  Jason Merrill  <jason@redhat.com>
11987
11988         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
11989         all non-extern arrays.
11990
11991         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
11992         typenames, too.  Downgrade complaint to pedwarn.
11993         (xref_tag): Warn about surprising behavior of 'friend struct T'.
11994         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
11995         'class This::Inherited'.
11996
11997 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
11998
11999         * decl.c (finish_case_label): Given the LABEL_DECL a
12000         DECL_CONTEXT.
12001
12002 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
12003
12004         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
12005         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
12006         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
12007         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
12008         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
12009         New macros.
12010         (sorry_for_unsupported_tree, print_scope_operator,
12011         print_left_paren, print_right_paren, print_left_bracket,
12012         print_right_bracket, print_whitespace): Likewise.
12013         (aggr_variety): Rename to class_key_or_enum.
12014         (print_type): Rename to print_type_id.
12015         (print_type_specifier_seq, print_simple_type_specifier,
12016         print_elaborated_type_specifier,
12017         print_rest_of_abstract_declarator,
12018         print_parameter_declaration_clause, print_exception_specification,
12019         print_nested_name_specifier, print_template_id,
12020         typedef_original_name,  print_template_argument_list_start,
12021         print_template_argument_list_end): New functions.
12022
12023 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
12024
12025         * ir.texi: Add more documentation.
12026
12027 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
12028
12029         * cp-tree.h (struct saved_scope): Remove x_function_parms.
12030         (current_function_parms): Don't define.
12031         (struct cp_language_function): Remove parms_stored.
12032         (current_function_just_assigned_this): Don't define.
12033         (current_function_parms_stored): Likewise.
12034         (static_ctors): Declare.
12035         (static_dtors): Likewise.
12036         (SF_EXPAND): Don't define.
12037         (expand_start_early_try_stmts): Remove declaration.
12038         (store_parm_decls): Likewise.
12039         * decl.c (static_ctors): Don't declare.
12040         (static_dtors): Likewise.
12041         (struct binding_level): Remove this_block.
12042         (poplevel): Remove dead code.
12043         (set_block): Likewise.
12044         (mark_binding_level): Don't mark this_block.
12045         (mark_saved_scope): Don't mark x_function_parms.
12046         (init_decl_processing): Don't add current_function_parms as a GC
12047         root.
12048         (check_function_type): Change prototype.
12049         (start_function): Remove RTL-generation code.
12050         (expand_start_early_try_stmts): Remove.
12051         (store_parm_decls): Give it internal linkage.  Remove
12052         RTL-generation code.
12053         (finish_function): Remove RTL-generation code.
12054         * decl2.c (static_ctors): Fix formatting.
12055         (static_dtors): Likewise.
12056         * method.c (use_thunk): Don't call store_parm_decls.
12057         (synthesize_method): Likewise.
12058         * optimize.c (maybe_clone_body): Likewise.
12059         * parse.y (fn.def2): Likewise.
12060         (.set_base_init): Likewise.
12061         (nodecls): Likewise.
12062         * pt.c (instantiate_decl): Likewise.
12063         * rtti.c (synthesize_tinfo_fn): Likewise.
12064         * semantics.c (genrtl_try_block): Simplify.
12065         (expand_body): Use genrtl_start_function and
12066         genrtl_finish_function.
12067         (genrtl_start_function): New function.
12068         (genrtl_finish_function): Likewise.
12069
12070 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
12071
12072         * error.c (cp_tree_printer, case 'P'): Append break.
12073
12074 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
12075
12076         * cp-tree.h (frob_opname): Declare.
12077         * parse.y (saved_scopes): New static variable.
12078         (cp_parse_init): Adjust.
12079         (do_id): If lastiddecl is NULL, do do_identifier.
12080         (operator): Save scope information.
12081         (unoperator): New reduction. Restore scope information.
12082         (operator_name): Append unoperator. Call frob_opname.
12083         * spew.c (frob_opname): Define.
12084
12085 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
12086
12087         * decl.c, rtti.c: Include defaults.h if not already included.
12088         Don't define the *_TYPE_SIZE macros.
12089
12090 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
12091
12092         * cp-tree.h (push_switch): Change prototype.
12093         (check_cp_case_value): Remove declaration.
12094         (decl_constant_value): Likewise.
12095         * decl.c (struct cp_switch): Add switch_stmt and cases.
12096         (case_compare): New function.
12097         (push_switch): Set switch_stmt.  Initialize cases.
12098         (pop_switch): Clean up cases.
12099         (define_case_label): Rename to ...
12100         (finish_case_label): ... this.  Do semantic analysis for case
12101         labels here.
12102         (start_function): Correct comment.
12103         * decl2.c (check_cp_case_value): Remove.
12104         * expr.c (do_case): Remove.
12105         * pt.c (tsubst_expr): Adjust call to finish_case_label.
12106         * semantics.c (genrtl_do_poplevel): Remove declaration.
12107         (RECHAIN_STMTS): Remove.
12108         (finish_break_stmt): Use build_break_stmt.
12109         (finish_continue_stmt): Use build_continue_stmt.
12110         (finish_switch_cond): Adjust condition here, rater than in
12111         c_expand_start_case.
12112         (finish_case_label): Remove.
12113         * typeck.c (c_expand_return): Remove.
12114         (c_expand_start_case): Likewise.
12115
12116 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
12117
12118         * ir.texi: Document type nodes.
12119
12120 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
12121
12122         * cp-tree.h (init_cp_semantics): Declare.
12123         (genrtl_try_block): Don't declare.
12124         (genrtl_handler): Likewise.
12125         (genrtl_catch_block): Likewise.
12126         (genrtl_ctor_stmt): Likewise.
12127         (genrtl_subobject): Likewise.
12128         (genrtl_do_poplevel): Likewise.
12129         (genrtl_named_return_value): Likewise.
12130         * lex.c (init_parse): Call init_cp_semantics.
12131         * semantics.c (genrtl_try_block): Give it internal linkage.
12132         (genrtl_handler): Likewise.
12133         (genrtl_catch_block): Likewise.
12134         (genrtl_ctor_stmt): Likewise.
12135         (genrtl_subobject): Likewise.
12136         (genrtl_do_poplevel): Likewise.
12137         (genrtl_named_return_value): Likewise.
12138         (lang_expand_stmt): Rename to ...
12139         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
12140         (init_cp_semantics): Define.
12141
12142         * decl.c (initialize_local_var): Remove RTL-generating code.
12143         * semantics.c (genrtl_try_block): Fix formatting.
12144
12145         Move statement-tree facilities from C++ to C front-end.
12146         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
12147         (void_zero_node): Remove.
12148         (stmt_tree): Likewise.
12149         (scope_chain): Adjust.
12150         (language_function): Rename to cp_language_function.
12151         (cp_function_chain): Adjust.
12152         (current_stmt_tree): Remove.
12153         (last_tree): Likewise.
12154         (last_expr_type): Likewise.
12155         (struct lang_decl): Adjust.
12156         (STMT_IS_FULL_EXPR_P): Remove.
12157         (add_tree): Remove.
12158         (begin_stmt_tree): Likewise.
12159         (finish_stmt_tree): Likewise.
12160         (walk_tree_fn): Likewise.
12161         (walk_stmt_tree): Likewise.
12162         * class.c (finish_struct): Replace use of add_tree with add_stmt.
12163         * decl.c (mark_stmt_tree): Adjust type.
12164         (init_decl_processing): Don't build void_zero_node.
12165         (initialize_local_var): Adjust usage of current_stmt_tree.
12166         (finish_enum): Use add_stmt, not add_tree.
12167         (save_function_data): Adjust use of language_function.
12168         (finish_constructor_body): Use add_stmt, not add_tree.
12169         (finish_destructor_body): Likewise.
12170         (push_cp_function_context): Adjust use of language_function.
12171         (pop_cp_function_context): Likewise.
12172         (mark_lang_function): Likewise.
12173         (mark_cp_function_context): Likewise.
12174         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
12175         (build_vec_init): Likewise.
12176         * semantics.c (SET_LAST_STMT): Remove.
12177         (RECHAIN_STMTS): Don't use it.
12178         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
12179         (current_stmt_tree): Define.
12180         (add_tree): Remove.
12181         (finish_goto_stmt): Use add_stmt, not add_tree.
12182         (finish_expr_stmt): Likewise.
12183         (begin_if_stmt): Likewise.
12184         (finish_then_clause): Likewise.
12185         (begin_while_stmt): Likewise.
12186         (begin_do_stmt): Likewise.
12187         (finish_return_stmt): Likewise.
12188         (begin_for_stmt): Likewise.
12189         (finish_break_stmt): Likewise.
12190         (finish_continue_stmt): Likewise.
12191         (begin_switch_stmt): Likewise.
12192         (finish_case_label): Likewise.
12193         (begin_try_block): Likewise.
12194         (begin_function_try_block): Likewise.
12195         (begin_handler): Likewise.
12196         (begin_catch_block): Likewise.
12197         (begin_compound_stmt): Likewise.
12198         (begin_asm_stmt): Likewise.
12199         (finish_asm_stmt): Likewise.
12200         (finish_label_stmt): Likewise.
12201         (add_decl_stmt): Likewise.
12202         (finish_subobject): Likewise.
12203         (finish_decl_cleanup): Likewise.
12204         (finish_named_return_value): Likewise.
12205         (setup_vtbl_ptr): Likewise.
12206         (add_scope_stmt): Likewise.
12207         (finish_stmt_expr): Likewise.
12208         (prune_unused_decls): Remove.
12209         (begin_stmt_tree): Likewise.
12210         (finish_stmt_tree): Likewise.
12211         (prep_stmt): Adjust use of current_stmt_tree.
12212         (lang_expand_stmt): Likewise.
12213         * tree.c (statement_code_p): Remove.
12214         (cp_statement_code_p): New function.
12215         (walk_stmt_tree): Remove.
12216         (init_tree): Set lang_statement_code_p.
12217
12218 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
12219
12220         Integrated preprocessor.
12221
12222         * Make-lang.in, Makefile.in: Remove all references to input.c,
12223         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
12224         * gxx.gperf, hash.h, input.c: Delete.
12225         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
12226         initialized properly.
12227
12228         * class.c (fixup_pending_inline): Take a tree, not a
12229         struct pending_inline *.  All callers changed.
12230         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
12231         RID_PROTECTED entries in ridpointers[] array here.
12232         * decl.c (duplicate_decls): Do not refer to struct
12233         pending_inline.
12234         (record_builtin_type, init_decl_processing): Use RID_MAX not
12235         CP_RID_MAX.
12236         (grokdeclarator): Use C_IS_RESERVED_WORD.
12237         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
12238         cpplib.
12239         (grok_x_components): Do not inspect pending_inlines chain.
12240
12241         * cp-tree.h (struct lang_identifier): Add rid_code entry.
12242         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
12243         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
12244         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
12245         TIME_IDENTIFIER_FILEINFO): Kill.
12246         Update prototypes.
12247         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
12248         single 32-bit word.
12249         * parse.y: Call do_pending_inlines unconditionally.
12250         reinit_parse_for_method is now snarf_method.  fn.defpen is no
12251         longer necessary.  Remove unnecessary <itype> annotation on
12252         SCOPE.  Do not refer to end_of_file or struct pending_inline.
12253         * semantics.c (begin_inline_definitions): Call
12254         do_pending_inlines unconditionally.
12255
12256         * lex.c: Remove all code now shared with C front end.
12257         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
12258         into the get_identifier table.  Rewrite pragma handling to
12259         work with the registry.  Move code to save tokens for later
12260         processing to spew.c.
12261
12262         * spew.c: Rewrite everything in terms of token streams instead
12263         of text.  Move routines here from lex.c / input.c as
12264         appropriate.  GC-mark trees hanging off the pending inlines
12265         chain.
12266
12267 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
12268
12269         * NEWS: Mention that the named return value extension has been
12270         deprecated.
12271         * cp-tree.h (original_result_rtx): Define.
12272         (TREE_REFERENCE_EXPR): Remove.
12273         (DECL_VPARENT): Likewise.
12274         (pushdecl_nonclass_level): Likewise.
12275         (store_return_init): Likewise.
12276         (reinit_lang_specific): Likewise.
12277         (genrtl_named_return_value): Change prototype.
12278         * decl.c (original_result_rtx): Remove.
12279         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
12280         Do not generate RTL for local variables here.
12281         (store_return_init): Remove.
12282         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
12283         store_return_init.
12284         (finish_named_return_value): Adjust accordingly.  Warn that this
12285         extension is deprecated.
12286         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
12287
12288 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
12289
12290         * pt.c (type_unification_real): Replace switch with if.
12291         (unify): Tsubst non-type parms before comparing.
12292
12293 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
12294
12295         * error.c (dump_typename): New function, broken out of ...
12296         (dump_type): ... here. Use it.
12297         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
12298
12299 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
12300
12301         * init.c (build_offset_ref): Deal with namespace scoped
12302         TEMPLATE_ID_EXPRs.
12303
12304 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
12305
12306         * class.c (resolve_address_of_overloaded_function): Add
12307         explanation message.
12308         * decl.c (define_case_label): Reformat explanation.
12309         * decl2.c (finish_static_data_member_decl): Likewise.
12310         (grokfield): Likewise.
12311         * friend.c (do_friend): Likewise.
12312
12313 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
12314
12315         * tree.c (walk_tree): Expose tail recursion.
12316         (walk_stmt_tree): New function.
12317         * cp-tree.h: Prototype walk_stmt_tree.
12318         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
12319         the BLOCKs directly.  If a BLOCK has no variables after
12320         pruning, discard it.
12321         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
12322         restore the line number.
12323
12324 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
12325
12326         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
12327         (pt.o): Remove dependency on HTAB_H.
12328         * cp-tree.h: Include hashtab.h.
12329         (walk_tree): Change prototype.
12330         (walk_tree_without_duplicates): New function.
12331         * decl.c (check_default_argument): Use it.
12332         * optimize.c (remap_decl): Adjust calls to walk_tree.
12333         (copy_body): Likewise.
12334         (expand_calls_inline): Likewise.
12335         (calls_setjmp_p): Use walk_tree_without_duplicates.
12336         * pt.c: Don't include hashtab.h.
12337         (for_each_template_parm): Use walk_tree_without_duplicates.
12338         * semantics.c (finish-stmt_tree): Likewise.
12339         (expand_body): Likewise.
12340         * tree.c (walk_tree): Add additional parameter.
12341         (walk_tree_without_duplicates): New function.
12342         (count_trees): Use it.
12343         (verify_stmt_tree): Adjust call to walk_tree.
12344         (find_tree): Use walk_tree_without_duplicates.
12345         (no_linkage_check): Likewise.
12346         (break_out_target_exprs): Adjust call to walk_tree.
12347         (cp_unsave): Likewise.
12348
12349 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12350
12351         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
12352         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
12353         * cp-tree.h (TYPE_BINFO): Adjust comment.
12354         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
12355         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
12356         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
12357         (TYPE_TEMPLATE_INFO): Likewise.
12358         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
12359         * class.c (push_nested_class): Likewise.
12360         * decl.c (lookup_name_real): Likewise.
12361         (grokdeclarator): Likewise.
12362         (grok_op_properties): Likewise.
12363         (xref_tag): Likewise.
12364         (xref_basetypes): Likewise.
12365         * decl2.c (constructor_name_full): Likewise.
12366         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
12367         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
12368         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
12369         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12370         (dump_type_suffix): Likewise.
12371         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
12372         instead.
12373         (get_aggr_from_typedef): Likewise.
12374         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
12375         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12376         (write_template_parm): Likewise.
12377         (write_template_template_parm): Check tree code instead of
12378         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
12379         * method.c (build_overload_nested_name): Add
12380         BOUND_TEMPLATE_TEMPLATE_PARM.
12381         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
12382         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12383         * pt.c (convert_template_argument): Check tree code instead of
12384         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
12385         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
12386         (for_each_template_parm): Adjust comment.
12387         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
12388         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12389         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
12390         template_args_equal to compare template template parameter cases.
12391         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12392         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
12393         instead.
12394         * tree.c (copy_template_template_parm): Decide whether to create
12395         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
12396         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12397         (copy_tree_r): Likewise.
12398         * typeck.c (comptypes): Likewise.  Check tree code instead of
12399         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
12400
12401 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
12402
12403         * decl.c (finish_function): Move the code for handling functions
12404         marked with the constructor and destructor attributes inside the
12405         expand_p block.
12406
12407 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
12408
12409         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
12410
12411 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
12412
12413         * pt.c (lookup_template_class): Remove abort.
12414         * tree.c (get_type_decl): Allow error_mark_node.
12415
12416 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
12417
12418         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
12419         TEMPLATE_ID_EXPRs.
12420
12421 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
12422
12423         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
12424         new ABI mangling.
12425
12426 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
12427
12428         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
12429         union tag mismatch error reporting.
12430
12431 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
12432
12433         * call.c (build_scoped_method_call): Check it is not a namespace.
12434
12435 2000-08-30  Jason Merrill  <jason@redhat.com>
12436
12437         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
12438
12439         * tree.c (bot_manip): Check TREE_CONSTANT rather than
12440         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
12441         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
12442
12443         * decl.c (start_function): Always call make_function_rtl.
12444
12445 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
12446
12447         * semantics.c (prune_unused_decls): New function.
12448         (finish_stmt_tree): Call it via walk_tree.
12449
12450 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
12451
12452         * class.c (build_secondary_vtable): Constify a char *.
12453         * decl.c (init_decl_processing): Initialize function_id_node,
12454         pretty_function_id_node, and func_id_node.
12455         * input.c (struct input_source): Constify 'str'.
12456         (feed_input): Constify first argument.
12457         * mangle.c (write_identifier): Constify argument.
12458         * pt.c (mangle_class_name_for_template): Constify argument.
12459
12460 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
12461
12462         * typeck.c (mark_addressable): Remove code that pokes around in
12463         RTL.
12464
12465 2000-08-28  Jason Merrill  <jason@redhat.com>
12466
12467         * lex.c (file_name_nondirectory): Move to toplev.c.
12468
12469         * cp-tree.h (LOCAL_CLASS_P): New macro.
12470         * class.c (finish_struct_1): Use it.
12471
12472 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
12473
12474         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
12475         (write_encoding): Pass another argument to write_name.
12476         (write_name): Add ignore_local_scope parameter.  Fix handling of
12477         local names.
12478         (write_nested_name): Use write_unqualified_name.
12479         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
12480         (write_template_prefix): Use write_unqualified_name.
12481         (write_component): Remove.
12482         (write_local_name): Add parameter.  Use direct local entity to
12483         discriminator calculation.
12484         (write_class_enum_type): Pass another argument to write_name.
12485         (write_template_template_arg): Likewise.
12486         (make_guard_variable): Likewise.
12487
12488 2000-08-27  Jason Merrill  <jason@redhat.com>
12489
12490         * decl.c (pushdecl): Matching decls for local externs are found in
12491         the current level.  Propagate linkage information from previous
12492         declarations.
12493
12494 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
12495
12496         * ir.texi (Expressions): Fix typo.
12497
12498 2000-08-25  Greg McGary  <greg@mcgary.org>
12499
12500         * tree.c (init_tree): Use ARRAY_SIZE.
12501
12502 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
12503
12504         * error.c (cp_tree_printer): Rework.
12505
12506 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
12507
12508         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
12509         dyn-string.o.
12510         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
12511         (cp-demangle.o): Remove target.
12512         (dyn-string.o): Likewise.
12513
12514         * decl.c (grokfndecl): Require that `main' return an `int'.
12515         * mangle.c (write_encoding): Don't mangle return types for
12516         conversion functions.
12517
12518 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
12519
12520         * error.c (tree_formatting_info): New data type.
12521         (tree_being_formatted): New macro.
12522         (tree_formatting_flags): Likewise.
12523         (put_whitespace): Likewise.
12524         (print_tree_identifier): Likewise.
12525         (print_identifier): Likewise.
12526         (cp_tree_printer, print_function_argument_list, print_declaration,
12527         print_expression, print_function_declaration,
12528         print_function_parameter, print_type, print_cv_qualifier): New
12529         functions.
12530         (init_error): Initialize lang_printer.
12531
12532 2000-08-24  Jason Merrill  <jason@redhat.com>
12533
12534         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
12535         adjustment necessary.
12536
12537 2000-08-24  Greg McGary  <greg@mcgary.org>
12538
12539         * cp-tree.h (MAIN_NAME_P): Remove macro.
12540
12541 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
12542
12543         * error.c (print_instantiation_context): Don't forget to flush the
12544         buffer.
12545
12546 2000-08-23  Jason Merrill  <jason@redhat.com>
12547
12548         * typeck.c (build_ptrmemfunc): Save the input pmf.
12549
12550         * method.c (process_modifiers): Use same_type_p.
12551
12552 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
12553
12554         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
12555         * mangle.c (write_function_type): Change prototype.
12556         (write_encoding): Don't mangle return types for
12557         constructors or destructors.
12558         (write_type): Adjust call to write_function_type.
12559         * pt.c (instantiate_template): Instantiate alternate entry points
12560         when instantiating the main function.
12561
12562 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
12563
12564         * error.c (cp_print_error_function): Don't use embedded '\n' in
12565         output_printf.
12566
12567 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
12568
12569         * decl.c (init_decl_processing): Remove bogus initialization.
12570         * error.c (lang_print_error_function): Restore here.
12571         (init_error): Initialize print_error_function.
12572
12573 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
12574
12575         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
12576
12577 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
12578
12579         * Makefile.in (error.o): Depends on diagnostic.h
12580
12581         * cp-tree.h (problematic_instantiation_changed,
12582         record_last_problematic_instantiation, current_instantiation,
12583         print_instantiation_context): Declare.
12584         (maybe_print_template_context): Remove.
12585
12586         * decl.c (init_decl_processing): Set print_error_function to NULL.
12587         (lang_print_error_function): Remove, since we're using a new
12588         machinery.
12589
12590         * error.c: #include diagnostic.h
12591         (function_category): New function.
12592         (cp_diagnostic_starter): Likewise.
12593         (cp_diagnostic_finalizer): Likewise.
12594         (cp_print_error_function): Likewise.
12595         (maybe_print_instantiation_context): Likewise.
12596         (print_instantiation_full_context): Likewise.
12597         (print_instantiation_partial_context): Likewise.
12598         (print_instantiation_context): Define.
12599         (init_error): Initialize diagnostic pager and finalizer.
12600
12601         * pt.c (problematic_instantiation_changed): Define.
12602         (record_last_problematic_instantiation): Likewise.
12603         (current_instantiation): Likewise.
12604         (maybe_print_template_context): Remove.
12605         (print_template_context): Likewise.
12606         (current_tinst_level): Make static to reflect Brendan Kehoe's
12607         change of 1995-04-13.
12608         (push_tinst_level): Call print_instantiation_context.
12609
12610 2000-08-21  Nix  <nix@esperi.demon.co.uk>
12611
12612         * lang-specs.h: Do not process -o or run the assembler if
12613         -fsyntax-only.
12614
12615 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
12616
12617         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
12618         variables.
12619         * decl2.c (lang_decode_option): Disable gettext attributes for
12620         -ansi.
12621
12622 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
12623
12624         * lex.c (lang_init_options): Default diagnostic message maximum
12625         length to 80, when line-wrapping.
12626
12627 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
12628
12629         * class.c (build_vtbl_initializer): Clear the entire
12630         vtbl_init_data.  Start keeping track of the functions for which we
12631         have created vcall offsets here.
12632         (dfs_build_vcall_offset_vtbl_entries): Remove.
12633         (build_vcall_offset_vtbl_entries): Reimplement.
12634         (add_vcall_offset_vtbl_entries_r): New function.
12635         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
12636         computing when vcall offsets are necessary.
12637
12638 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
12639
12640         * decl.c (member_function_or_else): Use cp_error ... %T.
12641         (grokdeclarator): Likewise.
12642         (start_method): Likewise.
12643         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
12644
12645 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
12646
12647         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
12648         TYPE_DECLs.
12649
12650 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
12651
12652         * cp-tree.h (PTRMEM_OK_P): New macro.
12653         (itf_ptrmem_ok): New enumeration value.
12654         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
12655         argument. Diagnose implicit pointer to member.
12656         (instantiate_type): Don't diagnose implicit pointer to member
12657         here. Pass itf_ptrmem_ok if ok. Adjust calls to
12658         resolve_address_of_overloaded_function.
12659         * init.c (build_offset_ref): Set PTRMEM_OK_P.
12660         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
12661         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
12662         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
12663         (build_unary_op): Deal with single non-static member in
12664         microsoft-land.
12665
12666 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
12667
12668         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
12669
12670 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
12671
12672         * cp-tree.h (enum_name_string): Remove prototype.
12673         (report_case_error): Remove prototype.
12674         * cp/typeck2.c (enum_name_string): Remove.
12675         (report_case_error): Remove.
12676         * error.c (dump_expr): Deal with enum values directly.
12677         Correctly negate integer constant.
12678
12679 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
12680
12681         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
12682         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
12683         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
12684         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
12685         (__cxa_vec_new): Use __cxa_vec_new2.
12686         (__cxa_vec_delete): Use __cxa_vec_delete2.
12687
12688 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
12689
12690         * vec.cc (__cxa_vec_new): Set "C" linkage.
12691         (__cxa_vec_ctor): Likewise.
12692         (__cxa_vec_cctor): Likewise.
12693         (__cxa_vec_dtor): Likewise.
12694         (__cxa_vec_delete): Likewise.
12695         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
12696         (__cxa_vec_ctor): Likewise.
12697         (__cxa_vec_cctor): Likewise.
12698         (__cxa_vec_dtor): Likewise.
12699         (__cxa_vec_delete): Likewise.
12700
12701 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
12702
12703         * class.c (instantiate_type): Reinstate local variable
12704         deleted in previous change.
12705
12706         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
12707         itf_no_attributes.
12708
12709 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
12710
12711         * cp-tree.h (instantiate_type_flags): New enumeration.
12712         (instantiate_type): Change parameter.
12713         * class.c (instantiate_type): Adjust prototype. Adjust.
12714         * call.c (standard_conversion): Adjust instantiate_type call.
12715         (reference_binding): Likewise.
12716         (build_op_delete_call): Likewise.
12717         (convert_like_real): Likewise.
12718         * cvt.c (cp_convert_to_pointer): Likewise.
12719         (convert_to_reference): Likewise.
12720         * pt.c (convert_nontype_argument): Likewise.
12721         * typeck.c (build_binary_op): Likewise.
12722         (build_ptrmemfunc): Likewise.
12723         (convert_for_assignment): Likewise.
12724
12725 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
12726
12727         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
12728         (current_aggr): Define.
12729         * decl.c (grokdeclarator): Make sure a friend class is an
12730         elaborated type specifier.
12731         * parse.y (current_aggr): Remove static definition.
12732         (cp_parse_init): Adjust.
12733         (structsp): Clear and restore current_aggr.
12734         (component_decl_list): Clear current_aggr.
12735
12736         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
12737         aggregate tag on the typename's context.
12738
12739         * pt.c (tsubst_friend_class): Return error_mark_node, if
12740         parms becomes NULL.
12741         (instantiate_class_template): Ignore error_mark_node friend types.
12742
12743 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
12744
12745         * cvt.c (warn_ref_binding): New static function, broken out of ...
12746         (convert_to_reference): ... here. Use it.
12747
12748 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
12749
12750         * parse.y (template_arg): Add rule for template qualified with
12751         global scope.
12752
12753 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
12754
12755         * decl2.c (add_function): Reorganize.
12756         (arg_assoc): Do not consider function template decls.
12757
12758 2000-08-11  Jason Merrill  <jason@redhat.com>
12759
12760         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
12761         looking inside.
12762
12763 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
12764
12765         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
12766         (lookup_nested_tag): Likewise.
12767
12768         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
12769         can be produced.
12770
12771 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
12772
12773         * parse.y (named_complex_class_head_sans_basetype): Remove
12774         always true if.
12775
12776 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
12777
12778         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
12779         explicit TEMPLATE_ID_EXPR args.
12780         (build_expr_from_tree, case CALL_EXPR): Likewise.
12781
12782 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
12783
12784         * decl.c (check_tag_decl): Diagnose typename's which don't
12785         declare anything.
12786
12787 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
12788
12789         * init.c (build_aggr_init): Reject bogus array initializers
12790         early.
12791
12792 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
12793
12794         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
12795         runtime.
12796         * cp/tinfo.cc (__dynamic_cast): Likewise.
12797         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
12798
12799 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
12800
12801         * cvt.c (convert_to_pointer_force): Fix error message when
12802         attempting to cast from ambiguous base.
12803
12804 2000-08-08  Jason Merrill  <jason@redhat.com>
12805
12806         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
12807         (tsubst_template_arg_vector): Likewise.
12808
12809         * decl2.c (build_anon_union_vars): Choose the largest field; don't
12810         assume that one will be as large as the union.
12811
12812 2000-08-07  Kazu Hirata  <kazu@hxi.com>
12813
12814         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
12815         * decl.c (pop_labels): Likewise.
12816
12817 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
12818
12819         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
12820         specifications.
12821         (__pointer_to_member_type_info): Likewise.
12822         (__base_class_info): Likewise.
12823         (__class_type_info): Likewise.
12824         (__si_class_type_info): Likewise.
12825         (__vmi_class_type_info): Likewise.
12826         * tinfo.cc (__si_class_type_info::__do_find_public_src):
12827         Changed member names to match specifications.
12828         (__vmi_class_type_info::__do_find_public_src): Likewise.
12829         (__si_class_type_info::__do_dyncast): Likewise.
12830         (__vmi_class_type_info::__do_dyncast): Likewise.
12831         (__si_class_type_info::__do_upcast): Likewise.
12832         (__vmi_class_type_info::__do_upcast): Likewise.
12833         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
12834         (__pbase_type_info::__pointer_catch): Likewise.
12835         (__pointer_type_info::__pointer_catch): Likewise.
12836         (__pointer_to_member_type_info::__pointer_catch): Likewise.
12837
12838 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
12839
12840         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
12841         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
12842         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
12843
12844 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
12845
12846         * cp-tree.h (add_method): Change prototype.
12847         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
12848         Don't double the size of the method vector in the error case.
12849         (handle_using_decl): Adjust call to add_method.
12850         (add_implicitly_declared_members): Likewise.
12851         (clone_function_decl): Likewise.
12852         * decl2.c (check_classfn): Likewise.
12853         * semantics.c (finish_member_declaration): Likewise.
12854
12855 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
12856
12857         * decl.c (flag_isoc94): New variable.
12858
12859 2000-08-02  Jason Merrill  <jason@redhat.com>
12860
12861         * pt.c (do_type_instantiation): Add complain parm; don't complain
12862         if called recursively.
12863         * cp-tree.h, parse.y: Adjust.
12864
12865 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
12866
12867         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
12868         -Wno-strict-prototypes.
12869
12870         * g++spec.c: Adjust type of second argument to
12871         lang_specific_driver, and update code as necessary.
12872
12873         * cp-tree.h: Don't prototype min_precision here.
12874         (my_friendly_assert): Cast expression to void.
12875         * semantics.c (do_poplevel): Initialize scope_stmts.
12876
12877 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
12878
12879         * cp-tree.h (DECL_NEEDED_P): Tweak.
12880
12881 2000-07-28  Jason Merrill  <jason@redhat.com>
12882
12883         * lang-specs.h: Use %i in rule for .ii files.
12884
12885 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
12886
12887         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
12888
12889 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
12890
12891         Allow indirect primary bases.
12892         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
12893         primary_base.
12894         (CLASSTYPE_VFIELD_PARENT): Remove.
12895         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
12896         (BINFO_PRIMARY_BINFO): Remove.
12897         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
12898         (BINFO_VBASE_PRIMARY_P): Likewise.
12899         (BINFO_PRIMARY_BASE_OF): New macro.
12900         (BINFO_INDIRECT_PRIMARY_P): Likewise.
12901         (get_primary_binfo): New function.
12902         * decl.c (lang_mark_tree): Make lang_type::primary_base.
12903         * class.c (vcall_offset_data_s): Rename to ...
12904         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
12905         and add ctor_vtbl_p.
12906         (get_derived_offset): Use get_primary_binfo.
12907         (dfs_mark_primary_bases): Adjust handling of virtual primary
12908         bases.
12909         (mark_primary_bases): Likewise.
12910         (set_primary_base): Take a binfo, not an integer, as a
12911         representation of the primary base.
12912         (indirect_primary_base_p): Remove.
12913         (determine_primary_base): Adjust for indirect primary bases.
12914         (dfs_find_final_overrider): Fix typo in coment.
12915         (update_vtable_entry_for_fn): Use get_primary_binfo.
12916         (layout_nonempty_base_or_field): Tweak.
12917         (build_base_fields): Adjust for new primary base semantics.
12918         (dfs_propagate_binfo_offsets): Remove.
12919         (propagate_binfo_offsets): Rewrite.
12920         (dfs_set_offset_for_shared_vbases): Remove.
12921         (layout_virtual_bases): Don't use it.
12922         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
12923         ABI.
12924         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
12925         CLASSTYPE_VFIELD_PARENT.
12926         (dfs_get_primary_binfo): New function.
12927         (get_primary_binfo): Likewise.
12928         (dump_class_hierarchy_r): Tweak printing of primary bases.
12929         (build_vtbl_initializer): Fix typo in comments.  Use
12930         vtbl_init_data.
12931         (build_vcall_and_vbase_vtbl_entries): Likewise.
12932         (build_vbaes_offset_vtbl_entries): Likewise.
12933         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
12934         BV_VCALL_INDEX to handle indirect primary bases.
12935         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
12936         (build_rtti_vtbl_entries): Likewise.
12937         * search.c (get_shared_vbase_if_not_primary): Tweak.
12938         (find_vbase_instance): Likewise.
12939         (binfo_for_vtable): Simplify.
12940         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
12941         (make_binfo): Make it have 11 entries.
12942
12943 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
12944
12945         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
12946         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
12947         ascertaining primaryness.
12948         (G): Remove template_args.
12949         (decl_is_template_id): New function.
12950         (write_encoding): Use decl_is_template_id.
12951         (write_name): Likewise.  Handle type_decls.  Get main variant of
12952         type decls.
12953         (write_nested_name): Likewise.
12954         (write_prefix): Likewise.
12955         (write_template_prefix): Likewise.
12956         (write_special_name_constructor): Remove defunct production from
12957         comment.
12958         (write_bare_function_type): Remove comment about absent parameter.
12959         (write_template_template_arg): Add missing grammar production to
12960         comment.
12961
12962 2000-07-27  Jason Merrill  <jason@redhat.com>
12963
12964         * decl.c (duplicate_decls): If common_type produces a non-typedef
12965         type for a typedef, just use the old type.
12966
12967 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
12968
12969         * cp-tree.h (function_depth): Declare.
12970         (verify_stmt_tree): Likewise.
12971         (find_tree): Likewise.
12972         * decl.c (function_depth): Give it external linkage.
12973         * optimize.c (optimize_function): Increment and decrement it.
12974         * tree.c (verify_stmt_tree_r): New function.
12975         (verify_stmt_tree): Likewise.
12976         (find_tree_r): Likewise.
12977         (find_tree): Likewise.
12978
12979 2000-07-27  Jason Merrill  <jason@redhat.com>
12980
12981         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
12982         TYPE_PTRMEMFUNC_P.
12983         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
12984
12985 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
12986
12987         * decl.c (start_cleanup_fn): Mark the function as `inline'.
12988         * decl2.c (get_guard): Call cp_finish_decl, not
12989         rest_of_decl_compilation, for local guards.
12990         * lex.c (do_identifier): Remove unused variable.
12991
12992 2000-07-26      Marc Espie <espie@cvs.openbsd.org>
12993
12994         * parse.y:  Add missing ';'.
12995
12996 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
12997
12998         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
12999         of `extern "C++"'.
13000
13001 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
13002
13003         Kill strict_prototype. Backwards compatibility only for
13004         non NO_IMPLICIT_EXTERN_C systems.
13005         * cp-tree.h (flag_strict_prototype): Remove.
13006         (strict_prototype): Remove.
13007         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
13008         * decl.c (maybe_push_to_top_level): Adjust.
13009         (pop_from_top_level): Adjust.
13010         (decls_match): Only allow sloppy parm matching for ancient
13011         system headers.
13012         (init_decl_processing): Adjust.
13013         (grokdeclarator): Adjust.
13014         * decl2.c (flag_strict_prototype): Remove.
13015         (strict_prototype): Remove.
13016         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
13017         (lang_f_options): Remove "strict-prototype".
13018         (unsupported-options): Add "strict-prototype".
13019         * lex.c (do_identifier): Adjust.
13020         (do_scoped_id): Adjust.
13021         * parse.y (empty_parms): Adjust.
13022         * class.c (push_lang_context): Adjust.
13023         (pop_lang_context): Adjust.
13024         * typeck.c (comp_target_parms): Adjust.
13025
13026 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
13027
13028         * decl.c (poplevel): Deal with anonymous variables at for scope.
13029         (maybe_inject_for_scope_var): Likewise.
13030
13031 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
13032
13033         * decl.c: Remove all signal handling code, now done in toplev.c.
13034
13035 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
13036
13037         * decl.c (make_rtl_for_nonlocal_decl): Rework.
13038
13039         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
13040         correctly.
13041
13042 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
13043
13044         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
13045         Define my_friendly_assert and my_friendly_abort as macros
13046         which may call friendly_abort.  Prototype friendly abort, not
13047         my_friendly_abort or my_friendly_assert.
13048         * decl.c (signal_catch): Report the signal caught in the error
13049         message.  Call fatal directly.
13050         * typeck2.c (ack, my_friendly_assert): Delete.
13051         (my_friendly_abort): Rename to friendly_abort.  Expect file,
13052         line, and function parameters.  Report the abort code, then
13053         call fancy_abort.  Do not mask an abort if errors have
13054         already occurred.
13055
13056 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
13057
13058         * typeck.c (comp_target_parms): Remove obsolete parameter.
13059         (comp_target_types): Adjust.
13060
13061 2000-07-17  Jason Merrill  <jason@redhat.com>
13062
13063         * typeck.c (mark_addressable): Never set TREE_USED.
13064         * call.c (build_call): Don't abort on calls to library functions
13065         that have been declared normally.
13066
13067         * typeck.c (build_binary_op): Fix grammar in warning.
13068
13069         * exception.cc (__eh_free): Fix prototype.
13070
13071         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
13072
13073         * decl.c (pushdecl): Handle seeing an OVERLOAD in
13074         IDENTIFIER_NAMESPACE_VALUE.
13075
13076 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
13077
13078         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
13079         * method.c (use_thunk): Correct handling of vcall offsets.
13080
13081 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
13082
13083         * .cvsignore: parse.h and parse.c have no cp- prefix.
13084
13085 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
13086
13087         * .cvsignore: New file.
13088
13089 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
13090
13091         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
13092
13093 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
13094
13095         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
13096         * parse.c: Remove.
13097         * parse.h: Likewise.
13098
13099 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
13100
13101         * class.c (layout_class_type): Add pointers to virtual bases after
13102         base classes under the old ABI.
13103
13104 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
13105
13106         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
13107         (finish_continue_stmt): Likewise.
13108         (begin_for_stmt): Remove call to note_level_for_for.
13109         (finish_goto_stmt): Change call from build_min_nt
13110         to build_stmt.
13111         (finish_expr_stmt): Likewise.
13112         (begin_if_stmt): Likewise.
13113         (begin_while_stmt): Likewise.
13114         (finish_while_stmt): Likewise.
13115         (finish_return_stmt): Likewise.
13116         (begin_for_stmt): Likewise.
13117         (finish_for_stmt): Likewise.
13118         (finish_break_stmt): Likewise.
13119         (begin_switch_stmt): Likewise.
13120         (finish_case_label): Likewise.
13121         (genrtl_try_block): Likewise.
13122         (begin_try_block): Likewise.
13123         (begin_handler): Likewise.
13124         (begin_compound_stmt): Likewise.
13125         (finish_asm_stmt): Likewise.
13126         (finish_label_stmt): Likewise.
13127         (add_decl_stmt): Likewise.
13128         (finish_subobject): Likewise.
13129         (finish_decl_cleanup): Likewise.
13130         (finish_named_return_value): Likewise.
13131         (setup_vtbl_ptr): Likewise.
13132         (add_scope_stmt): Likewise.
13133         * decl.c (finish_constructor_body): Likewise.
13134         (finish_destructor_body): Likewise.
13135         * optimize.c (copy_body_r): Likewise.
13136         (initialize_inlined_parameters): Likewise.
13137         (declare_return_variable): Likewise.
13138         (expand_call_inline): Likewise.
13139
13140 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
13141
13142         * semantics.c (expand_body): Sync interface information
13143         at the end of function body expansion.
13144
13145 2000-07-09  Jason Merrill  <jason@redhat.com>
13146
13147         * init.c (build_new_1): Bail early if the call to new fails.
13148
13149         * decl.c (compute_array_index_type): Check specifically for
13150         an INTEGER_CST, not just TREE_CONSTANT.
13151
13152         * decl.c (duplicate_decls): Don't call duplicate_decls on
13153         the DECL_TEMPLATE_RESULT.
13154         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
13155         codes.
13156
13157         * error.c (dump_template_bindings): Don't crash if we had an
13158         invalid argument list.
13159
13160         * typeck.c (c_expand_start_case): Do narrowing here.
13161         * semantics.c (finish_switch_cond): Not here.
13162
13163 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
13164
13165         * parse.y (asm_clobbers): Do string concatenation.
13166
13167 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
13168
13169         * decl.c (pushtag): Don't put local classes in template functions
13170         on the local_classes list.
13171
13172 2000-07-04  Scott Snyder  <snyder@fnal.gov>
13173
13174         * decl2.c (get_guard): Add missing return for old ABI local
13175         variable case.
13176
13177 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
13178
13179         * cp-tree.h (char_type_p): New function.
13180         * decl.c (init_decl_processing): Don't initialize
13181         signed_wchar_type_node or unsigned_wchar_type_node.
13182         (complete_array_type): Handle brace-enclosed string-constants.
13183         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
13184         * tree.c (char_type_p): New function.
13185         * typeck2.c (digest_init): Use char_type_p.
13186
13187 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
13188
13189         * pt.c (tsubst): Don't layout type, if it's error_mark.
13190
13191 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
13192
13193         * pt.c (instantiate_pending_templates): Reset template level.
13194
13195 2000-07-05  Jason Merrill  <jason@redhat.com>
13196
13197         * call.c (joust): Don't complain about `operator char *()' beating
13198         `operator const char *() const'.
13199
13200 2000-07-04  scott snyder  <snyder@fnal.gov>
13201             Jason Merrill  <jason@redhat.com>
13202
13203         * repo.c (repo_get_id): Handle the case where a class with virtual
13204         bases has a null TYPE_BINFO_VTABLE.
13205
13206 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
13207             Jason Merrill  <jason@redhat.com>
13208
13209         * parse.y (member_init): Just pass in the type.
13210         * init.c (expand_member_init): Handle getting a type.
13211
13212 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13213             Jason Merrill  <jason@redhat.com>
13214
13215         * decl.c (finish_function): Warn if a function has no return
13216         statement.
13217         Suggested by Andrew Koenig.
13218         * typeck.c (check_return_expr): Do set current_function_returns_value
13219         if we got an error_mark_node.
13220
13221 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
13222
13223         * decl2.c (push_decl_namespace): Push the original namespace.
13224
13225 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
13226
13227         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
13228         * semantics.c (begin_class_definition): Clear it.
13229
13230 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
13231
13232         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
13233         (genrtl_expr_stmt): Likewise.
13234         (genrtl_decl_stmt): Likewise.
13235         (genrtl_if_stmt): Likewise.
13236         (genrtl_while_stmt): Likewise.
13237         (genrtl_do_stmt): Likewise.
13238         (genrtl_return_stmt): Likewise.
13239         (genrtl_for_stmt): Likewise.
13240         (genrtl_break_stmt): Likewise.
13241         (genrtl_continue_stmt): Likewise.
13242         (genrtl_scope_stmt): Likewise.
13243         (genrtl_switch_stmt): Likewise.
13244         (genrtl_case_label): Likewise.
13245         (genrtl_begin_compound_stmt): Likewise.
13246         (genrtl_finish_compound_stmt): Likewise.
13247         (genrtl_compound_stmt): Likewise.
13248         (genrtl_asm_stmt): Likewise.
13249
13250         * init.c (begin_init_stmts): Remove call to
13251         genrtl_begin_compound_stmt.
13252         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
13253
13254         * semantics.c (lang_expand_stmt): Changed call to
13255         genrtl_compound_stmt to ignore return value.
13256
13257 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
13258
13259         * mangle.c (canonicalize_for_substitution): Return the canonical
13260         variant of a type.
13261
13262         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
13263         TYPE_DECL.
13264         * typeck.c (commonparms): Remove obstack manipulations.
13265
13266 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
13267
13268         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
13269
13270         * Makefile.in (OBJS): Added ../c-semantics.o.
13271         (OBJDEPS): Likewise.
13272
13273         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
13274         ../c-common.h.
13275         (struct stmt_tree): Added comment.
13276         (current_function_name_declared): Removed.
13277         (stmts_are_full_exprs_p): Likewise.
13278         (genrtl_do_pushlevel): Likewise.
13279         (genrtl_clear_out_block): Likewise.
13280         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
13281         (DECL_ANON_UNION_ELEMS): Likewise.
13282         (emit_local_var): Likewise.
13283         (make_rtl_for_local_static): Likewise.
13284         (do_case): Likewise.
13285         (expand_stmt): Likewise.
13286         (genrtl_decl_cleanup): Likewise.
13287         (c_expand_asm_operands): Likewise.
13288         (c_expand_return): Likewise.
13289         (c_expand_start_case): Likewise.
13290
13291         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
13292         (emit_local_var): Likewise.
13293         (initialize_local_var): Change reference to
13294         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
13295         Change reference to stmts_are_full_exprs_p to
13296         current_stmt_tree->stmts_are_full_exprs_p.
13297         (push_cp_function_context): Likewise.
13298
13299         * expect.c (expand_throw): Change reference to
13300         stmts_are_full_exprs_p.
13301
13302         * init.c (build_aggr_init): Change reference to
13303         stmts_are_full_exprs_p.
13304         (build_vec_init): Likewise.
13305
13306         * optimize.c (maybe_clone_body): Change reference to
13307         current_function_name_declared to
13308         cp_function_chain->name_declared.
13309
13310         * pt.c (instantiate_decl): Change reference to
13311         current_function_name_declared to
13312         cp_function_chain->name_declared.
13313
13314         * semantics.c (expand_cond): Moved declaration to c-common.h.
13315         (genrtl_do_pushlevel): Moved to c-semantics.c.
13316         (genrtl_clear_out_block): Likewise.
13317         (genrtl_goto_stmt): Likewise.
13318         (genrtl_expr_stmt): Likewise.
13319         (genrtl_decl_stmt): Likewise.
13320         (gerntl_if_stmt): Likewise.
13321         (genrtl_while_stmt): Likewise.
13322         (genrtl_do_stmt): Likewise.
13323         (genrtl_return_stmt): Likewise.
13324         (genrtl_for_stmt): Likewise.
13325         (genrtl_break_stmt): Likewise.
13326         (genrtl_continue_stmt): Likewise.
13327         (genrtl_scope_stmt): Likewise.
13328         (genrtl_switch_stmt): Likewise.
13329         (genrtl_case_label): Likewise.
13330         (genrtl_begin_compound_stmt): Likewise.
13331         (genrtl_finish_compound_stmt): Likewise.
13332         (genrtl_compound_stmt): Likewise.
13333         (genrtl_asm_stmt): Likewise.
13334         (genrtl_decl_cleanup): Likewise.
13335         (expand_cond): Likewise.
13336         (expand_stmt): Renamed to ...
13337         (lang_expand_stmt): ... this.
13338         (lang_expand_expr_stmt): Initialize.
13339         (set_current_function_name_declared): Likewise.
13340         (stmts_are_full_exprs_p): Likewise.
13341         (current_function_name_declared): Likewise.
13342         (anon_aggr_type_p): Likewise.
13343         (do_poplevel): Change reference to
13344         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
13345         Change reference to stmts_are_full_exprs_p to
13346         current_stmt_tree->stmts_are_full_exprs_p.
13347         (add_tree): Likewise.
13348         (finish_expr_stmt): Likewise.
13349         (prep_stmt): Likewise.
13350         (lang_expand_stmt): Likewise.
13351         (begin_compound_stmt): Change reference to
13352         current_function_name_declared to
13353         cp_function_chain->name_declared and call to
13354         current_function_name_declared().
13355         (setup_vtbl_ptr): Likewise.
13356         (genrtl_do_poplevel): Removed.
13357
13358 2000-06-30  Jason Merrill  <jason@redhat.com>
13359
13360         * init.c (init_init_processing): Go back to aligning like
13361         double_type_node for old ABI.
13362         (get_cookie_size): Make cookie larger if we get a type that needs
13363         more alignment.
13364         (build_vec_delete): Call it.
13365
13366         * typeck.c (qualify_type_recursive): New fn.
13367         (composite_pointer_type): Use it.
13368         (build_binary_op): Use composite_pointer_type.
13369
13370 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
13371             Jason Merrill  <jason@redhat.com>
13372
13373         * typeck.c (check_return_expr): Don't complain about returning
13374         NULL from operator new if -fcheck-new.
13375         * cp-tree.h: Declare flag_check_new here.
13376         * init.c: Not here.
13377
13378 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
13379
13380         * mangle.c (find_substitution): Use same_type_p.
13381         (write_encoding): Don't check for substitutions.
13382
13383 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
13384
13385         * parse.y (expr_no_comma_rangle): New non-terminal.
13386         (template_parm): Use it for default parameter case.
13387         (template_arg): Use it.
13388         (expr_no_commas): Remove commented out undefined extensions.
13389         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
13390         * parse.h, parse.c: Rebuilt.
13391
13392 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
13393
13394         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
13395         (finish_asm_stmt): Do it here, instead.
13396
13397         * cp-tree.h (ridpointers): Don't declare.
13398         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
13399         (record_builtin_java_type): Likewise.
13400         (init_decl_processing): Likewise.
13401         * lex.c: Move inclusion of lex.h.
13402         (ridpointers): Don't define.
13403         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
13404         RID_MAX.
13405         * lex.h (enum rid): Rename to ...
13406         (enum cp_rid): ... this.
13407         (ridpointers): Don't declare.
13408         * parse.y: Move inclusion of lex.h.
13409         * parse.c: Regenerated.
13410         * spew.c: Move inclusion of lex.h.
13411
13412         * cp-tree.h (struct language_function): Remove temp_name_counter.
13413         (temp_name_counter): Remove.
13414         (get_temp_name): Change prototype.
13415         (get_guard): New function.
13416         (get_guard_cond): Likewise.
13417         (set_guard): Likewise.
13418         * cvt.c (build_up_reference): Adjust call to get_temp_name.
13419         * decl.c (expand_static_init): Use get_guard and friends to
13420         implement guard variables.
13421         * decl2.c (get_temp_name): Assume that the variables created are
13422         always static.
13423         (get_sentry): Rename to ...
13424         (get_guard): ... this.  Implement new ABI guard variables.
13425         (get_guard_bits): New function.
13426         (get_guard_cond): Likewise.
13427         (set_guard): Likewise.
13428         (start_static_initialization_or_destruction): Use them.
13429         (do_static_initialization): Replace sentry with guard throughout.
13430         (do_static_destruction): Likewise.
13431         * init.c (create_temporary_var): Add comment.
13432
13433 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
13434
13435         * mangle.c (find_substitution): Use same_type_p.
13436         (write_encoding): Don't check for substitutions.
13437
13438 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
13439
13440         * parse.y (expr_no_comma_rangle): New non-terminal.
13441         (template_parm): Use it for default parameter case.
13442         (template_arg): Use it.
13443         (expr_no_commas): Remove commented out undefined extensions.
13444         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
13445         * parse.h, parse.c: Rebuilt.
13446
13447 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
13448
13449         * cp-tree.h (flag_const_strings): Remove.
13450         (warn_parentheses): Likewise.
13451         (warn_format): Likewise.
13452         (common_type): Likewise.
13453         (default_conversion): Likewise.
13454         (build_binary_op): Likewise.
13455         (cp_build_binary_op): New macro.
13456         * call.c (build_new_op): Use cp_build_binary_op instead of
13457         build_binary_op.
13458         * class.c (build_vtable_entry_ref): Likewise.
13459         * decl.c (expand_static_init): Likewise.
13460         (compute_array_index_type): Likewise.
13461         (build_enumerator): Likewise.
13462         * decl2.c (delete_sanity): Likewise.
13463         (start_static_initialization_or_destruction): Likewise.
13464         * error.c (dump_type_suffix): Likewise.
13465         * init.c (resolve_offset_ref): Likewise.
13466         (build_new): Likewise.
13467         (build_new_1): Likewise.
13468         (build_vec_delete_1): Likewise.
13469         (build_vec_init): Likewise.
13470         (build_delete): Likewise.
13471         * rtti.c (synthesize_tinfo_fn): Likewise.
13472         (synthesize_tinfo_var): Likewise.
13473         * search.c (expand_upcast_fixups): Likewise.
13474         (fixup_all_virtual_upcast_offsets): Likewise.
13475         * typeck.c (build_array_ref): Likewise.
13476         (get_member_function_from_ptrfunc): Likewise.
13477         (build_binary_op): Add parameter.
13478         (pointer_int_sum): Use cp_build_binary_op.
13479         (pointer_diff): Likewise.
13480         (build_modify_expr): Likewise.
13481         (get_delta_difference): Likewise.
13482         (build_ptrmemfunc): Likewise.
13483
13484 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
13485
13486         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
13487         * decl.c (create_implicit_typedef): Adjust.
13488         * decl2.c (build_artificial_parm): Adjust.
13489         * method.c (implicitly_declare_fn): Adjust.
13490         * pt.c (push_inline_template_parms_recursive): Adjust.
13491         (process_template_parm): Adjust.
13492         (overloaded_template_name): Adjust.
13493         * semantics.c (finish_template_template_parm): Adjust.
13494
13495 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
13496
13497         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
13498         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
13499         where to emit thunks.
13500         (build_vtt): Adjust call to build_vtt_inits.
13501         (build_vtt_inits): Add parameter to indicate whether or not
13502         sub-VTTs for virtual bases should be included.  Adjust handling of
13503         construction vtables.
13504         (get_matching_base): New function.
13505         (dfs_build_vtt_inits): Rename to ...
13506         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
13507         construction vtables.
13508         (dfs_fixup_binfo_vtbls): Likewise.
13509         (build_ctor_vtbl_groups): Build construction vtables for virtual
13510         bases, too.
13511         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
13512         to build construction vtbls.
13513         (dfs_accumulate_vtbl_inits): Adjust handling of
13514         construction vtables.
13515
13516         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
13517         types correctly.
13518
13519 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
13520
13521         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
13522
13523 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
13524
13525         * search.c (hides): Remove.
13526         (is_subobject_of_p): Add most_derived parameter. Use
13527         CANONICAL_BINFO.
13528         (lookup_field_queue_p): Adjust.
13529         (lookup_field_r): Adjust.
13530
13531 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
13532
13533         * decl2.c (handle_class_head): Bash typedefs to the type's main
13534         decl.
13535
13536 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
13537
13538         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
13539         (begin_global_stmt_expr): ... this.
13540         (genrtl_finish_stmt_expr): Rename to ...
13541         (finish_global_stmt_expr): ... this.
13542         * init.c (begin_init_stmts): Adjust calls.
13543         (finish_init_stmts): Likewise.
13544         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
13545         (begin_global_stmt_expr): ... this.
13546         (genrtl_finish_stmt_expr): Rename to ...
13547         (finish_global_stmt_expr): ... this.
13548
13549 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
13550
13551         * search.c (lookup_member): Fix typo in comment.
13552
13553 2000-06-24  Jason Merrill  <jason@redhat.com>
13554
13555         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
13556         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
13557
13558 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13559
13560         * parse.y (complex_direct_notype_declarator): Support global_scope.
13561         * Makefile.in: Adjust conflict count.
13562
13563 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
13564
13565         * parse.y (template_arg): Convert TEMPLATE_DECL
13566         that is a template template parameter to
13567         TEMPLATE_TEMPLATE_PARM here.
13568
13569         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
13570         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
13571         (copy_template_template_parm): Adjust prototype.
13572         * decl.c (grokdeclarator): Remove dead code.
13573         * pt.c (process_template_parm): Tidy.
13574         (lookup_template_class): Construct nodes in
13575         copy_template_template_parm.
13576         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
13577         lookup_template_class.  Use TYPE_TI_TEMPLATE.
13578         * tree.c (copy_template_template_parm): Add NEWARGS
13579         parameter.
13580         (mapcar): Adjust call to copy_template_template_parm.
13581         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
13582         * method.c (build_template_template_parm_names): Change error
13583         code to avoid compilation warning.
13584
13585         * gxxint.texi: Document template template parameter
13586         name mangling.
13587
13588 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
13589
13590         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
13591         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
13592         (cp-demangle.o): New rule.
13593         (dyn-string.o): Likewise.
13594         * inc/cxxabi.h (__cxa_demangle): New declaration.
13595
13596 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
13597
13598         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
13599         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
13600         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
13601         a tree, not an int.
13602         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
13603         (make_thunk): Change prototype.
13604         (emit_thunk): Rename to use_thunk.
13605         (mangle_thunk): Change prototype.
13606         * class.c (get_derived_offset): Simplify.
13607         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
13608         BV_GENERATE_THUNK_WITH_VTABLE_P.
13609         (build_primary_vtable): Simplify.
13610         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
13611         (dfs_find_base): Remove.
13612         (update_vtable_entry_for_fn): Correct bug in finding the base
13613         where a virtual function was first declared.  Figure out whether
13614         or not to emit a vcall-thunk with the vtables in which it appears.
13615         Correct logic for deciding whether to use an ordinary thunk, or a
13616         vcall thunk.
13617         (finish_struct_1): Remove unnecssary code.
13618         (build_vtbl_initializer): Use ssize_int for the running counter of
13619         negative indices.
13620         (build_vtbl_initializer): Only use vcall thunks where necessary.
13621         Mark thunks as needing to be emitted with their vtables, or not.
13622         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
13623         indices.  Use size_binop.
13624         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
13625         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
13626         size_binop.
13627         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
13628         (build_vtable_entry): Mark thunks as needing to be emitted with
13629         their vtables, or not.
13630         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
13631         * decl2.c (mark_vtable_entries): Use use_thunk instead of
13632         emit_thunk.
13633         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
13634         information.
13635         * error.c (dump_expr): Use BV_FN.
13636         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
13637         not an int.
13638         * method.c (make_thunk): Likewise.
13639         (emit_thunk): Rename to use_thunk.  Allow callers to decide
13640         whether or not to actually emit the thunk.  Adjust for changes in
13641         representation of vcall offsets.
13642         * search.c (dfs_get_pure_virtuals): Use BV_FN.
13643         * semantics.c (emit_associated_thunks): New function.
13644         (expand_body): Use it.
13645         * ir.texi: Adjust decriptions of thunks.
13646
13647 2000-06-22  Jason Merrill  <jason@redhat.com>
13648
13649         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
13650         (tsubst_friend_function): Copy it here.
13651
13652         * decl.c (grok_op_properties): Fix typo.
13653
13654         * decl2.c (delete_sanity): Clarify warning, avoid failure on
13655         deleting void*.
13656
13657         * pt.c (check_explicit_specialization): Clarify error.
13658
13659         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
13660         an old OVERLOAD when we're declaring a non-function.
13661         (pushdecl, destroy_local_var): Check for error_mark_node.
13662         (warn_extern_redeclared_static): Also bail early if
13663         we're a CONST_DECL.
13664         (push_overloaded_decl): Ignore an old error_mark_node.
13665
13666 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
13667
13668         * call.c (build_x_va_arg): Check if in a template decl.
13669         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
13670
13671 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13672
13673         * class.c (push_lang_context): TYPE_NAME gets you to the Java
13674         types DECLs.
13675         * decl.c (check_goto): Computed gotos assumed OK.
13676
13677 2000-06-20  Jason Merrill  <jason@redhat.com>
13678
13679         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
13680         for which we don't need to look for instantiations.
13681
13682 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
13683
13684         * parse.y (program): Always call finish_translation_unit.
13685         * parse.c, parse.h: Rebuilt.
13686
13687 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
13688
13689         * method.c: Don't include hard-reg-set.h.
13690
13691 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
13692
13693         * rtti.c (get_base_offset): Cope when vbase field is in a base.
13694
13695 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
13696
13697         * call.c (build_conditional_expr): Use VOID_TYPE_P.
13698         * cvt.c (cp_convert_to_pointer): Likewise.
13699         (convert_to_void): Likewise.
13700         * error.c (dump_expr): Likewise.
13701         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
13702         * init.c (build_delete): Likewise.
13703         * method.c (emit_thunk): Likewise.
13704         * optmize.c (declare_return_variable): Likewise.
13705         * rtti.c (get_tinfo_decl_dynamic): Likewise.
13706         (get_typeid): Likewise.
13707         (build_dynamic_cast_1): Likewise.
13708         * typeck.c (composite_pointer_type): Likewise.
13709         (common_type): Likewise.
13710         (build_indirect_ref): Likewise.
13711         (build_binary_op): Likewise.
13712         (build_x_compound_expr): Likewise.
13713         (check_return_expr): Likewise.
13714         * typeck2.c (add_exception_specifier): Likewise.
13715
13716         * mangle.c (write_method_parms): Use direct comparison for end
13717         of parmlist.
13718
13719 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
13720
13721         * cp-tree.h (genrtl_try_block): Declare function.
13722         (genrtl_handler): Likewise.
13723         (genrtl_catch_block): Likewise.
13724         (genrtl_ctor_stmt): Likewise.
13725         (genrtl_subobject): Likewise.
13726         (genrtl_decl_cleanup): Likewise.
13727         (genrtl_do_poplevel): Likewise.
13728         (genrtl_do_pushlevel): Likewise.
13729         (genrtl_clear_out_block): Likewise.
13730         (genrtl_goto_stmt): Likewise.
13731         (genrtl_expr_stmt): Likewise.
13732         (genrtl_decl_stmt): Likewise.
13733         (genrtl_if_stmt): Likewise.
13734         (genrtl_while_stmt): Likewise.
13735         (genrtl_do_stmt): Likewise.
13736         (genrtl_return_stmt): Likewise.
13737         (genrtl_for_stmt): Likewise.
13738         (genrtl_break_stmt): Likewise.
13739         (genrtl_continue_stmt): Likewise.
13740         (genrtl_scope_stmt): Likewise.
13741         (genrtl_switch_stmt): Likewise.
13742         (genrtl_case_label): Likewise.
13743         (genrtl_begin_compound_stmt): Likewise.
13744         (genrtl_finish_compound_stmt): Likewise.
13745         (genrtl_compound_stmt): Likewise.
13746         (genrtl_asm_stmt): Likewise.
13747         (genrtl_named_return_value): Likewise.
13748         (genrtl_begin_stmt_expr): Likewise.
13749         (genrtl_finish_stmt_expr): Likewise.
13750         (finish_for_stmt): Removed first argument.
13751         (finish_switch_stmt): Likewise.
13752
13753         * semantics.c (genrtl_try_block): Define function.
13754         (genrtl_handler): Likewise.
13755         (genrtl_catch_block): Likewise.
13756         (genrtl_ctor_stmt): Likewise.
13757         (genrtl_subobject): Likewise.
13758         (genrtl_decl_cleanup): Likewise.
13759         (genrtl_do_poplevel): Likewise.
13760         (genrtl_do_pushlevel): Likewise.
13761         (genrtl_clear_out_block): Likewise.
13762         (genrtl_goto_stmt): Likewise.
13763         (genrtl_expr_stmt): Likewise.
13764         (genrtl_decl_stmt): Likewise.
13765         (genrtl_if_stmt): Likewise.
13766         (genrtl_while_stmt): Likewise.
13767         (genrtl_do_stmt): Likewise.
13768         (genrtl_return_stmt): Likewise.
13769         (genrtl_for_stmt): Likewise.
13770         (genrtl_break_stmt): Likewise.
13771         (genrtl_continue_stmt): Likewise.
13772         (genrtl_scope_stmt): Likewise.
13773         (genrtl_switch_stmt): Likewise.
13774         (genrtl_case_label): Likewise.
13775         (genrtl_begin_compound_stmt): Likewise.
13776         (genrtl_finish_compound_stmt): Likewise.
13777         (genrtl_compound_stmt): Likewise.
13778         (genrtl_asm_stmt): Likewise.
13779         (genrtl_named_return_value): Likewise.
13780         (genrtl_begin_stmt_expr): Likewise.
13781         (genrtl_finish_stmt_expr): Likewise.
13782         (finish_for_stmt): Removed first argument and generate rtl
13783         specific code.
13784         (finish_switch_stmt): Likewise.
13785         (do_poplevel): Removed generate rtl specific code.
13786         (do_pushlevel): Likewise.
13787         (add_tree): Likewise.
13788         (finish_goto_stmt): Likewise.
13789         (finish_expr_stmt): Likewise.
13790         (begin_if_stmt): Likewise.
13791         (finish_if_stmt_cond): Likewise.
13792         (finish_then_clause): Likewise.
13793         (begin_else_clause): Likewise.
13794         (finish_else_clause): Likewise.
13795         (finish_if_stmt): Likewise.
13796         (clear_out_block): Likewise.
13797         (begin_while_stmt): Likewise.
13798         (finish_while_stmt_cond): Likewise.
13799         (finish_while_stmt): Likewise.
13800         (begin_do_stmt): Likewise.
13801         (finish_do_body): Likewise.
13802         (finish_do_stmt): Likewise.
13803         (finish_return_stmt): Likewise.
13804         (begin_for_stmt): Likewise.
13805         (finish_for_init_stmt): Likewise.
13806         (finish_for_cond): Likewise.
13807         (finish_for_expr): Likewise.
13808         (finish_break_stmt): Likewise.
13809         (finish_continue_stmt): Likewise.
13810         (begin_switch_stmt): Likewise.
13811         (finish_switch_cond): Likewise.
13812         (finish_case_label): Likewise.
13813         (begin_try_block): Likewise.
13814         (begin_function_try_block): Likewise.
13815         (finish_try_block): Likewise.
13816         (finish_cleanup_try_block): Likewise.
13817         (finish_cleanup): Likewise.
13818         (finish_function_try_block): Likewise.
13819         (finish_handler_sequence): Likewise.
13820         (finish_function_handler_sequence): Likewise.
13821         (begin_handler): Likewise.
13822         (finish_handler_parms): Likewise.
13823         (begin_catch_block): Likewise.
13824         (finish_handler): Likewise.
13825         (begin_compound_stmt): Likewise.
13826         (finish_compound_stmt): Likewise.
13827         (finish_asm_stmt): Likewise.
13828         (finish_label_stmt): Likewise.
13829         (finish_label_decl): Likewise.
13830         (finish_subobject): Likewise.
13831         (finish_decl_cleanup): Likewise.
13832         (finish_named_return_value): Likewise.
13833         (begin_stmt_expr): Likewise.
13834         (finish_stmt_expr): Likewise.
13835
13836         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
13837         to call genrtl_expr_stmt when appropriate.
13838
13839         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
13840         begin_compound_expr to call genrtl_begin_stmt_expr and
13841         genrtl_begin_compound_expr when appropriate.
13842         (finish_init_stmts): Changed calls to finish_compound_expr and
13843         finish_stmt_expr to call genrtl_finish_compound_expr and
13844         genrtl_finish_stmt_expr when appropriate.
13845         (expand_default_init): Changed call to finish_expr_stmt to call
13846         genrtl_expr_stmt when appropriate.
13847         (build_vec_init): Likewise.
13848
13849         * parse.y (simple_stmt): Removed first argument from call to
13850         finish_for_stmt. Removed first argument from call to
13851         finish_switch_stmt.
13852
13853         * parse.c: Regenerated.
13854
13855         * pt.c (tsubst_expr): Removed first argument from call to
13856         finish_for_stmt. Removed first argument from call to
13857         finish_switch_stmt.
13858
13859 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
13860
13861         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
13862         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
13863
13864         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
13865         (cplus_tree_code_length[]): Likewise.
13866         (cplus_tree_code_name[]): Likewise.
13867         (init_parse): Added call to add_c_tree_codes. Changed
13868         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
13869
13870 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
13871
13872         * cp-tree.h (finish_mem_initializers): Declare.
13873         (count_trees): Likewise.
13874         * parse.y (base_init): Use finish_mem_initializers.
13875         * semantics.c (finish_mem_initializers): New function.
13876
13877         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
13878         the number of trees.
13879         (n_trees): Remove.
13880         (count_trees): Don't use it.
13881
13882 2000-06-15  Jason Merrill  <jason@redhat.com>
13883
13884         * tree.c (count_trees): New debugging function.
13885
13886         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
13887         * init.c (build_member_call): Pull out the name of a DECL.
13888
13889         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
13890         * semantics.c (expand_body): Push to TV_INTEGRATION here.
13891         * optimize.c (optimize_function): Not here.
13892         * pt.c (instantiate_decl): Push to TV_PARSE.
13893
13894 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
13895
13896         * cp-tree.h (struct language_function): Remove x_base_init_list
13897         and x_member_init_list.
13898         (current_base_init_list): Remove.
13899         (current_member_init_list): Likewise.
13900         (setup_vtbl_ptr): Change prototype.
13901         (emit_base_init): Likewise.
13902         (expand_member_init): Likewise.
13903         (reinit_parse_for_function): Remove.
13904         * decl.c (save_function_data): Don't clear x_base_init_list and
13905         x_member_init_list.
13906         (mark_language_function): Don't mark them.
13907         * init.c (perform_member_init): Tweak comment.
13908         (sort_member_init): Take the list of initializers as an argument.
13909         (sort_base_init): Likewise.
13910         (emit_base_init): Likewise.
13911         (expand_member_init): Return the initializer.  Don't use global
13912         variables.
13913         * lex.c (reinit_parse_for_function): Remove.
13914         * method.c (build_template_parm_names): Correct substitution.
13915         (do_build_copy_constructor): Don't use current_member_init_list
13916         and current_base_init_list.
13917         (synthesize_method): Likewise.
13918         * parse.y (base_init): Split mem-initializers into
13919         base-initializers and field-initializers.
13920         (member_init_list): Build up the list here.
13921         (member_init): Return the initializer.
13922         (fn.depfn): Don't use reinit_parse_for_function.
13923         * parse.c: Regenerated.
13924         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
13925         ERROR_MARK.
13926         (tsubst_expr): Don't use current_member_init_list
13927         and current_base_init_list.
13928         (tsubst_expr_values): Rename to ...
13929         (tsubst_initializer_list): ... this.  Use convert_from_reference.
13930         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
13931         and current_base_init_list.
13932         (begin_function_definition): Don't call reinit_parse_for_function.
13933
13934         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
13935
13936         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
13937         correctly.
13938
13939         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
13940
13941 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
13942
13943         * cp-tree.h (IF_COND): Move to c-common.h.
13944         (THEN_CLAUSE): Likewise.
13945         (ELSE_CLAUSE): Likewise.
13946         (WHILE_COND): Likewise.
13947         (WHILE_BODY): Likewise.
13948         (DO_COND): Likewise.
13949         (DO_BODY): Likewise.
13950         (RETURN_EXPR): Likewise.
13951         (EXPR_STMT_EXPR): Likewise.
13952         (FOR_INIT_STMT): Likewise.
13953         (FOR_COND): Likewise.
13954         (FOR_EXPR): Likewise.
13955         (FOR_BODY): Likewise.
13956         (SWITCH_COND): Likewise.
13957         (SWITCH_BODY): Likewise.
13958         (CASE_LOW): Likewise.
13959         (CASE_HIGH): Likewise.
13960         (GOTO_DESTINATION): Likewise.
13961         (COMPOUND_BODY): Likewise.
13962         (ASM_CV_QUAL): Likewise.
13963         (ASM_STRING): Likewise.
13964         (ASM_OUTPUTS): Likewise.
13965         (ASM_INPUTS): Likewise.
13966         (ASM_CLOBBERS): Likewise.
13967         (DECL_STMT_DECL): Likewise.
13968         (STMT_EXPR_STMT): Likewise.
13969         (LABEL_STMT_LABEL): Likewise.
13970         (SCOPE_BEGIN_P): Likewise.
13971         (SCOPE_END_P): Likewise.
13972         (SCOPE_STMT_BLOCK): Likewise.
13973         (SCOPE_NULLIFIED_P): Likewise.
13974         (SCOPE_NO_CLEANUPS_P): Likewise.
13975         (SCOPE_PARTIAL_P): Likewise.
13976         (ASM_VOLATILE_P): Likewise.
13977         (STMT_LINENO): Likewise.
13978         (STMT_LINENO_FOR_FN_P): Likewise.
13979
13980         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
13981         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
13982         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
13983         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
13984         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
13985
13986         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
13987
13988         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
13989         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
13990
13991         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
13992         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
13993         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
13994
13995 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
13996
13997         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
13998         * class.c (dfs_find_final_overrider): Set it appropriately.
13999         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
14000         avoid unneeded secondary vptrs.
14001
14002 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
14003
14004         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
14005         (check_bitfield_decl, check_field_decl): Likewise.
14006         (build_vtbl_or_vbase_field, build_base_field): Likewise.
14007         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
14008         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
14009         (xfer_tag, finish_enum): Likewise.
14010         * decl2.c (finish_builtin_type): Likewise.
14011         * init.c (init_init_processing): Likewise.
14012         * pt.c (instantiate_class_template): Likewise.
14013         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
14014         * cp-tree.h (struct lang_type): Add user_align member.
14015         (CLASSTYPE_USER_ALIGN): Define.
14016
14017 2000-06-13  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
14018
14019         * Make-lang.in (c++.install-common): Install g++-cross in
14020         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
14021         $(target_alias)-g++ and $(target_alias)-c++.
14022
14023 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
14024
14025         * class.c (vcall_offset_data_s): Add last_init and fns.
14026         (overrides): Rename to same_signature_p.
14027         (dfs_find_final_overrider): Adjust accordingly.
14028         (mark_overriders): Likewise.
14029         (warn_hidden): Likewise.
14030         (build_vtbl_initializer): Reorganize machinery for building things
14031         at negative offsets.
14032         (build_vcall_and_vbase_vtbl_entries): Likewise.
14033         (build_vbase_offset_vtbl_entries): Likewise.
14034         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
14035         offset entries.  Do not create two entries for functions with the
14036         same signature.
14037         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
14038         (build_rtti_vtbl_entries): Reorganize machinery for building things
14039         at negative offsets.
14040
14041         * optimize.c (expand_call_inline): Don't recurse into the code
14042         used to initialize the parameters more than once.
14043
14044 2000-06-11  Mark Mitchell <mark@codesourcery.com>
14045
14046         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
14047         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
14048         (find_substitution): Only use the `Sa' substitution for
14049         std::allocator, not instantiations of it.
14050         (write_template_prefix): Move comment.  Only use a TREE_LIST to
14051         represent substitutions for a member template.
14052         (write_array_type): Mangle array dimensions correctly.
14053         * optimize.c (maybe_clone_body): Copy more information from the
14054         cloned function.
14055         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
14056         on the regenerated declaration.
14057
14058 2000-06-11  Chip Salzenberg  <chip@valinux.com>
14059             Mark Mitchell <mark@codesourcery.com>
14060
14061         * class.c (build_vtable): Clarify comment.
14062         (build_ctor_vtbl_group): Pass the most derived type to
14063         build_vtable.
14064
14065 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14066
14067         * decl2.c (compare_options): Don't needlessly cast away const-ness.
14068
14069 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
14070
14071         * decl.c (add_binding): Handle duplicate declarations of external
14072         variables.
14073
14074 2000-06-09  Chip Salzenberg  <chip@valinux.com>
14075             Mark Mitchell <mark@codesourcery.com>
14076
14077         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
14078         argument.
14079         (write_signed_number): New macro.
14080         (write_unsigned_number): Likewise.
14081         (write_source_name): Use them.
14082         (write_number): Handle signed and unsigned values.
14083         (write_integer_cst): Use tree_int_cst_sgn, and use
14084         write_unsigned_number or write_signed_number as appropriate.
14085         (write_discriminator): Use write_unsigned_number or
14086         write_signed_number as appropriate.
14087         (write_template_arg_literal): Likewise.
14088         (write_array_type): Use tree_low_cst.
14089         (write_template_parm):  Use write_unsigned_number or
14090         write_signed_number as appropriate.
14091         (write_substitution): Adjust call to write_number.
14092         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
14093         (write_expression): Handle non-type template arguments of
14094         reference type correctly.
14095         (mangle_thunk): Use write_signed_number.
14096
14097 2000-06-09  Chip Salzenberg  <chip@valinux.com>
14098
14099         * mangle.c (find_substition): Don't mangle objects with typename
14100         substitutions (e.g. "cin" as "Si").
14101
14102 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
14103
14104         * call.c (add_candidate): Use ggc_alloc_cleared.
14105         * decl.c (lookup_label): Likewise.
14106         * lex.c (retrofit_lang_decl): Likewise.
14107
14108 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
14109
14110         * semantics.c (expand_body): Push to TV_EXPAND.
14111         * optimize.c (optimize_function): Push to TV_INTEGRATION.
14112         * decl.c (start_function): Always call announce_function.
14113
14114         * tinfo2.cc: Just declare abort.
14115
14116 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
14117
14118         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
14119         whenever @ is a symbolic name.
14120
14121 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
14122
14123         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
14124
14125 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
14126
14127         * decl.c (pushdecl): Look up functions by DECL_NAME, not
14128         DECL_ASSEMBLER_NAME.
14129
14130 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
14131
14132         * decl2.c (c_language): Define.
14133
14134 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
14135
14136         * lex.c (lang_init_options): Tweak.
14137
14138         * decl2.c: Remove #inclusion of diagnostic.h
14139         (lang_decode_option): Move diagnostic formatting options to
14140         toplevel.
14141
14142         * lang-options.h: Remove documentation for diagnostic options.
14143
14144         * Makefile.in (lex.o): Depends upon diagnostic.h
14145
14146 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
14147
14148         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
14149         the same DECL_RESULT, it's not a redefinition.
14150         * pt.c (tsubst_decl): Remove code to handle illegal
14151         specializations.
14152
14153 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
14154
14155         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
14156
14157 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
14158
14159         * search.c (maybe_suppress_debug_info): Don't check
14160         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
14161
14162         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
14163         here if extern_p.
14164
14165         Remember instantiation context in deferred instantiations.
14166         * cp-tree.h (struct tinst_level): Remove.
14167         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
14168         * pt.c (current_tinst_level): Now a tree.
14169         (print_template_context, push_tinst_level, pop_tinst_level,
14170         tinst_for_decl): Adjust.
14171         (reopen_tinst_level): New fn.
14172         (init_pt): Register current_tinst_level as a root.
14173         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
14174         of the pending templates list.
14175         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
14176         * lex.c (extract_interface_info): Adjust.
14177         * decl2.c (warn_if_unknown_interface): Adjust.
14178
14179 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
14180
14181         * class.c (indirect_primary_base_p): New function.
14182         (determine_primary_base): Use it.
14183
14184 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
14185
14186         Update new-abi dynamic cast algorithm.
14187         * tinfo.cc (__class_type_info::__dyncast_result): Add
14188         whole_details. Adjust constructor.
14189         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
14190         Avoid unnecessary searching.
14191         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
14192
14193 2000-06-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14194
14195         * decl.c (init_decl_processing): Don't call record_component_aliases.
14196         * tree.c (build_cplus_array_type_1): Likewise.
14197
14198 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
14199
14200         * ir.texi: Correct typo.
14201         * mangle.c (write_expression): Handle non-type template arguments
14202         with reference type.
14203         * method.c (build_overload_value): Likewise.
14204         * pt.c (convert_nontype_argument): Explicitly represent conversion
14205         to a reference with an ADDR_EXPR.
14206         (unify): Always unify arguments in left-to-right order.
14207
14208 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
14209             Mark Mitchell  <mark@codesourcery.com>
14210
14211         * Make-lang.in (CXX_SRCS): Add mangle.c.
14212         * Makefile.in (CXX_OBJS): Add mangle.o.
14213         (mangle.o): New rule.
14214
14215         * class.c (local_classes): New variable.
14216         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
14217         (get_vtt_name): Use mangle_vtt_name for new ABI.
14218         (init_class_processing): Initialize local_classes.
14219         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
14220         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
14221         (std_identifier): New macro.
14222         (DECL_VOLATILE_MEMFUNC_P): New macro.
14223         (DECL_NAMESPACE_STD_P): Likewise.
14224         (local_classes): Declare.
14225         (get_mostly_instantiated_function_type): Declare.
14226         (init_mangle): Declare.
14227         (mangle_decl): Likewise.
14228         (mangle_type_string): Likewise.
14229         (mangle_type): Likewise.
14230         (mangle_typeinfo_for_type): Likewise.
14231         (mangle_typeinfo_string_for_type): Likewise.
14232         (mangle_vtbl_for_type): Likewise.
14233         (mangle_vtt_for_type): Likewise.
14234         (mangle_ctor_vtbl_for_type): Likewise.
14235         (mangle_thunk): Likewise.
14236         (mangle_conv_op_name_for_type): Likewise.
14237         (mangle_guard_variable): Likewise.
14238         * decl.c (pushtag): Keep track of local classes.
14239         (initialize_predefined_identifiers): Initialize std_identifier.
14240         (init_decl_processing): Use std_identifier.
14241         (start_decl): Don't treat instantiations as specializations.
14242         (grokdeclarator): Likewise.
14243         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
14244         name for fully-instantiated templates.
14245         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
14246         destructors with the new ABI.
14247         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
14248         (grokfield): Use mangle_type for new ABI.
14249         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
14250         (get_sentry): Use mangle_guard_variable for new ABI.
14251         (start_static_initialization_or_destruction): Likewise.
14252         * expr.c (extract_aggr_init): Remove.
14253         (extract_scalar_init): Likewise.
14254         (extract_init): Remove #if 0'd code.
14255         * mangle.c: New function.
14256         * method.c (build_mangled_name): Assert not flag_new_abi.
14257         (build_static_name): Likewise.
14258         (build_decl_overload_real): Likewise.
14259         (build_typename_overload): Likewise.
14260         (build_overload_with_type): Likewise.
14261         (build_overload_name): Likewise.
14262         (get_ctor_vtbl_name): Likewise.
14263         (start_squangling): Likewise.
14264         (get_id_2): Likewise.
14265         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
14266         (init_method): Call init_mangle for new ABI.
14267         (make_thunk): Call mangle_thunk for new ABI.
14268         * operators.def: Correct new ABI manglings for the `%' operator.
14269         Add `::' operator.
14270         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
14271         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
14272         (lookup_template_class): Call mangle_decl for new ABI.
14273         (get_mostly_instantiated_function_type): New function.
14274         (set_mangled_name_for_template_decl): Use it.
14275         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
14276         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
14277         conversion op names.
14278         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
14279         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
14280         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
14281         mangle_typeinfo_string_for_type.
14282
14283 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
14284
14285         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
14286         (INNERMOST_TEMPLATE_ARGS): New macro.
14287         (innermost_args): Remove.
14288         (get_innermost_template_args): New function.
14289         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
14290         * error.c (dump_function_decl): Be caution when using
14291         most_general_template.
14292         * method.c (build_template_parm_names):  Use
14293         INNERMOST_TEMPLATE_ARGS.
14294         * pt.c (add_to_template_args): Tidy comment
14295         (get_innermost_template_args): New function.
14296         (check_explicit_specialization): Clear DECL_INITIAL for a new
14297         specialization.
14298         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
14299         Tidy.
14300         (push_template_decl): Always register specializations of the most
14301         general template.
14302         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
14303         (coerce_template_parms): Likewise.
14304         (lookup_template_class): Likewise.
14305         (innermost_args): Remove.
14306         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
14307         (tsubst_decl): Handle tricky specializations.  Use
14308         get_innermost_template_args.
14309         (instantiate_template): Simplify handling of partial
14310         instantiations.
14311         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
14312         (most_general_template): Reimplement, in a more straightforward
14313         manner.
14314         (regenerate_decl_from_template): Tweak formatting.  Use
14315         TMPL_ARGS_DEPTH for clarity.
14316         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
14317
14318         * dump.c (dequeue_and_dump): Dump information about thunks.
14319
14320 2000-06-01  Richard Henderson  <rth@cygnus.com>
14321
14322         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
14323
14324 2000-06-01  Richard Henderson  <rth@cygnus.com>
14325
14326         * decl2.c (unsupported_options): Fix typo, make const.
14327         (lang_decode_option): Fix bsearch argument order.
14328
14329 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
14330
14331         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
14332         on FIELD_DECLs.
14333
14334 2000-05-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14335
14336         * cp-tree.h (c_get_alias_set): Deleted.
14337         * Makefile.in (decl.o): Include ../expr.h.
14338         * decl.c (expr.h): Include.
14339         (init_decl_processing): Call record_component_aliases for arrays.
14340         (grokdeclarator): Likewise.
14341         Set TREE_ADDRESSABLE for fields that aren't bitfields.
14342         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
14343
14344 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
14345
14346         Remove guiding declaration support.
14347         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
14348         (flag_guiding_decls): Remove.
14349         * call.c (build_user_type_conversion_1): Remove support for
14350         guiding decls.
14351         (build_new_function_call): Likewise.
14352         (build_new_op): Likewise.
14353         (build_new_method_call): Likewise.
14354         * decl.c (start_function): Likewise.
14355         * friend.c (is_friend): Likewise.
14356         (do_friend): Likewise.
14357         * decl2.c ((flag_dump_translation_unit): Make it const.
14358         (flag_guiding_decls): Remove.
14359         (unsupported_options): New variable
14360         (compare_options): New function.
14361         (lang_decode_option): Use them.
14362
14363         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
14364
14365         * method.c (mangle_expression): Adjust test for legal expression
14366         operators.
14367
14368         * pt.c (instantiate_decl): Save and restore the local
14369         specializations list.
14370
14371 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
14372
14373         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
14374
14375 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
14376
14377         * call.c (add_template_candidate_real): Handle member template
14378         constructors for classes with virtual bases.
14379         (build_user_type_conversion_1): Use in_charge_arg_for_name.
14380         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
14381
14382         * ir.texi: Update thunk documentation.
14383
14384         * call.c (joust): Fix handling of overloaded builtin operators.
14385
14386 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
14387
14388         * cp-tree.h (DECL_ANTICIPATED): New macro.
14389         Document new use of DECL_LANG_FLAG_7.
14390         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
14391         in the user namespace.
14392         * lex.c (do_identifier): If the identifier's declaration has
14393         DECL_ANTICIPATED on, it has not yet been declared.  But do not
14394         replace it with an ordinary implicit declaration.
14395
14396         * tinfo2.cc: Include stdlib.h.
14397
14398 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
14399
14400         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
14401         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
14402         CLASSTYPE_ALIGN.
14403
14404 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
14405
14406         * decl2.c (lang_decode_option): Use skip_leading_substring instead
14407         of plain strncmp.
14408
14409 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
14410
14411         * operators.def (<?): Duplicated, should have been...
14412         (>?): this.  Fixed.
14413
14414 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
14415             Mark Mitchell  <mark@codesourcery.com>
14416
14417         * cp-tree.h (ansi_opname): Make it a macro.
14418         (ansi_assopname): Likewise.
14419         (struct lang_decl_flags): Add assignment_operator_p.
14420         (struct lang_decl): Add operator_code.
14421         (DECL_VTT_PARM): Adjust.
14422         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
14423         overloaded operator.
14424         (SET_OVERLOADED_OPERATOR_CODE): New macro.
14425         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
14426         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
14427         (opname_tab): Remove.
14428         (assignop_tab): Likewise.
14429         (operator_name_info_t): New type.
14430         (operator_name_info): New variable.
14431         (assignment_operator_name_info): Likewise.
14432         (build_cp_library_fn): Remove declaration.
14433         (push_cp_library_fn): Likewise.
14434         (operator_name_string): Likewise.
14435         (build_decl_overload): Likewise.
14436         * call.c (print_z_candidates): Simplify.
14437         (build_object_call): Adjust usage of ansi_opname.  Use
14438         DECL_OVERLOADED_OPERATOR_P.
14439         (op_error): Adjust operator name lookup.
14440         (build_conditional_expr): Adjust usage of ansi_opname.
14441         (build_new_op): Likewise.
14442         (build_op_delete_call): Likewise.
14443         (build_over_call): Likewise.
14444         (joust): Use DECL_OVERLOADED_OPERATOR_P.
14445         * decl.c (duplicate_decls): Copy operator_code.
14446         (init_decl_processing): Adjust parameters to push_cp_library_fn.
14447         (builtin_function): Adjust parameters to build_library_fn_1.
14448         (build_library_fn_1): Accept an overloaded operator code.
14449         (build_library_fn): Pass ERROR_MARK.
14450         (build_cp_library_fn): Accept an overloaded operator code.
14451         (push_cp_library_fn): Likewise.
14452         (grokfndecl): Tweak.
14453         (grokdeclarator): Simplify code to compute names of overloaded
14454         operators.  Adjust use of ansi_opname.
14455         (ambi_op_p): Work on tree_codes, not identifiers.
14456         (unary_op_p): Likewise.
14457         (grok_op_properties): Likewise.
14458         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
14459         (lang_mark_tree): Don't try to mark the operator_code.
14460         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
14461         * error.c (dump_decl): Remove special handling for operator
14462         names.
14463         (dump_function_name): Likewise.
14464         (dump_expr): Adjust name lookup of operators.
14465         (op_to_string): Simplify.
14466         (assop_to_string): Likewise.
14467         * init.c (build_new_1): Adjust use of ansi_opname.
14468         * lex.c (opname_tab): Remove.
14469         (assignop_tab): Likewise.
14470         (ansi_opname): Likewise.
14471         (ansi_assopname): Likewise.
14472         (operator_name_string): Likewise.
14473         (reinit_lang_specific): Likewise.
14474         (operator_name_info): New variable.
14475         (assignment_operator_name_info): Likewise.
14476         (init_operators): New function.
14477         (init_parse): Use it.
14478         (do_identifier): Adjust use of ansi_opname.
14479         * method.c (mangle_expression): Don't use ansi_opname for
14480         mangling.
14481         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
14482         (build_decl_overload): Remove.
14483         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
14484         (do_build_assign_ref): Adjust use of ansi_opname.
14485         (synthesize_method): Likewise.
14486         (implicitly_declare_fn): Likewise.
14487         * operators.def: New file.
14488         * parse.y (operator): Adjust use of ansi_opname.
14489         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
14490         (set_mangled_name_for_template_decl): Don't play games with
14491         current_namespace.
14492         (special_function_p): Adjust use of ansi_opname.
14493         * typeck.c (check_return_expr): Likewise.
14494         * Make-lang.in (cc1plus): Depend on operators.def.
14495         * Makefile.in (lex.o): Likewise.
14496         (decl.o): Likewise.
14497
14498 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
14499
14500         * Make-lang.in (cplib2.ready): Eradicate.
14501
14502 2000-05-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14503
14504         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
14505         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
14506         (built_min, cp_tree_equal): Likewise.
14507
14508 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
14509
14510         * class.c (layout_nonempty_base_or_field): Replace
14511         `record_layout_info' with `record_layout_info_s'.
14512
14513 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
14514
14515         Fix goto checking.
14516         * cp-tree.h (struct language_function): x_named_labels is now
14517         a struct named_label_list*.
14518         * decl.c (struct named_label_use_list): Renamed from...
14519         (struct named_label_list): ...this.  New struct.
14520         (push_binding_level): Don't set eh_region.
14521         (note_level_for_eh): New fn.
14522         (pop_label): Take label and old value directly.
14523         (pop_labels): Adjust for new named_labels format.
14524         (lookup_label): Likewise.
14525         (poplevel): Note characteristics of a binding level containing a
14526         named label.  Mess with named label lists earlier.
14527         (mark_named_label_lists): New fn.
14528         (mark_lang_function): Call it.
14529         (use_label): New fn, split out from...
14530         (make_label_decl): ...here.  Don't call it.
14531         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
14532         check_previous_gotos): New fns, split out from...
14533         (define_label): ...here.
14534         (check_switch_goto): New fn.
14535         (define_case_label): Call it.
14536         (check_goto): New fn.
14537         * semantics.c (finish_goto_stmt): Call it and use_label.
14538         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
14539         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
14540
14541 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
14542
14543         * class.c (build_vtable_entry_ref): Correct usage of
14544         get_vtbl_decl_for_binfo.
14545
14546         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
14547         * method.c (implicitly_declare_fn): Not here.
14548
14549 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
14550
14551         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
14552         (CPTI_PTMD_DESC_TYPE): ... here.
14553         (ptmd_desc_type_node): Rename to ...
14554         (ptm_desc_type_node): ... here.
14555         * decl.c: Likewise.
14556         * rtti.c (ptmd_initializer): Rename to ...
14557         (ptm_initializer): ... here.
14558         (sythesize_tinfo_var): Adjust. Deal with pointer to member
14559         function.
14560         (create_tinfo_types): Adjust.
14561
14562 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
14563
14564         Finish implementation of VTTs.
14565         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
14566         CPTI_VTT_PARM_IDENTIFIER.
14567         (vtt_parm_identifier): New macro.
14568         (vtt_parm_type): Likewise.
14569         (BINFO_SUBVTT_INDEX): Likewise.
14570         (BINFO_VPTR_INDEX): Likewise.
14571         (struct lang_decl): Add vtt_parm.
14572         (DECL_VTT_PARM): New macro.
14573         (DECL_USE_VTT_PARM): Likewise.
14574         (DECL_NEEDS_VTT_PARM_P): Likewise.
14575         (get_vtt_name): Declare.
14576         (build_artificial_parm): Likewise.
14577         (fixup_all_virtual_upcast_offsets): Likewise.
14578         (expand_indirect_vtbls_init): Remove.
14579         * call.c (build_new_method_call): Pass the vtt to subobject
14580         constructors and destructors.
14581         * class.c (get_vtt_name): Give it external linkage.
14582         (build_clone): Handle the magic VTT parameters for clones.
14583         (clone_function_decl): Fix typo in comment.
14584         (build_vtt): Keep track of the indices in the VTTs where various
14585         entities are stored.
14586         (build_vtt_inits): Likewise.
14587         (dfs_build_vtt_inits): Likewise.
14588         (build_ctor_vtbl_group): Tweak type of construction vtables.
14589         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
14590         primary bases, when building construction vtables.
14591         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
14592         (initialize_predefined_identifiers): Add vtt_parm_identifier.
14593         (init_decl_processing): Initialize vtt_parm_type.
14594         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
14595         (lang_mark_tree): Make vtt_parm.
14596         * decl2.c (build_artificial_parm): New function.
14597         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
14598         (grokclassfn): Use build_artificial_parm.
14599         * init.c (initialize_vtbl_ptrs): Call
14600         fixup_all_virtual_upcast_offsets directly.
14601         (perform_member_init): Use the complete subobject destructor for
14602         member cleanups.
14603         (build_vtbl_address): New function.
14604         (expand_virtual_init): Handle VTTs.
14605         * optimize (maybe_clone_body): Likewise.
14606         * search.c (fixup_all_virtual_upcast_offsets): Give it external
14607         linkage.
14608         (expand_indirect_vtbls_init): Remove.
14609         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
14610         * tree.c (make_binfo): Make them bigger.
14611
14612 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
14613
14614         * inc/cxxabi.h (__pbase_type_info): Define, based on
14615         __pointer_type_info.
14616         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
14617         (__pointer_to_member_type_info): Likewise.
14618         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
14619         (__pointer_to_member_type_info::__is_pointer_p): Remove.
14620         (__pointer_type_info::__do_catch): Rename to ...
14621         (__pbase_type_info::__do_catch): ... here. Adjust.
14622         (__pbase_type_info::__pointer_catch): Implement.
14623         (__pointer_type_info::__pointer_catch): Adjust.
14624         (__pointer_to_member_type_info::__pointer_catch): Adjust.
14625
14626 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
14627
14628         * tinfo.h (__user_type_info::contained_virtual_p): New
14629         predicate.
14630         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
14631         shaped hierarchy.
14632         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
14633         diamond shaped hierarchy. Add early out for mixed diamond and
14634         duplicate shaped hierarchy.
14635
14636 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
14637
14638         * cp-tree.h (build_delete): Change prototype.
14639         (build_vec_delete): Likewise.
14640         * call.c (build_scoped_method_call): Use special_function_kind
14641         values to indicate the kind of destruction to be done.
14642         (build_method_call): Likewise.
14643         * decl.c (finish_destructor_body): Likewise.
14644         (maybe_build_cleanup_1): Likewise.  Rename to ...
14645         (maybe_build_cleanup): ... this.
14646         * decl2.c (delete_sanity): Use special_function_kind
14647         values to indicate the kind of destruction to be done.
14648         (build_cleanup): Likewise.
14649         * init.c (perform_member_init): Likewise.
14650         (build_vec_delete_1): Likewise.
14651         (build_dtor_call): Simplify.
14652         (build_delete): Use special_function_kind
14653         values to indicate the kind of destruction to be done.
14654         (build_vbase_delete): Likewise.
14655         (build_vec_delete): Likewise.
14656
14657         * init.c (sort_member_init): Fix typo in error message generation
14658         code.
14659
14660 2000-05-15  Donald Lindsay  <dlindsay@cygnus.com>
14661
14662         * semantics.c (begin_class_definition): make the packed
14663         attribute be sensitive to the "-fpack-struct" command line flag
14664
14665 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
14666
14667         Update new-abi upcast algorithm.
14668         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
14669         prototype and meaning of return value.
14670         (__si_class_type_info::__do_upcast): Likewise.
14671         (__vmi_class_type_info::__do_upcast): Likewise.
14672         * tinfo.cc (__class_type_info::__upcast_result): Replace
14673         whole2dst with part2dst. Adjust ctor.
14674         (__class_type_info::__do_upcast): Adjust call of worker function.
14675         (__class_type_info::__do_upcast): Adjust.
14676         (__si_class_type_info::__do_upcast): Adjust. Use parent's
14677         __do_upcast.
14678         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
14679         virtual base in diamond hierarchy bug.
14680
14681 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
14682
14683         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
14684         and bitfield to tinfo_fn_p.
14685         (DECL_TINFO_FN_P): Adjust.
14686         (SET_DECL_TINFO_FN_P): Likewise.
14687         (DECL_MUTABLE_P): Likewise.
14688         (DECL_C_BIT_FIELD): Likewise.
14689         (SET_DECL_C_BIT_FIELD): Likewise.
14690         (CLEAR_DECL_C_BIT_FIELD): Likewise.
14691         (DECL_UNINLINABLE): Likewise.
14692         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
14693         (handle_using_decl): Remove assertion.
14694         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
14695         to build FIELD_DECLs.
14696         (build_base_field): Likewise.
14697         (layout_class_type): Likewise.
14698         * decl.c (init_decl_processing): Likewise.
14699         (build_ptrmemfunc_type): Likewise.
14700         (grokdeclarator): Likewise.
14701         * decl2.c (grok_x_components): Likewise.
14702         * except.c (call_eh_info): Likewise.
14703         * init.c (init_init_processing): Likewise.
14704         * rtti.c (expand_class_desc): Likewise.
14705         (create_pseudo_type_info): Likewise.
14706         (get_vmi_pseudo_type_info): Likewise.
14707         (create_tinfo_types): Likewise.
14708         * ptree.c (print_lang_decl): Adjust.
14709         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
14710         before checking DECL_MUTABLE_P.
14711
14712         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
14713         parameters for template functions.
14714         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
14715         destructors as well as constructors.
14716
14717 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
14718
14719         * class.c (build_ctor_vtbl_group): Set inits.
14720         * optimize.c (maybe_clone_body): Set DECL_INLINE and
14721         DECL_THIS_INLINE appropriately for clones.
14722
14723         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
14724         (DECL_CONV_FN_P): Simplify.
14725         (DECL_OPERATOR): Remove.
14726         (language_to_string): Declare.
14727         * decl.c (duplicate_decls): Fix typo in comment.
14728         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
14729         (grok_op_properties): Use DECL_CONV_FN_P instead of
14730         IDENTIFIER_TYPENAME_P.
14731         * dump.c (dequeue_and_dump): Dump the language linkage of
14732         declarations.
14733         * error.c (language_to_string): Give it external linkage.
14734         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
14735         (implicitly_declare_fn): Set DECL_LANGUAGE.
14736         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
14737         IDENTIFIER_TYPENAME_P.
14738         (tsubst_decl): Likewise.
14739         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
14740         * semantics.c (finish_member_declaration): Don't mark members of
14741         classes declared in an extern "C" region as extern "C".
14742
14743 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14744
14745         * decl2.c (qualified_lookup_using_namespace): Look through
14746         namespace aliases.
14747
14748         * decl.c (push_using_decl): Return the old decl on namespace level.
14749
14750 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
14751
14752         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
14753         (VTT_NAME_PREFIX): New macro.
14754         (CTOR_VTBL_NAME_PREFIX): Likewise.
14755         (get_ctor_vtbl_name): New function.
14756         * class.c (get_vtable_name): Simplify.
14757         (get_vtt_name): New function.
14758         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
14759         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
14760         when a virtual base becomes primary.
14761         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
14762         VTTs.
14763         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
14764         additional parameters.
14765         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
14766         (initialize_array): New function.
14767         (build_vtt): Likewise.
14768         (build_vtt_inits): Likewise.
14769         (dfs_build_vtt_inits): Likewise.
14770         (dfs_fixup_binfo_vtbls): Likewise.
14771         (build_ctor_vtbl_group): Likewise.
14772         (initialize_vtable): Use initialize_array.
14773         (accumulate_vtbl_inits): Reimplement to handle construction
14774         vtables.
14775         (dfs_accumulate_vtbl_inits): Likewise.
14776         (bulid_vtbl_initializer): Adjust parameter name.
14777         * method.c (build_typename_overload): Remove #if 0'd code.
14778         (get_ctor_vtbl_name): New function.
14779         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
14780         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
14781
14782         * cp-tree.h (struct lang_type): Remove search_slot.
14783         (CLASSTYPE_SEARCH_SLOT): Remove.
14784         (emit_base_init): Change prototype.
14785         (initialize_vtbl_ptrs): Likewise.
14786         (expand_indirect_vtbls_init): Likewise.
14787         (clear_search_slots): Remove.
14788         * decl.c (lang_mark_tree): Don't mark search_slot.
14789         * init.c (initialize_vtbl_ptrs): Simplify.
14790         (emit_base_init): Likewise.
14791         * search.c (struct vbase_info): Document decl_ptr.
14792         (convert_pointer_to_single_level): Remove.
14793         (dfs_find_vbases): Remove.
14794         (dfs_init_base_pointers): Simplify.
14795         (dfs_clear_vbase_slots): Remove.
14796         (dfs_vtable_path_unmark): New function.
14797         (init_vbase_pointers): Simplify.
14798         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
14799         (expand_indirect_vtbls_init): Simplify.  Don't call
14800         mark_all_temps_used.
14801         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
14802         initialize_vtbl_ptrs.
14803
14804 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
14805
14806         * except.c: Add static prototypes.
14807
14808 2000-05-20  H.J. Lu  <hjl@gnu.org>
14809
14810         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
14811
14812 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
14813
14814         Don't create a separate copy of virtual bases for the
14815         CLASSTYPE_VBASECLASSES list.
14816         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
14817         (BINFO_FOR_VBASE): Remove.
14818         (CANONICAL_BINFO): Adjust.
14819         (binfo_for_vbase): New function.
14820         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
14821         instead of BINFO_FOR_VBASE.
14822         (build_vbase_pointer): Likewise.
14823         (build_secondary_vtable): Likewise.
14824         (dfs_mark_primary_bases): Likewise.
14825         (mark_primary_bases): Likewise.
14826         (layout_nonempty_base_or_field): Likewise.
14827         (dfs_set_offset_for_shared_vbases): Likewise.
14828         (dfs_set_offset_for_unshared_vbases): Likewise.
14829         (layout_virtual_bases): Likewise.  Adjust for changes to the
14830         CLASSTYPE_VBASECLASSES list.
14831         (dump_class_hierarchy_r): Use binfo_for_vbase
14832         instead of BINFO_FOR_VBASE.
14833         (dump_class_hierarchy): Likewise.
14834         (finish_vtbls): Likewise.
14835         (build_vtbl_initializer): Adjust for changes to the
14836         CLASSTYPE_VBASECLASSES list.
14837         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
14838         * decl.c (finish_destructor_body): Adjust for changes to the
14839         CLASSTYPE_VBASECLASSES list.
14840         * init.c (sort_base_init): Use binfo_for_vbase.
14841         (construct_virtual_bases): Adjust for changes to the
14842         CLASSTYPE_VBASECLASSES list.
14843         (expand_member_init): Use binfo_for_vbase.
14844         (build_vbase_delete):  Adjust for changes to the
14845         CLASSTYPE_VBASECLASSES list.
14846         * method.c (do_build_copy_constructor): Likewise.
14847         * rtti.c (get_base_offset): Use binfo_for_vbase.
14848         (expand_class_desc): Remove #if 0'd code.
14849         * search.c (struct vbase_info): Remove vbase_types.
14850         (get_base_distance):  Use binfo_for_vbase.
14851         (lookup_field_queue_p): Use CANONICAL_BINFO.
14852         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
14853         (get_pure_virtuals): Adjust for changes to the
14854         CLASSTYPE_VBASECLASSES list.
14855         (dfs_find_vbases): Use binfo_for_vbase.
14856         (dfs_init_vbase_pointers): Likewise.
14857         (init_vbase_pointers): Don't initialize vi.vbase_types.
14858         (virtual_context): Use binfo_for_vbase.
14859         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
14860         CLASSTYPE_VBASECLASSES list.
14861         (expand_indirect_vtbls_init): Simplify.
14862         (dfs_get_vbase_types): Don't replicate virtual bases.
14863         (find_vbase_instance): Use binfo_for_vbase.
14864         (binfo_for_vbase): New function.
14865         * typeck.c (get_delta_difference): Use binfo_for_vbase.
14866
14867 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
14868
14869         * decl2.c (finish_anon_union): Generalize error messages to handle
14870         anonymous structures.
14871         * init.c (perform_member_init): Remove `name' parameter.
14872         (build_field_list): New function.
14873         (sort_member_init): Handle anonymous union initialization order
14874         correctly.  Check for multiple initializations of the same union.
14875         (emit_base_init): Don't look up fields by name here.
14876         (expand_member_init): Record the result of name lookup for future
14877         reference.
14878         * typeck.c (build_component_ref): Fix formatting.
14879
14880 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
14881
14882         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
14883         * typeck.c (build_x_compound_expr): Replace warn_unused with
14884         warn_unused_value.
14885
14886         * decl2.c (lang_decode_option): Update -Wall unused flags by
14887         calling set_Wunused.
14888
14889 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
14890
14891         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
14892         * init.c (dfs_vtable_path_unmark): Remove.
14893         * search.c (marked_new_vtable_p): Likewise.
14894         (unmarked_new_vtable_p): Likewise.
14895         (dfs_search_slot_nonempty_p): Likewise.
14896         (dfs_mark): Likewise.
14897         (dfs_vtable_path_unmark): Likewise.
14898         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
14899         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
14900         (dfs_init_vbase_pointers): Remove special-case new ABI code.
14901         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
14902         (init_vbase_pointers): Simplify.
14903         (expand_indirect_vtbls_init): Likewise.
14904
14905         * class.c (copy_virtuals): New function.
14906         (build_primary_table): Use it.
14907         (build_secondary_vtable): Likewise.
14908         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
14909         indicate that no vcall offset is required.
14910         (add_virtual_function): Likewise.
14911         (modify_all_vtables): Likewise.
14912         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
14913         (dfs_accumulate_vtbl_inits): Likewise.
14914         (build_vtbl_initializer): Make changes to handle construction
14915         vtables.
14916         (dfs_build_vcall_offset_vtbl_entries): Likewise.
14917         (build_rtti_vtbl_entries): Likewise.
14918         (build_vtable_entries): Handle a NULL vcall_index.
14919
14920 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
14921
14922         * decl2.c (lang_decode_option): Fix thinko.
14923
14924 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
14925
14926         * except.c (check_handlers): New fn.
14927         * cp-tree.h: Declare it.
14928         * semantics.c (finish_handler_sequence): Call it.
14929         (finish_function_handler_sequence): Likewise.
14930         (finish_handler_parms): Set TREE_TYPE on the handler.
14931         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
14932         * search.c (get_base_distance_recursive): If protect>1, ignore
14933         special access.
14934         (get_base_distance): Don't reduce watch_access.
14935
14936 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
14937
14938         * lex.c: #include diagnostic.h.
14939         (lang_init_options): Set default prefixing rules.
14940
14941         * lang-options.h: Add -fdiagnostics-show-location=.
14942
14943         * decl2.c: #include diagnostic.h.
14944         (lang_decode_option): Handle -fdiagnostics-show-location=.
14945
14946 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
14947
14948         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
14949         * vec.cc: Revert my 2000-05-07 change.
14950
14951 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
14952
14953         * class.c (check_field_decls): Complain about non-static data
14954         members with same name as class in class with constructor.
14955
14956 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
14957
14958         * decl.c (grokdeclarator): Allow non-static data members with
14959         same name as class.
14960
14961 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
14962
14963         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
14964         and pending_inline.filename.  Update prototypes.
14965         * decl.c (define_label): Constify filename parameter.
14966         * decl2.c (warn_if_unknown_interface): Constify local char *.
14967         * input.c Constify input_source.filename. Don't declare
14968         input_filename or lineno.  Constify filename parameter to feed_input.
14969         * lex.c (init_parse): Constify parameter and return value.
14970         (cp_pragma_interface, cp_pragma_implementation): Constify
14971         filename argument.
14972         (reinit_parse_for_method, reinit_parse_for_block,
14973         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
14974         Constify local char *.
14975         * pt.c: Don't declare lineno or input_filename.
14976         (print_template_context, tsubst_friend_function, tsubst_decl,
14977         tsubst, instantiate_decl): Constify local char *.
14978         * semantics.c (expand_body): Constify local char *.
14979         * tree.c (build_srcloc): Constify filename parameter.
14980         * typeck.c (c_expand_asm_operands): Constify filename
14981         parameter.
14982
14983 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
14984
14985         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
14986         offsetof expansion.
14987
14988 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
14989
14990         * inc/cxxabi.h:  Fix typos in comment.
14991         (__base_class_info::__offset): Use a static_cast.
14992
14993 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
14994
14995         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
14996         of std::size_t and std::ptrdiff_t respectively.
14997         * tinfo.cc: Likewise.
14998         * vec.cc: Likewise.
14999
15000 2000-05-06  Richard Henderson  <rth@cygnus.com>
15001
15002         * typeck.c (build_c_cast): Don't warn integer->pointer size
15003         mismatch for constants.
15004
15005 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
15006
15007         * rtti.c (ptmd_initializer): Set non-public, if class is
15008         incomplete.
15009
15010         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
15011         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
15012         __cxa_vec_delete): Likewise.
15013         * tinfo.cc (__dynamic_cast): Likewise.
15014         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
15015         __cxa_vec_delete): Likewise.
15016
15017 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
15018
15019         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
15020         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
15021         (lang_decl_flags): Add vcall_offset.
15022         (THUNK_VCALL_OFFSET): Use it.
15023         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
15024         * method.c (make_thunk): Create the lang_decl here, not in
15025         emit_thunk.
15026         (emit_thunk): Make generic thunks into ordinary functions once
15027         they have been fed to expand_body.
15028         * semantics.c (expand_body): Set current_function_is_thunk here.
15029
15030 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15031
15032         * class.c (update_vtable_entry_for_fn): Prototype.
15033
15034         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
15035         and `tmpl'.
15036
15037         * search.c (dfs_build_inheritance_graph_order): Prototype.
15038
15039 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
15040
15041         * cp-tree.h (special_function_kind): Add various kinds of
15042         destructors.
15043         (special_function_p): New function.
15044         * class.c (overrides): Don't let one kind of destructor override
15045         another.
15046         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
15047         whether or not to instantiate a template.
15048         * tree.c (special_function_p): Define.
15049
15050 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
15051
15052         * cp-tree.def (THUNK_DECL): Remove.
15053         * cp-tree.h (DECL_THUNK_P): New macro.
15054         (DECL_NON_THUNK_FUNCTION_P): Likewise.
15055         (DECL_EXTERN_C_FUNCTION_P): Likewise.
15056         (SET_DECL_THUNK_P): Likewise.
15057         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
15058         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
15059         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
15060         * decl.c (decls_match): Use DECL_EXTERN_C_P.
15061         (duplicate_decls): Likewise.
15062         (pushdecl): Likewise.  Adjust thunk handling.
15063         (grokfndecl): Use DECL_EXTERN_C_P.
15064         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
15065         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
15066         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
15067         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
15068         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
15069         DECL_NO_STATIC_CHAIN.
15070         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
15071         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
15072         * search.c (covariant_return_p): Remove THUNK_DECL handling.
15073         * ir.texi: Update.
15074
15075 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
15076
15077         * tree.c (walk_tree): Set lineno.
15078
15079 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
15080
15081         * exception.cc: Update license notice.
15082         * new.cc: Likewise.
15083         * new1.cc: Likewise.
15084         * new2.cc: Likewise.
15085         * tinfo.cc: Likewise.
15086         * tinfo2.cc: Likewise.
15087         * vec.cc: Likewise.
15088         * inc/cxxabi.h: Likewise.
15089         * inc/exception: Likewise.
15090         * inc/new: Likewise.
15091         * inc/new.h: Likewise.
15092         * inc/typeinfo: Likewise.
15093
15094 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
15095
15096         * tree.c (build_target_expr_with_type): If we already have a
15097         TARGET_EXPR, just return it.
15098
15099         * optimize.c (initialize_inlined_parameters): Don't generate an
15100         EXPR_STMT if we can just use DECL_INITIAL.
15101         * decl.c (emit_local_var): Only make the initialization a
15102         full-expression if stmts_are_full_exprs_p.
15103
15104 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
15105
15106         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
15107         macro.
15108         * call.c (standard_conversion): Use it.
15109         (direct_reference_binding): Likewise.
15110         (build_over_call): Likewise.
15111         (is_properly_derived_from): Likewise.
15112         (compare_ics): Likewise.
15113         * class.c (resolves_to_fixed_type_p): Likewise.
15114         * optimize.c (declare_return_variable): Likewise.
15115         * pt.c (is_specialization_of): Likewise.
15116         (unify): Likewise.
15117         * typeck.c (comp_target_parms): Likeiwse.
15118         (build_static_cast): Likewise.
15119         (build_reinterpret_cast): Likewise.
15120         (build_const_cast): Likewise.
15121         (comp_ptr_ttypes_real): Likewise.
15122         (comp_ptr_ttypes_const): Likewise.
15123         * typeck2.c (process_init_constructor): Likewise.
15124
15125 2000-04-30  Scott Snyder <snyder@fnal.gov>
15126
15127         * decl.c (finish_destructor_body): Use the base destructor when
15128         destroying virtual bases.
15129
15130 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
15131
15132         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
15133         STMT_EXPRs.
15134         * optimize.c (struct inline_data): Add target_exprs field.
15135         (declare_return_variable): When a function returns an aggregate,
15136         use the variable declared in the TARGET_EXPR as the remapped
15137         DECL_RESULT.
15138         (expand_call_inline): Update the pending target_exprs stack.
15139         (optimize_function): Initialize the stack.
15140
15141         * decl2.c (finish_file): Fix typo in comment.
15142
15143         * method.c (emit_thunk): Don't try to return a `void' value.
15144
15145         * optimize.c (initialize_inlined_parameters): If the parameter is
15146         addressable, we need to make a new VAR_DECL, even if the
15147         initializer is constant.
15148
15149 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
15150
15151         * decl.c (grok_op_properties): Add an extra check of argtypes.
15152
15153 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
15154
15155         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
15156         variables.
15157         (initialize_inlined_parameters): Try to avoid creating new
15158         VAR_DECLs.
15159
15160 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
15161
15162         * lex.c (my_get_run_time): Remove.
15163         (init_filename_times): Use get_run_time instead of my_get_run_time.
15164         (check_newline): Likewise.
15165         (dump_time_statistics): Likewise.
15166         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
15167         of computing elapsed time explicitly.
15168
15169 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
15170
15171         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
15172         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
15173         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
15174         before calling decl_constant_value.
15175         * class.c (check_bitfield_decl): Likewise.
15176         * cvt.c (ocp_convert): Likewise.
15177         (convert): Likewise.
15178         * decl.c (compute_array_index_type): Likewise.
15179         (build_enumerator): Likewise.
15180         * decl2.c (check_cp_case_value): Likewise.
15181         * pt.c (convert_nontype_argument): Likewise.
15182         (tsubst): Likewise.
15183         * typeck.c (decay_conversion): Likewise.
15184         (build_compound_expr): Likewise.
15185         (build_reinterpret_cast): Likewise.
15186         (build_c_cast): Likewise.
15187         (convert_for_assignment): Likewise.
15188
15189 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
15190
15191         * decl.c (finish_function): Don't play games with DECL_INLINE.
15192
15193 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
15194
15195         * ir.texi: Correct typo.
15196
15197 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15198
15199         * decl.c (grokdeclarator): Reject VLAs as members.
15200
15201 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
15202
15203         * call.c (standard_conversion): Accept conversion between
15204         COMPLEX_TYPEs.
15205
15206         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
15207
15208 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
15209
15210         * decl2.c (finish_file): Remove double setup for accounting
15211         compile time.
15212
15213 2000-04-24  Robert Lipe <robertlipe@usa.net>
15214
15215         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
15216
15217 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
15218
15219         * new.cc (set_new_handler): Needs to be in std::.
15220
15221 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
15222
15223         * cp-tree.h (lang_decl): Remove pretty_function_p.
15224         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
15225         language-specific node.
15226         * decl.c (cp_make_fname_decl): Use build_decl, not
15227         build_lang_decl, to build the variables.
15228         (grokvardecl): Don't call build_lang_decl for local variables in
15229         templates.
15230         (grokdeclarator): Don't call build_lang_decl for local type
15231         declarations in templates.
15232         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
15233         zero'd memory, rather than calling memset.
15234         * pt.c: Include hashtab.h.
15235         (local_specializations): New variable.
15236         (retrieve_local_specialization): Use it.
15237         (register_local_specialization): Likewise.
15238         (tsubst_decl): Don't assume local variables have
15239         DECL_LANG_SPECIFIC.
15240         (instantiate_decl): Set up local_specializations.
15241         * Makefile.in (HTAB_H): New variable.
15242
15243 2000-04-23  Richard Henderson  <rth@cygnus.com>
15244
15245         * typeck.c (c_expand_asm_operands): Restore the original
15246         contents of the output list.
15247
15248 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
15249
15250         * ir.texi:  Document complex number representation.
15251
15252 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
15253
15254         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
15255         (target_incomplete_p): New function.
15256         (tinfo_base_init): Create comdat NTBS name variable.
15257         (ptr_initializer): Add non_public parameter. Calculate it.
15258         (ptmd_initializer): Likewise.
15259         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
15260         (create_real_tinfo_var): Add non_public parameter. Use it.
15261         Push proxy into global namespace.
15262         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
15263         New enumeration.
15264         * inc/typeinfo (type_info::before, type_info::operator==):
15265         Compare __name addresses.
15266
15267         * tinfo2.cc: Remove new-abi builtins comment.
15268
15269 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
15270
15271         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
15272
15273         * call.c (joust): Exit early if we get the same function, too.
15274
15275         * decl2.c (key_method): Return NULL_TREE for template classes.
15276         (import_export_class): Don't need to check for template classes.
15277
15278 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
15279
15280         * lex.c: Remove references to cccp.c.
15281
15282 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
15283
15284         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
15285         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
15286         (DECL_DESTRUCTOR_P): Use destructor_attr.
15287         (DECL_CONST_MEMFUNC_P): Reimplement.
15288         (DECL_VOLATILE_MEMFUNC_P): Remove.
15289         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
15290         (overrides): Use DECL_DESTRUCTOR_P.
15291         (check_for_override): Likewise.
15292         * decl.c (start_function): Likewise.
15293         * decl2.c (grokfclassfn): Likewise.
15294         (check_classfn): Likewise.
15295         (grok_function_init): Likewise.
15296
15297 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
15298
15299         * decl2.c (grokfield): Issue error on illegal data member
15300         declaration.
15301
15302 2000-04-17  Mark P Mitchell  <mark@codesourcery.com>
15303
15304         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
15305
15306 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
15307
15308         * class.c (build_vtable_entry): Don't build thunks for type-info
15309         functions.
15310
15311 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
15312
15313         * decl.c (decls_match): Allow a redeclaration of a builtin to
15314         specify args while the builtin did not.
15315
15316 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
15317
15318         * cp-tree.def (THUNK_DECL): Add to documentation.
15319         * cp-tree.h (flag_huge_objects): Declare.
15320         * class.c (modify_vtable_entry): Tidy.
15321         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
15322         Calculate delta appropriately for the new ABI.
15323         (dfs_modify_vtables): Use it.
15324         (modify_all_vtables): Fix thinko in code to add overriding copies
15325         of functions to primary vtables.
15326         (build_clone): Fix typo in comment.
15327         (clone_function_decl): Correct order of destructors in vtable.
15328         (build_vbase_offset_vtbl_entries): Adjust comment.
15329         (dfs_vcall_offset_queue_p): Remove.
15330         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
15331         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
15332         (build_vtable_entry): Correct check for pure virtual functions.
15333         Don't declare flag_huge_objects.
15334         * decl.c (flag_huge_objects): Remove declaration.
15335         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
15336         Use int_size_in_bytes.
15337         (emit_thunk): Handle vcall offset thunks.
15338
15339 2000-04-15  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15340
15341         * decl2.c (parse_time, varconst_time): Delete declarations.
15342         (finish_file): Delete LINENO declaration.
15343         START_TIME and THIS_TIME now long.
15344
15345 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
15346
15347         * class.c (build_base_field): Reformat comment.
15348
15349         * inc/cxxabi.h (stddef.h): Comment inclusion.
15350         (__base_class_info::__offset): Comment shift.
15351
15352 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
15353
15354         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
15355         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
15356         (cp_push_exception_identifier): New macro.
15357         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
15358         (DECL_BASE_DESTRUCTOR_P): Likewise.
15359         (DECL_DELETING_DESTRUCTOR_P): Likewise.
15360         (get_vtbl_decl_for_binfo): Fix formatting.
15361         (in_charge_arg_for_name): New macro.
15362         (maybe_build_cleanup_and_delete): Remove declaration.
15363         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
15364         (in_charge_arg_for_name): New function.
15365         (build_new_method_call): Use it.  Handle cloned destructors.
15366         (build_clone): Don't make the base constructor virtual.
15367         Automatically defer generated functions.
15368         (clone_function_decl): Handle destructors, too.
15369         (clone_constructors_and_destructors): Likewise.
15370         (create_vtable_ptr): Don't create a vtable entry for a cloned
15371         function.
15372         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
15373         (initialize_predefined_identifiers): Update appropriately.
15374         (finish_destructor_body): Simplify.
15375         (maybe_build_cleanup_and_delete): Remove.
15376         * except.c (expand_throw): Handle new-ABI destructors.
15377         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
15378         (build_dtor_call): New function.
15379         (build_delete): Use it.  Simplify.
15380         * optimize.c (maybe_clone_body): Handle destructors.
15381         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
15382
15383         * exception.cc (cleanup_fn): New typedef.
15384         (CALL_CLEANUP): New macro.
15385         (cp_eh_info): Use them.
15386         (__cp_push_exception): Likewise.
15387         (__cp_pop_exception): Likewise.
15388
15389 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
15390
15391         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
15392         (complete_dtor_identifier): New macro.
15393         (CLASSTYPE_FIRST_CONVERSION): Remove.
15394         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
15395         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
15396         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
15397         (CLASSTYPE_CONSTRUCTORS): Likewise.
15398         (CLASSTYPE_DESTRUCTORS): Likewise.
15399         (lang_decl): Add cloned_function.
15400         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
15401         (DECL_BASE_CONSTRUCTOR_P): Likewise.
15402         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
15403         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
15404         (DECL_CLONED_FUNCTION_P): Likewise.
15405         (DECL_CLONED_FUNCTION): Likewise.
15406         (clone_function_decl): Declare.
15407         (maybe_clone_body): Likewise.
15408         * call.c (build_user_type_conversion_1): Call complete object
15409         constructors in the new ABI.
15410         (build_new_method_call): Don't add in-charge parameters under the
15411         new ABI.
15412         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
15413         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
15414         CLASSTYPE_DESTRUCTOR_SLOT.
15415         (build_clone): New function.
15416         (clone_function_decl): Likewise.
15417         (clone_constructors_and_destructors): Likewise.
15418         (check_bases_and_members): Use it.
15419         * decl.c (iniitialize_predefined_identifiers): Initialize
15420         complete_dtor_identifier.
15421         (finish_function): Don't add extra code to a clone.
15422         (lang_mark_tree): Mark cloned_function.
15423         * decl2.c (mark_used): Don't bother trying to instantiate things
15424         we synthesized.
15425         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
15426         * method.c (set_mangled_name_for_decl): Don't treat clones as
15427         constructors.
15428         (synthesize_method): Sythesize cloned functions, not the clones.
15429         * optimize.c (inline_data): Update comment on ret_label.
15430         (remap_block): Don't assume DECL_INITIAL exists.
15431         (copy_body_r): Allow ret_label to be NULL.
15432         (maybe_clone_body): Define.
15433         * pt.c (tsubst_decl): Handle clones.
15434         (instantiate_clone): New function.
15435         (instantiate_template): Use it.
15436         (set_mangled_name_for_template_decl): Don't treat clones as
15437         constructors.
15438         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
15439         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
15440         * semantics.c (expand_body): Clone function bodies as necessary.
15441
15442         * optimize.c (remap_decl): Avoid sharing structure for arrays
15443         whose size is only known at run-time.
15444         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
15445
15446         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
15447         to has_in_charge_parm_p.
15448         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
15449         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
15450         (DECL_COPY_CONSTRUCTOR_P): New macro.
15451         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
15452         (build_user_type_conversion_1): Likewise.
15453         (convert_like_real): Likewise.
15454         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
15455         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
15456         (copy_args_p): Likewise.
15457         (grok_ctor_properties): Likewise.
15458         (start_function): Likewise.
15459         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
15460         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
15461         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
15462         * method.c (do_build_copy_constructor): Use
15463         DECL_HAS_IN_CHARGE_PARM_P.
15464         (synthesize_method): Likewise.
15465         * pt.c (instantiate_template): Remove goto.
15466         * tree.c (build_cplus_method_type): Remove mention of obstacks in
15467         comment.
15468
15469         * cp-tre.h (finish_function): Change prototype.
15470         * decl.c (end_cleanup_fn): Adjust caller.
15471         (finish_function): Take only one parameter.
15472         * decl2.c (finish_objects): Adjust caller.
15473         (finish_static_storage_duration_function): Likewise.
15474         * method.c (emit_thunk): Likewise.
15475         * parse.y: Likewise.
15476         * parse.c: Regenerated.
15477         * pt.c (instantiate_decl): Likewise.
15478         * rtti.c (synthesize_tinfo_fn): Likewise.
15479         * semantics.c (expand_body): Likewise.
15480
15481         * cp-tree.h (copy_decl): New function.
15482         * class.c (finish_struct_1): Use it.
15483         * lex.c (copy_decl): Define it.
15484         * pt.c (tsubst_decl): Likewise.
15485         * tree.c (copy_template_template_parm): Likewise.
15486
15487         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
15488         has_nonpublic_assign_ref.
15489         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
15490         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
15491         * class.c (finish_struct_methods): Don't set
15492         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
15493         (interface_only): Don't declare.
15494         (interface_unknown): Likewise.
15495
15496 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15497
15498         * tree.h (HAVE_TEMPLATES): Remove definition.
15499         * lang-options.h (-fthis-is-variable): Remove documentation.
15500
15501 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
15502
15503         * class.c (instantiate_type): Handle object-relative template-id.
15504
15505         * semantics.c (finish_expr_stmt): Call convert_to_void here.
15506         * decl.c (cplus_expand_expr_stmt): Not here.
15507
15508         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
15509         Initialize exprtype earlier.
15510
15511         * parse.y (fn.def1): Check for defining types in return types.
15512
15513         * decl.c (check_tag_decl): Notice extra fundamental types.
15514         Diagnose empty decls in classes, too.
15515
15516         * decl.c (grokdeclarator): Don't override an anonymous name if no
15517         declarator was given.
15518
15519         * cvt.c (convert_to_void): Call resolve_offset_ref.
15520
15521         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
15522
15523         * decl2.c (decl_namespace): Handle getting a type.
15524
15525         * typeck.c (build_c_cast): Re-enable warning for cast between
15526         pointer and integer of different size.
15527
15528 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
15529
15530         * inc/cxxabi.h (__pointer_type_info): Add restrict and
15531         incomplete flags.
15532         (__pointer_type_info::__pointer_catch): New virtual function.
15533         (__pointer_to_member_type_info): Derive from
15534         __pointer_type_info. Adjust.
15535         (__pointer_to_member_type_info::__do_catch): Remove.
15536         (__pointer_to_member_type_info::__is_pointer_p): Declare.
15537         (__pointer_to_member_type_info::__pointer_catch): Declare.
15538         * rtti.c (qualifier_flags): Add restrict flag.
15539         (ptmd_initializer): Reorder members.
15540         (create_tinfo_types): Expand comments. Reorder
15541         ptmd_desc_type_node members.
15542         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
15543         Implement.
15544         (__pointer_type_info::__do_catch): Move specific code into
15545         __pointer_catch. Call it.
15546         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
15547         specific catch checking. Fix void conversion check.
15548         (__pointer_to_member_type_info::__do_catch): Remove.
15549         (__pointer_to_member_type_info::__pointer_catch): Implement.
15550
15551 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15552
15553         * lex.c (init_parse): Remove traces of classof and headof.
15554         * decl2.c (flag_operator_names): Default to 1.
15555         (lang_decode_option): Do not set it for -ansi.
15556
15557 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
15558
15559         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
15560         (DECL_MAIN_VARIANT): Remove.
15561         * decl.c (duplicate_decls): Don't set it.
15562         (start_function): Likewise.
15563         (lang_mark_tree): Don't mark it.
15564         * decl2.c (defer_fn): Don't use it.
15565         * lex.c (retrofit_lang_decl): Don't set it.
15566         * pt.c (tsubst_decl): Likewise.
15567         * ptree.c (print_lang_decl): Don't print it.
15568         * typeck.c (mark_addressable): Don't use it.
15569
15570 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
15571
15572         * vec.cc: Include <new> and <exception>.
15573         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
15574         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
15575         terminate.
15576         (__cxa_vec_delete): Catch dtor exceptions.
15577
15578 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
15579
15580         Prepend __ to implementation defined names.
15581         * inc/typeinfo (type_info): Rename _name to __name.
15582         (type_info::type_info): Rename parameter.
15583         (type_info::operator==, type_info::operator!=,
15584         type_info::before): Likewise.
15585         (type_info::is_pointer_p, type_info::is_function_p,
15586         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
15587         parameters.
15588         * inc/cxxabi.h
15589         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
15590         (__pointer_type_info::__pointer_type_info): Likewise.
15591         (__pointer_type_info::is_pointer_p,
15592         __pointer_type_info::do_catch): Prepend __. Rename parameters.
15593         (__array_type_info::__array_type_info): Rename parameters.
15594         (__function_type_info::__function_type_info): Likewise.
15595         (__function_type_info::is_function_p): Prepend __.
15596         (__enum_type_info::__enum_type_info): Rename parameters.
15597         (__pointer_to_member_type_info::__pointer_to_member_type_info):
15598         Likewise.
15599         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
15600         parameters.
15601         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
15602         (__class_type_info::__class_type_info): Rename parameters.
15603         (__class_type_info::sub_kind): Prepend __. Adjust member names.
15604         (__class_type_info::upcast_result,
15605         __class_type_info::dyncast_result): Prepend __. Move definition
15606         into tinfo.cc.
15607         (__class_type_info::do_upcast, __class_type_info::do_catch,
15608         __class_type_info::find_public_src,
15609         __class_type_info::do_dyncast,
15610         __class_type_info::do_find_public_src): Prepend __. Rename
15611         parameters.
15612         (__si_class_type_info::__si_class_type_info): Rename parameters.
15613         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
15614         __si_class_type_info::do_find_public_src): Prepent __. Rename
15615         parameters.
15616         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
15617         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
15618         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
15619         parameters.
15620         (__dynamic_cast): Rename parameters.
15621         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
15622         type_info::do_catch, type_info::do_upcast): Prepend __.
15623         (contained_p, public_p, virtual_p, contained_public_p,
15624         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
15625         (__class_type_info::do_catch,
15626         __class_type_info::do_upcast): Prepend __. Adjust.
15627         (__class_type_info::__upcast_result,
15628         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
15629         Adjust.
15630         (__class_type_info::find_public_src): Prepend __. Adjust.
15631         (__class_type_info::do_find_public_src,
15632         __si_class_type_info::do_find_public_src,
15633         __vmi_class_type_info::do_find_public_src): Likewise.
15634         (__class_type_info::do_dyncast,
15635         __si_class_type_info::do_dyncast,
15636         __vmi_class_type_info::do_dyncast): Likewise.
15637         (__class_type_info::do_upcast,
15638         __si_class_type_info::do_upcast,
15639         __vmi_class_type_info::do_upcast): Likewise.
15640         (__dynamic_cast): Adjust.
15641         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
15642         (__function_type_info::is_function_p): Likewise.
15643         (__pointer_type_info::do_catch): Likewise. Adjust.
15644         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
15645         (__throw_type_match_rtti_2): Adjust.
15646         (__is_pointer): Adjust.
15647
15648 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
15649
15650         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
15651         (complete_ctor_identifier): New macro.
15652         (special_function_kind): Add sfk_copy_constructor and
15653         sfk_assignment_operator.
15654         (LOOKUP_HAS_IN_CHARGE): Remove.
15655         (cons_up_default_function): Rename to ...
15656         (implicitly_declare_fn): ... this.
15657         * call.c (build_new_method_call): Add in-charge parameters for
15658         constructors here.
15659         * class.c (add_implicitly_declared_members): Change parameter name
15660         from cant_have_assignment to cant_have_const_assignment.
15661         Replace calls to cons_up_default_function to implicitly_declare_fn.
15662         * cvt.c (ocp_convert): Use complete_ctor_identifier.
15663         * decl.c (initialize_predefined_identifiers): Initialize it.
15664         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
15665         complex expression.
15666         * init.c (expand_default_init): Don't calculate the in-charge
15667         parameter here.
15668         (build_new_1): Likewise.
15669         * lex.c (cons_up_default_function): Move to method.c.
15670         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
15671         (implicitly_declare_fn): New function.
15672         * typeck.c (build_static_cast): Use complete_ctor_identifier.
15673         (build_modify_expr): Likewise.
15674         * typeck2.c (build_functional_cast): Likewise.
15675
15676         Under the new ABI, constructors don't return `this'.
15677         * cp-tree.h (warn_reorder): Declare.
15678         (special_function_kind): New enum.
15679         (global_base_init_list): Remove declaration.
15680         (emit_base_init): Don't return a value.
15681         (check_base_init): Don't declare.
15682         (is_aggr_typedef): Likewise.
15683         * decl.c (check_special_function_return_type): New function.
15684         (return_types): Remove.
15685         (grokdeclarator): Use check_special_function_return_type.
15686         (start_function): Don't initialize ctor_label under the new ABI.
15687         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
15688         * init.c (begin_init_stmts): Move to top of file.
15689         (finish_init_stmts): Likewise.
15690         (warn_reorder): Don't declare.
15691         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
15692         value.
15693         (check_base_init): Remove.
15694         (is_aggr_typedef): Likewise.
15695         (build_new_1): Don't use the return value of a constructor.
15696         * semantics.c (setup_vtbl_ptr): Don't use the return value
15697         of emit_base_init.
15698         * typeck.c (check_return_expr): Don't magically convert return
15699         statements into `return this' in constructors under the new ABI.
15700
15701         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
15702         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
15703         (base_ctor_identifier): New macro.
15704         (base_dtor_identifier): Likewise.
15705         (deleting_dtor_identifier): Likewise.
15706         * decl.c: Don't include obstack.h.
15707         (obstack_chunk_alloc): Don't define.
15708         (obstack_chunk_free): Likewise.
15709         (struct predefined_identifier): New type.
15710         (initialize_predefined_identifiers): New function.
15711         (init_decl_processing): Use it.
15712         (debug_temp_inits): Remove.
15713         (start_method): Don't call preserve_data.
15714         (hack_incomplete_structures): Update comment.
15715         * init.c (init_init_processing): Don't initialize
15716         nelts_identifier.
15717         (build_offset_rf): Remove dead code.
15718         (build_delete): Use CLASSTYPE_N_BASECLASSES.
15719         * search.c (init_search_processing): Don't initialize
15720         vptr_identifier.
15721
15722 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15723
15724         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
15725         some sign_compare warnings.
15726
15727 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
15728
15729         Rename abi::__vmi_class_type_info members.
15730         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
15731         base_list, detail_masks members to vmi_flags, vmi_base_count,
15732         vmi_bases and vmi_flags_masks respectively.
15733         (__vmi_class_type_info::vmi_flags_masks): Rename
15734         details_unknown_mask to flags_unknown_mask.
15735         * tinfo.cc (__class_type_info::do_upcast): Adjust.
15736         (__vmi_class_type_info::do_find_public_src): Adjust.
15737         (__vmi_class_type_info::do_dyncast): Adjust.
15738         (__vmi_class_type_info::do_upcast): Adjust.
15739
15740 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
15741
15742         * tinfo.cc (convert_to_base): New function.
15743         (get_vbase_offset): Remove. Move into convert_to_base.
15744         (__vmi_class_type_info::do_find_public_src): Adjust.
15745         (__vmi_class_type_info::do_dyncast): Adjust.
15746         (__vmi_class_type_info::do_upcast): Adjust.
15747
15748 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
15749
15750         * tinfo.cc (operator=): Use __builtin_strcmp.
15751         * tinfo2.cc (before): Likewise.
15752
15753 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
15754
15755         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
15756         (DECL_SAVED_INLINE): Rename to ...
15757         (DECL_DEFERRED_FN): ... this.
15758         (in_function_p): Remove declaration.
15759         (mark_inline_for_output): Rename to ...
15760         (defer_fn): ... this.
15761         * decl.c (finish_function): Adjust call to mark_inline_for_output.
15762         (in_function_p): Remove definition.
15763         * decl2.c (saved_inlines): Rename to ...
15764         (deferred_fns): ... this.
15765         (saved_inlines_used): Rename to ...
15766         (deferred_fns_used): ... this.
15767         (mark_inline_for_output): Rename to ...
15768         (defer_fn): ... this.
15769         (finish_file): Adjust accordingly.
15770         (init_decl2): Likewise.
15771         * lex.c (cons_up_default_function): Likewise.
15772         * pt.c (mark_decl_instantiated): Likewise.
15773         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
15774         circumstances.
15775         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
15776         * semantics.c (expand_body): Defer more functions.
15777
15778 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
15779
15780         * vec.cc: New file.
15781         * Make-lang.in (CXX_LIB2FUNCS): Add it.
15782         (vec.o): Build it.
15783         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
15784         __cxa_vec_delete): Declare.
15785
15786 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
15787
15788         * rtti.c (dfs_class_hint_mark): New static function.
15789         (dfs_class_hint_unmark): New static function.
15790         (class_hint_flags): Use them.
15791
15792 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
15793
15794         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
15795
15796 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
15797
15798         * cp-tree.h (instantiate_decl): Change prototype.
15799         * decl2.c (mark_used): Adjust call.
15800         * optimize.c (inlinable_function_p): Adjust handling of templates.
15801         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
15802         (do_type_instantiation): Likewise.
15803         (instantiate_decl): Defer more templates.
15804         (instantiate_pending_templates): Adjust logic to handle inline
15805         friend functions.
15806
15807         * Makefile.in (GGC_H): New variable.  Use it throughout in place
15808         of ggc.h.
15809
15810         * call.c: Don't include obstack.h.  Include ggc.h.
15811         (obstack_chunk_alloc): Don't define.
15812         (obstack_chunk_free): Likewise.
15813         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
15814         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
15815         (pop_switch): Free it.
15816
15817         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
15818
15819         * dump.c (dequeue_and_dump): Don't try to print the bit_position
15820         if we don't have a DECL_FIELD_OFFSET.
15821
15822 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
15823
15824         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
15825         special_function_p.
15826
15827 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15828
15829         * cfns.gperf (hash, libc_name_p): Prototype.
15830
15831         * rtti.c (build_dynamic_cast_1): Constification.
15832
15833         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
15834
15835         * semantics.c (deferred_type_access_control): Prototype.
15836
15837 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
15838
15839         Correct many new ABI issues regarding vbase and vcall offset
15840         layout.
15841         * cp-tree.h (BINFO_VTABLE): Document.
15842         (struct lang_type): Tweak formatting.
15843         (BINFO_PRIMARY_BINFO): Add to documentation.
15844         (CLASSTYPE_VSIZE): Fix typo in comment.
15845         (CLASSTYPE_VBASECLASSES): Update documentation.
15846         (BINFO_VBASE_MARKED): Remove.
15847         (SET_BINFO_VBASE_MARKED): Likewise.
15848         (CLEAR_BINFO_VBASE_MARKED): Likewise.
15849         (BINFO_FIELDS_MARKED): Remove.
15850         (SET_BINFO_FIELDS_MARKED): Likewise.
15851         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
15852         (enum access_kind): New enumeration.
15853         (num_extra_vtbl_entries): Remove declaration.
15854         (size_extra_vtbl_entries): Likewise.
15855         (get_vtbl_decl_for_binfo): New function.
15856         (dfs_vbase_unmark): Remove declaration.
15857         (mark_primary_bases): Likewise.
15858         * class.c (SAME_FN): Remove.
15859         (struct vcall_offset_data_s): Move definition.
15860         (build_vbase_pointer): Use `build', not `build_binary_op', to
15861         access the vbase pointer under the new ABI.
15862         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
15863         (build_primary_vtable): Likewise.
15864         (dfs_mark_primary_bases): Move here from search.c.
15865         (mark_primary_bases): Likewise.
15866         (determine_primary_bases): Under the new ABI, don't make a base
15867         class a primary base just because we don't yet have any virtual
15868         functions.
15869         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
15870         (num_vfun_entries): Remove.
15871         (dfs_count_virtuals): Likewise.
15872         (num_extra_vtbl_entries): Likewise.
15873         (size_extra_vtbl_entries): Likewise.
15874         (layout_virtual_bases): Iterate in inheritance graph order under
15875         the new ABI.
15876         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
15877         indicate that a vfield is present.
15878         (init_class_processing): Initialize access_public_node, etc., from
15879         ak_public, etc.
15880         (get_vtbl_decl_for_binfo): New function.
15881         (dump_class_hierarchy_r): Likewise.
15882         (dump_class_hierarchy): Use it.
15883         (finish_vtbls): Build the vtbls in inheritance graph order.
15884         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
15885         (initialize_vtable): Use get_vtbl_decl_for_binfo.
15886         (accumulate_vtbl_inits): Add comments explaining why a pre-order
15887         walk is required.
15888         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
15889         where the vptr points, even for primary vtables.
15890         (build_vtbl_initializer): Adjust handling of vbase and vcall
15891         offsets.
15892         (build_vcall_and_vbase_vtable_entries): New function.
15893         (dfs_build_vbase_offset_vtbl_entries): Remove.
15894         (build_vbase_offset_vtbl_entries): Reimplement.
15895         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
15896         were already handled in a primary base class vtable.
15897         (build_vcall_offset_vtbl_entries): Adjust.
15898         (build_rtti_vtbl_entries): Adjust.
15899         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
15900         * init.c (expand_virtual_init): Simplify.
15901         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
15902         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
15903         * search.c (BINFO_ACCESS): New macro.
15904         (SET_BINFO_ACCESS): Likewise.
15905         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
15906         (access_in_type): Likewise.
15907         (dfs_accessible_p): Likewise.
15908         (protected_accessible_p): Likewise.
15909         (lookup_fnfields_1): Adjust documentation.
15910         (dfs_mark_primary_bases): Move to class.c
15911         (mark_primary_bases): Likewise.
15912         (dfs_vbase_unmark): Remove.
15913         (virtual_context): Use BINFO_FOR_VBASE.
15914         (dfs_get_vbase_types): Simplify.
15915         (dfs_build_inheritance_graph_order): New function.
15916         (get_vbase_types): Use it.
15917         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
15918
15919         * tinfo.cc (get_vbase_offset): New function.
15920         (__vmi_class_type_info::do_find_public_src): Use it.
15921         (__vmi_class_type_info::do_dyncast): Likewise.
15922         (__vmi_class_type_info::do_upcast): Likewise.
15923
15924 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
15925
15926         * lang-specs.h: Pass -fno-show-column to the preprocessor.
15927
15928 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
15929
15930         * rtti.c (class_hint_flags): Rename flags.
15931         (class_initializer): Remove flags.
15932         (synthesize_tinfo_var): Combine offset and flags. Add flags
15933         for __vmi_class_type_info.
15934         (create_tinfo_types): Remove flags from __class_type_info and
15935         __si_class_type_info. Merge flags and offset from
15936         base_class_type_info.
15937         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
15938         (__base_class_info::is_virtual_p): Adjust.
15939         (__base_class_info::is_public_p): Adjust.
15940         (__base_class_info::offset): New accessor.
15941         (__class_type_info::details): Remove member.
15942         (__class_type_info::__class_type_info): Lose details.
15943         (__class_type_info::detail_masks): Remove.
15944         (__si_class_type_info::__si_class_type_info): Lose details.
15945         (__vmi_class_type_info::details): New member.
15946         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
15947         (__vmi_class_type_info::detail_masks): New member.
15948         * tinfo.cc (__class_type_info::do_upcast): Initialize result
15949         with unknown_details_mask.
15950         (__vmi_class_type_info::do_find_public_src): Adjust
15951         (__vmi_class_type_info::do_dyncast): Adjust.
15952         (__vmi_class_type_info::do_upcast): Set result details, if
15953         needed. Adjust.
15954         (__dynamic_cast): Temporarily #if out optimization.
15955
15956 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
15957
15958         * rtti.c (get_tinfo_decl): Mark used.
15959         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
15960         mark as dealt with, if we output it.
15961
15962 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
15963
15964         * class.c: Reorganize to put virtual function table initialization
15965         machinery at the end of the file.
15966
15967 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
15968
15969         * class.c (finish_struct): Use bitsize_zero_node.
15970         * pt.c (instantiate_class_template): Likewise.
15971
15972 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
15973
15974         Put RTTI entries at negative offsets in new ABI.
15975         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
15976         vbase offset at index -3, not -1.
15977         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
15978         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
15979         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
15980         (build_rtti_vtbl_entries): New function.
15981         (set_rtti_entry): Remove.
15982         (build_primary_vtable): Don't use it.
15983         (build_secondary_vtable): Likewise.
15984         (start_vtable): Remove.
15985         (first_vfun_index): New function.
15986         (set_vindex): Likewise.
15987         (add_virtual_function): Don't call start_vtable.  Do call
15988         set_vindex.
15989         (set_primary_base): Rename parameter.
15990         (determine_primary_base): Likewise.
15991         (num_vfun_entries): Don't use skip_rtti_stuff.
15992         (num_extra_vtbl_entries): Include RTTI information.
15993         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
15994         (skip_rtti_stuff): Remove.
15995         (dfs_modify_vtables): Don't use it.
15996         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
15997         (layout_nonempty_base_or_field): Update size handling.
15998         (create_vtable_ptr): Tweak.
15999         (layout_class_type): Adjust parameter names.
16000         (finish_struct_1): Simplify.
16001         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
16002         (skip_rtti_stuff): Remove.
16003         (first_vfun_index): New function.
16004         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
16005         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
16006         (marked_vtable_pathp): Declare.
16007         (unmarked_vtable_pathp): Likewise.
16008         * error.c (dump_expr): Use first_vfun_index to calculate vtable
16009         offsets.
16010         * rtti.c (build_headof): Look for RTTI at negative offsets.
16011         (get_tinfo_decl_dynamic): Likewise.
16012         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
16013         here.
16014         (create_pseudo_type_info): Do it here instead.  Adjust so that
16015         vptr points at first virtual function.
16016         * search.c (marked_vtable_pathp): Make it global.
16017         (unmarked_vtable_pathp): Likewise.
16018         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
16019         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
16020         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
16021         (get_pure_virtuals): Likewise.
16022         (expand_upcast_fixups): Likewise.
16023         * tree.c (debug_binfo): Likewise.
16024         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
16025         negative offset.
16026
16027 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16028
16029         * class.c (check_field_decl): Fix typo.
16030         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
16031         (check_methods): Likewise.
16032         (check_field_decls): Likewise.
16033         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
16034         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
16035         Use DECL_RESULT_FLD, not DECL_RESULT.
16036         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
16037         * lex.c (identifier_type): Likewise.
16038         * pt.c (determine_specialization, lookup_template_class): Likewise.
16039         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
16040         (resolve_overloaded_unification, more_specialized): Likewise.
16041         * semantics.c (finish_member_declaration): Likewise.
16042         * typeck.c (build_x_function_call): Likewise.
16043
16044 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
16045
16046         * class.c (layout_empty_base): Handle empty bases with non-byte
16047         alignment.
16048         (build_base_field): Likewise.
16049         (layout_virtual_bases): Likewise.
16050
16051         * class.c (finish_struct_1): Fix typo in this change:
16052
16053         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16054
16055 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
16056
16057         * decl.c (grokdeclarator): Count partial specializations when
16058         keeping track of how many template classes have been seen.
16059
16060         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
16061
16062 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16063
16064         * class.c (build_vbase_pointer_fields): layout_field now place_field.
16065         (get_vfield_offset): Use byte_position.
16066         (set_rtti_entry): Set OFFSET to ssizetype zero.
16067         (get_binfo_offset_as_int): Deleted.
16068         (dfs_record_base_offsets): Use tree_low_cst.
16069         (dfs_search_base_offsets): Likewise.
16070         (layout_nonempty_base_or_field): Reflect changes in RLI format
16071         and call byte_position.
16072         (layout_empty_base): Convert offset to ssizetype.
16073         (build_base_field): use rli_size_unit_so_far.
16074         (dfs_propagate_binfo_offsets): Do computation in proper type.
16075         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
16076         (layout_class_type): Reflect changes in RLI names and fields.
16077         (finish_struct_1): Set DECL_FIELD_OFFSET.
16078         * dump.c (dequeue_and_dump): Call bit_position.
16079         * expr.c (cplus_expand_constant): Use byte_position.
16080         * rtti.c (expand_class_desc): Use bitsize_one_node.
16081         * typeck.c (build_component_addr): Use byte_position and don't
16082         special case for zero offset.
16083
16084 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
16085
16086         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
16087
16088         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
16089         tinfo object.
16090         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
16091         vtable.
16092
16093 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16094
16095         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
16096         DECL_P macros.
16097         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
16098         make_typename_type, check_initializer, cp_finish_decl,
16099         xref_tag): Likewise.
16100         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
16101         decl_namespace, arg_assoc_template_arg, arg_assoc,
16102         validate_nonmember_using_decl, do_class_using_decl): Likewise.
16103         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
16104         args_to_string): Likewise.
16105         * friend.c (is_friend): Likewise.
16106         * lex.c (note_got_semicolon, note_list_got_semicolon,
16107         is_global): Likewise.
16108         * method.c (build_overload_nested_name, build_overload_value,
16109         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
16110         * parse.y (typename_sub, typename_sub1): Likewise.
16111         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
16112         process_partial_specialization, convert_template_argument,
16113         template_args_equal, add_pending_template, lookup_template_class,
16114         for_each_template_parm_r, maybe_fold_nontype_arg,
16115         tsubst, instantiate_template, type_unification_real, unify,
16116         instantiate_pending_templates, set_mangled_name_for_template_decl):
16117         Likewise.
16118         * repo.c (repo_get_id, repo_template_used): Likewise.
16119         * search.c (lookup_field_1): Likewise.
16120         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
16121         * xref.c (classname): Likewise.
16122
16123 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
16124
16125         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
16126         (CANONICAL_BINFO): New macro.
16127         (BINFO_NEW_VTABLE_MARKED): Use it.
16128         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
16129         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
16130         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
16131         not TREE_TYPE.
16132         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
16133         (build_secondary_vtable): Likewise.
16134         (dfs_finish_vtbls): Likewise.
16135         (dfs_accumulate_vtbl_inits): Likewise.
16136         (accumulate_vtbl_inits): New function.
16137         (finish_vtbls): Make sure that virtual bases come after
16138         non-virtual bases in the vtable group.
16139         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
16140         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
16141         * search.c (struct vbase_info): Move definition.
16142         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
16143         (unmarked_new_vtable_p): Likewise.
16144         (dfs_mark_vtable_path): Remove.
16145         (dfs_mark_new_vtable): Remove.
16146         (dfs_unmark_new_vtable): Likewise.
16147         (dfs_clear_search_slot): Likewise.
16148         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
16149         (dfs_clear_vbase_slots): Likewise.
16150         (init_vbase_pointers): LIkewise.
16151
16152 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
16153
16154         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
16155         SIZETYPE to a non-SIZETYPE.
16156
16157 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
16158
16159         * class.c (layout_virtual_bases): Adjust names in conditionally
16160         compiled code.
16161
16162         * class.c (record_base_offsets): New function.
16163         (layout_conflict_p): Likewise.
16164         (layout_nonempty_base_or_field): Use it.
16165         (layout_empty_base): New function.
16166         (build_base_field): Use it.
16167         (build_base_fields): Update comment.
16168         (layout_virtual_bases): Fold in a little code form
16169         layout_basetypes.  Use layout_empty_base.
16170         (layout_basetypes): Remove.
16171         (end_of_class): New function.
16172         (layout_class_type): Use it.  Adjust.
16173
16174         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
16175         (fntype_p): Remove.
16176         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
16177         comment.
16178         (dfs_skip_nonprimary_vbases_markedp): Likewise.
16179         * typeck.c (fntype_p): Remove.
16180
16181         * cp-tree.h (TI_SPEC_INFO): Remove.
16182         (CLASSTYPE_TI_SPEC_INFO): Likewise.
16183         * pt.c (process_partial_specialization): Likewise.
16184
16185         * class.c (build_base_field): Fix thinko in computation of binfo
16186         offsets.
16187
16188         * tree.c (mark_local_for_remap_p): Mark variables declared in
16189         TARGET_EXPRs as well.
16190
16191 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
16192
16193         * typeck.c (require_complete_type, complete_type,
16194         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
16195         build_array_ref, convert_arguments, pointer_diff,
16196         build_x_unary_op, build_unary_op, build_c_cast,
16197         build_modify_expr): Use COMPLETE_TYPE_P etc.
16198         * call.c (is_complete, convert_like_real,
16199         build_new_method_call): Likewise.
16200         * class.c (build_vbase_pointer_fields, check_bases,
16201         build_base_field, finish_struct_1, pushclass): Likewise.
16202         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
16203         * decl.c (maybe_process_template_type_declaration, pushtag,
16204         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
16205         layout_var_decl, check_initializer, cp_finish_decl,
16206         grokdeclarator, require_complete_types_for_parms,
16207         grok_op_properties, xref_tag, xref_basetypes,
16208         check_function_type): Likewise.
16209         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
16210         * friend.c (do_friend): Likewise.
16211         * init.c (build_offset_ref): Likewise.
16212         * parse.y (structsp): Likewise.
16213         * pt.c (maybe_process_partial_specialization,
16214         tsubst_friend_function, instantiate_class_template, tsubst,
16215         do_type_instantiation, instantiate_pending_templates): Likewise.
16216         * repo.c (repo_get_id): Likewise.
16217         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
16218         synthesize_tinfo_var, emit_support_tinfos): Likewise.
16219         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
16220         * semantics.c (begin_class_definition): Likewise.
16221         * tree.c (build_cplus_method_type): Likewise.
16222         * typeck2.c (digest_init, build_functional_cast,
16223         add_exception_specifier): Likewise.
16224         * parse.h, parse.c: Regenerated.
16225
16226 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
16227
16228         * inc/cxxabi.h: New header file. Define new-abi entry points.
16229         (__pointer_type_info::target): Rename member to ...
16230         (__pointer_type_info::type): ... here.
16231         (__base_class_info::type): Rename member to ...
16232         (__base_class_info::base): ... here.
16233         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
16234         * cp-tree.h (CPTI_ABI): New global tree enumeration.
16235         (abi_node): New global tree node.
16236         * decl.c (abi_node): Document.
16237         (init_decl_processing): Initialize abi_node.
16238         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
16239         (get_vmi_pseudo_type_info): Likewise.
16240         (create_tinfo_types): Likewise.
16241         (emit_support_tinfos): Likewise.
16242         * tinfo.h (cxxabi.h): Include for new-abi.
16243         Move rtti class definitions to new header file.
16244         * tinfo.cc (abi): Use the namespace.
16245         (std): Move new abi rtti classes from here ...
16246         (__cxxabiv1): ... to here.
16247         * tinfo2.cc (cxxabi.h): Include for new-abi.
16248         Move rtti class definitions to new header file.
16249         (std): Move new abi rtti classes from here ...
16250         (__cxxabiv1): ... to here.
16251         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
16252         namespace.
16253
16254 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
16255             Jason Merrill  <jason@casey.cygnus.com>
16256
16257         * method.c (build_overload_int): Use host_integerp.
16258
16259 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16260
16261         * init.c (build_offset_ref): Handle the case of a templated member
16262         function.
16263
16264 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16265
16266         * except.c (expand_exception_blocks): Clear catch_clauses_last.
16267
16268 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
16269
16270         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
16271         * class.c (check_bitfield_decl): Turn illegal bitfields into
16272         non-bitfields.
16273         (dfs_propagate_binfo_offsets): Adjust for new size_binop
16274         semantics.
16275         (dfs_offset_for_unshared_vbases): Likewise.
16276         * cvt.c (cp_convert_to_pointer): Convert NULL to a
16277         pointer-to-member correctly under the new ABI.
16278         * expr.c (cplus_expand_constant): Don't use cp_convert when
16279         turning an offset into a pointer-to-member.
16280         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
16281         when dereferencing them under the new ABI.
16282         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
16283         of pointers-to-members under the new ABI.
16284
16285         * class.c (check_bitfield_decl): Remove restriction on really long
16286         bitfields.
16287         (layout_class_type): Implement new ABI handling of bitfields
16288         longer than their types.
16289
16290 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16291
16292         * parse.y (extdefs): Call ggc_collect.
16293         * parse.c: Regenerated.
16294
16295 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
16296
16297         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
16298         (note_name_declared_in_class): Use OVL_CURRENT to get at a
16299         potential overload.
16300
16301 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16302
16303         * class.c (build_vbase_path): Use integer_zerop.
16304         (build_vtable_entry): Use tree_low_cst.
16305         (get_vfield_offset): Use bit_position.
16306         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
16307         Use tree_low_cst.
16308         (check_bitfield_decl): Set DECL_SIZE using convert.
16309         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
16310         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
16311         Use tree_low_cst.
16312         (finish_struct_1): Use bit_position.
16313         (dump_class_hierarchy): Use tree_low_cst.
16314         * cp-tree.h (min_precision): Add declaration.
16315         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
16316         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
16317         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
16318         * expr.c (cplus_expand_constant): Use bit_position.
16319         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
16320         * rtti.c (get_base_offset): Use bit_position.
16321         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
16322         host_integerp, and tree_low_cst.
16323         (pointer_int_sum): Use integer_zerop.
16324         (build_component_addr): Use bit_position.
16325
16326 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
16327
16328         * typeck.c (require_complete_type): Don't assume size_zero_node.
16329         (complete_type_or_else): Likewise.
16330
16331 2000-03-16  Steven Grady <grady@digitaldeck.com>
16332             Jason Merrill  <jason@casey.cygnus.com>
16333
16334         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
16335
16336 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
16337
16338         * decl2.c (grokfield): Bail out if type is error_mark_node.
16339
16340 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
16341
16342         * tinfo2.cc (__ptr_to_member_data): Rename to ...
16343         (__pointer_to_member_data): ... here. Adjust.
16344         * rtti.c (create_tinfo_types): Adjust.
16345
16346 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
16347
16348         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
16349         * decl.c (ref_desc_type_node): Undocument.
16350         * rtti.c (ptr_ref_initializer): Rename to ...
16351         (ptr_initializer): ... here. Adjust comments.
16352         (ptmd_initializer): Fix comment thinko.
16353         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
16354         (create_tinfo_types): Remove ref_desc_type_node init.
16355         * tinfo2.cc (__reference_type_info): Remove.
16356
16357 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
16358
16359         * decl.c (cp_finish_decl): Remove obsolete comment.
16360
16361         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
16362
16363 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
16364
16365         * cp-tree.h: Tweak documentation.
16366         * class.c (build_vbase_pointer_fields): Layout the fields, too.
16367         (avoid_overlap): Remove.
16368         (get_binfo_offset_as_int): New function.
16369         (dfs_serach_base_offsets): Likewise.
16370         (layout_nonempty_base_or_field): Likewise.
16371         (build_base_field): Layout fields here.  Avoid placing two objects
16372         of the same type at the same address, under the new ABI.
16373         (build_base_fields): Adjust accordingly.
16374         (create_vtable_ptr): Return the new field, but don't attach it to
16375         TYPE_FIELDS.
16376         (remove_base_field): Remove.
16377         (remove_base_fields): Remove.
16378         (layout_basetypes): Adjust accordingly.
16379         (layout_class_type): Call layout_field for each field, rather than
16380         just making a wholesale call to layout_type.
16381
16382 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
16383
16384         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
16385
16386 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
16387
16388         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
16389
16390         * except.c (dtor_nothrow): New fn.
16391         (do_pop_exception): Use it.  Take type parm.
16392         (push_eh_cleanup): Take type parm.
16393         (expand_start_catch_block): Pass it.
16394         (build_eh_type_type_ref): Accept null type.
16395
16396 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
16397
16398         * cp-tree.h (revert_static_member_fn): Change prototype.
16399         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
16400         (grok_op_properties): Likewise.
16401         (start_function): Likewise.
16402         (revert_static_member_fn): Simplify.
16403         * pt.c (check_explicit_specialization): Adjust call to
16404         revert_static_member_fn.
16405
16406 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
16407
16408         * cp-tree.h (scope_kind): New type.
16409         (tmpl_spec_kind): Likewise.
16410         (declare_pseudo_global_level): Remove.
16411         (pseudo_global_level_p): Rename to template_parm_scope_p.
16412         (pushlevel): Remove declaration.
16413         (begin_scope): New function.
16414         (finish_scope): Likewise.
16415         (current_tmpl_spec_kind): Likewise.
16416         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
16417         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
16418         Add template_spec_p.
16419         (toplevel_bindings_p): Adjust.
16420         (declare_pseudo_global_level): Remove.
16421         (pseudo_global_level_p): Rename to template_parm_scope_p.
16422         (current_tmpl_spec_kind): New function.
16423         (begin_scope): Likewise.
16424         (finish_scope): Likewise.
16425         (maybe_push_to_top_level): Adjust.
16426         (maybe_process_template_type_declaration): Likewise.
16427         (pushtag): Likewise.
16428         (pushdecl_nonclass_level): Likewise.
16429         (lookup_tag): Likewise.
16430         (grokfndecl): Handle member template specializations.  Share
16431         constructor and non-constructor code.
16432         * decl2.c (check_classfn): Handle member template specializations.
16433         * pt.c (begin_template_parm_list): Use begin_scope.
16434         (begin_specialization): Likewise.
16435         (end_specialization): Likewise.
16436         (check_explicit_specialization): Use current_tmpl_spec_kind.
16437         Handle member template specializations.
16438         (end_template_decl): Use finish_scope.  Remove call to
16439         get_pending_sizes.
16440         (push_template_decl_real): Remove bogus error message.
16441         (tsubst_decl): Fix typo in code contained in comment.
16442         (instantiate_template): Handle member template specializations.
16443         (most_general_template): Likewise.
16444
16445 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
16446
16447         * lex.c (whitespace_cr): Compress consecutive calls to warning().
16448         (do_identifier): Ditto for error().
16449
16450         * pt.c (convert_nontype_argument): Ditto for cp_error().
16451         (convert_template_argument): Ditto for cp_pedwarn().
16452
16453 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
16454
16455         * exception.cc (__check_null_eh_spec): New fn.
16456         * except.c (expand_end_eh_spec): Call it if the spec is throw().
16457
16458 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
16459
16460         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
16461         * except.c (expand_end_eh_spec): Add the return type.
16462         * rtti.c (throw_bad_cast): Add the parmtypes.
16463         (throw_bad_typeid): Likewise.
16464
16465         * semantics.c (expand_stmt): Only leave out rtl for unused
16466         artificials, and set DECL_IGNORED_P on them as well.
16467         * decl.c (wrapup_globals_for_namespace): Likewise.
16468
16469 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
16470
16471         * decl.c (maybe_commonize_var): Skip all artificial decls.
16472         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
16473
16474 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
16475
16476         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
16477         * cp-tree.h: Declare flag_enforce_eh_specs.
16478         * decl.c (store_parm_decls, finish_function): Check it.
16479
16480         C library functions don't throw.
16481         * Makefile.in (cfns.h): New target.
16482         (except.o): Depend on it.
16483         * Make-lang.in (cc1plus): Depend on cfns.gperf.
16484         * cfns.gperf: New file.
16485         * cfns.h: Generated.
16486         * except.c: Include it.
16487         (nothrow_libfn_p): New fn.
16488         * decl.c (grokfndecl): Use it.
16489         * cp-tree.h: Declare it.
16490
16491         * decl.c (push_overloaded_decl_1, auto_function,
16492         define_function): Lose.
16493         (build_library_fn_1): New static fn.
16494         (builtin_function): Use it.
16495         (get_atexit_node): Use build_library_fn_ptr.
16496         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
16497         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
16498         push_void_library_fn, push_throw_library_fn): New fns.
16499         * cp-tree.h: Declare them.
16500         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
16501         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
16502         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
16503         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
16504         * rtti.c (build_runtime_decl): Lose.
16505         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
16506         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
16507         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
16508
16509         * call.c (build_call): Remove result_type parm.
16510         Call mark_used on unused artificial fns.
16511         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
16512
16513 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
16514
16515         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
16516         appropriate.
16517         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
16518         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
16519         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
16520         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
16521         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
16522         expand_generic_desc): Likewise.
16523
16524 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
16525
16526         * exception.cc (__cp_pop_exception): Cleanup the original object.
16527
16528 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
16529
16530         * decl.c (grok_op_properties): Merge conversion to void warning
16531         with other silly op warnings.
16532
16533 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
16534
16535         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
16536         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
16537
16538 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
16539
16540         * decl.c (cp_make_fname_decl): New function.
16541         (wrapup_globals_for_namespace): Don't emit unused static vars.
16542         (init_decl_processing): Remove comment about use of
16543         array_domain_type. Set make_fname_decl.
16544         (cp_finish_decl): Remove __FUNCTION__ nadgering.
16545         * semantics.c (begin_compound_stmt): Remove
16546         current_function_name_declared flagging.
16547         (expand_stmt): Don't emit unused local statics.
16548         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
16549         specially.
16550
16551 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
16552
16553         * typeck.c (convert_for_assignment): Don't look at array
16554         initializer.
16555         * call.c (convert_like_real): Likewise.
16556
16557 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
16558
16559         Add initial support for '\uNNNN' specifier.
16560         * lex.c (read_ucs): New fn.
16561         (readescape, skip_white_space): Call it.
16562         (is_extended_char, is_extended_char_1): New fns.
16563         (utf8_extend_token): New fn, #if 0'd out.
16564         (real_yylex): Treat extended chars like letters.
16565
16566         * search.c (note_debug_info_needed): Walk the bases even if we
16567         weren't deferring the type itself.
16568
16569 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16570
16571         * decl2.c (finish_objects): Constify a char*.
16572
16573         * method.c (emit_thunk): Likewise.
16574
16575 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
16576
16577         * typeck.c (dubious_conversion_warnings): Look through
16578         REFERENCE_TYPE.
16579
16580 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16581
16582         * class.c (dfs_modify_vtables): I is now unsigned.
16583         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
16584         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
16585         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
16586         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
16587         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
16588         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
16589         Call integer_all_onesp.
16590         * typeck2.c (process_init_constructor): Use compare_tree_int.
16591
16592         * lang-specs.h (as): Don't call if -syntax-only.
16593
16594 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
16595
16596         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
16597         RTL_EXPR_HAS_NO_SCOPE after all.
16598
16599 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
16600
16601         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
16602         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
16603         RTL_EXPR_HAS_NO_SCOPE.
16604
16605         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
16606         later.
16607
16608         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
16609
16610 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
16611
16612         * call.c (convert_like): Macrofy.
16613         (convert_like_with_context): New macro.
16614         (convert_like_real): Renamed from convert_like.  Add calling
16615         context parameters, for diagnostics. Add recursive flag.  Call
16616         dubious_conversion_warnings for outer conversion.
16617         (build_user_type_conversion): Use convert_like_with_context.
16618         (build_over_call): Likewise. Don't warn about dubious
16619         conversions here. Adjust convert_default_arg calls.
16620         (convert_default_arg): Add context parameters for diagnostics.
16621         Pass through to convert_like_with_context.
16622         * cp-tree.h (convert_default_arg): Add context parameters.
16623         (dubious_conversion_warnings): Prototype new function.
16624         * typeck.c (convert_arguments): Adjust convert_default_arg call.
16625         (dubious_conversion_warnings): New function, broken
16626         out of convert_for_assignment.
16627         (convert_for_assignment): Adjust.
16628
16629 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
16630
16631         * decl2.c (key_method): Break out from...
16632         (import_export_vtable, import_export_class): ...here.
16633
16634         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
16635         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
16636
16637         * search.c (note_debug_info_needed, dfs_debug_mark,
16638         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
16639         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
16640
16641 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
16642
16643         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
16644         typos.
16645
16646 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
16647
16648         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
16649         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
16650         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
16651         (lang_type): Split gets_new into has_new and has_array_new.
16652         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16653         (TYPE_GETS_NEW): Split into ...
16654         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
16655         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
16656         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
16657         (build_op_new_call): Don't declare.
16658         (build_new_1): Likewise.
16659         * call.c (build_op_new_call): Remove.
16660         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
16661         instead of TYPE_NEEDS_DESTRUCTOR.
16662         (finish_struct_bits): Likewise.
16663         (add_implicitly_declared_members): Likewise.
16664         (check_field_decl): Likewise.
16665         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
16666         correctly under the new ABI.
16667         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
16668         instead of TYPE_NEEDS_DESTRUCTOR.
16669         (initialize_local_var): Likewise.
16670         (destroy_local_var): Likewise.
16671         (cp_finish_decl): Likewise.
16672         (register_dtor_fn): Likewise.
16673         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
16674         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
16675         TYPE_VEC_DELETE_TAKES_SIZE here.
16676         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
16677         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
16678         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16679         (finish_destructor_body): Likewise.
16680         (maybe_build_cleanup_1): Likewise.
16681         * decl2.c (do_static_destruction): Likewise.
16682         * init.c (build_new_1): Make it static.
16683         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16684         (expand_cleanup_for_base): Likewise.
16685         (get_cookie_size): New function.
16686         (build_new_1): Handle array-new cookies correctly under the new
16687         ABI.
16688         (build_vec_delete_1): Likewise.
16689         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16690         (build_delete): Likewise.
16691         (build_vec_delete): Handle array-new cookies correctly under the new
16692         ABI.
16693         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16694         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
16695         TYPE_HAS_ARRAY_NEW_OPERATOR.
16696         * ptree.c (print_lang_type): Check them.
16697         * search.c (context_for_name_lookup): Fix typo in comment.
16698         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16699         * tree.c (break_out_cleanups): Likewise.
16700         (build_cplus_array_test_1): Likewise.
16701         (cp_build_qualified_type_real): Likewise.
16702         * typeck.c (complete_type): Likewise.
16703
16704         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
16705         the command-line, not the end.
16706
16707 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
16708
16709         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
16710
16711 2000-03-02  Tom Tromey  <tromey@cygnus.com>
16712
16713         * cp-tree.h (build_java_class_ref): Declare.
16714         * init.c (build_java_class_ref): No longer static.
16715         * except.c (expand_throw): Generate a Java-style `throw' if the
16716         thrown object is a "Java" object.
16717         (initialize_handler_parm): Generate a Java-style lookup of
16718         exception info if the caught object is a "Java" object.
16719         (catch_language, catch_language_init): New globals.
16720         (decl_is_java_type): New function.
16721         (expand_start_catch_block): Don't call push_eh_info() or
16722         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
16723         class reference to build_catch_block.
16724
16725 2000-03-02  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16726
16727         * typeck.c (comptypes): Treat sizetype like its language equivalent.
16728
16729 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
16730
16731         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
16732         to merge reference/pointer code and fix incorrect warnings.
16733
16734 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
16735
16736         * search.c (protected_accessible_p): Use context_for_name_lookup.
16737
16738         * init.c (construct_virtual_bases): Fix thinko.
16739         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
16740
16741 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
16742
16743         * decl.c (current_function_decl): Move to toplev.c.
16744
16745 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
16746
16747         * pt.c (fn_type_unification): Unify return type, whenever
16748         provided.
16749         (get_bindings_real): Only pass return type when necessary.
16750         Remove explicit return type check.
16751         * class.c (resolve_address_of_overloaded_function): Pass desired
16752         return type to fn_type_unification.
16753
16754 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16755
16756         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
16757         DECL_FIELD_SIZE.
16758         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
16759         DECL_FIELD_SIZE.
16760         * rtti.c (expand_class_desc): Likewise.
16761         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
16762         (THUNK_VCALL_OFFSET): Likewise.
16763         (THUNK_DELTA): Reflect changes in ../tree.h.
16764
16765 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
16766
16767         * search.c (protected_accessible_p): Also allow the access if
16768         the member is public in DERIVED.  Lose TYPE parm.
16769         (friend_accessible_p): Lose TYPE parm.
16770         (accessible_p): Adjust.
16771
16772 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16773
16774         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
16775         on things that are not sizes; ssize_binop deleted.
16776         Call size_diffop when appropriate.
16777         (dfs_build_vcall_offset_vtbl_entries): Likewise.
16778         (build_primary_vtable, build_secondary_vtable): Likewise.
16779         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
16780         Variable I is HOST_WIDE_INT.
16781         (get_vfield_offset): Pass proper types to size_binop.
16782         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
16783         (finish_struct_1): Likewise.
16784         (skip_rtti_stuff): Arg N is now pointer to signed.
16785         (layout_class_type): Use size_zero_node.
16786         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
16787         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
16788         * decl.c (complete_arry_type): Pass proper types to size_binop.
16789         (xref_basetypes): BINFO_OFFSET is sizetype.
16790         * error.c (dump_expr): Don't use size_binop non-sizes.
16791         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
16792         * init.c (construct_virtual_bases): Fix type error.
16793         (build_vec_delete_1): Pass proper type to size_binop and don't
16794         fold result.
16795         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
16796         * rtti.c (get_base_offset): Pass proper type to size_binop.
16797         * search.c (dfs_find_vbases): Fix type error.
16798         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
16799         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
16800         * tree.c (debug_binfo): Variable N is signed.
16801         Use HOST_WIDE_INT_PRINT_DEC.
16802         * typeck.c (comptypes): sizetype is same as equivalent integer type.
16803         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
16804         size_one_node and size_zero_node.
16805         (c_alignof): Use size_one_node.
16806         (build_component_addr): Pass proper types to size_binop.
16807         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
16808
16809 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
16810
16811         Implement class scope using-declarations for functions.
16812         * class.c (handle_using_decl): Call add_method for used functions.
16813         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
16814         (add_method): Used functions are hidden by local functions.
16815         (check_bases_and_members): Handle using-decls before finalizing
16816         CLASSTYPE_METHOD_VEC.
16817         * call.c (add_function_candidate): Add ctype parm; if nonzero,
16818         override the type of 'this' accordingly.
16819         (add_template_candidate, add_template_candidate_real): Add ctype parm.
16820         (convert_class_to_reference, build_user_type_conversion_1,
16821         build_new_function_call, build_object_call, build_new_op,
16822         build_new_method_call): Pass ctype parm.
16823
16824         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
16825         the baselink.
16826         * call.c (convert_class_to_reference, build_user_type_conversion_1,
16827         build_new_function_call, build_object_call, build_new_op,
16828         build_new_method_call, build_op_delete_call): Don't get basetype_path
16829         from a baselink.
16830         * typeck.c (build_component_ref): Likewise.
16831         * init.c (build_offset_ref): Likewise.
16832         (resolve_offset_ref): Don't call enforce_access.
16833         Call build_scoped_ref.
16834         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
16835         would cause an error or if -pedantic.
16836         * class.c (alter_access): Lose binfo parm.
16837
16838 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
16839
16840         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
16841         types.
16842
16843 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
16844
16845         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
16846         pseudo_type_info creation into the std namespace
16847
16848 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
16849
16850         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
16851         (import_export_class): Remove declaration.
16852         * decl2.c (import_export_class): Make it static.
16853         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
16854         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
16855         EXPR_WITH_FILE_LOCATION.
16856         * lex.c (check_newline): Tweak filename/lineno setting.
16857         * semantics.c (begin_while_stmt): Fix typo in comment.
16858
16859 2000-02-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16860
16861         * lang-options.h (-fmessage-length=): Add missing option.
16862
16863         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
16864
16865 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
16866
16867         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
16868
16869 2000-02-25  Jim Wilson  <wilson@cygnus.com>
16870
16871         * optimize.c (expand_call_inline): Emit the return label before
16872         evaluating the return value.
16873
16874 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
16875
16876         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
16877         than duplicating functionality here.
16878         * optimize.c: Include input.h.
16879         (expand_call_inline): Use push_srcloc and pop_srcloc.
16880         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
16881         * parse.c: Regenerated.
16882         * Makefile.in (lex.o): Depend on input.h.
16883         (optimize.o): Likewise.
16884
16885 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
16886
16887         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
16888         function type, rather than ICE.
16889
16890 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
16891
16892         * decl.c (grokdeclarator): Call decl_type_access_control.
16893         * parse.y (parse_end_decl): Don't call decl_type_access_control if
16894         decl is null.
16895
16896 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
16897
16898         * decl.c (decls_match): Remove obsolete static member nadgering.
16899
16900 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16901
16902         * decl.c (grokdeclarator): Change ANSI to ISO.
16903         * lex.c (consume_string, readescape, do_identifier): Likewise.
16904         (parse_float, real_yylex): Likewise.
16905         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
16906         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
16907         new_type_id, maybe_label_decls, simple_stmt,
16908         for.init.statement): Likewise.
16909         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
16910         * semantics.c (finish_named_return_value): Likewise.
16911         * parse.c: Regenerate.
16912
16913 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
16914
16915         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
16916         (CPTI_CLASS_STAR_TYPE): Remove.
16917         (vtable_index_type): Likewise.
16918         (class_star_type_node): Remove.
16919         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
16920         (build_binary_op_nodefault): Remove.
16921         * call.c (build_new_op): Use build_binary_op instead of
16922         build_binary_op_nodefault.
16923         * decl.c (init_decl_processing): Remove class_star_type_node
16924         initialization.  Make delta_type_node ptrdiff_type_node under the
16925         new ABI.  Initialize vtable_index_type.
16926         (build_ptrmemfunc_type): Build different structures for the new
16927         ABI.
16928         (build_enumerator): Use build_binary_op instead of
16929         build_binary_op_nodefault.
16930         * method.c (build_overload_value): Mangle pointers-to-members
16931         appropriately under the new ABI.
16932         * typeck.c (build_array_ref): Use build_binary_op instead of
16933         build_binary_op_nodefault.
16934         (get_member_function_from_ptrfunc): Adjust for the new ABI.
16935         (build_binary_op_nodefault): Rename to ...
16936         (build_binary_op): ... this.  Remove old version.  Adjust for
16937         pointer-to-member comparisons under the new ABI.
16938         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
16939         (build_ptrmemfunc): Adjust for the new ABI.
16940         (expand_ptrmemfunc_cst): Likewise.
16941         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
16942         (pfn_from_ptrmemfunc): Adjust for the new ABI.
16943
16944 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
16945
16946         * call.c (build_object_call): Compress consecutive calls to
16947         cp_error.
16948         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
16949         (build_op_delete_call): Adjust message formatting.
16950
16951         * class.c (check_bases): Compress consecutive calls to
16952         cp_pedwarn.
16953         (finish_struct_anon): Say 'ISO C++'.
16954
16955         * decl.c (start_decl): Same here.
16956         (grok_reference_init): Likewise.
16957         (grokfndecl): Correct message formatting.
16958         (grokfndecl): Improve diagnostic.
16959         (check_static_variable_definition): Likewise. Say 'ISO C++'
16960         (compute_array_index_type): Say 'ISO C++'
16961         (create_array_type_for_decl): Compress consecutive calls to
16962         cp_error.
16963         (grokdeclarator): Say 'ISO C++'
16964         (grok_op_properties): Likewise.
16965
16966         * decl2.c (delete_sanity): Clairify diagnostic.
16967         (check_member_template): Same here.
16968         (grok_function_init): Use consistent terminology.
16969
16970         * expr.c (do_case): Say 'ISO C++'
16971
16972         * friend.c (do_friend): Compress consecutive calls to warning.
16973
16974 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
16975
16976         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
16977         * class.c (build_secondary_vtable): Reorganize.  Don't create a
16978         new vtable under the new ABI.
16979         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
16980         computing the size.
16981         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
16982         the initializing elements.
16983         (initialize_vtable): New function.
16984         (dfs_finish_vtbls): Use it.
16985         (dfs_accumulate_vtbl_inits): New function.
16986         (finish_vtbls): Merge primary and secondary vtables under the new
16987         ABI.
16988         (finish_struct_1): Remove redundant call to layout_vtable_decl.
16989         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
16990         aren't VAR_DECLs.
16991
16992         * class.c (build_vtable): New function, split out from ...
16993         (get_vtable_decl): ... here, and ...
16994         (build_secondary_vtable): ... here.
16995
16996         * pt.c (tsubst_decl): Fix formatting.
16997
16998 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16999
17000         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
17001         (avoid_overlap, build_base_field): Likewise.
17002         (build_base_field, build_base_fields, is_empty_class):
17003         Test DECL_SIZE with integer_zero.
17004         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
17005         * cp-tree.h (struct lang_type): New field size_unit.
17006         (CLASSTYPE_SIZE_UNIT): New macro.
17007         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
17008         (cp_finish_decl): Delete -Wlarger-than processing.
17009         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
17010         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
17011         * tree.c (make_binfo): binfo vector is one entry longer.
17012         (walk_tree): Walk DECL_SIZE_UNIT.
17013
17014 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
17015
17016         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
17017         comment.
17018         (build_vtable_entry): Don't assume all vtable entries are
17019         functions.
17020         (build_vtbl_initializer): Adjust accordingly.
17021         (get_vtable_decl): Fix formatting.
17022
17023 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
17024
17025         * semantics.c (deferred_type_access_control): Walk the entire
17026         type_lookups list.
17027         (save_type_access_control): Rename from
17028         initial_deferred_type_access_control.  Just remember the value.
17029         (decl_type_access_control): New fn.
17030         (begin_function_definition): Use deferred_type_access_control, after
17031         we've started the function.  Set type_lookups to error_mark_node.
17032         * parse.y (frob_specs, fn.def1): Adjust.
17033         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
17034         (parse_end_decl, parse_bitfield0, parse_method): New fns.
17035         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
17036         (after_type_component_declarator0): Likewise.
17037         (after_type_component_declarator): Likewise.
17038         (notype_component_declarator): Likewise.
17039         * cp-tree.h: Adjust.
17040
17041         * decl.c (redeclaration_error_message): Allow redeclaration of
17042         namespace-scope decls.
17043
17044 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
17045
17046         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
17047
17048 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
17049
17050         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
17051         * decl2.c (grokclassfn): Likewise.
17052
17053         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
17054
17055         * decl2.c (lang_decode_option): Don't set default message length
17056         here.
17057         * lex.c (lang_init_options): Set it here.
17058
17059 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
17060
17061         Make DECL_CONTEXT mean the class in which a member function was
17062         declared, even for a virtual function.
17063         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
17064         (DECL_FRIEND_CONTEXT): New macro.
17065         (DECL_REAL_CONTEXT): Remove.
17066         (SET_DECL_FRIEND_CONTEXT): Likewise.
17067         (DECL_VIRTUAL_CONTEXT): Adjust.
17068         (DECL_CLASS_SCOPE_P): Use TYPE_P.
17069         (add_friends): Remove.
17070         (hack_decl_function_context): Likewise.
17071         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
17072         CP_DECL_CONTEXT.
17073         (build_over_call): Fix indentation.  Use DECL_CONTEXT
17074         instead of DECL_CLASS_CONTEXT.
17075         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
17076         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
17077         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
17078         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
17079         (build_base_field): Likewise.
17080         (finish_struct_1): Likewise.
17081         (build_self_reference): Likewise.
17082         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
17083         DECL_REAL_CONTEXT.
17084         (pushtag): Use decl_function_context, not
17085         hack_decl_function_context.
17086         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
17087         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
17088         (pushdecl): Remove bogus code.
17089         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
17090         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
17091         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
17092         Use decl_function_context, nothack_decl_function_context.
17093         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
17094         (grokdeclarator): Likewise.  Use decl_function_context, not
17095         hack_decl_function_context.
17096         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
17097         (start_function): Use DECL_FRIEND_CONTEXT, not
17098         DECL_CLASS_CONTEXT.  Use decl_function_context, not
17099         hack_decl_function_context.
17100         (finish_function): Use decl_function_context, not
17101         hack_decl_function_context.
17102         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
17103         DECL_CLASS_CONTEXT.
17104         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
17105         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
17106         (grokfield): Likewise.
17107         (finish_builtin_type): Likewise.
17108         (finish_vtable_vardec): Use decl_function_context, not
17109         hack_decl_function_context.
17110         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
17111         (start_static_initialization_or_destruction): Likewise.
17112         (finish_static_initialization_or_destruction): Likewise.
17113         (mark_used): Adjust logic for deciding when to synthesize methods.
17114         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
17115         DECL_REAL_CONTEXT.
17116         * error.c (dump_function_decl): Use DECL_CONTEXT, not
17117         DECL_CLASS_CONTEXT.
17118         * friend.c (is_friend): Likewise.
17119         (add_friends): Remove.
17120         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
17121         * lex.c (begin_definition_of_inclass_inline): Use
17122         decl_function_context, not hack_decl_function_context.
17123         (process_next_inline): Likewise.
17124         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
17125         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
17126         DECL_CLASSS_CONTEXT.
17127         (hack_identifier): Likewise.
17128         (synthesize_method):  Use decl_function_context, not
17129         hack_decl_function_context.
17130         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
17131         DECL_REAL_CONTEXT.
17132         (is_member_template): Use decl_function_context, not
17133         hack_decl_function_context.  Use DECL_CONTEXT, not
17134         DECL_CLASS_CONTEXT.
17135         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
17136         DECL_CLASS_CONTEXT.
17137         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
17138         DECL_REAL_CONTEXT.
17139         (push_template_decl_real): Likewise.
17140         (instantiate_class_template): Don't call add_friends.
17141         (tsubst_default_argument): Use DECL_CONTEXT, not
17142         DECL_REAL_CONTEXT.
17143         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
17144         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
17145         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
17146         DECL_CLASS_CONTEXT.
17147         * repo.c (repo_inline_used): Likewise.
17148         * search.c (current_scope): Adjust for new _CONTEXT macros.
17149         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
17150         DECL_REAL_CONTEXT.
17151         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
17152         (lookup_fnfields_here):Likewise.
17153         (check_final_overrider): Likewise.
17154         (init_vbase_pointers): Likewise.
17155         (virtual_context): Likewise.
17156         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
17157         (expand_body): Use decl_function_context, not
17158         hack_decl_function_context.
17159         * tree.c (hack_decl_function_context): Remove.
17160         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
17161         DECL_CLASS_CONTEXT.
17162         * typeck2.c (error_not_base_type): Likewise.
17163
17164 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
17165
17166         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
17167
17168 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17169
17170         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
17171
17172 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
17173
17174         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
17175
17176 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
17177
17178         * decl2.c (lang_decode_option): Enable automatic line wrapping.
17179
17180 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
17181
17182         * parse.y (frob_specs): Split out...
17183         (parse_decl): From here.
17184         (fn.def2): Call initial_deferred_type_access_control.
17185         (after_type_component_declarator0): Call frob_specs.
17186         (notype_component_declarator0): Likewise.
17187         * search.c (friend_accessible_p): Nested classes are friends of their
17188         enclosing classes.
17189
17190 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
17191
17192         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
17193         used to create an implicit temporary.
17194
17195         * class.c (dfs_modify_vtables): Tweak calculation of functions to
17196         override.
17197
17198 2000-02-08  Nathan Sidwell  <nathan@acm.org>
17199
17200         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
17201         strip array element qualifiers too.
17202
17203 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
17204
17205         * decl.c (store_parm_decls): Don't build cleanups for parameters
17206         while processing_template_decl.
17207
17208 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
17209
17210         * cp-tree.h (struct saved_scope): Add incomplete field.
17211         (namespace_scope_incomplete): New macro.
17212         * decl.c (pushdecl): Use it.
17213         (hack_incomplete_structures): Use it.  See through artificial
17214         binding levels.
17215         (mark_saved_scope): Mark it.
17216
17217         Implement access control for nested types.
17218         * search.c (type_access_control): New fn.
17219         (accessible_p): Now we do perform access control for types.
17220         * semantics.c (deferred_type_access_control): New fn.
17221         (initial_deferred_type_access_control): New fn.
17222         (begin_function_definition): Call it.  Add lookups parm.
17223         * decl.c (struct binding_level): Add this_class field.
17224         (pushlevel_class): Set it.
17225         (mark_binding_level): Mark it.
17226         (lookup_name_real): Use it.  Call type_access_control.
17227         (mark_saved_scope): Mark lookups field.
17228         * cp-tree.h (flagged_type_tree): Add lookups field.
17229         (struct saved_scope): Add lookups field.
17230         (type_lookups): New macro.
17231         * parse.y (declmods): Now <ftype>.
17232         (parse_decl): Add lookups parm.  Call
17233         initial_deferred_type_access_control.
17234         (lang_extdef): Clear type_lookups.
17235         (typed_declspecs, declmods, typespec): Set lookups field.
17236         (initdcl): Call deferred_type_access_control.
17237         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
17238         component_decl_1, named_parm): Adjust.
17239         * friend.c (is_friend): Nested classes are friends of their
17240         enclosing classes.
17241
17242         * class.c (currently_open_derived_class): New fn.
17243         * method.c (hack_identifier): Use it.
17244
17245         * lex.c (do_identifier): Remove obsolete code.
17246
17247         * parse.y (typed_typespecs): Propagate new_type_flag properly.
17248
17249 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
17250
17251         * tinfo.h: Remove apostrophes from C++ comment (xgettext
17252         thinks this file is plain C).
17253
17254 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17255
17256         * Makefile.in (call.o): Depend on $(EXPR_H).
17257
17258         * call.c: Include "expr.h".
17259
17260         * class.c (dump_class_hierarchy): Add prototype.
17261
17262         * search.c (dfs_get_pure_virtuals): Likewise.
17263
17264 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
17265
17266         * parse.y (simple_stmt): Allow :: token in asm parameter list.
17267         * parse.c: Rebuilt.
17268
17269 2000-01-31  Jim Wilson  <wilson@cygnus.com>
17270
17271         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
17272         Store it in DECL_FCONTEXT.
17273         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
17274
17275 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
17276
17277         * tinfo.h (old abi): #include "tconfig.h".
17278         * tinfo.cc (convert_to_base): Move into old abi section.
17279
17280 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
17281
17282         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
17283         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
17284         (BINFO_PRIMARY_BINFO): New macro.
17285         (BF_DELTA): Rename to ...
17286         (BV_DELTA): ... this.
17287         (BF_VCALL_INDEX): Rename to ...
17288         (BV_VCALL_INDEX): ... this.
17289         (BF_FN): Rename to ...
17290         (BV_FN): ... this.
17291         * class.c (build_vbase_path): Adjust for changes to reverse_path.
17292         (set_rtti_entry): Rename BF_ macros to BV_ variants.
17293         (modify_vtable_entry): Simplify.
17294         (add_virtual_function): Rename BF_ macros to BV_ variants.
17295         (build_vtable_initializer): Likewise.
17296         (get_class_offset_1): Remove.
17297         (dfs_get_class_offset): Likewise.
17298         (get_class_offset): Likewise.
17299         (dfs_find_final_overrider): New function.
17300         (find_final_overrider): Likewise.
17301         (modify_one_vtable): Remove.
17302         (dfs_find_base): New function.
17303         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
17304         find_final_overrider.
17305         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
17306         virtuals.
17307         (dfs_fixup_vtable_deltas): Remove.
17308         (override_one_vtable): Remove.
17309         (merge_overrides): Likewise.
17310         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
17311         unreal chilren of virtual bases.
17312         (finish_struct_1): Don't use merge_overrides.  Don't use
17313         dfs_fixup_vtable_deltas.
17314         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
17315         BINFOs.
17316
17317 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
17318             Jason Merrill  <jason@yorick.cygnus.com>
17319
17320         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
17321
17322 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
17323
17324         * exception.cc (__throw_bad_typeid): Add missing std::.
17325
17326 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17327
17328         * cp-tree.h (make_thunk): PROTO -> PARAMS.
17329
17330 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
17331
17332         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
17333
17334         Runtime support for new-abi rtti.
17335         * inc/typeinfo (type_info::operator!=): Define in class.
17336         (type_info::before, type_info::name, type_info::operator==,
17337         type_info::operator!=): Define new ABI implementations.
17338         (type_info::is_pointer_p, type_info::is_function_p): Declare
17339         new virtual functions.
17340         (type_info::do_catch, type_info::do_upcast): Likewise.
17341
17342         * tinfo.h (__base_class_info): Define new class.
17343         (__class_type_info): Likewise.
17344         (__si_class_type_info): Likewise.
17345         (__vmi_class_type_info): Likewise.
17346         (__dynamic_cast): Prototype.
17347
17348         * tinfo.cc: Conditionalize old and new rtti mechanisms.
17349         (type_info::is_pointer_p): Define new function.
17350         (type_info::is_function_p): Likewise.
17351         (type_info::do_catch): Likewise.
17352         (type_info::do_upcast): Likewise.
17353         (vtable_prefix): New structure for vtable access.
17354         (adjust_pointer): Define new template function.
17355         (contained_p, public_p, virtual_p, contained_public_p,
17356         contained_nonpublic_p, contained_nonvirtual_p): Define new
17357         functions.
17358         (nonvirtual_base_type): New local variable.
17359         (__class_type_info::~__class_type_info): Define.
17360         (__si_class_type_info::~__si_class_type_info): Likewise.
17361         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
17362         (__class_type_info::do_catch): Define new function.
17363         (__class_type_info::do_upcast): Likewise.
17364         (__class_type_info::find_public_src): Likewise.
17365         (__class_type_info::do_find_public_src): Likewise.
17366         (__si_class_type_info::do_find_public_src): Likewise.
17367         (__vmi_class_type_info::do_find_public_src): Likewise.
17368         (__class_type_info::do_dyncast): Likewise.
17369         (__si_class_type_info::do_dyncast): Likewise.
17370         (__vmi_class_type_info::do_dyncast): Likewise.
17371         (__class_type_info::do_upcast): Likewise.
17372         (__si_class_type_info::do_upcast): Likewise.
17373         (__vmi_class_type_info::do_upcast): Likewise.
17374         (__dynamic_cast): Likewise.
17375
17376         * tinfo2.cc (__fundamental_type_info): Define new class.
17377         (__pointer_type_info): Likewise.
17378         (__reference_type_info): Likewise.
17379         (__array_type_info): Likewise.
17380         (__function_type_info): Likewise.
17381         (__enum_type_info): Likewise.
17382         (__ptr_to_member_type_info): Likewise.
17383         (__fundamental_type_info::~__fundamental_type_info): Define.
17384         (__pointer_type_info::~__pointer_type_info): Likewise.
17385         (__reference_type_info::~__reference_type_info): Likewise.
17386         (__array_type_info::~__array_type_info): Likewise.
17387         (__function_type_info::~__function_type_info): Likewise.
17388         (__enum_type_info::~__enum_type_info): Likewise.
17389         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
17390         (__pointer_type_info::do_catch): Define new function.
17391         (__ptr_to_member_type_info::do_catch): Define new function.
17392
17393         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
17394         (__is_pointer): Likewise.
17395
17396         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
17397
17398 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
17399
17400         * cp/class.c (build_vtable): Rename to build_primary_vtable.
17401         (prepare_fresh_vtable): Rename to build_secondary_vtable.
17402         (make_new_vtable): New function.
17403         (modify_vtable_entry): Handle generation of new vtables correctly.
17404         (modify_one_vtable): Remove unused parameter.
17405         (dfs_fixup_vtable_deltas): Likewise.
17406         (override_one_vtable): Use build_secondary_vtable.
17407         (finish_struct_1): Use build_primary_vtable and
17408         build_secondary_vtable.
17409
17410 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
17411
17412         * cp/decl.c: Adjust variable names, comments, help strings.
17413
17414 2000-01-29  Nathan Sidwell  <nathan@acm.org>
17415
17416         * new2.cc (operator delete[]): Use operator delete, don't assume
17417         implementation.
17418
17419 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
17420
17421         * class.c (build_vtbl_initializer): Add argument to
17422         build_vtable_entry call.
17423
17424 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
17425
17426         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
17427         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
17428         (BF_DELTA): New macro.
17429         (BF_VCALL_INDEX): Likewise.
17430         (BF_FN): Likewise.
17431         (THUNK_VCALL_OFFSET): Likewise.
17432         (make_thunk): Change prototype.
17433         * class.c (build_vtable_entry): Integrate
17434         build_vtable_entry_for_fn.  Handle vcall indices.
17435         (build_vtable_entry_for_fn): Remove.
17436         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
17437         BF_VCALL_INDEX, BF_FN.
17438         (modify_vtable_entry): Integrate common code from
17439         modify_one_vtable and dfs_fixup_vtable_deltas.
17440         (add_virtual_function): Set BF_VCALL_INDEX.
17441         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
17442         and BF_FN.
17443         (modify_one_vtable): Simplify.
17444         (dfs_fixup_vtable_deltas): Likewise.
17445         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
17446         * method.c (make_thunk): Handle vcall indices.
17447
17448 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
17449
17450         Compiler side new abi rtti (not enabled).
17451         * cp-tree.h (new_abi_rtti_p): New macro.
17452         (emit_support_tinfos): Prototype new function.
17453         (tinfo_decl_p): Likewise.
17454         (emit_tinfo_decl): Likwise.
17455         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
17456         macros.
17457         (doing_runtime): New local static.
17458         (init_rtti_processing): Add new-abi initializer.
17459         (get_tinfo_decl): Add new-abi logic.
17460         (tinfo_from_decl): Likewise.
17461         (build_dynamic_cast_1): Likewise.
17462         (qualifier_flags): New static function.
17463         (tinfo_base_init): Likewise.
17464         (generic_initializer): Likewise.
17465         (ptr_ref_initializer): Likewise.
17466         (ptmd_initializer): Likewise.
17467         (class_hint_flags): Likewise.
17468         (class_initializer): Likewise.
17469         (synthesize_tinfo_var): Likewise.
17470         (create_real_tinfo_var): Likewise.
17471         (create_pseudo_type_info): Likewise.
17472         (get_vmi_pseudo_type_info): Likewise.
17473         (create_tinfo_types): Likewise.
17474         (emit_support_tinfos): New global function.
17475         (tinfo_decl_p): New global predicate.
17476         (emit_tinfo_decl): New global function.
17477         * class.c (set_rtti_entry): Generalize for old and new rtti.
17478         (build_vtbl_initializer): Likewise.
17479         * decl2.c (finish_file): Likewise.
17480
17481 2000-01-27  Jim Wilson  <wilson@cygnus.com>
17482
17483         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
17484         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
17485
17486 2000-01-27  Mike Stump  <mrs@wrs.com>
17487
17488         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
17489         for scopes.
17490
17491 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
17492
17493         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
17494
17495 2000-01-26  J"orn Rennecke <amylaar@cygnus.co.uk>
17496
17497         * optimize.c (calls_setjmp_r): Supply new argument
17498         to special_function_p.
17499
17500 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17501
17502         * call.c: PROTO -> PARAMS.
17503         * class.c: Likewise.
17504         * cp-tree.h: Likewise.
17505         * cvt.c: Likewise.
17506         * decl.c: Likewise.
17507         * decl.h: Likewise.
17508         * decl2.c: Likewise.
17509         * dump.c: Likewise.
17510         * errfn.c: Likewise.
17511         * error.c: Likewise.
17512         * except.c: Likewise.
17513         * expr.c: Likewise.
17514         * init.c: Likewise.
17515         * input.c: Likewise.
17516         * lex.c: Likewise.
17517         * lex.h: Likewise.
17518         * method.c: Likewise.
17519         * optimize.c: Likewise.
17520         * parse.y: Likewise.
17521         * pt.c: Likewise.
17522         * repo.c: Likewise.
17523         * rtti.c: Likewise.
17524         * search.c: Likewise.
17525         * semantics.c: Likewise.
17526         * spew.c: Likewise.
17527         * tree.c: Likewise.
17528         * typeck.c: Likewise.
17529         * typeck2.c: Likewise.
17530         * xref.c: Likewise.
17531
17532 2000-01-25  Richard Henderson  <rth@cygnus.com>
17533
17534         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
17535
17536 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
17537
17538         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
17539         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
17540         (struct vcall_offset_data_s): New type.
17541         (dfs_vcall_offset_queue_p): New function.
17542         (dfs_build_vcall_offset_vtbl_entries): Likewise.
17543         (build_vcall_offset_vtbl_entries): Likewise.
17544         (layout_vtable_decl): Likewise.
17545         (num_vfun_entries): Likewise.
17546         (num_extra_vtbl_entries): Add the entries for vcall offsets.
17547         (build_vtbl_initializer): Likewise.
17548         (dfs_finish_vtabls): Use layout_vtable_decl.
17549         (modify_one_vtables): Always duplicate vtables under the new ABI.
17550         (finish_struct_1): Use layout_vtable_decl.
17551
17552 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17553
17554         * decl.c (member_function_or_else): Change third arg from a format
17555         specifier to an `enum overload_flags'.  Callers changed.
17556
17557 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
17558
17559         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
17560         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
17561         build_const_cast, get_delta_difference, check_return_expr): Avoid
17562         ANSI string concatenation usage.
17563
17564 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
17565
17566         * class.c (layout_class_type): Put the fields required to make a
17567         class non-empty at the end, not the beginning, of the TYPE_FIELDs
17568         list.
17569
17570 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
17571
17572         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
17573         template.
17574
17575         * decl2.c (mark_used): Do instantiate inlines that have been
17576         explicitly instantiated.
17577
17578 2000-01-24  Richard Henderson  <rth@cygnus.com>
17579
17580         * call.c (build_over_call): Use expand_tree_builtin.
17581         * typeck.c (build_function_call_real): Likewise.
17582         (build_binary_op_nodefault): Handle unordered compares.
17583
17584 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
17585
17586         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
17587         cp_tree_index values.
17588         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
17589         New global node #defines for them.
17590         * rtti.c (call_void_fn): Replace with ...
17591         (build_runtime_decl): ... new static function.
17592         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
17593         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
17594         (build_dynamic_cast_1): Always produce correctly typed result.
17595         Explicitly produce type_info addresses. Use dynamic_cast_node.
17596         * exception.cc (__throw_bad_cast): Return `void *'.
17597         (__throw_bad_typeid): Return `const type_info &'.
17598
17599 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
17600
17601         * cp-tree.h (get_vtable_decl): Prototype new function.
17602         * class.c (get_vtable_decl): New function. Broken out from ...
17603         (build_vtable): ... here. Use it.
17604         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
17605         by get_vtable_decl.
17606
17607 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
17608
17609         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
17610         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
17611         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
17612         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
17613         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
17614         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
17615         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
17616         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
17617         (CPTI_TINFO_VAR_ID): New enumeration.
17618         (__tp_desc_type_node, __access_mode_type_node,
17619         __bltn_desc_type_node, __user_desc_type_node,
17620         __class_desc_type_node, __ptr_desc_type_node,
17621         __attr_desc_type_node, __func_desc_type_node,
17622         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
17623         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
17624         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
17625         enum_desc_type_node, class_desc_type_node,
17626         si_class_desc_type_node, vmi_class_desc_type_node,
17627         ptmd_desc_type_node, base_desc_type_node): New #defines.
17628         (tinfo_fn_id, tinfo_fn_type): Rename to ...
17629         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
17630         (tinfo_var_id): New enumeration.
17631         (DECL_TINFO_FN_P): Augment comment.
17632         * decl.c (cp_global_trees): Adjust documentation.
17633         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
17634         tinfo_decl_type and tinfo_var_id.
17635         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
17636         (build_typeid): Remove unused variable.
17637         (get_tinfo_var): Use tinfo_var_id.
17638         (tinfo_name): New static function.
17639         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
17640         (tinfo_from_decl): Likewise.
17641         (get_base_offset): New static function, broken out of
17642         expand_class_desc.
17643         (expand_si_desc): Use tinfo_name.
17644         (expand_class_desc): Likewise. Lose local static variable.
17645         Use base_desc_type_node. Use get_base_offset.
17646         (expand_ptr_desc): Use tinfo_name.
17647         (expand_attr_desc): Likewise.
17648         (expand_generic_desc): Likewise.
17649
17650         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
17651         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
17652
17653 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
17654
17655         * cp-tree.h (__eprintf): Remove declaration.
17656         * tree.c (__eprintf): Remove definition.
17657
17658 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
17659             Mark Mitchell  <mark@codesourcery.com>
17660
17661         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
17662         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
17663
17664 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
17665
17666         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
17667
17668 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
17669
17670         * cp-tree.h (register_dtor_fn): New function.
17671         * decl.c (destroy_local_static): Rename to ...
17672         (register_dtor_fn): ... this.  Give it external linkage.
17673         (expand_static_init): Use it.
17674         * decl2.c (do_static_initialization): Likewise, if using
17675         __cxa_atexit.
17676         (do_static_destruction): Check that __cxa_atexit is not in use.
17677         (finish_file): Don't call do_static_destruction if using
17678         __cxa_atexit.
17679
17680         * typeck.c (convert_arguments): Restore two-message error
17681         reporting.
17682
17683 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
17684
17685         Remap dynamic cast hint values to be consistent across ABIs.
17686         * search.c (dynamic_cast_base_recurse): Remap generated value.
17687         (get_dynamic_cast_base_type): Adjust documentation.
17688         * tinfo.h (__user_type_info::dyncast): Likewise.
17689         (__user_type_info::find_public_subobj): Remap BOFF meaning.
17690         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
17691         (__class_type_info::do_dyncast): Likewise.
17692         (__class_type_info::do_find_public_subobj): Likewise.
17693         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
17694
17695 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
17696
17697         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
17698
17699         * typeck2.c (incomplete_type_error): Restore previous
17700         cp_error and cp_error_at call sequence.
17701
17702 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
17703
17704         * class.c (dump_class_hierarchy): Make format agree with argument;
17705         cast pointer to unsigned long and print with %lx.
17706
17707 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
17708
17709         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
17710
17711         * typeck.c (composite_pointer_type, common_type,
17712         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
17713         build_function_call_real, convert_arguments,
17714         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
17715         build_unary_op, mark_addressable, build_compound_expr,
17716         build_static_cast, build_reinterpret_cast, build_const_cast,
17717         build_c_cast, build_modify_expr, get_delta_difference,
17718         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
17719         'ISO C++'.  Fusion consecutive calls to diagnostic message routines
17720         into a single one.
17721         * typeck2.c (readonly_error, abstract_virtuals_error,
17722         process_init_constructor, check_for_new_type): Likewise.
17723
17724 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
17725
17726         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
17727         VAR_DECLs.
17728
17729 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
17730
17731         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
17732         (build_x_typeid): Likewise.
17733         (get_tinfo_fn): Likewise.
17734         (get_tinfo_fn_unused): Rename to ...
17735         (get_tinfo_decl): ... here.
17736         * rtti.c (build_headof): Replace logic error with assertion.
17737         (get_tinfo_fn_dynamic): Rename to ...
17738         (get_tinfo_decl_dynamic): ... here. Make static. Use
17739         complete_type_or_else.
17740         (build_x_typeid): Move into ...
17741         (build_typeid): ... here. Adjust call to
17742         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
17743         throw_bad_typeid expression.
17744         (get_tinfo_fn_unused): Rename to ...
17745         (get_tinfo_decl): ... here. Adjust comment.
17746         (get_tinfo_fn): Delete.
17747         (tinfo_from_decl): New static function.
17748         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
17749         (get_typeid): Use complete_type_or_else.
17750         (build_dynamic_cast_1): Adjust calls to
17751         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
17752         * parse.y (primary): Adjust call to build_typeid.
17753         * except.c (build_eh_type_type_ref): Adjust call to
17754         get_tinfo_decl. Mark as used.
17755         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
17756         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
17757         * parse.c: Regenerated.
17758
17759 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
17760
17761         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
17762         calling convention.
17763         (resolves_to_fixed_type_p): Document calling convention.
17764         * rtti.c (build_x_typeid): Initialize NONNULL.
17765
17766         * cp-tree.h (build_shared_int_cst): New function.
17767         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
17768         * class.c (modify_vtable_entry): Likewise.
17769         (add_virtual_function): Split out code to generated shared
17770         INTEGER_CSTs to build_share_int_cst.
17771         (modify_all_vtables): Handle all the overridden functions here.
17772         Add overridden functions from non-primary virtual bases to the
17773         primary vtable.
17774         (finish_struct_1): Adjust call to modify_all_vtables.  Add
17775         overridden functions from non-primary bases to the vtable.
17776         * tree.c (build_shared_int_cst): New function.
17777
17778         * cp-tree.h (scratchalloc): Remove.
17779         (build_scratch_list): Likewise.
17780         * call.c (convert_class_to_reference): Replace build_scratch_list
17781         and build_expr_list with build_tree_list.
17782         (add_candidate): Replace scratchalloc with expralloc.  Note memory
17783         leak.
17784         (build_user_type_conversion_1):  Replace build_scratch_list
17785         and build_expr_list with build_tree_list.
17786         (build_new_op): Likewise.
17787         (build_op_delete_call): Likewise.
17788         (convert_like): Likewise.
17789         * cvt.c (ocp_convert): Likewise.
17790         * decl.c (start_decl): Likewise.
17791         (start_function): Likewise.
17792         (finish_destructor_body): Likewise.
17793         (maybe_build_cleanup_1): Likewise.
17794         * decl2.c (reparse_decl_as_expr): Likewise.
17795         * init.c (perform_member_init): Likewise.
17796         (expand_cleanup_for_base): Likewise.
17797         (build_builtin_delete_call): Likewise.
17798         (build_new_1): Likewise.
17799         (build_delete): Likewise.
17800         * method.c (do_build_assign_ref): Likewise.
17801         * parse.y (already_scoped_stmt): Likewise.
17802         (nontrivial_exprlist): Likewise.
17803         (net_initializer): Likewise.
17804         (initlist): Likewise.
17805         * parse.c: Regenerated.
17806         * rtti.c (build_x_typeid): Likewise.
17807         (build_dynamic_cast_1): Likewise.
17808         * typeck.c (build_x_compound_expr): Likewise.
17809         (build_static_cast): Likewise.
17810         (build_modify_expr): Likewise.
17811
17812         * cp-tree.h (DECL_VINDEX): Add documentation.
17813         * class.c (build_vtable_entry): Likewise.
17814         (start_vtable): Add comment.
17815         (add_virtual_function): Replace pending_hard_virtuals with
17816         overridden_virtuals and pending_virtuals with new_virtuals.
17817         Replace redundant assignments with assertions.
17818         (check_for_override): Add comment.
17819         (check_bases_and_members): Replace pending_hard_virtuals with
17820         overridden_virtuals and pending_virtuals with new_virtuals.
17821         (create_vtbl_ptr): Likewise.
17822         (layout_class_type): Likewise.
17823         (finish_struct_1): Likewise.  Add comments.
17824
17825 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
17826
17827         * class.c (finish_struct_1): Replace redundant code with
17828         assertions.
17829
17830         * cp-tree.h (flag_new_abi): Move.
17831         (flag_use_cxa_atexit): Likewise.
17832         (flag_honor_std): Likewise.
17833         (flag_rtti): Likewise.
17834         (vbase_offsets_in_vtable_p): Define.
17835         (vptrs_present_everywhere_p): Likewise.
17836         (TYPE_CONTAINS_VPTR_P): Likewise.
17837         (dfs_walk_real): Declare.
17838         * class.c (build_vbase_pointer_fields): Check
17839         vbase_offsets_in_vtable_p.
17840         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
17841         BINFO_VPTR_FIELD.
17842         (build_vbase_offset_vtbl_entries): Simplify.
17843         (build_vbase_offset_vtbl_entries): Adjust.
17844         (build_vbase_pointer): Add ability to look up vbase offsets in
17845         vtable.
17846         (start_vtable): New function.
17847         (add_virtual_function): Use it.
17848         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
17849         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
17850         (build_vtbl_initializer): Take the type of the complete object as
17851         input.  Use it to correctly calculate vbase offsets.
17852         (dfs_finish_vtbls): Pass the complete type to
17853         build_vtbl_initializer.
17854         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
17855         (create_vtable_ptr): Create a vtable even if there are no
17856         new virtual functions, under the new ABI.
17857         (finish_struct_1): Likewise.
17858         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
17859         * decl.c (exapnd_static_init): Remove call to
17860         preserve_initializer.
17861         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
17862         vtables.
17863         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
17864         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
17865         (construct_virtual_bases): Don't initialize virtual base pointers
17866         under the new ABI.
17867         (build_aggr_init): Clean up comment.
17868         (expand_aggr_init_1): Likewise.
17869         * rtti.c (expand_class_desc): Store the virtual function table
17870         index where the vbase offset lives in the offset field.
17871         * search.c (dfs_walk_real): Make it global.
17872         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
17873         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
17874
17875         * tinfo.h (USItype): Make it signed under the new ABI.
17876         * tinfo.cc (convert_to_base): New function.  Encapsulate base
17877         conversion logic here.
17878         (__class_type_info::do_upcast): Use it.
17879         (__class_type_info::do_dyncast): Likewise.
17880         (__class_type_info::do_find_public_subobj): Likewise.
17881
17882         * init.c (construct_virtual_bases): Don't look up the addresses of
17883         virtual bases at run-time.
17884
17885         * class.c (build_vbase_pointer): Relocate.
17886         (build_vbase_pointer_fields): Likewise.
17887         (dfs_build_vbase_offset_vtbl_entries): Likewise.
17888         (build_vbase_offset_vtbl_entries): Likewise.
17889
17890         * decl.c (init_decl_processing): Complain if -fnew-abi
17891         -fno-vtable-thunks is used.
17892
17893         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
17894         flag_new_abi.
17895
17896 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
17897
17898         * cp-tree.h (num_extra_vtbl_entries): New function.
17899         (size_extra_vtbl_entries): Likewise.
17900         (dfs_vtable_path_unmark): Likewise.
17901         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
17902         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
17903         * class.c (num_extra_vtbl_entries): New function.
17904         (size_extra_vtbl_entries): Likewise.
17905         (dfs_build_vbase_offset_vtbl_entries): New function.
17906         (build_vbase_offset_vtbl_entries): Likewise.
17907         (build_vtbl_initializer): Use it.
17908         (finish_struct_1): Adjust vtable sizes (using
17909         num_extra_vtbl_entries).
17910         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
17911         THUNK_DECL is non-NULL before expanding it.
17912         * init.c (expand_virtual_init): Adjust the vtable pointer by
17913         size_extra_vtbl_entries before storing it.
17914         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
17915         Handle TREE_LIST parameters here, not in the dfs_* functions.
17916         (dfs_unmarked_real_bases_queue_p): Adjust.
17917         (dfs_marked_real_bases_queue_p): Likewise.
17918         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
17919         (dfs_vtable_path_marked_real_bases_queue_p): New function.
17920         (dfs_vtable_path_unmark): Likewise.
17921
17922 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
17923
17924         * optimize.c (copy_body_r): Clear the operand three of a
17925         TARGET_EXPR when copying it.
17926
17927 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17928
17929         * method.c (build_decl_overload_real): Check whether we are in ::
17930         before returning __builtin_new/delete.
17931
17932 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
17933
17934         * pt.c (tsubst_friend_function): Improve comment.
17935         (instantiate_decl): Avoid crashing when a "nested" function is
17936         instantiated from the top level.
17937
17938         * dump.c (dqeueue_and_dump): Dump
17939         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
17940
17941 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17942
17943         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
17944
17945 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
17946
17947         * g++spec.c (lang_specific_driver): Add -fnew-abi if
17948         ENABLE_NEW_GXX_ABI defined.
17949         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
17950         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
17951         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
17952
17953 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
17954
17955         * decl.c (start_cleanup_fn): Call pushdecl.
17956
17957         * call.c (convert_class_to_reference): Fix typos.
17958         (build_conditional_expr): Handle errors gracefully.
17959         * class.c (push_nested_class): Likewise.
17960         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
17961         (DECL_THIS_EXTERN): Use it.
17962         (DECL_THIS_STATIC): Likewise.
17963         * cvt.c (convert_to_void): Handle errors gracefully.
17964         (build_expr_type_conversion): Likewise.
17965         * decl.c (maybe_push_decl): Likewise.
17966         (start_decl_1): Likewise.
17967         (require_complete_types_for_parms): Likewise.
17968         * parse.y (structsp): Likewise.
17969         (base_class): Likewise.
17970         * parse.c: Regenerated.
17971         * pt.c (finish_member_template_decl): Likewise.
17972         * typeck.c (decay_conversion): Likewise.
17973
17974         * cp-tree.h (dfs_skip_vbases): New function.
17975         (find_vbase_instance): Likewise.
17976         * class.c (determine_primary_base): Allow a nearly empty base to
17977         serve as a primary base class under the new ABI.
17978         (get_class_offset_1): Rename to ...
17979         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
17980         messages here.
17981         (get_class_offset): Use it.  Issue error messages here.
17982         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
17983         find the right copies of virtual bases.
17984         (fixup_vtable_deltas1): Rename to ...
17985         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
17986         bases as primary bases.
17987         (fixup_vtable_deltas): Remove.
17988         (override_one_vtable): Handle virtual bases as primary bases.
17989         (merge_overrides): Likewise.
17990         (finish_struct_1): Likewise.
17991         (dump_class_hierarchy): Dump primary-ness of bases as well.
17992         * search.c (mark_primary_bases): Use a pre-order traversal to
17993         handle primary virtual bases.
17994         (dfs_skip_vbases): New fiunction.
17995         (expand_upcast_fixups): Adjust to handle primary virtual bases.
17996         (fixup_virtual_upcast_offsets): Likewise.
17997         (fixup_all_virtual_upcast_offsets): Likewise.
17998         (dfs_find_vbase_instances): New function.
17999         (find_vbase_instance): Likewise.
18000
18001 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
18002
18003         * lex.c (DIR_SEPARATOR): Delete macro.
18004
18005 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
18006
18007        * decl2.c (lang_decode_option): Handle automatic line wrapping
18008        option.
18009
18010 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
18011
18012         * friend.c (do_friend): Don't resolve scopes when processing
18013         template declarations, even if the qualifying scope doesn't
18014         involve template parameters.
18015
18016 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
18017
18018         * class.c (dfs_modify_vtables_queue_p): Remove.
18019         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
18020         and dfs_marked_real_bases_queue_p instead of
18021         dfs_modify_vtables_queue_p.
18022
18023         * class.c (build_vbase_path): Simplify.
18024         (dfs_propagate_binfo_offsets): New function.
18025         (propagate_binfo_offsets): Use it.
18026         (remove_base_field): Simplify.
18027         (dfs_set_offset_for_vbases): Remove.
18028         (dfs_set_offset_for_shared_vbases): New function.
18029         (dfs_set_offset_for_unshared_vbases): Likewise.
18030         (layout_virtual_bases): Use them.
18031         (layout_basetypes): Don't call propagate_binfo_offsets.
18032         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
18033         for the vbases.
18034
18035         * class.c (build_base_field): New function, split out from ...
18036         (build_base_fields): ... here.  Use it.  Allocate primary bases
18037         first, under the new ABI.
18038         (get_vtable_entry): Remove.
18039         (remove_base_field): New function, split out from ...
18040         (remove_base_fields): ... here.  Adjust since primary bases come
18041         first under the new ABI.
18042
18043         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
18044         (initialize_vtbl_ptrs): New function.
18045         (expand_indirect_vtbls_init): Change prototype.
18046         (convert_pointer_to_vbase): Declare.
18047         * init.c (expand_direct_vtbls_init): Remove.
18048         (dfs_initialize_vtbl_ptrs): New function.
18049         (initialize_vtbl_ptrs): Likewise.
18050         (emit_base_init): Use initialize_vtbl_ptrs.
18051         * search.c (convert_pointer_to_vbase): Make it global.
18052         (expand_indirect_vtbls_init): Remove vtable initialization code.
18053         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
18054
18055         * class.c (dfs_finish_vtbls): New function.
18056         (finish_vtbls): Use it.
18057         (dump_class_hierarchy): New function.
18058
18059         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
18060         (BINFO_VBASE_PRIMARY_P): New macro.
18061         (BINFO_VIRTUALS): Add to documentation.
18062         (SET_BINFO_PRIMARY_MARKED_P): Remove.
18063         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
18064         (dfs_mark_primary_bases_queue_p): Likewise.
18065         (dfs_unmarked_real_bases_queue_p): New function.
18066         (dfs_marked_real_bases_queue_p): Likewise.
18067         * search.c (dfs_mark_primary_bases): Adjust.
18068         (mark_primary_bases): Likewise.
18069         (get_shared_vbase_if_not_primary): New function.
18070         (dfs_unmarked_real_bases_queue_p): Likewise.
18071         (dfs_marked_real_bases_queue_p): Likewise.
18072         (dfs_get_pure_virtuals): Simplify.
18073         (get_pure_virtuals): Likewise.
18074
18075 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18076
18077         * lex.c: Include tm_p.h.
18078
18079 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
18080
18081         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
18082
18083 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
18084
18085         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
18086         * pt.c (instantiate_decl): Defer comdat templates that might not be
18087         needed.
18088
18089         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
18090         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
18091         (finish_file): Likewise.
18092
18093         * decl2.c (import_export_class): Undo 12/14 change.
18094
18095         * error.c (dump_decl): operator new, not operatornew.
18096
18097         * class.c (field_decl_cmp): A nontype is "greater" than a type.
18098         * search.c (lookup_field_1): Look for the last field with the
18099         desired name.
18100
18101 2000-01-05  Nathan Sidwell  <nathan@acm.org>
18102
18103         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
18104         FUNCTION_DECL.
18105
18106 2000-01-05  Nathan Sidwell  <nathan@acm.org>
18107
18108         * typeck.c (build_static_cast): Don't strip target qualifiers
18109         when casting from a class.
18110
18111 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18112
18113         * class.c (warn_hidden): Initialize variable `fndecl'.
18114
18115 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
18116
18117         * decl.c (flag_isoc9x): New variable to be able to use code in
18118         c-common.c.  For now always zero.
18119
18120 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
18121
18122         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
18123         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
18124         or unshare_base_binfos for virtual bases here.
18125         * search.c (dfs_get_vbase_types): Do it here.
18126         (get_vbase_types): Adjust.
18127
18128 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
18129
18130         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
18131         (BINFO_PRIMARY_MARKED_P): Use flag 5.
18132         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
18133         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
18134         (unmark_primary_bases): Remove declaration.
18135         (unmarkedp): Declare.
18136         (dfs_vbase_unmark): Likewise.
18137         * class.c (determine_primary_base): Return immediately if there
18138         are no base classes.  Call mark_primary_bases here.
18139         (modify_all_direct_vtables): Remove.
18140         (modify_all_indirect_vtables): Remove.
18141         (dfs_modify_vtables_queue_p): New function.
18142         (dfs_modify_vtables): New function.
18143         (modify_all_vtables): Use them.
18144         (build_base_fields): Build FIELD_DECLs for primary virtual base
18145         classes.
18146         (create_vtable_ptr): Don't call determine_primary_base here.
18147         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
18148         (dfs_set_offset_for_vbases): ... this.
18149         (layout_virtual_bases): Use it.
18150         (layout_class_type): Call determine_primary_base here.
18151         * search.c (unmarkedp): Make it global.
18152         (shared_marked_p): Simplify.
18153         (shared_unmarked_p): Likewise.
18154         (dfs_primary_bases_queue_p): Remove.
18155         (dfs_unmark_primary_bases): Likewise.
18156         (unmark_primary_bases): Likewise.
18157         (mark_primary_bases): Simplify.
18158         (get_pure_virtuals): Don't call mark_primary_bases here.
18159         (dfs_vbase_unmark): New function.
18160         (get_vbase_types): Simplify.
18161
18162         * class.c (struct base_info): Remove.
18163         (determine_primary_base): Take has_virtual_p rather than a
18164         base_info as input.  Don't calculate max_has_virtual.
18165         (finish_struct_bits): Remove max_has_virtual argument.
18166         (create_vtable_ptr): Remove max_has_virtual_p argument.
18167         (layout_virtual_bases): Remove max argument.
18168         (layout_basetypes): Likewise.
18169         (layout_class_type): Remove max_has_virtual_p argument.
18170         (finish_struct_1): Remove max_has_virtual.
18171
18172         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
18173         (layout_basetypes): Remove.
18174         * class.c (propagate_binfo_offsets): Moved here from tree.c.
18175         Update to handle primary virtual bases.
18176         (remove_base_fields): New function, split out from
18177         layout_basetypes.
18178         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
18179         (layout_virtual_bases): New function, split out from
18180         layout_basetypes.  Update to handle primary virtual bases.
18181         (layout_basetypes): Moved here from tree.c.  Use
18182         remove_base_fields and layout_virtual_bases.
18183         * search.c (dfs_mark_primary_bases_queue_p): New function.
18184         (mark_primary_bases): Use it.
18185         * tree.c (CEIL): Remove.
18186         (propagate_binfo_offsets): Remove.
18187         (layout_basetypes): Remove.
18188
18189 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
18190
18191         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
18192         (BINFO_PRIMARY_MARKED_P): New macro.
18193         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
18194         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
18195         (mark_primary_bases): New function.
18196         (unmark_primary_bases): Likewise.
18197         * search.c (get_abstract_virtuals_1): Remove.
18198         (dfs_mark_primary_bases): New function.
18199         (mark_primary_bases): Likewise.
18200         (dfs_unmark_primary_bases): Likewise.
18201         (unmark_primary_bases): Likewise.
18202         (dfs_get_pure_virtuals): Likewise.
18203
18204 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
18205
18206         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
18207         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
18208         (modify_one_vtable): Adjust.
18209         (fixup_vtable_deltas1): Likewise.
18210         (override_one_vtable): Likewise.
18211         * search.c (get_abstract_virtuals_1): Likewise.
18212         (get_pure_virtuals): Likewise.
18213         (expand_upcast_fixups): Likewise.
18214         * tree.c (debug_binfo): Likewise.
18215
18216         * class.c (build_vtable): Don't return a value.  Don't rebuild
18217         vtables for bases that have already been handled.
18218         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
18219         already been handled.
18220         (modify_one_vtable): Adjust accordingly.
18221         (fixup_vtable_deltas1): Likewise.
18222         (finish_struct_1): Likewise.
18223
18224 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
18225
18226         * call.c (build_new_method_call): Also check destructors.