OSDN Git Service

PR c++/10428
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2003-04-22  Mark Mitchell  <mark@codesourcery.com>
2
3         PR c++/10428
4         * decl.c (check_elaborated_type_specifier): New function, split
5         out from ...
6         (xref_tag): ... here.  Use the new function in more places.
7
8         * rtti.c (throw_bad_typeid): Use build_cxx_call.
9
10 2003-04-21  Mark Mitchell  <mark@codesourcery.com>
11
12         * call.c (build_over_call): Use build_cxx_call.
13         (build_cxx_call): New method, split out of build_over_call.
14         * cp-tree.h (language_function): Add can_throw.
15         (build_cxx_call): Declare it.
16         * decl.c (finish_function): If a function does not contain any
17         calls to functions that can throw an exception, indicate that
18         fact.
19         * decl2.c (mark_used): Do not defer the instantiation of
20         functions, if the current function does not throw.
21         * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
22         * pt.c (instantiate_decl): Make sure import_export_decl is called
23         before emitting things.
24         * rtti.c (throw_bad_cast): Use build_cxx_call.
25         (build_dynamic_cast_1): Likewise.
26         * typeck.c (build_function_call): Likewise.
27
28 2003-04-21  Nathan Sidwell  <nathan@codesourcery.com>
29
30         PR c++/9881
31         * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
32         expressions. Reverts my 2002-08-08 patch.
33         
34         * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
35         cheaper early exit.
36
37 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
38
39         * cp/decl2.c (start_static_storage_duration_function): Take count
40         arg, don't check if it wraps round.
41         (generate_ctor_or_dtor_function): Add locus arg, use it.
42         (generate_ctor_and_dtor_functions_for_priority): Data arg is a
43         locus.
44         (finish_file): Set line numbers to past EOF for synthesized
45         functions.
46
47 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
48
49         PR c++/10405
50         * search.c (lookup_field_1): Final scan goes backwards for
51         types, forwards for non-types.
52
53 2003-04-17  Roger Sayle  <roger@eyesopen.com>
54
55         PR c/10375
56         * decl.c (duplicate_decls): Preserve "const", "noreturn" and
57         "nothrow" function attributes.
58
59 2003-04-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
60
61         PR c++/10347
62         * pt.c (type_dependent_expression_p): Handle array new.
63
64 2003-04-15  Mark Mitchell  <mark@codesourcery.com>
65
66         PR c++/10381
67         * parser.c (cp_parser_primary_expression): Reorganize logic for
68         dealing with name lookup failures.
69
70 2003-04-15  Jason Merrill  <jason@redhat.com>
71
72         * decl2.c (mark_used): Don't instantiate anything if
73         skip_evaluation.
74
75 2003-04-14  Ziemowit Laski  <zlaski@apple.com>
76
77         * tree.c (build_cplus_array_type_1): Do not call
78         uses_template_parms() on a NULL index_type.
79
80 2003-04-13  Roger Sayle  <roger@eyesopen.com>
81
82         * decl.c (duplicate_decls): Preserve pure and malloc attributes.
83
84 2003-04-12  Mark Mitchell  <mark@codesourcery.com>
85
86         PR c++/10300
87         * init.c (build_new_1): Reorganize.
88
89 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
90
91         * class.c (initialize_array)
92         * decl.c (reshape_init)
93         * decl2.c (build_expr_from_tree)
94         * init.c (build_zero_init)
95         * pt.c (tsubst_copy, tsubst_copy_and_build)
96         * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
97         (ptm_initializer, class_initializer, get_pseudo_ti_init)
98         * semantics.c (finish_compound_literal)
99         * typeck.c (build_ptrmemfunc1)
100         * typeck2.c (store_init_value, process_init_constructor)
101         (build_functional_cast): Use build_constructor.
102
103 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
104
105         * call.c (print_z_candidates): Use gcc_gettext_width, not
106         strlen, to determine how much padding to use.
107
108 2003-04-10  Zack Weinberg  <zack@codesourcery.com>
109
110         * decl.c: Update all calls to shadow_warning.
111
112 2003-04-10  Mark Mitchell  <mark@codesourcery.com>
113
114         * class.c (layout_class_type): Correct handling for overlong
115         bit-fields whose width is the same as an integer type.
116
117 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
118
119         * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
120         * cp-lang.c (cp_tree_size): New function.
121         (LANG_HOOKS_TREE_SIZE): Override.
122
123         * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
124         tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
125         (union lang_tree_node): Remove common and srcloc members.
126         (build_srcloc_here): Don't prototype.
127         * decl.c (cp_tree_node_structure): Kill SRCLOC case.
128         * pt.c (pending_templates): Correct comment.
129         * tree.c (build_srcloc, build_srcloc_here): Kill.
130
131 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
132
133         * call.c: Include intl.h.
134         (print_z_candidate): Always use inform; get rid of errfn
135         argument. Reorganize so that all the strings get picked up
136         by xgettext.  Note obligation of caller to pass first argument
137         through gettext.
138         (print_z_candidates): Update to match.  Indent second and
139         successive candidates by strlen() of translated message.
140         (joust): Restructure ambiguous-conversion pedwarn so that
141         translators see a complete sentence.  Update calls to
142         print_z_candidate.
143
144         * Make-lang.in (cp/call.o): Update dependencies.
145
146 2003-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
147
148         * decl.c (set_current_binding_level): Delete, revert last change.
149         (current_binding_level): Modify to allow it as as lvalue.
150
151 2003-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
152
153         * name-lookup.c (find_binding): Pass appropriate pointer type to
154         POP_TIMEVAR_AND_RETURN.
155
156 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
157
158         * Make-lang.in (cp-warn): Add $(STRICT_WARN).
159         * cp-tree.h: Don't insist on having GNUC.
160
161 2003-04-03  Jason Merrill  <jason@redhat.com>
162
163         * cvt.c (ocp_convert): Only abort if we try to convert an object
164         of TREE_ADDRESSABLE type.
165
166         * class.c (build_vtable): Set DECL_ALIGN here.
167         (get_vtable_decl): Not here.
168         (layout_vtable_decl): Or here.
169         (create_vtable_ptr): Or here.
170         (layout_class_type): Or here.
171         (check_bitfield_decl): Don't mess with field alignment.
172
173 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
174
175         * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
176         DEF_ASSN_OPERATOR): Delete spurious semi-colon.
177         * rtti.c (dfs_class_hint_mark): Likewise.
178
179         * decl.c (push_local_name, push_class_level_binding,
180         maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
181         functions returning void.
182         * decl2.c (add_using_namespace): Likewise.
183
184         * decl.c (print_binding_level, print_other_binding_stack,
185         print_binding_stack): Cast argument of %p specifier to void*.
186         * ptree.c (cxx_print_decl): Likewise.
187
188         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
189         VAR_FUNCTION_OR_PARM_DECL_CHECK,
190         VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
191         BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
192         LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
193
194         * decl.c (set_current_binding_level): New macro.  Use throughout
195         when setting the current binding level.
196
197         * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
198         in enum.
199         * method.c (mangling_flags): Likewise.
200
201         * cp-tree.h (lang_type_header): Add __extension__ and use
202         CHAR_BITFIELD for members.
203
204 2003-04-02  Geoffrey Keating  <geoffk@apple.com>
205
206         PR other/9274
207         * mangle.c: Include gt-cp-mangle.h.
208         (subst_identifiers): Mark with GTY.
209         * config-lang.in (gtfiles): Add cp/mangle.c.
210         * Make-lang.in: (gt-cp-mangle.h): New rule.
211         (cp/mangle.o): Depends on gt-cp-mangle.h.
212
213 2003-04-01  Andrew Pinski  <pinskia@physics.uc.edu>
214
215         * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
216         after \$(srcdir)/cp/name-lookup.h.
217         * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
218         of ggc_alloc.  Include gt-cp-name-lookup.h at the end of the file.
219         * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
220         (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
221
222 2003-03-31  Jason Merrill  <jason@redhat.com>
223
224         PR java/10145
225         * class.c (check_field_decl): Don't set DECL_ALIGN.
226
227 2003-03-30  Mark Mitchell  <mark@codesourcery.com>
228
229         PR c++/7647
230         * decl.c (grokdeclarator): Tidy, slightly.
231         * search.c (lookup_field_1): Add want_type parameter.
232         (lookup_field_r): Adjust call to lookup_field_1.
233
234 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
235
236         * Make-lang.in (cp/name-lookup.o): Add more dependencies.
237
238 2003-03-30  Gabriel Dos Reis <gdr@integrable-solutions.net>
239
240         * cp-tree.h (binding_for_name: Move to name-lookup.h  Adjust
241         prototype.
242         (cxx_scope_find_binding_for_name): Likewise.
243         * decl.c (find_binding: Move to name-lookup.c.
244         (binding_for_name): Likewise.
245         (cxx_scope_find_binding_for_name): Likewise.
246         (BINDING_LEVEL):  Remove.
247         (push_binding): Tidy.
248         (push_class_binding): Likewise.
249         (pop_binding): Likewise.
250         (poplevel): Likewise.
251         (poplevel_class): Likewise.
252         (set_identifier_type_value_with_scope): Likewise.
253         (push_overloaded_decl): Likewise.
254         (lookup_tag): Likewise.
255         (unqualified_namespace_lookup): Likewise.
256         (lookup_name_current_level): Likewise.
257         (maybe_inject_for_scope_var): Likewise.
258         (namespace_binding): Move to name-lookup.c.
259         (set_namespace_binding): Likewise.
260         * decl2.c (lookup_using_namespace): Tidy.
261         (qualified_lookup_using_namespace): Likewise.
262         (do_toplevel_using_decl): Likewise.
263         * name-lookup.c: Include "timevar.h"
264         * name-lookup.h (cxx_scope):  Declare.
265         (struct cxx_binding): Lose member "has_level".  Adjust "scope"
266         member declaration.
267         (BINDING_SCOPE): Adjust definition.
268         (BINDING_HAS_LEVEL_P): Remove.
269
270 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
271
272         * name-lookup.c: New file.
273         * name-lookup.h: Likewise..
274         * decl.c (push_binding): Adjust use cxx_binding_make.
275         (free_bindings): Move to name-lookup.c
276         (pop_binding): Use cxx_binding_free.
277         (binding_for_name): Tidy.
278         * cp-tree.h: Include "name-lookup.h"
279         (cxx_binding_make): Move to name-lookup.h
280         (cxx_binding_clear): Likewise.
281         (struct cxx_binding): Likewise.
282         (LOCAL_BINDING_P): Likewise.
283         (INHERITED_VALUE_BINDING_P): Likewise.
284         (BINDING_SCOPE): Likewise.
285         (BINDING_HAS_LEVEL_P): Likewise.
286         (BINDING_VALUE): Likewise.
287         (BINDING_TYPE): Likewise.
288         * config-lang.in (gtfiles): Add cp/name-lookup.h
289         * Make-lang.in (cp/name-lookup.o): New rule.
290         (CXX_OBJS): Add cp/name-lookup.o
291         (CXX_TREE_H): Add cp/name-lookup.h
292
293 2003-03-28  Jason Merrill  <jason@redhat.com>
294
295         PR c++/10245
296         * cvt.c (force_rvalue): New fn.
297         * call.c (build_conditional_expr): Use it.
298         * cp-tree.h: Declare it.
299
300 2003-03-28  Mike Stump  <mrs@apple.com>
301
302         * error.c (dump_expr): Add 0x to printed hex numbers to make
303         output match source code better.
304
305 2003-03-28  Mark Mitchell  <mark@codesourcery.com>
306
307         PR c++/10218
308         * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
309         definitions.
310
311         * decl2.c (generate_ctor_or_dtor_function): Tolerate a
312         non-existant ssdf_decls array.
313         (finish_file): Call generator_ctor_or_dtor_function when there are
314         static constructors or destructors and no other static
315         initializations.
316
317 2003-03-28  Nathan Sidwell  <nathan@codesourcery.com>
318
319         PR c++/10047
320         * decl2.c (finish_file): Don't warn about explicitly instantiated
321         inline decls.
322
323 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
324
325         PR c++/10224
326         * pt.c (lookup_template_class): Only check instantiated args if
327         they do not contain template parameters.
328
329 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
330
331         PR c++/10158
332         * parser.c (cp_parser_function_definition): Set
333         DECL_INITIALIZED_IN_CLASS for members.
334         * pt.c (instantiate_decl): Only reduce the template args for
335         friends that are not defined in class.
336
337 2003-03-25  Jason Merrill  <jason@redhat.com>
338
339         * call.c (print_z_candidate): Change name of first arg to msgid.
340         (joust): Add comment for translators.
341
342 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
343
344         PR c++/9898, PR c++/383, DR 322
345         * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
346         through reference types on both PARM and ARG.
347
348 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
349
350         PR c++/10119
351         * error.c (dump_expr) <BASELINK>: Use dump_expr.
352         * pt.c (maybe_fold_nontype_args): New function.
353         (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
354         <TEMPLATE_ID_EXPR>: Break out folding code, call it.
355         (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
356         maybe_fold_nontype_args.
357
358 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
359
360         PR c++/10026
361         * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
362
363 2003-03-23  Mark Mitchell  <mark@codesourcery.com>
364
365         PR c++/7086
366         * typeck.c (cxx_mark_addressable):  Adjust call to
367         gen_mem_addressof or put_var_into_stack.
368
369 2003-03-22  Nathan Sidwell  <nathan@codesourcery.com>
370
371         PR c++/9978, c++/9708
372         * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
373         * call.c (add_template_candidate_real): Adjust
374         instantiate_template call.
375         * class.c (resolve_address_of_overloaded_function): Likewise.
376         * decl.c (build_enumerator): Set TREE_CONSTANT.
377         * pt.c (check_instantiated_args): New.
378         (push_inline_template_parms_recursive): Set TREE_CONSTANT,
379         TREE_READONLY.
380         (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
381         (reduce_template_parm_level): Likewise.
382         (process_template_parm): Likewise.
383         (check_explicit_specialization): Adjust instantiate_template call.
384         (convert_template_argument): Don't check non-type argument here.
385         (lookup_template_class): Check them here.
386         (tsubst_friend_function): Adjust instantiate_template call.
387         (instantiate_template): Add tsubst_flags parameter, use it. Check
388         instantiated args.
389
390 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
391
392         * decl.c: Update calls to shadow_warning.
393
394 2003-03-21  Nathan Sidwell  <nathan@codesourcery.com>
395
396         PR c++/9898
397         * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
398         (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
399
400 2003-03-20  Mark Mitchell  <mark@codesourcery.com>
401
402         * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
403         friends.
404         * cp/pt.c (instantiate_class_template): Fix formatting.
405
406 2003-03-14  Matt Austern  <austern@apple.com>
407
408         * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
409         (unemitted_tinfo_decl_p): Remove.
410         (emit_tinfo_decl): Change declaration to remove unused parameter.
411         * decl2.c (finish_file): Change tinfo emission to loop through
412         unemitted_tinfo_decls array instead of looping through all decls.
413         * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
414         unused second parameter.
415         (init_rtti_processing): initialize unemitted_tinfo_decls varray.
416         (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
417         (emit_tinfo_decl): remove unused second parameter, add assertion
418         that decl hasn't already been emitted.
419
420 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
421
422         * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
423         type from 'int' to 'bool'. Replace 0 and 1 with true and false in
424         return statements.
425
426 2003-03-19  Jason Merrill  <jason@redhat.com>
427
428         PR c++/8316, c++/9315, c++/10136
429         * call.c (print_z_candidate): Split out from...
430         (print_z_candidiates): ...here.
431         (joust): Use it.
432
433 2003-03-17  Roger Sayle  <roger@eyesopen.com>
434
435         PR c++/10031
436         * decl.c (duplicate_decls): Use the new type when prototyping
437         anticipated decls, even when the types match.  This defines the
438         exception list for the built-in function.
439
440 2003-03-17  Jason Merrill  <jason@redhat.com>
441
442         PR c++/10091
443         * typeck.c (build_class_member_access_expr): Compare
444         TYPE_MAIN_VARIANTs.
445
446 2003-03-17  Mark Mitchell  <mark@codesourcery.com>
447
448         PR c++/9639
449         * parser.c (cp_parser_declarator_id): Clear parser->scope.
450
451 2003-03-16  Jason Merrill  <jason@redhat.com>
452
453         PR c++/9993
454         * decl.c (finish_function): Only allow the NRVO to use variables
455         declared at function scope.
456
457 2003-03-17  Andreas Jaeger  <aj@suse.de>
458
459         * Make-lang.in (cp/TAGS): Remove.
460
461 2003-03-16  Nathan Sidwell  <nathan@codesourcery.com>
462
463         PR c++/9629
464         * cp-tree.h (struct language_function): Add in_base_initializer.
465         (in_base_initializer): define it.
466         (expand_member_init): Remove INIT param.
467         * init.c (expand_member_init): Remove INIT param, return the member.
468         (emit_mem_initializers): Set in_base_initializer.
469         * class.c (build_base_path): Check in_base_initializer.
470         * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
471         * pt.c (tsubst_initializer_list): Likewise.
472
473 2003-03-16   Gabriel Dos Reis <gdr@integrable-solutions.net>
474
475         * decl.c (binding_for_name): Fix initialization thinko.
476
477 2003-03-15  Gabriel Dos Reis <gdr@integrable-solutions.net>
478
479         Compile-time improvement: 2/n.
480         * cp-tree.h (struct cxx_binding): New datatype;
481         (struct lang_identifier): Use it.
482         (LOCAL_BINDING_P): Adjust definition.
483         (INHERITED_VALUE_BINDING_P): Likewise.
484         (BINDING_SCOPE): Likewise.
485         (BINDING_HAS_LEVEL_P): Likewise.
486         (BINDING_VALUE): Likewise.
487         (BINDING_TYPE): Likewise.
488         (IDENTIFIER_VALUE): Likewise.
489         (struct tree_binding): Remove.
490         (TS_CP_BINDING): Likewise.
491         ((union lang_tree_node): Remove field "binding".
492         (cxx_binding_clear): New macro.
493         (binding_for_name): Adjust return type.
494         (qualified_lookup_using_namespace): Adjust prototype.
495         (lookup_using_namespace): Adjust prototype.
496         (cxx_scope_find_binding_for_name): Declare.
497         * cp-tree.def: Remove CPLUS_BINDING definition.
498         * decl.c (push_binding): Adjust local variable type.
499         (add_binding): Likewise.
500         (push_class_binding): Likewise.
501         (pop_binding): Likewise.
502         (poplevel): Likewise.
503         (poplevel_class): Likewise.
504         (free_bindings):  Adjust type.
505         (find_binding): Adjust return type, add a third parameter. Remove
506         non-useful assertion now that we use static typing.
507         (cxx_scope_find_binding_for_name): New function.
508         (binding_for_name): Use it.  Adjust local variable type. Simplify.
509         (namespace_binding):  Simplify.
510         (set_namespace_binding): Likewise.
511         (set_identifier_type_value_with_scope): Adjust local variable type.
512         (lookup_tag): Don't type-abuse of local variable 'old'.
513         (lookup_namespace_name): Likewise.  Allocate binding on stack.
514         (select_decl): Adjust prototype.
515         (unqualified_namespace_lookup):  Allocate binding on stack.
516         Don't type-abuse of local variable 'val'.
517         (lookup_name_real): Likewise.
518         (maybe_inject_for_scope_var): Adjust local variable type.
519         (cp_tree_node_structure): Remove CPLUS_BINDING case label.
520         (namespace_binding): Adjust logic, simplify.
521         (BINDING_LEVEL): Adjust definition.
522         (push_class_level_binding): Adjust local variable type.
523         (struct cxx_saved_binding): Adjust field 'binding' type.
524         * decl2.c (ambiguous_decl): Adjust prototype.
525         (lookup_using_namespace): Adjust local variable type.
526         (qualified_lookup_using_namespace): Catch type error and correct
527         ensueing logic error.
528         (do_nonmember_using_decl): Adjust local variable type.  Allocate
529         temporary cxx_binding on stack.
530         (do_toplevel_using_decl): Adjust local variable type.
531         * ptree.c (cxx_print_cxx_binding): New function.
532         (cxx_print_identifier): Use it.
533         (cxx_print_xnode): Delete CPLUS_BINDING case label.
534
535 2003-03-15  Roger Sayle  <roger@eyesopen.com>
536
537         * tree.c (count_functions): Fix whitespace.
538
539 2003-03-15  Neil Booth  <neil@daikokuya.co.uk>
540
541         * Make-lang.in: Update.
542
543 2003-03-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
544
545         PR c++/6440
546         * pt.c (maybe_process_partial_specialization): Handle
547         member class template when enclosing class template is
548         explicit specialized.
549         (most_general_template): Stop looking when DECL is already
550         specialized.
551
552 2003-03-13  Jason Merrill  <jason@redhat.com>
553
554         PR c++/9420
555         * search.c (lookup_conversions): Call complete_type here.
556         * call.c (implicit_conversion): Not here.
557
558 2003-03-13  Mark Mitchell  <mark@codesourcery.com>
559
560         * decl2.c (do_nonmember_using_decl): Correct handling of
561         simultaneous type/non-type bindings.
562
563         * call.c (initialize_reference): Remove bogus assertion.
564         * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
565
566 2003-03-12  Andrew Lewycky  <andrew@mxc.ca>
567
568         PR c++/7050
569         * expr.c (cxx_expand_expr): Return const0_rtx for throw
570         expressions.
571
572 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
573
574         PR c++/9474
575         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
576         to merge old and new declarations.
577
578 2003-03-12  Alexandre Oliva  <aoliva@redhat.com>
579
580         * g++.1: Remove.
581         * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
582         (cp/g++.1): Build it from scratch in the build tree.
583         (c++.install-man): Depend on it.  Install it from the build tree.
584         (c++.mostlyclean): Clean it.
585
586 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
587
588         PR c++/9474
589         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
590         to merge old and new declarations.
591
592         PR c++/9924
593         * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
594
595 2003-03-11  Jason Merrill  <jason@redhat.com>
596
597         PR c++/9820
598         * search.c (lookup_member): Fix handling of functions in a class
599         being defined.
600
601 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
602
603         PR c++/8700
604         * call.c (convert_class_to_reference): Adjust usage of
605         splice_viable.
606         (any_viable): Remove.
607         (splice_viable): Combine with any_viable.
608         (print_z_candidates): Avoid printing duplicates.
609         (build_user_type_conversion_1): Adjust usage of splice_viable.
610         (build_new_function_call): Likewise.
611         (build_operator_new_call): Likewise.
612         (build_object_call): Likewise.
613         (build_conditional_expr): Likewise.
614         (build_new_op): Likewise.
615         (build_new_method_call): Likewise.
616         (joust): Remove spurious comment.
617         * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
618         * decl2.c (arg_assoc_class): Simplify.
619         * friend.c (add_friend): Likewise.
620
621 2003-03-11  Jason Merrill  <jason@redhat.com>
622
623         PR c++/8660
624         * decl2.c (check_classfn): A member template only matches a
625         member template.
626
627 2003-03-11  Neil Booth  <neil@daikokuya.co.uk>
628
629         * Make-lang.in (CXX_C_OBJS): Update.
630         * lang-specs.h: Don't define __GNUG__ here.
631
632 2003-03-10  Mark Mitchell  <mark@codesourcery.com>
633
634         * call.c (perform_overload_resolution): New function.
635         (build_new_function_call): Use it.
636         (build_operator_new_call): Likewise.
637         (add_candidates): Add explicit_targs and template_only parameters.
638         (build_new_op): Adjust accordingly.
639         * cp-tree.h (build_operator_new_call): New function.
640         (build_function_call_real): Remove.
641         (build_function_call_maybe): Likewise.
642         * init.c (build_new_1): Use build_operator_new_call.
643         * typeck.c (build_function_call_real): Rename to ...
644         (build_function_call): ... this.
645
646 2003-03-10  Devang Patel  <dpatel@apple.com>
647
648         PR c++/9394
649         * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
650
651 2003-03-10  Jason Merrill  <jason@redhat.com>
652
653         PR c++/9798
654         * decl.c (push_using_directive): Push before recursing.
655
656         PR c++/9868, c++/9524
657         * call.c (resolve_scoped_fn_name): Handle the case of a function
658         pointer member.
659
660         * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
661         argument in the pointer-to-member case.
662
663 2003-03-09  Mark Mitchell  <mark@codesourcery.com>
664
665         PR c++/9373
666         * cp-lang.c (cxx_get_alias_set): Use alias set zero for
667         pointers to member functions.
668
669         PR c++/8534
670         * decl.c (build_ptrmemfunc_type): Do not allow default arugments
671         in pointer-to-member-function types.
672
673 2003-03-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
674
675         * expr.c (cplus_expand_constant): Use C90 prototype style.
676         (cxx_expand_expr): Likewise.
677
678 2003-03-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
679
680         PR c++/9970
681         * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
682         functions.
683
684 2003-03-08  Geoffrey Keating  <geoffk@apple.com>
685
686         * lang-specs.h (c++-header): Change .pch to .gch.
687
688 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
689
690         * cp-tree.h (cxx_init): Update prototype.
691         * lex.c (cxx_init): Similarly.
692
693 2003-03-08  Mark Mitchell  <mark@codesourcery.com>
694
695         PR c++/9823
696         * cp-tree.h (begin_mem_initializers): Remove.
697         * parser.c (cp_parser_mem_initializer_list): Inline it here.
698         Do not call finish_mem_initializers if not in a constructor.
699         (cp_parser_class_head): Fix typo in error message.
700         * semantics.c (begin_mem_initializers): Remove.
701         * testsuite/g++.dg/parser/constructor1.C: New test.
702
703         PR c++/9809
704         * call.c (add_function_candidate): Skip builtin fuctions that have
705         not yet been declared.
706
707         PR c++/9982
708         * init.c (build_new_1): Correct logic for determining whether or
709         not to use an array cookie.
710
711         PR c++/9524
712         * parser.c (cp_parser_postfix_expression): Call
713         finish_non_static_data_member, even when processing_template_decl.
714
715         PR c++/9912
716         * cp-tree.h (is_ancestor): New function.
717         (handle_class_head): Change prototype.
718         * decl2.c (is_namespace_ancestor): Rename to ...
719         (namespace_anecestor): ... this.
720         (set_decl_namespace): Adjust accordingly.
721         (handle_class_head): Remove unncessary parameters.
722         * parser.c (cp_parser_class_head): Check that
723         nested-name-specifiers are used appropriately.
724
725 2003-03-07  Mark Mitchell  <mark@codesourcery.com>
726
727         * call.c (reference_binding): Remove REF_IS_VAR parameter.
728         (implicit_conversion): Adjust call to reference_binding.
729         (make_temporary_var_for_ref_to_type): Add TYPE parameter.
730         (initialize_reference): Adjust handling for references bound to
731         rvalues.
732         * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
733         prototype.
734         (real_non_cast_lvalue_p): New method.
735         * cvt.c (build_up_reference): Adjust use of
736         make_temporary_var_for_ref_to_temp.
737         * tree.c (real_non_cast_lvalue_p): New method.
738
739 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
740
741         * except.c (init_exception_processing): Use C90 prototype style.
742         (cp_protect_cleanup_actions): Likewise.
743         (prepare_eh_type): Likewise.
744         (build_eh_type_type): Likewise.
745         (build_exc_ptr): Likewise.
746         (do_begin_catch): Likewise.
747         (dtor_nothrow): Likewise.
748         (do_end_catch): Likewise.
749         (push_eh_cleanup): Likewise.
750         (decl_is_java_type): Likewise.
751         (choose_personality_routine): Likewise.
752         (initialize_handler_parm): Likewise.
753         (expand_start_catch_block): Likewise.
754         (expand_end_catch_block): Likewise.
755         (begin_eh_spec_block): Likewise.
756         (finish_eh_spec_block): Likewise.
757         (do_allocate_exception): Likewise.
758         (do_free_exception): Likewise.
759         (wrap_cleanups_r): Likewise.
760         (stabilize_throw_expr): Likewise.
761         (build_throw): Likewise.
762         (complete_ptr_ref_or_void_ptr_p): Likewise.
763         (is_admissible_throw_operand): Likewise.
764         (nothrow_libfn_p): Likewise.
765         (can_convert_eh): Likewise.
766         (check_handlers_1): Likewise.
767         (check_handlers): Likewise.
768
769 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
770
771         * call.c (merge_conversion_sequences): New function.
772         (build_conv): Set ICS_USER_FLAG for USER_CONVs.
773         (convert_class_to_reference): Correct handling of second
774         standard conversion sequence in a user-defined conversion
775         sequence.
776         (build_user_type_conversion_1): Use merge_conversion_sequences.
777         * cp-tree.def: Add comments for CONV nodes.
778         * rtti.c (get_tinfo_decl): Use build_address/build_nop.
779
780 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
781
782         * error.c (init_error): Use C90 prototype style.
783         (dump_scope): Likewise.
784         (dump_qualifiers): Likewise.
785         (dump_template_argument): Likewise.
786         (dump_template_argument_list): Likewise.
787         (dump_template_parameter): Likewise.
788         (dump_template_bindings): Likewise.
789         (dump_type): Likewise.
790         (dump_typename): Likewise.
791         (class_key_or_enum): Likewise.
792         (dump_aggr_type): Likewise.
793         (dump_type_prefix): Likewise.
794         (dump_type_suffix): Likewise.
795         (dump_global_iord): Likewise.
796         (dump_simple_decl): Likewise.
797         (dump_decl): Likewise.
798         (dump_template_decl): Likewise.
799         (dump_function_decl): Likewise.
800         (dump_parameters): Likewise.
801         (dump_exception_spec): Likewise.
802         (dump_function_name): Likewise.
803         (dump_template_parms): Likewise.
804         (dump_char): Likewise.
805         (dump_expr_list): Likewise.
806         (dump_expr): Likewise.
807         (dump_binary_op): Likewise.
808         (dump_unary_op): Likewise.
809         (type_as_string): Likewise.
810         (expr_as_string): Likewise.
811         (decl_as_string): Likewise.
812         (context_as_string): Likewise.
813         (lang_decl_name): Likewise.
814         (cp_file_of): Likewise.
815         (cp_line_of): Likewise.
816         (decl_to_string): Likewise.
817         (expr_to_string): Likewise.
818         (fndecl_to_string): Likewise.
819         (code_to_string): Likewise.
820         (language_to_string): Likewise.
821         (parm_to_string): Likewise.
822         (op_to_string): Likewise.
823         (type_to_string): Likewise.
824         (assop_to_string): Likewise.
825         (args_to_string): Likewise.
826         (cv_to_string): Likewise.
827         (cxx_print_error_function): Likewise.
828         (cp_diagnostic_starter): Likewise.
829         (cp_diagnostic_finalizer): Likewise.
830         (cp_print_error_function): Likewise.
831         (function_category): Likewise.
832         (print_instantiation_full_context): Likewise.
833         (print_instantiation_partial_context): Likewise.
834         (maybe_print_instantiation_context): Likewise.
835         (print_instantiation_context): Likewise.
836         (cp_printer): Likewise.
837         (print_integer): Likewise.
838         (print_non_consecutive_character): Likewise.
839         (locate_error): Likewise.
840
841 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
842
843         PR c++/9965
844         * call.c (reference_binding): Add ref_is_var parameter.
845         (implicit_conversion): Adjust call to reference_binding.
846         (initialize_reference): Likewise.
847
848         PR c++/9400
849         * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
850         PARM_DECLs.
851
852         PR c++/9791
853         * class.c (get_basefndecls): Use lookup_fnfields_1.
854
855 2003-03-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
856
857         PR c++/9188
858         * parser.c (cp_parser_type_parameter): Remove redundant `expect'
859         in error message.
860         (cp_parser_single_declaration): Likewise.
861
862 2003-03-05  Jason Merrill  <jason@redhat.com>
863
864         PR c++/9440
865         * call.c (build_conditional_expr): Use convert rather than an
866         explicit NOP_EXPR.
867
868 2003-03-02  Matt Austern  <austern@apple.com>
869
870         * decl.c (cp_binding_level): Add static_decls varray member.
871         (add_decl_to_level): Add static/inline namespace scope
872         declarations to static_decls array.
873         (wrapup_global_for_namespace): Pass static_decls only, instead of
874         all decls, to wrapup_global_declarations/check_global_declarations.
875         (push_namespace): Initialize static_decls for ordinary namespaces.
876         (cxx_init_decl_processing): Initialize static_decls for global
877         namespace.
878
879 2003-03-05  Mark Mitchell  <mark@codesourcery.com>
880
881         * class.c (end_of_class): Correct thinko.
882
883 2003-03-04  Nathanael Nerode  <neroden@gcc.gnu.org>
884
885         * config-lang.in: Replace ${libstdcxx_version} by its value.
886
887 2003-03-04  Gabriel Dos Reis <gdr@integrable-solutions.net>
888
889         * cp-tree.h (cxx_saved_binding): Declare.
890         (struct saved_scope): Adjust type of field 'old_binding'.
891         * decl.c (cxx_saved_binding_make): New macro.
892         (struct cxx_saved_binding): Define.
893         (store_bindings): Adjust prototype.  Use cxx_saved_binding to save
894         C++ bindings.
895         (maybe_push_to_top_level): Adjust local variable type.
896         (pop_from_top_level): Likewise.
897
898 2003-03-04  Tom Tromey  <tromey@redhat.com>
899
900         * Make-lang.in (c++.tags): New target.
901
902 2003-03-04  Neil Booth  <neil@daikokuya.co.uk>
903
904         * Make-lang.in: Update.
905
906 2003-03-03  Jason Merrill  <jason@redhat.com>
907
908         * decl.c (finish_enum): Do set the type in a template. Simplify.
909         * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
910
911 2003-03-03  Mark Mitchell  <mark@codesourcery.com>
912
913         PR c++/9878
914         * call.c (convert_class_to_reference): Correct conversion
915         sequences.
916         (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
917         (implicit_conversion): Adjust call to reference_binding.
918         (add_candidate): Change type of candidates parameter.
919         (add_function_candidate): Likewise.
920         (add_conv_candidate): Likewise.
921         (build_builtin_candidate): Likewise.
922         (add_builtin_candidate): Likewise.
923         (add_builtin_candidates): Likewise.
924         (add_template_candidate_real): Likewise.
925         (add_template_candidate): Likewise.
926         (add_template_conv_candidate): Likewise.
927         (build_user_type_conversion_1): Adjust accordingly.
928         (build_object_call): Likewise.
929         (build_conditional_expr): Likewise.
930         (add_candidates): Likewise.
931         (build_new_op): Likewise.
932         (convert_like_real): Use USER_CONV_CAND.  Use build_nop.
933         (build_new_method_call): Adjust calls to add_function_candidate.
934         (make_temporary_var_for_ref_to_temp): New function.
935         (initialize_reference): Add decl parameter.
936         * class.c (build_rtti_vtbl_entries): Use build_address and
937         build_nop.
938         * cp-tree.h (initialize_reference): Change prototype.
939         (make_temporary_var_for_ref_to_temp): New function.
940         (build_type_conversion): Change prototype.
941         (build_address): New function.
942         (build_nop): Likewise.
943         * cvt.c (cp_convert_to_pointer): Adjust call to
944         build_type_conversion.  Avoid indicating redundant NOP_EXPRs.
945         Use build_nop.
946         (convert_to_pointer_force): Use build_nop.
947         (build_up_reference): Use make_temporary_var_for_ref_to_temp.
948         (convert_to_reference): Adjust call to build_type_conversion.
949         (ocp_convert): Likewise.
950         (build_type_conversion): Remove for_sure parameter.
951         * decl.c (grok_reference_init): Use initialize_reference.
952         * typeck.c (build_address): New function.
953         (build_nop): Likewise.
954         (build_unary_op): Use them.
955         (build_ptrmemfunc): Tidy slightly.
956         (convert_for_initialization): Adjust call to
957         initialize_reference.
958         * typeck2.c (store_init_value): Remove #if 0'd code.
959
960 2003-03-03  Jason Merrill  <jason@redhat.com>
961
962         * decl.c (start_function): Clear DECL_NUM_STMTS.
963
964         * class.c (get_vtable_decl): Use vtbl_type_node.
965         (build_primary_vtable): Check for it.
966
967 2003-03-02  Aldy Hernandez  <aldyh@redhat.com>
968
969         * decl.c (check_initializer): Check for vector_opaque_p.
970
971 2003-03-02  Ashif Harji  <asharji@uwaterloo.ca>
972
973         * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
974           invoke an external cpp during compilation.
975
976 2003-03-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
977
978         * decl.c (duplicate_decls): Convert use of warning_with_decl() to
979         that of warning().
980         (start_decl): Likewise.
981         (start_function): Likewise.
982
983 2003-03-01  Neil Booth  <neil@daikokuya.co.uk>
984
985         * Make-lang.in (CXX_C_OBJS): Update.
986
987 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
988
989         PR c++/9892
990         * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
991         instantiating it.
992
993 2003-02-28  Aldy Hernandez  <aldyh@redhat.com>
994
995         * parser.c (cp_parser_init_declarator): Revert opaque
996         vector_opaque_p change.
997         Do not include target.h.
998
999 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
1000
1001         PR c++/9879
1002         * cp-tree.h (build_zero_init): Add parameter.
1003         * decl.c (cp_finish_decl): Adjust call.
1004         * init.c (build_zero_init): Add nelts parameter.  Adjust recursive
1005         calls.
1006         (build_default_init): Add nelts parameter.  Adjust calls to
1007         build_zero_init.
1008         (build_new_1): Adjust call to build_default_init.
1009         * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
1010
1011 2003-02-26  Devang Patel  <dpatel@apple.com>
1012
1013         * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
1014         required.  Postpone enum setting for template decls.
1015         (build_enumerator): Delay copying value node until finish_enum
1016         (). Remove #if 0'ed code.
1017         * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
1018         (tsubst_copy): Add check for enum type.
1019
1020 2003-02-25  Mark Mitchell  <mark@codesourcery.com>
1021
1022         PR c++/9683
1023         * decl2.c (prune_vars_needing_no_initialization): Do not throw
1024         away initializations for DECL_EXTERNAL VAR_DECLs.
1025         (finish_file): Adjust accordingly.
1026         * pt.c (instantiate_decl): Do not defer VAR_DECLs.
1027
1028 2003-02-24 Gabriel Dos Reis  <gdr@integrable-solutions.net>
1029
1030         * decl.c (add_binding): Time TV_NAME_LOOKUP.
1031         (push_class_binding): Likewise.
1032         (set_namespace_binding): Likewise.
1033
1034 2003-02-24  Mark Mitchell  <mark@codesourcery.com>
1035
1036         PR c++/9836
1037         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
1038         specializations back to the main template.
1039         * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
1040         * pt.c (resolve_typename_type): Likewise.
1041
1042 2003-02-24  Jeffrey D. Oldham  <oldham@codesourcery.com>
1043
1044         PR c++/9778
1045         * pt.c (tsubst_copy_and_build): For a templated function inside a
1046         scope, process template arguments.
1047
1048 2003-02-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1049
1050         PR c++/9602
1051         * typeck2.c (abstract_virtuals_error): Don't check when
1052         TYPE is still template parameter dependent.
1053
1054 2003-02-23  Mark Mitchell  <mark@codesourcery.com>
1055
1056         PR c++/5333
1057         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
1058         * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
1059         * pt.c (instantiate_class_template): Don't try to instantiate
1060         dependent types.
1061         (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
1062
1063 2003-02-21  Mark Mitchell  <mark@codesourcery.com>
1064
1065         PR c++/9749
1066         * decl.c (grokdeclarator): Do not allow parameters with variably
1067         modified types.
1068
1069 2003-02-21  Nathan Sidwell  <nathan@codesourcery.com>
1070
1071         * search.c (grow_bfs_bases): Remove. Fold into ...
1072         (bfs_walk): ... here, fix fencepost error. Fix merge lossage
1073         in previous patch.
1074
1075 2003-02-20  Mark Mitchell  <mark@codesourcery.com>
1076
1077         PR c++/9729
1078         * mangle.c (mangle_conv_op_name_for_type): Issue an error message
1079         when the G++ 3.2 ABI prevents correct compilation.
1080
1081 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
1082
1083         Change base class access representation. Share virtual base
1084         binfos.
1085         * cp/call.c (build_special_member_call): Remove binfo_for_vbase
1086         call.
1087         * cp/class.c (build_base_path): Likewise.
1088         (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
1089         (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
1090         (make_new_vtable): Adjust.
1091         (force_canonical_binfo_r): Delete.
1092         (force_canonical_binfo): Delete.
1093         (mark_primary_virtual_base): Delete.
1094         (dfs_unshared_virtual_bases): Delete.
1095         (mark_primary_bases): Adjust.
1096         (maybe_warn_about_overly_private_class): Adjust.
1097         (dfs_base_derived_from): Delete.
1098         (base_derived_from): Follow the inheritance chain.
1099         (struct find_final_overrider_data): Add vpath member.
1100         (dfs_find_final_overrider): Adjust.
1101         (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
1102         (find_final_overrider): Adjust.
1103         (update_vtable_entry_for_fn): Adjust.
1104         (modify_all_vtables): Adjust.
1105         (walk_subobject_offsets): Adjust.
1106         (layout_nonempty_base_or_field): Adjust.
1107         (layout_empty_base): Remove last parameter. Adjust.
1108         (build_base_field): Adjust.
1109         (build_base_fields): Adjust.
1110         (propagate_binfo_offsets): Remove last parameter. Adjust.
1111         (dfs_set_offset_for_unshared_vbases): Delete.
1112         (layout_virtual_bases): Adjust.
1113         (finish_struct_1): Adjust.
1114         (init_class_processing): Don't init access nodes.
1115         (dfs_get_primary_binfo): Delete.
1116         (get_primary_binfo): Adjust.
1117         (dump_class_hierarchy_r): Remove most derived arg, add IGO
1118         parameter. Adjust.
1119         (dump_class_hierarchy): Adjust.
1120         (finish_vtbls): Adjust.
1121         (get_original_base): Delete.
1122         (build_vtt_inits): Adjust.
1123         (dfs_build_secondary_vptr_vtt_inits): Adjust.
1124         (dfs_ctor_vtable_bases_queue_p): Adjust.
1125         (build_ctor_vtbl_group): Adjust.
1126         (dfs_accumulate_vtbl_inits): Adjust.
1127         (build_vtbl_initializer): Adjust.
1128         (build_vbase_offset_vtbl_entries): Adjust.
1129         (add_vcall_offset_vtbl_entries_1): Adjust.
1130         * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
1131         (access_*_node): Remove.
1132         (CANONICAL_BINFO): Delete.
1133         (BINFO_UNSHARED_MARKED): Remove.
1134         (BINFO_MARKED): Set LANG_FLAG_0 directly.
1135         (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
1136         (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
1137         (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
1138         Delete.
1139         (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
1140         (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
1141         (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
1142         Delete.
1143         (BINFO_DEPENDENT_BASE_P): New.
1144         (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
1145         index.
1146         (markedp, unmarkedp): Adjust.
1147         (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
1148         dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
1149         find_vbase_instance, binfo_for_vbase): Delete.
1150         (copied_binfo, original_binfo): Declare.
1151         (finish_base_specifier): Add virtual_p arg.
1152         (unshare_base_binfos): Delete.
1153         (copy_base_binfos): Declare.
1154         (reverse_path): Delete.
1155         * cp/decl.c (xref_basetypes): Access and virtuality passed
1156         differently. Don't copy direct base binfos here. Call
1157         copy_base_binfos.
1158         * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
1159         (initialize_vtbl_ptrs): Adjust.
1160         (expand_member_init): Adjust.
1161         * cp/parser.c (cp_parser_base_specifier): Adjust.
1162         * cp/pt.c (instantiate_class_template): Adjust.
1163         (get_template_base_recursive): Adjust.
1164         * cp/rtti.c (get_pseudo_ti_init): Adjust.
1165         (get_pseudo_ti_desc): Adjust.
1166         * cp/tree.c (unshare_base_binfos): Rename to ...
1167         (copy_base_binfos): ... here, reimplement.
1168         (make_binfo): Set BINFO_DEPENDENT_BASE_P.
1169         (reverse_path): Remove.
1170         * cp/typeck.c (get_delta_difference): Adjust error messages.
1171         * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
1172         * cp/search.c (lookup_base_r): Adjust.
1173         (dynamic_cast_base_recurse): Adjust.
1174         (canonical_binfo): Remove.
1175         (dfs_canonical_queue): Remove.
1176         (dfs_assert_unmarked_p): Remove.
1177         (assert_canonical_unmarked): Remove.
1178         (shared_marked_p, shared_unmarked_p): Remove.
1179         (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
1180         (dfs_access_in_type): Adjust.
1181         (access_in_type): Adjust.
1182         (dfs_accessible_queue_p): Adjust.
1183         (dfs_accessible_p): Adjust.
1184         (is_subobject_of_p_1, is_subobject_of_p): Remove.
1185         (struct lookup_field_info): Remove from_dep_base_p field.
1186         (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
1187         (lookup_field_r): Remove dependent base code.
1188         (lookup_member): Likewise.
1189         (dfs_walk, dfs_walk_real): Add access arg to queue fn.
1190         (dfs_unmarked_real_bases_queue_p): Remove.
1191         (dfs_marked_real_bases_queue_p): Remove.
1192         (dfs_skip_vbases): Remove.
1193         (dfs_get_pure_virtuals): Adjust.
1194         (markedp, unmarkedp): Adjust.
1195         (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
1196         (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
1197         (dfs_unmark): Adjust.
1198         (dfs_get_vbase_types):Remove.
1199         (dfs_build_inheritance_graph_order): Remove.
1200         (get_vbase_types): Remove
1201         (dfs_find_vbase_instance): Remove.
1202         (find_vbase_instance): Remove.
1203         (dfs_debug_unmarkedp): Adjust.
1204         (dependent_base_p): Remove.
1205         (dfs_push_type_decls): Adjust.
1206         (dfs_push_decls): Adjust.
1207         (dfs_no_overlap_yet): Adjust.
1208         (copied_binfo): New function.
1209         (original_binfo): New function.
1210         (binfo_for_vbase): Remove.
1211
1212 2003-02-18  Zack Weinberg  <zack@codesourcery.com>
1213
1214         * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
1215         (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
1216         vectors, for speed.
1217
1218 2003-02-18  Mark Mitchell  <mark@codesourcery.com>
1219
1220         PR c++/9704
1221         * class.c (layout_class_type): In the 3.2 ABI, take into account
1222         trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
1223
1224 2003-02-18  Matt Austern <austern@apple.com>
1225
1226         * cp/cp-lang.c: Change lang hooks so that final_write_globals does
1227         nothing for C++.
1228         * cp/decl.c (wrapup_globals_for_namespace): Remove special
1229         handling of global namespace.
1230
1231 2003-02-18  Geoffrey Keating  <geoffk@apple.com>
1232
1233         * cp-tree.h (rid_to_yy): Delete.
1234         (C_RID_YYCODE): Delete.
1235         (finish_file): Delete redundant declaration.
1236
1237 2003-02-18  Jason Merrill  <jason@redhat.com>
1238
1239         PR c++/9623
1240         * decl.c (reshape_init): Don't mess with initializer labels.
1241
1242         PR c++/9485
1243         * parser.c (cp_parser_postfix_expression): Set idk properly for
1244         object->scope::member.
1245
1246 2003-02-18  Ben Elliston  <bje@redhat.com>
1247
1248         PR other/7350
1249         * decl.c (duplicate_decls): Fix typo in comment.
1250
1251 2003-02-17  Michael Elizabeth Chastain <mec@shout.net>
1252
1253         PR debug/9717
1254         * class.c (build_base_field): Mark fields for base classes with
1255         DECL_IGNORED_P.
1256
1257 2003-02-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1258
1259         PR c++/9457
1260         * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
1261         CONSTRUCTOR_ELTS only once.
1262
1263 2003-02-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1264
1265         PR c++/9459
1266         * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
1267         (dump_type_suffix): Likewise.
1268
1269 2003-02-14  Nathan Sidwell  <nathan@codesourcery.com>
1270
1271         * search.c: ANSIfy function declarations and definitions.
1272         * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
1273         * call.c (build_method_call, resolve_scoped_fn_name,
1274         build_java_interface_fn_ref): Adjust lookup_field, lookup_member
1275         calls.
1276         * class.c (handle_using_decl): Likewise.
1277         * decl.c (make_typename_type, make_unmound_class_template,
1278         start_decl, compute_array_index_type): Likewise.
1279         * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
1280         * init.c (expand_member_init, build_member_call): Likewise.
1281         * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
1282         resolve_typename_type): Likewise.
1283         * typeck.c (lookup_destructor, finish_class_member_access_exprm
1284         build_prememfunc_access_expr): Likewise.
1285
1286 2003-02-13  Gabriel Dos Reis <gdr@integrable-solutions.net>
1287
1288         * decl2.c: Include "timevar.h".
1289         (namespace_ancestor): Time name lookup.
1290         (add_using_namespace): Likewise.
1291         (lookup_using_namespace): Likewise.
1292         (qualified_lookup_using_namespace): Likewise.
1293         (decl_namespace): Likewise.
1294         (lookup_arg_dependent): Likewise.
1295         * lex.c (do_identifier): Likewise.
1296         (do_scoped_id): Likewise.
1297         * pt.c (lookup_template_class): Likewise.
1298
1299 2003-02-14   Andrew Pinski <pinskia@physics.uc.edu>
1300
1301         * decl.c: (define_label): Fix warning for return 0 instead of NULL.
1302
1303 2003-02-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1304
1305         * decl.c: Include "timevar.h".
1306         (poplevel): Time name lookup.
1307         (find_binding): Likewise.
1308         (push_namespace): Likewise.
1309         (pop_nested_namespace): Likewise.
1310         (store_bindings): Likewise.
1311         (maybe_push_to_top_level): Likewise.
1312         (pop_from_top_level): Likewise.
1313         (push_local_name): Likewise.
1314         (pushtag): Likewise.
1315         (pushdecl): Likewise.
1316         (pushdecl_with_scope): Likewise.
1317         (pushdecl_namespace_level): Likewise.
1318         (pushdecl_top_level): Likewise.
1319         (pushdecl_class_level): Likewise.
1320         (push_class_level_binding): Likewise.
1321         (push_using_decl): Likewise.
1322         (push_using_directive): Likewise.
1323         (push_overloaded_decl): Likewise.
1324         (lookup_label): Likewise.
1325         (define_label): Likewise.
1326         (lookup_tag): Likewise.
1327         (lookup_tag_reverse): Likewise.
1328         (lookup_namespace_name): Likewise.
1329         (select_decl): Likewise.
1330         (unqualified_namespace_lookup): Likewise.
1331         (lookup_name_real): Likewise.
1332         (lookup_name_current_level): Likewise.
1333         (lookup_type_current_level): Likewise.
1334         (maybe_inject_for_scope_var): Likewise.
1335         (xref_tag): Likewise.
1336
1337         * Make-lang.in (cp/decl.o): Add dependency on timevar.h
1338
1339 2003-02-12  Phil Edwards  <pme@gcc.gnu.org>
1340
1341         * decl.c (build_enumerator):  Remove unneeded test.
1342
1343 2003-02-09  Dan Nicolaescu  <dann@ics.uci.edu>
1344
1345         * cp-tree.h (struct lang_type_header): Make all fields unsigned
1346         char.
1347
1348 2003-02-03  Mark Mitchell  <mark@codesourcery.com>
1349
1350         PR c++/7129
1351         * call.c (z_candidate): Add args.
1352         (convert_class_to_reference): Set it.
1353         (implicit_conversion): Tidy.
1354         (add_candidate): Add args parameter.
1355         (add_function_candidate): Adjust call to add_candidate.
1356         (add_conv_candidate): Likewise.
1357         (build_builtin_candidate): Likewise.
1358         (build_user_type_conversion_1): Eliminate wasteful tree_cons
1359         usage.
1360         (build_new_function_call): Likewise.
1361         (build_object_call): Likewise.
1362         (add_candidates): New function.
1363         (build_new_op): Use it.
1364         (covert_like_real): Adjust call to build_over_call.
1365         (build_over_call): Remove args parameter.
1366         * operators.def: Add <?= and >?=.
1367
1368 2003-02-01  Richard Sandiford  <rsandifo@redhat.com>
1369
1370         * typeck.c (build_indirect_ref): Don't check flag_volatile.
1371
1372 2003-01-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1373
1374         PR c++/8849
1375         * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
1376
1377 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
1378
1379         * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
1380         BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
1381         (BINFO_LANG_ELTS): New #define.
1382         * tree.c (make_binfo): Use BINFO_LANG_ELTS.
1383
1384 2003-01-30  Geoffrey Keating  <geoffk@apple.com>
1385
1386         * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
1387
1388 2003-01-30  Mark Mitchell  <mark@codesourcery.com>
1389
1390         * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
1391         for class types.
1392         * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
1393         rather than TYPE_LANG_FLAG_0.
1394         (TYPE_BUILT_IN): Remove.
1395         (TYPE_DEPENDENT_P): New macro.
1396         (TYPE_DEPENDENT_P_VALID): Likewise.
1397         (lang_type_class): Add fields_readonly.
1398         * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
1399         * pt.c (dependent_type_p_r): New function, split out from ...
1400         (dependent_type_p): ... here.  Memoize results.
1401         * search.c (dependent_base_p): Use dependent_type_p, not
1402         uses_template_parms.
1403         * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
1404         for class types.
1405
1406 2003-01-29  Mark Mitchell  <mark@codesourcery.com>
1407
1408         * call.c (build_field_call): Use build_new_op, not build_opfncall.
1409         (prep_operand): New function.
1410         (build_new_op): Use it.  Remove dead code.
1411         * class.c (pushclass): Change "modify" parameter type from int to
1412         bool.
1413         (currently_open_class): Use same_type_p, not pointer equality.
1414         (push_nested_class): Adjust calls to pushclass, remove modify
1415         parameter.
1416         * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
1417         (pushclass): Change prototype.
1418         (push_nested_class): Likewise.
1419         (grokoptypename): Remove.
1420         (build_opfncall): Remove.
1421         (value_dependent_expression_p): Declare.
1422         (resolve_typename_type): Likewise.
1423         (resolve_typename_type_in_current_instantiation): Likewise.
1424         (enter_scope_of): Remove.
1425         (tsubst): Remove.
1426         (tsubst_expr): Likewise.
1427         (tsubst_copy): Likewise.
1428         (tsubst_copy_and_build): Likewise.
1429         * decl.c (warn_about_implicit_typename_lookup): Remove.
1430         (finish_case_label): Return error_mark_node for erroneous labels.
1431         (start_decl): Adjust calls to push_nested_class.
1432         (grokfndecl): Call push_scope/pop_scope around call to
1433         duplicate_decls.
1434         (grokdeclarator): Do not call tsubst.
1435         (start_function): Adjust calls to push_nested_class.
1436         * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
1437         (check_classfn): Use push_scope/pop_scope around type comparisions.
1438         (grokoptypename): Remove.
1439         (push_sscope): Adjust call to push_nested_class.
1440         * error.c (dump_type): Show cv-qualification of typename types.
1441         * init.c (build_member_call): Use build_new_op, not
1442         build_opfncall.
1443         * method.c (build_opfncall): Remove.
1444         * parser.c (cp_parser): Add allow_non_constant_expression_p and
1445         non_constant_expression_p.
1446         (cp_parser_constant_expression): Adjust prototype.
1447         (cp_parser_resolve_typename_type): Remove.
1448         (cp_parser_non_constant_expression): New function.
1449         (cp_parser_non_constant_id_expression): Likewise.
1450         (cp_parser_new): Set allow_non_constant_expression_p and
1451         non_constant_expression_p.
1452         (cp_parser_primary_expression): Reject `this' and `va_arg' in
1453         constant-expressions.  Note that dependent names aren't really
1454         constant.
1455         (cp_parser_postfix_expression): Reject conversions to non-integral
1456         types in constant-expressions.  Neither are increments or
1457         decrements.
1458         (cp_parser_unary_expression): Reject increments and decrements in
1459         constant-expressions.
1460         (cp_parser_direct_new_declarator): Adjust call to
1461         cp_parser_constant_expression.
1462         (cp_parser_cast_expression): Reject conversions to non-integral
1463         types in constant-expressions.
1464         (cp_parser_assignment_expression): Rejects assignments in
1465         constant-expressions.
1466         (cp_parser_expression): Reject commas in constant-expressions.
1467         (cp_parser_labeled_statement): Adjust call to
1468         cp_parser_constant_expression.
1469         (cp_parser_direct_declarator): Simplify array bounds, even in
1470         templates, when they are non-dependent.  Use
1471         resolve_typename_type, not cp_parser_resolve_typename_type.
1472         (cp_parser_class_head): Use resolve_typename_type, not
1473         cp_parser_resolve_typename_type.
1474         (cp_parser_member_declaration): Adjust call to
1475         cp_parser_constant_expression.
1476         (cp_parser_constant_initializer): Likewise.
1477         (cp_parser_constructor_declarator): Use resolve_typename_type, not
1478         cp_parser_resolve_typename_type.
1479         (cp_parser_late_parsing_default_args): Adjust call to
1480         push_nested_class.
1481         * pt.c (tsubst): Give it internal linkage.
1482         (tsubst_expr): Likewise.
1483         (tsubst_copy): Likewise.
1484         (tsubst_copy_and_build): Likewise.
1485         (push_access_scope_real): Likewise.
1486         (tsubst_friend_class): Likewise.
1487         (instantiate_class_template): Adjust call to pushclass.
1488         (value_dependent_expression_p): Give it external linkage.
1489         Robustify.
1490         (resolve_typename_type): New function.
1491         * semantics.c (finish_call_expr): Use build_new_op, not
1492         build_opfncall.
1493         (begin_constructor_declarator): Remove.
1494         (begin_class_definition): Adjust call to pushclass.
1495         (enter_scope_of): Remove.
1496         * typeck.c (comptypes): Resolve typename types as appropriate.
1497         (build_x_indirect_ref): Use build_new_op, not build_opfncall.
1498         (build_x_compound_expr): Likewise.
1499         (build_modify_expr): Likewise.
1500         (build_x_modify_expr): Likewise.
1501         * typeck2.c (build_x_arrow): Likewise.
1502
1503 2003-01-29  Fariborz Jahanian  <fjahanian@apple.com>
1504
1505         * pt.c (last_pending_template) Declare GTY().
1506
1507 2003-01-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1508
1509         PR c++/8591
1510         * parser.c (cp_parser_elaborated_type_specifier): Convert
1511         TEMPLATE_DECL to TYPE_DECL only when processing template friends.
1512         (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
1513
1514 2003-01-28  Nathan Sidwell  <nathan@codesourcery.com>
1515
1516         PR c++/9437
1517         * pt.c (unify): Don't unify '*T' with 'U C::*'.
1518
1519         PR c++/3902
1520         * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
1521         inside a declarator.
1522
1523 2003-01-27  Nathan Sidwell  <nathan@codesourcery.com>
1524
1525         * class.c (update_vtable_entry_for_fn): Add index parameter.
1526         Generate vcall thunk for covariant overriding from a virtual
1527         primary base.
1528         (dfs_modify_vtables): Adjust.
1529
1530 2003-01-25  Nathan Sidwell  <nathan@codesourcery.com>
1531
1532         PR c++/9403
1533         * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
1534         template keyword.
1535         (cp_parser_base_specifier): Look for and consume a
1536         TEMPLATE keyword. Replace switch with array index.
1537
1538         PR c++/795
1539         * semantics.c (finish_non_static_data_member): Remember the
1540         field's type even in a template.
1541
1542         PR c++/9415
1543         * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
1544         already scoped.
1545
1546         PR c++/8545
1547         * parser.c (cp_parser_cast_expression): Be more tentative.
1548
1549 2003-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1550
1551         * cp-tree.h (flagged_type_tree_s): Remove.
1552         (check_for_new_type): Likewise.
1553         * typeck2.c (check_for_new_type): Likewise.
1554
1555 2003-01-23  Nathanael Nerode  <neroden@gcc.gnu.org>
1556
1557         * dump.c: ANSIfy function declarations and definitions.
1558
1559         * cp-tree.h, decl.h: Get rid of PARAMS.  Again.
1560
1561 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
1562
1563         PR c++/9354
1564         * init.c (build_new): Set the type of the new-expression, even
1565         when processing_templte_decl.
1566
1567         PR c++/9216
1568         * parser.c (cp_parser_primary_expression): Improve error message
1569         for templates used in an expression context.
1570
1571         PR c++/8696
1572         * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
1573         parse when encountering "typedef".
1574
1575 2003-01-22  Nathanael Nerode  <neroden@gcc.gnu.org>
1576
1577         * class.c, parser.c: ANSIfy function definitions and declarations.
1578
1579 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
1580
1581         PR c++/9328
1582         * error.c (dump_decl): For an OVERLOAD, just print the name of the
1583         function; it doesn't make sense to try to print its type.
1584         * semantics.c (finish_typeof): Issue errors about invalid uses.
1585
1586         PR c++/9298
1587         * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
1588         function.
1589         (cp_parser_expression_statement): Use it.
1590         (cp_parser_explicit_instantiation): Likewise.
1591         * pt.c (do_decl_instantiation): Improve error handling logic.
1592
1593 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
1594
1595         PR c++/9384
1596         * parser.c (cp_parser_using_declaration): Issue error messages
1597         about name resolution failures here.
1598
1599         PR c++/9388
1600         * class.c (currently_open_derived_class): Use dependent_type_p.
1601         * cp-tree.h (dependent_type_p): New function.
1602         (dependent_template_arg_p): Likewise.
1603         (dependent_template_p): Likewise.
1604         (type_dependent_expression_p): Likewise.
1605         * parser.c (cp_parser_dependent_type_p): Remove.
1606         (cp_parser_value_dependent_type_p): Likewise.
1607         (cp_parser_type_dependent_expression_p): Likewise.
1608         (cp_parser_dependent_template_arg_p): Likewise.
1609         (cp_parser_dependent_template_id_p): Likewise.
1610         (cp_parser_dependent_template_p): Likewise.
1611         (cp_parser_diagnose_invalid_type_name): Replace
1612         cp_parser_dependent_type_p with dependent_type_p, etc.
1613         (cp_parser_primary_expresion): Likewise.
1614         (cp_parser_nested_name_specifier_opt): Likewise.
1615         (cp_parser_postfix_expression): Likewise.
1616         (cp_parser_unary_expression): Likewise.
1617         (cp_parser_template_name): Likewise.
1618         (cp_parser_class_name): Likewise.
1619         (cp_parser_lookup_name): Likewise.
1620         * pt.c (dependent_type_p): New function.
1621         (value_dependent_expression_p): Likewise.
1622         (type_dependent_expression_p): Likewise.
1623         (dependent_template_arg_p): Likewise.
1624         (dependent_template_id_p): Likewise.
1625         (dependent_template_p): Likewise.
1626
1627         PR c++/9285
1628         PR c++/9294
1629         * parser.c (cp_parser_simple_declaration): Return quickly when
1630         encountering errors.
1631
1632 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1633
1634         Make-lang.in (cp/decl.o-warn): Add -Wno-error.
1635
1636 2003-01-17  Jason Merrill  <jason@redhat.com>
1637
1638         PR c++/9167, c++/9358
1639         * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
1640
1641 2003-01-17  Jason Merrill  <jason@redhat.com>
1642
1643         PR c++/9342
1644         * call.c (build_conditional_expr): Always do lvalue-rvalue
1645         conversion.
1646
1647 2003-01-17  Mark Mitchell  <mark@codesourcery.com>
1648
1649         PR c++/9294
1650         * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
1651         * cp-tree.h (BASELINK_BINFO): Adjust.
1652         (BASELINK_FUNCTIONS): Likewise.
1653         (BASELINK_ACCESS_BINFO): Likewise.
1654         (tree_baselink): New structure.
1655         (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
1656         (lang_tree_node): Add baselink.
1657         * decl.c (cp_tree_node_structure): Add BASELINK case.
1658         * search.c (build_baselink): Adjust.
1659         * tree.c (cp_walk_subtrees): Add BASELINK case.  Remove BASELINK_P
1660         test from TREE_LIST case.
1661
1662         PR c++/9272
1663         * parser.c (cp_parser_constructor_declarator_p): Do not assume
1664         that a constructor cannot be declared outside of its own class.
1665
1666         * parser.c (cp_parser_resolve_typename_type): If the scope cannot
1667         be resolved, neither can the qualified name.
1668
1669         * rtti.c (get_pseudo_ti_desc): Fix thinko.
1670
1671 2003-01-16  Jason Merrill  <jason@redhat.com>
1672
1673         PR c++/8564
1674         * init.c (build_vec_init): Re-add maxindex parm.
1675         (perform_member_init, build_aggr_init): Pass it.
1676         (build_new_1): Pass it. Use an incomplete array type for full_type.
1677         * typeck.c (build_modify_expr): Pass it.
1678         * cp-tree.h: Adjust.
1679
1680 2003-01-16  Jeffrey D. Oldham  <oldham@codesourcery.com>
1681
1682         * cp-tree.h (tsubst_copy_and_build): New declaration.
1683         * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
1684         (tsubst_expr): Use 'tsubst_copy_and_build'.  Update initial comment.
1685         (tsubst_copy_and_build): New function.
1686
1687 2003-01-16  Mark Mitchell  <mark@codesourcery.com>
1688
1689         * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
1690         (PARTIAL_INSTANTIATION_P): Remove.
1691         (IMPLICIT_TYPENAME_P): Likewise.
1692         (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
1693         (build_typename_type): Remove declaration.
1694         (parmlist_is_exprlist): Likewise.
1695         * decl.c (build_typename_type): Make it static, remove third
1696         parameter.
1697         (push_class_binding): Don't do implicit typename stuff.
1698         (make_typename_type): Likewise.
1699         (lookup_name_real): Likewise.
1700         (grokdeclarator): Don't try to convert declarations into
1701         initializations.  Don't do implicit typename stuff.
1702         (parmlist_is_exprlist): Remove.
1703         (xref_basetypes): Simplify.
1704         * decl2.c (grokfield): Don't try to convert declarations into
1705         initializations.
1706         (build_anon_union_vars): Do this while processing templates, too.
1707         (finish_anon_union): Likewise.
1708         * error.c (dump_type): Remove implicit typename handling.
1709         * parser.c (cp_parser_diagnose_invalid_type_name): New method.
1710         (cp_parser_primary_expression): Correct handling of names not
1711         found by unqualified name lookup in templates.
1712         (cp_parser_nested_name_specifier_opt): Avoid checking dependency
1713         of types when possible.
1714         (cp_parser_simple_declaration): Complain intelligently about some
1715         invalid declarations.
1716         (cp_parser_member_declaration): Likewise.
1717         (cp_parser_constructor_declarator_p): Don't check when we're in a
1718         function scope.
1719         * pt.c (instantiate_class_template): Remove
1720         PARTIAL_INSTANTIATION_P gunk.
1721         * search.c (lookup_field_r): Don't build implicit typenames.
1722         (marked_pushdecls_p): Don't enter dependent base types.
1723         (unmarked_pushdecls_p): Likewise.
1724         * semantics.c (begin_class_definition): Remove implicit typename
1725         stuff.
1726
1727 2003-01-16  Nathan Sidwell  <nathan@codesourcery.com>
1728
1729         PR c++/9212
1730         * parser.c (cp_parser_direct_declarator): If accepting either
1731         abstract or named, the name must be an unqualified-id.
1732
1733 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1734
1735         * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
1736
1737 2003-01-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1738
1739         * decl2.c (check_classfn): Fix uninitialized warning.
1740         (build_anon_union_vars): Likewise.
1741         * pt.c (tsubst_copy): Likewise.
1742
1743 2003-01-14  Jeffrey D. Oldham  <oldham@codesourcery.com>
1744
1745         Further conform g++'s __vmi_class_type_info to the C++ ABI
1746         specification.
1747         * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
1748         the specification.
1749         (class_hint_flags): Likewise.
1750
1751 2003-01-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1752
1753         * config-lang.in: Add semantics.c to gtfiles.
1754         * cp-tree.h (flagged_type_tree_s): Remove lookups field.
1755         (saved_scope): Likewise.
1756         (type_lookups): Remove.
1757         (deferred_access): New structure.
1758         (type_access_control): Remove.
1759         (save_type_access_control): Likewise.
1760         (reset_type_access_control): Likewise.
1761         (decl_type_access_control): Likewise.
1762         (push_deferring_access_checks): Declare.
1763         (resume_deferring_access_checks): Likewise.
1764         (stop_deferring_access_checks): Likewise.
1765         (pop_deferring_access_checks): Likewise.
1766         (get_deferred_access_checks): Likewise.
1767         (pop_to_parent_deferring_access_checks): Likewise.
1768         (perform_deferred_access_checks): Likewise.
1769         (perform_or_defer_access_check): Likewise.
1770         * decl.c (make_typename_type): Use perform_or_defer_access_check.
1771         (make_unbound_class_template): Likewise.
1772         (grokdeclarator): Don't call decl_type_access_control.
1773         * parser.c (cp_parser_context): Remove deferred_access_checks
1774         and deferring_access_checks_p fields.
1775         (cp_parser_context_new): Adjust.
1776         (cp_parser): Remove access_checks_lists.
1777         (cp_parser_defer_access_check): Remove.
1778         (cp_parser_start_deferring_access_checks): Remove.
1779         (cp_parser_stop_deferring_access_checks): Remove.
1780         (cp_parser_perform_deferred_access_checks): Remove.
1781         (cp_parser_nested_name_specifier_opt): Use new deferred access
1782         functions.
1783         (cp_parser_simple_declaration): Likewise.
1784         (cp_parser_template_id): Likewise.
1785         (cp_parser_function_definition): Likewise.
1786         (cp_parser_class_specifier): Likewise.
1787         (cp_parser_lookup_name): Likewise.
1788         (cp_parser_single_declaration): Likewise.
1789         (cp_parser_pre_parsed_nested_name_specifier): Likewise.
1790         (cp_parser_parse_tentatively): Likewise.
1791         (cp_parser_parse_definitely): Likewise.
1792         (yyparse): Likewise.
1793         (cp_parser_init_declarator): Remove access_checks parameter.
1794         Use new deferred access functions.
1795         (cp_parser_function_definition_from_specifiers_and_declarator):
1796         Likewise.
1797         (cp_parser_class_head): Remove deferring_access_checks_p and
1798         saved_access_checks parameters.  Use new deferred access functions.
1799         (cp_parser_member_specification_opt): Don't call
1800         reset_type_access_control.
1801         * search.c (type_access_control): Remove.
1802         * semantics.c: Include "gt-cp-semantics.h".
1803         (deferred_type_access_control): Remove.
1804         (deferred_access_stack): New variable.
1805         (deferred_access_free_list): Likewise.
1806         (push_deferring_access_checks): New function.
1807         (resume_deferring_access_checks): Likewise.
1808         (stop_deferring_access_checks): Likewise.
1809         (pop_deferring_access_checks): Likewise.
1810         (get_deferred_access_checks): Likewise.
1811         (pop_to_parent_deferring_access_checks): Likewise.
1812         (perform_deferred_access_checks): New function, adapted from
1813         cp_parser_perform_deferred_access_checks.
1814         (perform_or_defer_access_check): New function, adapted from
1815         cp_parser_defer_access_check.
1816         (current_type_lookups): Remove.
1817         (deferred_type_access_control): Likewise.
1818         (decl_type_access_control): Likewise.
1819         (save_type_access_control): Likewise.
1820         (reset_type_access_control): Likewise.
1821         (begin_function_definition): Adjust.
1822         (begin_class_definiton): Likewise.
1823
1824 2003-01-13  Jason Merrill  <jason@redhat.com>
1825
1826         PR c++/8748
1827         * class.c (build_base_path): Take the address before calling save_expr.
1828
1829         * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
1830         all the ambiguous conversions are bad.
1831
1832         * class.c (maybe_warn_about_overly_private_class): Don't stop
1833         searching when we find a nonprivate method.
1834
1835         * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
1836
1837 2003-01-12  Mark Mitchell  <mark@codesourcery.com>
1838
1839         * cp-tree.h (get_arglist_len_in_bytes): Remove.
1840
1841         PR c++/9264
1842         * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
1843         typeame types more robustly.
1844
1845 2003-01-11  Phil Edwards  <pme@gcc.gnu.org>
1846
1847         * parser.c:  Fix comment typos.
1848
1849 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
1850
1851         PR c++/9099
1852         * parser.c (cp_parser_scope_through_which_access_occurs): Handle
1853         an object_type which is not a class type.
1854
1855 2003-01-10  Geoffrey Keating  <geoffk@apple.com>
1856
1857         * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
1858         (cp_parser_late_parsing_default_args): Likewise.
1859
1860 2003-01-10  Nathanael Nerode  <neroden@gcc.gnu.org>
1861
1862         * cfns.gperf: ANSIfy function declarations.
1863         * cfns.h: Regenerate.
1864         * cp-tree.h: ANSIfy function declarations.
1865
1866 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
1867
1868         * cp-tree.h (reparse_absdcl_as_expr): Remove.
1869         (reparse_absdcl_as_casts): Likewise.
1870         (reparse_decl_as_expr): Likewise.
1871         (finish_decl_parsing): Likewise.
1872         * decl2.c (reparse_absdcl_as_expr): Remove.
1873         (reparse_absdcl_as_casts): Likewise.
1874         (repase_decl_as_expr): Likewise.
1875         (finish_decl_parsing): Likewise.
1876
1877         PR c++/9128
1878         PR c++/9153
1879         PR c++/9171
1880         * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
1881         function.
1882         (cp_parser_nested_name_specifier_opt): Correct the
1883         check_dependency_p false.
1884         (cp_parser_postfix_expression): Fix formatting.
1885         (cp_parser_decl_specifier_seq): Avoid looking for constructor
1886         declarators when possible.
1887         (cp_parser_template_id): Avoid performing name-lookup when
1888         possible.
1889         (cp_parser_class_head): Do not count specializations when counting
1890         levels of templates.
1891         (cp_parser_constructor_declarator_p): Return immediately if
1892         there's no chance that the tokens form a constructor declarator.
1893         * rtti.c (throw_bad_typeid): Add comment.  Do not return an
1894         expression with reference type.
1895         (get_tinfo_decl_dynamic): Do not return an expression with
1896         reference type.
1897         (build_typeid): Add comment.  Do not return an expression with
1898         reference type.
1899         * typeck.c (build_class_member_access_expr): Improve handling of
1900         conditionals and comma-expressions as objects.
1901
1902 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
1903
1904         * cfns.gperf: ANSIfy function declarations.
1905         * cfns.h: Regenerate.
1906         * cp-tree.h: ANSIfy function declarations.
1907         * parser.c: ANSIfy function declarations & definitions.
1908
1909         * decl.c (bad_specifiers): Fix parameter order error I introduced.
1910
1911 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
1912
1913         Merge from pch-branch:
1914
1915         2003-01-09  Geoffrey Keating  <geoffk@apple.com>
1916
1917         Merge to tag pch-merge-20030102:
1918
1919         * semantics.c (finish_translation_unit): Don't call finish_file.
1920         * parser.c: Don't include ggc.h.
1921         (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
1922         read first token here.  Don't allow PCH files after the first
1923         token is read.
1924         (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
1925         (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
1926         (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
1927         (cp_parser_late_parsing_for_member): Don't duplicate call to
1928         cp_lexer_set_source_position_from_token.
1929         (cp_parser_late_parsing_default_args): Likewise.
1930         (yyparse): Call finish_file after clearing the_parser.
1931
1932         2002-12-11  Geoffrey Keating  <geoffk@apple.com>
1933
1934         * Make-lang.in: Remove $(GGC_H) from all dependencies.
1935         (CXX_TREE_H): Add $(GGC_H).
1936         * class.c: Don't include ggc.h.
1937         (field_decl_cmp): Make parameters be 'const void *' to match qsort.
1938         (method_name_cmp): Likewise.
1939         (resort_data): New variable.
1940         (resort_field_decl_cmp): New.
1941         (resort_method_name_cmp): New.
1942         (resort_sorted_fields): New.
1943         (resort_type_method_vec): New.
1944         (finish_struct_methods): Delete cast.
1945         (finish_struct_1): Delete cast.
1946         * cp-tree.h: Include ggc.h.
1947         (struct lang_type_class): Add reorder attribute to field `methods'.
1948         (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
1949         (resort_sorted_fields): New prototype.
1950         (resort_type_method_vec): New prototype.
1951         * call.c: Don't include ggc.h.
1952         * decl.c: Likewise.
1953         * decl2.c: Likewise.
1954         * init.c: Likewise.
1955         * lex.c: Likewise.
1956         * method.c: Likewise.
1957         * optimize.c: Likewise.
1958         * parse.y: Likewise.
1959         * pt.c: Likewise.
1960         * repo.c: Likewise.
1961         * search.c: Likewise.
1962         * semantics.c: Likewise.
1963         * spew.c: Likewise.
1964         * tree.c: Likewise.
1965
1966         * lang-specs.h: Remove comment.
1967
1968         2002-12-03  Geoffrey Keating  <geoffk@apple.com>
1969
1970         * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
1971         (operator_name_info): Mark to be saved for PCH, specify size.
1972         (assignment_operator_name_info): Likewise.
1973
1974         2002-11-19  Geoffrey Keating  <geoffk@apple.com>
1975
1976         * decl.c (anon_cnt): Mark to be saved for PCH.
1977
1978         2002-10-25  Geoffrey Keating  <geoffk@apple.com>
1979
1980         * lex.c  (init_reswords): Delete now-untrue comment.
1981         Allocate ridpointers using GGC.
1982
1983         2002-10-04  Geoffrey Keating  <geoffk@apple.com>
1984
1985         * cp-tree.h (union lang_decl_u2): Add tags to all fields.
1986
1987         * g++spec.c (lang_specific_driver): Don't include standard
1988         libraries in `added'.
1989
1990         2002-08-27  Geoffrey Keating  <geoffk@redhat.com>
1991
1992         * decl2.c (finish_file): Call c_common_write_pch.
1993         * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
1994
1995         2002-08-17  Geoffrey Keating  <geoffk@redhat.com>
1996
1997         * g++spec.c (lang_specific_driver): Treat .h files as C++ header
1998         files when using g++.
1999         * lang-specs.h: Handle compiling C++ header files.
2000
2001 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
2002
2003         * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
2004
2005 2003-01-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2006
2007         * pt.c (push_access_scope_real): Call push_to_top_level for
2008         function in namespace scope.
2009         (pop_access_scope): Call pop_from_top_level for function in
2010         namespace scope.
2011
2012 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
2013
2014         * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
2015
2016 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
2017
2018         * Make-lang.in (c++.install-common, c++.install-man,
2019         c++.uninstall): Prepend $(DESTDIR) to destination paths in
2020         all (un)installation commands.
2021         (c++.install-common): Rewrite $(LN) commands to support
2022         DESTDIR with "ln" as well as with "ln -s".
2023
2024 2003-01-08  Jason Merrill  <jason@redhat.com>
2025
2026         * parser.c (cp_parser_primary_expression): See through explicitly
2027         scoped ALIAS_DECLs, too.
2028
2029 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
2030
2031         * decl.c: Remove some #if 0 code.
2032
2033         * decl.c: ANSIfy function declarations.
2034
2035 2003-01-07  Mark Mitchell  <mark@codesourcery.com>
2036
2037         * parser.c (cp_parser_asm_definition): Correct handling of omitted
2038         operands.
2039
2040 2003-01-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2041
2042         PR c++/9030
2043         * decl.c (make_typename_type): Check access only when tf_error.
2044         (make_unbound_class_template): Likewise.
2045         * pt.c (saved_access_scope): New variable.
2046         (push_access_scope_real): New function.
2047         (push_access_scope): Likewise.
2048         (pop_access_scope): Likewise.
2049         (tsubst_default_argument): Use them.
2050         (instantiate_template): Likewise.
2051         (regenerate_decl_from_template): Likewise.
2052         (instantiate_decl): Likewise.
2053         (get_mostly_instantiated_function_type): Likewise.
2054
2055 2003-01-07  Nathanael Nerode <neroden@gcc.gnu.org>
2056
2057         * tree.c: Delete bogus #if 0 code.
2058
2059 2003-01-07  Andreas Schwab  <schwab@suse.de>
2060
2061         * class.c (layout_class_type): Don't use
2062         PCC_BITFIELD_TYPE_MATTERS if not defined.
2063
2064 2003-01-06  Mark Mitchell  <mark@codesourcery.com>
2065
2066         PR c++/9165
2067         * decl2.c (build_cleanup): Mark the object as used.
2068
2069         * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
2070         (hash_local_specialization): New function.
2071         (register_local_specialization): Revert 2003-01-05 change.
2072         (instantiate_decl): Use hash_local_specialization when creating
2073         the local_specializations table.
2074
2075         * decl2.c (mark_used): Do not synthesize thunks.
2076
2077         * class.c (layout_class_type): Correct handling of unnamed
2078         bitfields wider than their types.
2079
2080         PR c++/9189
2081         * parser.c (cp_parser): Remove default_arg_types.  Update
2082         documentation for unparsed_functions_queues.
2083         (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
2084         parameter.
2085         (cp_parser_new): Don't set parser->default_arg_types.
2086         (cp_parser_function_definition): Adjust usage of
2087         unparsed_funtions_queues.
2088         (cp_parser_class_specifier): Don't mess with
2089         parser->default_arg_types.  Handle default argument processing in
2090         a separate phase from function body processing.
2091         (cp_parser_template_declaration_after_export): Adjust usage of
2092         unparsed_functions_queues.
2093         (cp_parser_late_parsing_for_member): Do not handle default
2094         arguments.
2095
2096 2003-01-06  Nathan Sidwell  <nathan@codesourcery.com>
2097
2098         PR c++/9109
2099         * parser.c (cp_parser_declarator_kind): New enum.
2100         (cp_parser_declarator): Adjust.
2101         (cp_parser_direct_declarator): Adjust. Allow for either named or
2102         abstract declarator. Prefer abstract, if possible. Allow
2103         parenthesized function name.
2104         (cp_parser_condition): Adjust cp_parser_declarator call.
2105         (cp_parser_explicit_instantiation): Likewise.
2106         (cp_parser_init_declarator): Likewise.
2107         (cp_parser_type_id): Likewise.
2108         (cp_parser_function_definition): Likewise.
2109         (cp_parser_member_declaration): Likewise.
2110         (cp_parser_parameter_declaration): Use cp_parser_declarator to do
2111         the tentative parsing.
2112         (cp_parser_exception_declaration): Likewise.
2113
2114 2003-01-05  Mark Mitchell  <mark@codesourcery.com>
2115
2116         * parser.c (cp_parser_template_parameter): Adjust call to
2117         cp_parser_parameter_declaration.
2118         (cp_parser_parameter_declaration_list): Likewise.
2119         (cp_parser_parameter_declaration): Replace
2120         greater_than_is_operator_p with template_parm_p parameter.  Do not
2121         cache tokens for template default arguments.
2122
2123         * pt.c (retrieve_local_specialization): Use htab_find, not
2124         htab_find_with_hash.
2125         (register_local_specialization): Use htab_find_slot, not
2126         htab_find_slot_with_hash.
2127         (instantiate_decl): Pass a hash function to htab_create.
2128
2129 2003-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2130
2131         * parser.c (cp_parser_binary_expression,
2132         cp_parser_multiplicative_expression,
2133         cp_parser_additive_expression, cp_parser_shift_expression,
2134         cp_parser_relational_expression, cp_parser_equality_expression,
2135         cp_parser_and_expression, cp_parser_exclusive_or_expression,
2136         cp_parser_inclusive_or_expression,
2137         cp_parser_logical_and_expression, cp_parser_logical_or_expression,
2138         cp_parser_binary_expression): Const-ify.
2139
2140 2003-01-04  Mark Mitchell  <mark@codesourcery.com>
2141
2142         * method.c (use_thunk): Disable access control while building the
2143         body of the thunk.
2144
2145 2003-01-03  Nathanael Nerode  <neroden@gcc.gnu.org>
2146
2147         * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
2148         front end.
2149
2150 2003-01-03  Matt Austern  <austern@apple.com>
2151
2152         * cp-tree.h (struct lang_type_class): add field for key method
2153         (cp_global_trees): rename dynamic_classes to keyed_classes
2154         (key_method): add definition
2155         * class.c (finish_struct_1): compute class's key method, and add
2156         the class to keyed_classes list if there is no key method.
2157         * decl.c (finish_function): add class to keyed_classes list if we
2158         see a definition of the class's key method.
2159         * pt.c (instantiate_class_template): add template specialization
2160         of a dynamic class to keyed_classes list.
2161         * decl2.c (key_method): remove
2162         (finish_file): iterate only through keyed_classes list when
2163         deciding whether to emit vtables, remove class from its list after
2164         we do the emission.
2165
2166 2003-01-02  Jason Merrill  <jason@redhat.com>
2167
2168         * call.c (build_conditional_expr): Stabilize lvalues properly.
2169         * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
2170         * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
2171         Don't allow CALL_EXPR or VA_ARG_EXPR, either.
2172
2173         * call.c (convert_like_real): Call decl_constant_value for an
2174         IDENTITY_CONV even if there are no more conversions.
2175
2176         * cvt.c (build_up_reference): Don't push unnamed temps.
2177
2178         * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
2179
2180         * dump.c (cp_dump_tree): Don't try to dump class-specific fields
2181         for a backend struct.
2182
2183         * except.c (wrap_cleanups_r, build_throw): Make
2184         MUST_NOT_THROW_EXPRs void.
2185         * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
2186
2187         * init.c (build_vec_delete_1): Pre-evaluate the base address.
2188
2189         * init.c (get_temp_regvar): Simplify logic.
2190
2191         * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
2192         our replacement is a decl.
2193
2194         * decl.c (cp_make_fname_decl): Push the decls inside the
2195         outermost scope.
2196
2197 2003-01-03  Nathan Sidwell  <nathan@codesourcery.com>
2198
2199         PR c++/45, c++/3784
2200         * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
2201         the same too.
2202
2203 2003-01-03  Graham Stott  <graham.stott@btinternet.com>
2204
2205         * parser.c (struct cp_parser): Add access_checks_lists field
2206         (cp_parser_simple_declaration): Use.
2207         (cp_parser_init_declarator): Likewise.
2208
2209 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
2210
2211         * parser.c (cp_parser_declaration): Accept the __extension__
2212         keyword before the declaration.
2213
2214         PR c++/2843
2215         * parser.c (cp_parser_parameter_declaration): Allow attributes to
2216         appear after the declarator.
2217
2218         * call.c (build_new_method_call): Fix typo in message format
2219         string.
2220
2221 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
2222
2223         * parser.c (cp_lexer_next_token_is): Declare it inline.
2224         (cp_lexer_set_source_position_from_token): Likewise.
2225         (cp_lexer_debugging_p): Likewise.
2226         (cp_parser_parsing_tentatively): Likewise.
2227         (cp_parser_nested_name_specifier_opt): Reduce the number of calls
2228         to the cp_lexer_peek_token.
2229
2230         * parser.c (cp_parser_sizeof_operand): Do not evaluate the
2231         expression.
2232
2233 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
2234
2235         * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
2236         cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
2237         cp/repo.c: Fix copyright years.
2238
2239 2003-01-01  Neil Booth  <neil@daikokuya.co.uk>
2240
2241         * lex.c: Remove superfluous include of cpplib.h.
2242         (CONSTRAINT): Define without conditions.
2243         (init_cp_pragma): Use c_register_pragma.
2244
2245 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
2246
2247         * .cvsignore: Remove.
2248
2249 2002-12-31  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2250
2251         * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
2252           except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
2253           lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
2254           pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
2255           typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
2256           copyright header.
2257         * lex.h: parse.y is dead, so don't mention it.  Also replace the
2258           copyright header with the default GNU copyright header.
2259
2260 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
2261
2262         * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
2263         (lookup_name_namespace_only): Likewise.
2264         (begin_only_namespace_names): Likewise.
2265         (end_only_namespace_names): Likewise.
2266         * decl.c (only_namespace_names): Remove.
2267         (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
2268         (lookup_name_real): Do not check only_namespace_names.
2269         (lookup_name_namespace_only): Remove.
2270         (begin_only_namespace_names): Likewise.
2271         (end_only_namespace_names): Likewise.
2272         * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
2273         nested-name-specifiers more gracefully.
2274         (cp_parser_class_or_namespace_name): Avoid looking up namespace
2275         names when they cannot possibly appear.
2276         (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
2277         (cp_parser_elaborated_type_specifier): Likewise.
2278         (cp_parser_namespace_name): Only look for namespace names.
2279         (cp_parser_lookup_name): Add is_namespace parameter.
2280         (cp_parser_lookup_name_simple): Adjust call to
2281         cp_parser_lookup_name.
2282
2283         * parser.c (cp_parser_dependent_type_p): Fix thinko.
2284
2285 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
2286
2287         * .cvsignore: Update.
2288
2289 2002-12-31  Nathan Sidwell  <nathan@codesourcery.com>
2290
2291         * class.c (modify_vtable_entry): Remove unused variable.
2292         (get_vcall_index): Always expect a non-thunk.
2293         (update_vtable_entry_for_fn): Combine covariant adjustments, when
2294         overriding a thunk. Pass get_vcall_index a non-thunk.
2295
2296         * decl2.c (finish_file): Mark undefined inlines as extern.
2297
2298 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
2299
2300         * cp-tree.def (RETURN_INIT): Remove.
2301         * cp-tree.h (DECL_IN_MEMORY_P): Remove.
2302         (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
2303         (note_level_for_for): Remove.
2304         (note_level_for_try): Likewise.
2305         (note_level_for_catch): Likewise.
2306         (finish_named_return_value): Likewise.
2307         (do_pushlevel): Change prototype.
2308         (pending_lang_change): Remove.
2309         * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
2310         sk_for.
2311         (note_level_for_for): Remove.
2312         (note_level_for_try): Likewise.
2313         (note_level_for_catch): Likewise.
2314         (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
2315         * parser.c (cp_parser_context_free_list): Make it "deletable".
2316         (cp_parser_template_argument): Remove misleading comment.
2317         * pt.c (tsubst_expr): Remove RETURN_INIT code.
2318         * semantics.c (genrtl_named_return_value): Remove.
2319         (do_pushlevel): Take a scope kind as an argument.
2320         (begin_if_stmt): Adjust.
2321         (begin_while_stmt): Likewise.
2322         (begin_for_stmt): Likewise.
2323         (finish_for_init_stmt): Likewise.
2324         (begin_switch_stmt): Likewise.
2325         (begin_handler): Likewise.
2326         (begin_compound_stmt): Likewise.
2327         (finish_named_return_value): Remove.
2328         (cp_expand_stmt): Remove RETURN_INIT case.
2329         * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
2330
2331 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
2332
2333         PR c++/9112
2334         * parser.c (cp_parser_direct_declarator): Handle erroneous
2335         parenthesized declarators correctly.
2336
2337 2002-12-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2338
2339         * cp-tree.h (pending_lang_change): Declare.
2340
2341 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
2342
2343         * parser.c (cp_parser_context_free_list): New variable.
2344         (cp_parser_context_new): Use it.
2345         (cp_parser_error): Check return code from
2346         cp_parser_simulate_error.
2347         (cp_parser_simulate_error): Return a value.
2348         (cp_parser_id_expression): Optimize common case.
2349         (cp_parser_class_name): Likewise.
2350         (cp_parser_class_specifier): Adjust call to
2351         cp_parser_late_parsing_default_args.
2352         (cp_parser_lookup_name): Optimize common case.
2353         (cp_parser_late_parsing_for_member): Adjust call to
2354         cp_parser_late_parsing_default_args.
2355         (cp_parser_late_parsing_default_args): Add scope parameter.
2356         (cp_parser_require): Avoid creating the error message unless it's
2357         needed.
2358         (cp_parser_parse_definitely): Place free'd contexts on the free
2359         list.
2360
2361         * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
2362
2363 2002-12-30  David Edelsohn  <edelsohn@gnu.org>
2364
2365         * parser.c (cp_parser_parameter_declaration_clause): Treat system
2366         header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
2367
2368 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
2369
2370         * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
2371         GCC, not GNU CC.
2372
2373 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
2374
2375         * parse.y: Remove.
2376         * spew.c: Likewise.
2377         * Make-lang.in (gt-cp-spew.h): Remove.
2378         * cp-tree.h (do_pending_lang_change): Remove.
2379         (do_identifier): Change prototype.
2380         (finish_id_expr): Remove.
2381         * decl.c (lookup_name_real): Remove yylex variable.
2382         * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
2383         * lex.c (init_cpp_parse): Remove.
2384         (reduce_cmp): Likewise.
2385         (token_cmp): Likewise.
2386         (yychar): Likewise.
2387         (lastiddecl): Likewise.
2388         (token_count): Likewise.
2389         (reduce_count): Likewise.
2390         (yyhook): Likewise.
2391         (print_parse_statistics): Likewise.
2392         (do_pending_lang_change): Likewise.
2393         (do_identifier): Remove parsing parameter.
2394         * lex.h (lastiddecl): Remove.
2395         (looking_for_typename): Remove.
2396         (looking_for_template): Likewise.
2397         (pending_lang_change): Likewise.
2398         (yylex): Likewise.
2399         * semantics.c (finish_id_expr): Remove.
2400
2401         * decl.c (grokdeclarator): Diagnost "extern thread" and "static
2402         thread" correctly.
2403
2404 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
2405
2406         * decl.c, decl2.c, decl.h:  GCC, not GNU CC.  This is the C++ front
2407         end, not the C front end.
2408
2409 2002-12-30  Nathan Sidwell  <nathan@codesourcery.com>
2410
2411         * cp-tree.h (THUNK_TARGET): New macro.
2412         (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
2413         (finish_thunk): Remove offset parms.
2414         * class.c (find_final_overrider): Look through thunks.
2415         (get_vcall_index): Use THUNK_TARGET.
2416         (update_vtable_entry_for_fn): Look through thunks. Set covariant
2417         fixed offset here. Adjust finish_thunk call.
2418         (build_vtbl_initializer): Adjust finish_thunk calls.
2419         * mangle.c (mangle_call_offset): Remove superfluous if.
2420         (mangle_thunk): Adjust.
2421         * method.c (make_thunk): Adjust.
2422         (finish_thunk): Adjust.
2423         (thunk_adjust): Remove assert.
2424         (use_thunk): Use THUNK_TARGET
2425         * dump1.c (cp_dump_tree): Adjust thunk dumping.
2426
2427         PR c++/9054
2428         * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
2429         * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
2430
2431 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2432
2433         Remove traditional C constructs 4/n.
2434         * decl2.c (grok_method_quals, warn_if_unknown_interface,
2435         grok_x_components, cp_build_parm_decl, build_artificial_parm,
2436         maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
2437         delete_sanity, check_member_template, check_java_method,
2438         check_classfn, finish_static_data_member_decl, grokfield,
2439         grokbitfield, grokoptypename, grok_function_init,
2440         cplus_decl_attributes, constructor_name, defer_fn,
2441         build_anon_union_vars, finish_anon_union, coerce_new_type,
2442         coerce_delete_type, comdat_linkage, maybe_make_one_only,
2443         key_method, import_export_vtable, import_export_class,
2444         output_vtable_inherit, import_export_decl, import_export_tinfo,
2445         build_cleanup, get_guard, get_guard_bits, get_guard_cond,
2446         set_guard, start_objects, finish_objects,
2447         start_static_storage_duration_function,
2448         finish_static_storage_duration_function, get_priority_info,
2449         start_static_initialization_or_destruction,
2450         finish_static_initialization_or_destruction,
2451         do_static_initialization, do_static_destruction,
2452         prune_vars_needing_no_initialization, write_out_vars,
2453         reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
2454         add_using_namespace, merge_functions, ambiguous_decl,
2455         lookup_using_namespace, lookup_using_namespace,
2456         qualified_lookup_using_namespace, set_decl_namespace,
2457         decl_namespace, current_decl_namespace, push_decl_namespace,
2458         pop_decl_namespace, push_scope, pop_scope, add_function,
2459         arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
2460         lookup_arg_dependent, do_namespace_alias,
2461         validate_nonmember_using_decl, do_nonmember_using_decl,
2462         do_toplevel_using_decl, do_local_using_decl,
2463         do_class_using_decl, do_using_directive, check_default_args,
2464         mark_used, handle_class_head): Use C90 prototypings.  Use booleans.
2465         * parser.c (cp_parser_class_head): Use booleanss.
2466         * decl.c (walk_globals, walk_vtables): Likewise.
2467         * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
2468         walk_globals): Change return type from 'int' to 'bool'.
2469         * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
2470         throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
2471         build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
2472         get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
2473         qualifier_flags, tinfo_base_init, generic_initializer,
2474         ptr_initializer, dfs_class_hint_mark, ptm_initializer,
2475         dfs_class_hint_unmark, class_hint_flags, class_initializer,
2476         typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
2477         get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
2478         unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
2479         * repo.c (repo_compile_flags, repo_template_declared,
2480         repo_template_defined, repo_class_defined, repo_get_id,
2481         repo_template_used, repo_vtable_used, repo_inline_used,
2482         repo_tinfo_used, repo_template_instantiated, extract_string,
2483         open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
2484         finish_repo): Likewise.
2485         * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
2486         cxx_print_xnode): Likewise..
2487         * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
2488         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
2489         * cxxfilt.c (demangle_it, print_demangler_list, usage,
2490         standard_symbol_characters, hp_symbol_characters, main, fatal):
2491         Likewise.
2492         (strip_underscore):  Change type from 'int' to 'bool'.
2493         (main): Use boolean constants.
2494
2495 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2496
2497         Remove traditional C constructs 3/n.
2498         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
2499         build_up_reference, warn_ref_binding, convert_to_reference,
2500         convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
2501         convert_to_void, convert, convert_force, build_type_conversion,
2502         build_expr_type_conversion, type_promotes_to,
2503         perform_qualification_conversions): Use C90 prototyping style.
2504         * decl2.c (grok_array_decl): Use boolean constant.
2505         (delete_sanity): Likewise.
2506         * typeck.c (build_unary_op): Likewise.
2507         * semantics.c (finish_switch_cond): Likewise.
2508         * parser.c (cp_parser_direct_new_declarator): Likewise.
2509         * init.c (build_new): Likewise.
2510
2511 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
2512
2513         * Make-lang.in (po-generated): Remove parse.c.
2514         (CXX_OBJS): Remove parse.o and spew.o.  Add parser.o.
2515         ($(srcdir)/cp/parse.h): Remove target.
2516         ($(srcdir)/cp/parse.c): Likewise.
2517         (gt-cp-parse.h): Likewise.
2518         (gt-cp-parser.h): New target.
2519         (c++.distclean): Do not remove parse.output.
2520         (c++.maintainer-clean): Do not remove parse.c or parse.h.
2521         (cp/spew.o): Remove target.
2522         (cp/lex.o): Adjust dependencies.
2523         (cp/pt.o): Likewise.
2524         (cp/parse.o): Likewise.
2525         (cp/TAGS): Do not mention parse.c.
2526         (cp/parser.o): New target.
2527         * NEWS: Mention the new parser.
2528         * call.c (build_scoped_method_call): Simplify.
2529         (build_method_call): Likewise.
2530         (build_new_function_call): Adjust calls to add_function_candidate
2531         and add_template_candidate.
2532         (build_new_op): Improve handling of erroroneous operands.
2533         (convert_default_arg): Remove circular argument processing.
2534         (name_as_c_string): New function.
2535         (build_new_method_call): Use it.
2536         (perform_implicit_conversion): Use error_operand_p.
2537         * class.c (finish_struct_anon): Use constructor_name_p.
2538         (check_field_decls): Likewise.
2539         (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
2540         (resolve_address_of_overloaded_function): Likewise.
2541         (instantiate_type): Tweak pointer-to-member handling.
2542         (get_primary_binfo): Remove incorrect assertion.
2543         * config-lang.in (gtfiles): Add parser.c, remove parse.c.
2544         * cp-tree.h (DEFARG_TOKENS): New macro.
2545         (default_arg): New structure.
2546         (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
2547         (lang_tree_node): Add default_arg.
2548         (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
2549         (type_info_ref_type): New macro.
2550         (saved_scope): Make processing_explicit_instantiation a boolean.
2551         (check_access): New field.
2552         (unparsed_text): Remove.
2553         (language_function): Remove unparsed_inlines.
2554         (error_operand_p): New macro.
2555         (lang_decl): Adjust pending_inline_info.
2556         (DEFARG_POINTER): Remove.
2557         (tag_types): Add typenames.
2558         (lookup_ualified_name): Declare.
2559         (lookup_name_real): Likewise.
2560         (shadow_tag): Adjust prototype.
2561         (get_scope_of_declarator): Declare it.
2562         (process_next_inline): Remove it.
2563         (check_for_missing_semicolon): Likewise.
2564         (maybe_get_template_decl_from_type_decl): Declare it.
2565         (finish_label_stmt): Adjust prototype.
2566         (finish_non_static_data_meber): Declare it.
2567         (finish_pseudo_destructor_call_expr): Rename to ...
2568         (finish_pseudo_destructor_expr): ... this.
2569         (finish_compound_literal): Declare it.
2570         (begin_inline_definitions): Remove it.
2571         (init_spew): Remove.
2572         (peekyylex): Likewise.
2573         (arbitrate_lookup): Likewise.
2574         (frob_opname): Likewise.
2575         (maybe_snarf_defarg): Likewise.
2576         (add_defarg_fn): Likewise.
2577         (do_pending_defargs): Likewise.
2578         (done_pending_defargs): Likewise.
2579         (unprocessed_defarg_fn): Likewise.
2580         (replace_defarg): Likewise.
2581         (end_input): Likewise.
2582         (get_overloaded_fn): Likewise.
2583         * cvt.c (convert_to_reference): Improve error handling.
2584         * decl.c (lookup_name_real): Do not declare it static.
2585         (maybe_push_to_top_level): Set check_access.
2586         (identifier_type_value): Adjust call to lookup_name_real.
2587         (lookup_qualified_name): New method.
2588         (lookup_name_real): Remove special-case parsing code.
2589         (lookup_name-nonclass): Adjust call to lookup_name_real.
2590         (lookup_name_namespace_only): Likewise.
2591         (lookup_name): Likewise.
2592         (check_tag_decl): Return the type declared.
2593         (shadow_tag): Likewise.
2594         (register_dtor_fn): Tweak check_access.
2595         (grokfndecl): Use constructor_name_p.
2596         (get_scope_of_declarator): New function.
2597         (grokdeclarator): Obscure tweaks for slightly different declarator
2598         representations.
2599         (start_method): Return error_mark_node to indicate failure.
2600         (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
2601         * decl2.c (constructor_name_full): Simplify.
2602         (constructor_name): Use it.
2603         (build_expr_from_tree): Adjust for changes to do new parser.
2604         (push_scope): Improve robustness.
2605         (validate_nonmember_using_decl): Process declarations, not names.
2606         (do_class_using_decl): Likewise.
2607         (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
2608         here.
2609         * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
2610         * expr.c (cxx_expand_expr): Handle BASELINKs.
2611         * init.c (member_init_ok_or_else): Issue more errors.
2612         (build_offset_ref): Tweak handling of FUNCTION_DECLs.
2613         * lex.c: Do not include parse.h.
2614         (yypring): Do not declare.
2615         (yylval): Likewise.
2616         (make_reference_declarator): Remove error-generating code.
2617         (rid_to_yy): Remove.
2618         (cxx_init): Do not call init_spew.
2619         (yypring): Remove.
2620         (check_for_missing_semicolon): Remove.
2621         * lex.h (got_scope): Remove.
2622         (got_object): Remove.
2623         * method.c (hack_identifier): Use finish_non_static_data_member.
2624         (implicitly_declare_fn): Adjust use of constructor_name.
2625         * parser.c: New file.
2626         * pt.c (parse.h): Do not include it.
2627         (maybe_get_template_decl_from_template): Do not declare it.
2628         (finish_member_template_decl): Tweak.
2629         (begin_explicit_instantiation): Adjust for
2630         processing_explicit_instantiation being boolean.
2631         (end_explicit_instantiation): Likewise.
2632         (maybe_process_partial_specialization): Tighten specialization
2633         test.
2634         (retrieve_local_specialization): Adjust ue of hash table.
2635         (eq_local_specializations): New function.
2636         (register_local_specialization): Likewise.
2637         (push_template_decl_real): Remove unnecessary test.
2638         (maybe_get_template_decl_from_type_decl): Don't make it static.
2639         (for_each_template_parm_r): Handle TYPEOF_TYPE.
2640         (tsubst_copy): Use retrieive_local_specialization to handle
2641         PARM_DECL.  Adjust handling of CONST_DECLs.  Handle BASELINKs.
2642         Handle COMPONENT_REFs with pseudo-destructor-expressions.
2643         Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
2644         (tsubst_expr): Pass decls, not names, to do_local_using_decl.
2645         (unify): Tweak handling of CONST_DECLs.
2646         (regenerate_decl_from_template): Use push_nested_class.
2647         (template_for_substitution): New funciton.
2648         (instantiate_decl): Use it.  Register parameters as local
2649         specializations.
2650         * rtti.c (init_rtti_processing): Set type_info_ref_type.
2651         (build_typeid): Use it.
2652         (get_typeid): Likeise.
2653         * search.c (accessible_p): Use check_access, not
2654         flag_access_control.
2655         (adjust_result_of_qualified_name_lookup): Pay attention to the
2656         context_class.
2657         * semantics.c (finish_asm_stmt): Adjust error handling.
2658         (finish_label_stmt): Return the statement.
2659         (finish_non_static_data_member): New function.
2660         (finish_class_expr): Handle BASELINKs.
2661         (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
2662         (finish_object_call_expr): Simplify handling during templates.
2663         (finish_pseudo_destructor_call_expr): Rename to ...
2664         (finish_pseudo_dtor_expr): ... this.
2665         (finish_compound_literal): New function.
2666         (begin_inline_definitions): Remove.
2667         (finish_sizeof): Remove special template handling.
2668         * spew.c: Do not include parse.h.
2669         * tree.c (get_overloaded_fn): Remove.
2670         * typeck.c (build_class_member_access_expr): Handle
2671         PSEUDO_DTOR_EXPR.  Adjust handling of static member functions.
2672         (lookup_destructor): New function.
2673         (finish_class_member_access_expr): Use it.
2674         (convert_arguments): Simplify.
2675         (build_unary_op): Handle BASELINKs.
2676
2677 2002-12-26  Nathan Sidwell  <nathan@codesourcery.com>
2678
2679         PR c++/4803
2680         * decl2.c (mark_used): Defer inline functions.
2681         (finish_file): Merge deferred_fns loops. Check all used
2682         inline functions have a definition.
2683         * method.c (make_thunk): Thunks are not inline.
2684
2685         PR c++/5116, c++/764
2686         * call.c (build_new_op): Make sure template class operands are
2687         instantiated.
2688
2689 2002-12-24  Nathan Sidwell  <nathan@codesourcery.com>
2690
2691         PR C++/7964
2692         * cp-tree.h (resolve_scoped_fn_name): Prototype.
2693         * call.c (resolve_scoped_fn_name): New function. Deal with
2694         more template expansion. Broken out of ...
2695         * parse.y (parse_finish_call_expr): ... here. Call it.
2696         * decl2.c (build_expr_from_tree, CALL_EXPR): Use
2697         resolve_scoped_fn_name and build_call_from_tree.
2698
2699         PR c++/9053
2700         * decl.c (duplicate_decls): Templates may be disambiguated by
2701         return type.
2702
2703         PR c++/8702
2704         * decl2.c (check_classfn): Use lookup_fnfield_1. List all
2705         conversion operators on failure.
2706
2707 2002-12-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2708
2709         Remove traditional C constructs 2/n.
2710         * call.c (tourney, build_field_call, equal_functions, joust,
2711         compare_ics, build_over_call, build_java_interface_fn_ref,
2712         convert_like_real, op_error, build_object_call, resolve_args,
2713         build_vfield_ref, check_dtor_name, build_scoped_method_call,
2714         build_addr_func, build_call, build_method_call, null_ptr_cst_p,
2715         sufficient_parms_p, build_conv, non_reference, strip_top_quals,
2716         standard_conversion, reference_related_p,
2717         reference_compatible_p, convert_class_to_reference,
2718         direct_reference_binding, reference_binding,
2719         ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
2720         add_template_conv_candidate, any_viable, any_strictly_viable,
2721         build_this, splice_viable, print_z_candidates,
2722         build_user_type_conversion, build_new_function_call,
2723         conditional_conversion, build_conditional_expr, build_new_op,
2724         build_op_delete_call, enforce_access, call_builtin_trap,
2725         convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
2726         convert_default_arg, type_passed_as, convert_for_arg_passing,
2727         in_charge_arg_for_name, is_properly_derived_from,
2728         maybe_handle_implicit_object, maybe_handle_ref_bind,
2729         source_type, add_warning, can_convert, can_convert_arg,
2730         perform_implicit_conversion, can_convert_arg_bad,
2731         initialize_reference, add_conv_candidate,
2732         add_template_candidate_real, add_template_candidate): Ansify.
2733
2734 2002-12-22  Nathan Sidwell  <nathan@codesourcery.com>
2735
2736         PR c++/8572
2737         * cp-tree.h (grokoptypename): Add SCOPE parameter.
2738         * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
2739         if in a template scope.
2740         * parse.y (unoperator): Return the scope.
2741         (operator_name): Adjust grokoptypename call.
2742
2743 2002-12-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2744
2745         * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
2746         * decl.c (make_unbound_class_template): Adjust.  Check for tf_error.
2747         * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
2748
2749 2002-12-20  Kazu Hirata  <kazu@cs.umass.edu>
2750
2751         * ChangeLog: Fix a typo.
2752         * class.c: Fix comment typos.
2753         * cp-tree.h: Likewise.
2754
2755 2002-12-18  Jason Merrill  <jason@redhat.com>
2756
2757         Handle anonymous unions at the tree level.
2758         C++ ABI change: Mangle anonymous unions using the name of their
2759         first named field (by depth-first search).  Should not cause
2760         binary compatibility problems, though, as the compiler previously
2761         didn't emit anything for affected unions.
2762         * cp-tree.def (ALIAS_DECL): New tree code.
2763         * decl2.c (build_anon_union_vars): Build ALIAS_DECLs.  Return the
2764         first field, not the largest.
2765         (finish_anon_union): Don't mess with RTL.  Do set DECL_ASSEMBLER_NAME,
2766         push the decl, and write it out at namespace scope.
2767         * decl.c (lookup_name_real): See through an ALIAS_DECL.
2768         (pushdecl): Add namespace bindings for ALIAS_DECLs.
2769         * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
2770         of a decl which doesn't have one.
2771         * typeck.c (build_class_member_access_expr): Don't recurse if
2772         we already have the type we want.
2773
2774 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2775
2776         PR c++/8099
2777         * friend.c (make_friend_class): Allow partial specialization
2778         when declaration is not a template friend.
2779
2780 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2781
2782         PR c++/3663
2783         * pt.c (lookup_template_class): Copy TREE_PRIVATE and
2784         TREE_PROTECTED to created decl nodes.
2785
2786 2002-12-18  Mark Mitchell  <mark@codesourcery.com>
2787
2788         * class.c (build_base_field): Do not set DECL_PACKED on the
2789         FIELD_DECL.
2790
2791 2002-12-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2792
2793         * cp-tree.h (struct tree_srcloc): Use location_t.
2794         (SOURCE_LOCUS): New.
2795         (SRCLOC_FILE, SRCLOC_LINE): Adjust.
2796
2797 2002-12-17  Jason Merrill  <jason@redhat.com>
2798
2799         * decl.c (finish_function): Also complain about no return in
2800         templates.
2801         * semantics.c (finish_return_stmt): Also call check_return_expr in
2802         templates.
2803         * typeck.c (check_return_expr): In a template, just remember that we
2804         saw a return.
2805
2806 2002-12-16  Jason Merrill  <jason@redhat.com>
2807
2808         * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
2809         of the CALL_EXPR.
2810
2811         * semantics.c (do_pushlevel): Call pushlevel after adding the
2812         SCOPE_STMT.
2813         (do_poplevel): Call poplevel before adding the SCOPE_STMT.
2814         * parse.y (function_body): Go back to using compstmt.
2815         * decl.c (pushdecl): Skip another level to get to the parms level.
2816
2817         * call.c (build_new_method_call): Use is_dummy_object to determine
2818         whether or not to evaluate the object parameter to a static member
2819         function.
2820
2821 2002-12-14  Jason Merrill  <jason@redhat.com>
2822
2823         * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
2824         return slot for normal functions.  Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
2825         * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
2826         don't bother with an AGGR_INIT_EXPR.
2827         (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
2828         just generate a new decl normally.  Take return slot parm.
2829         * cp-tree.h: Adjust prototype.
2830
2831 2002-12-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2832
2833         PR C++/8031
2834         * cvt.c (convert_to_pointer_force): Don't try comparing against
2835         erronous type.
2836
2837 2002-12-13  Geoffrey Keating  <geoffk@apple.com>
2838
2839         * cp-tree.h: Have the multiple-include guards around
2840         the entire file.
2841
2842 2002-12-10  David Edelsohn  <edelsohn@gnu.org>
2843
2844         * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
2845         for SPEW_DEBUG.
2846         (snarf_method): Same.
2847         (snarf_defarg): Same.
2848
2849 2002-12-10  Mark Mitchell  <mark@codesourcery.com>
2850
2851         PR c++/8372
2852         * pt.c (tsubst_copy): Handle destructor names more correctly.
2853
2854 2002-12-10  Matt Austern   <austern@apple.com>
2855
2856         * cp-tree.h: get rid of needs_virtual_reinit bit.
2857
2858 2002-12-09  Mark Mitchell  <mark@codesourcery.com>
2859
2860         * NEWS: Document removal of in-class initialization extension for
2861         static data members of non-arithmetic, non-enumeration type.
2862         * decl.c (check_static_variable_definition): Do not allow that
2863         extension.
2864         * decl2.c (grokfield): Do not call digest_init when processing
2865         templates.
2866
2867 2002-12-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2868
2869         * error.c (dump_expr): Fix format specifier warning.
2870
2871 2002-12-04  Geoffrey Keating  <geoffk@apple.com>
2872
2873         * class.c (finish_struct_1): Correct comment.
2874         * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
2875
2876 2002-12-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2877
2878         PR C++/8799
2879         * error.c (dump_expr): Don't ever try to dump a non-existent
2880         expression.
2881
2882 2002-12-03  Nathan Sidwell  <nathan@codesourcery.com>
2883
2884         Implement covariant returns.
2885         * cp-tree.h (IS_AGGR_TYPE_2): Remove.
2886         (struct lang_decl_flags): Add this_thunk_p flag.
2887         Rename vcall_offset to virtual_offset.
2888         (struct lang_decl): Rename delta to fixed_offset.
2889         (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
2890         (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
2891         (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
2892         (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
2893         (make_thunk): Add this_adjusting arg.
2894         (finish_thunk): Declare.
2895         (mangle_thunk): Add this_adjusting arg.
2896         * class.c (get_vcall_index): Use base function for lookup.
2897         (update_vtable_entry_for_fn): Generate covariant thunk.
2898         (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
2899         (build_vtbl_initializer): Use base function for lookup.
2900         Finish covariant thunk here. Adjust thunk generation.
2901         * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
2902         Adjust thunk dumping.
2903         * mangle.c (mangle_call_offset): New function.
2904         (mangle_thunk): Adjust for covariant thunks.
2905         * method.c (make_thunk): Adjust. Do not set name here.
2906         (finish_thunk): New function. Set name here.
2907         (use_thunk): Generate covariant thunks too.
2908         (thunk_adjust): New function.
2909         * search.c (covariant_return_p): Remove. Fold into ...
2910         (check_final_overrider): ... here. Simplify.
2911         * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
2912
2913 2002-12-03  Jason Merrill  <jason@redhat.com>
2914
2915         PR c++/8674
2916         * call.c (build_over_call): Check specifically for TARGET_EXPR
2917         when eliding.
2918
2919         PR c++/8461, c++/8625
2920         * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
2921         (cp_convert_parm_for_inlining): Remove.
2922         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
2923         Remove.
2924         * cp-tree.h (ADDR_IS_INVISIREF): Remove.
2925         * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
2926
2927         * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
2928         an ambiguous conversion.
2929
2930 2002-12-03  Mark Mitchell  <mark@codesourcery.com>
2931
2932         PR c++/8688
2933         * decl.c (reshape_init): Handle erroneous initializers.
2934
2935 2002-12-02  Mark Mitchell  <mark@codesourcery.com>
2936
2937         PR c++/8720
2938         * spew.c (remove_last_token): Make sure that last_chunk is set
2939         correctly.
2940
2941         PR c++/8615
2942         * error.c (dump_expr): Handle character constants with
2943         TREE_OVERFLOW set.
2944
2945 2002-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2946
2947         DR 180
2948         * decl.c (grokdeclarator): Require class-key for all friend class.
2949         Output the correct type and context in the error message.
2950
2951 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
2952
2953         PR c++/5919
2954         * pt.c (unify): Use variably_modified_type_p to test validity of
2955         template argument types.
2956
2957         PR c++/8727
2958         * cp-tree.h (lang_type_class): Add typeinfo_var.
2959         (CLASSTYPE_TYPEINFO_VAR): New macro.
2960         * rtti.c (get_tinfo_decl): Use it.
2961
2962         PR c++/8663
2963         * init.c (expand_member_init): Always get the main variant of a
2964         base class.
2965
2966 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
2967
2968         PR c++/8332
2969         PR c++/8493
2970         * decl.c (cxx_init_decl_processing): Use size_type_node, not
2971         c_size_type_node.
2972         * decl2.c (coerce_new_type): Likewise.
2973         * except.c (do_allocate_exception): Likewise.
2974
2975 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
2976
2977         * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
2978         dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
2979         lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
2980         repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
2981         typeck2.c: Include coretypes.h and tm.h.
2982         * Make-lang.in: Update dependencies.
2983
2984 2002-11-30  Mark Mitchell  <mark@codesourcery.com>
2985
2986         PR c++/8227
2987         * decl.c (layout_var_decl): Deal gracefully with erroneous types.
2988         (check_initializer): Validate the type of the initialized
2989         variable, even if the initializer is absent.
2990         * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
2991
2992         PR c++/8214
2993         * typeck.c (convert_for_assignment): Do not use
2994         decl_constant_value on the operand.
2995
2996         PR c++/8511
2997         * pt.c (instantiate_decl): Handle template friends defined outside
2998         of the class correctly.
2999
3000 2002-11-29  Joe Buck <jbuck@synopsys.com>
3001
3002         * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
3003         anonymous structs.
3004
3005 2002-11-29  Mark Mitchell  <mark@codesourcery.com>
3006
3007         * class.c (walk_subobject_offsets): Recur on binfos as well as on
3008         types.
3009         (layout_nonempty_base_or_field): Pass it a binfo when processing a
3010         base class.
3011         (layout_empty_base): Likewise.
3012         (build_base_field): Likewise.
3013
3014 2002-11-27  Mark Mitchell  <mark@codesourcery.com>
3015
3016         * class.c (build_base_field): Make sure we get the canonical base
3017         when descending through primary bases.
3018
3019 2002-11-26  Geoffrey Keating  <geoffk@apple.com>
3020
3021         * decl.c (check_initializer): Don't error on initialisation of
3022         a scalar with a brace-enclosed expression.
3023
3024 2002-11-26  Nathan Sidwell  <nathan@codesourcery.com>
3025
3026         * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
3027         (template_parms_equal): Remove prototype.
3028         * typeck.c (buuld_indirect_ref): Reformat.
3029
3030 2002-11-25  Jason Merrill  <jason@redhat.com>
3031
3032         * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
3033         and a DO_STMT.
3034
3035 2002-11-25  Mark Mitchell  <mark@codesourcery.com>
3036
3037         * tree.c (cp_build_qualified_type_real): Correct handling of
3038         array types.
3039         * class.c (walk_subobject_offsets): Fix thinko.
3040         (build_base_field): Record offsets of empty bases in primary
3041         virtual bases.
3042         (layout_class_type): Record offsets of empty bases in fields.
3043
3044         * search.c (is_subobject_of_p_1): Fix thinko.
3045         (lookup_field_queue_p): Likewise.
3046
3047 2002-11-24  Mark Mitchell  <mark@codesourcery.com>
3048
3049         * class.c (layout_class_type): Reuse tail padding when laying out
3050         virtual bases.
3051
3052 2002-11-22  Mark Mitchell  <mark@codesourcery.com>
3053
3054         * rtti.c (qualifier_flags): Fix thinko.
3055
3056 2002-11-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3057
3058         Remove traditional C constructs 1/n.
3059         * cp-tree.h (init_method, set_mangled_name_for_decl,
3060         build_opfncall, hack_identifier, make_thunk, use_thunk,
3061         synthesize_method, implicitly_declare_fn,
3062         skip_artificial_parms_for, optimize_function, calls_setjmp_p,
3063         maybe_clone_body): Remove use of PARAMS.
3064
3065         * method.c (do_build_assign_ref, do_build_copy_constructor,
3066         synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
3067         Likewise.
3068         (synthesize_method): Use 'bool' type and constants instead of
3069         'int'.
3070         (locate_copy): Likewise.
3071         (implicitly_declare_fn): Likewise.
3072
3073         * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
3074         Remove old-style declaration.
3075         (maybe_clone_body): Use 'bool' type and constants.
3076
3077 2002-11-21  Glen Nakamura  <glen@imodulo.com>
3078
3079         PR c++/8342
3080         * typeck.c (get_member_function_from_ptrfunc): Make sure that a
3081         SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
3082         of the branches of a COND_EXPR.
3083
3084 2002-11-19  Mark Mitchell  <mark@codesourcery.com>
3085
3086         * pt.c (for_each_template_parm): Free allocated memory.
3087         * search.c (is_subobject_of_p_1): New function.
3088         (is_subobject_of_p): Avoid walking virtual bases multiple times.
3089
3090 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
3091
3092         * g++spec.c (lang_specific_spec_functions): New.
3093
3094 2002-11-15  Kazu Hirata  <kazu@cs.umass.edu>
3095
3096         * ChangeLog: Follow spelling conventions.
3097         * class.c: Likewise.
3098         * decl2.c: Likewise.
3099
3100 2002-11-14  Zack Weinberg  <zack@codesourcery.com>
3101
3102         * search.c (dfs_push_decls): Do not try to reorder elements
3103         3..n of method_vec if method_vec has only two elements.
3104         Reverse order of two tests to avoid accessing unallocated
3105         memory.
3106
3107 2002-11-14  Mark Mitchell  <mark@codesourcery.com>
3108
3109         * class.c (dfs_find_final_overrider): Adjust so that the most
3110         derived object is a binfo, rather than a class type.
3111         (find_final_overrider): Likewise.
3112         (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
3113         (add_vcall_offset): Likewise.
3114
3115 2002-11-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3116
3117         PR c++/8389
3118         * pt.c (instantiate_template): Push class scope for member
3119         functions.
3120         (get_mostly_instantiated_function_type): Likewise.  Don't call
3121         tsubst on context.  Remove CONTEXTP and TPARMSP parameters.
3122         * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
3123         * mangle.c (write_encoding, write_unqualified_name): Adjust.
3124
3125 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
3126
3127         * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
3128         vcall offfsets.  Split out ...
3129         (add_vcall_offset): ... new function.
3130
3131         PR c++/8338
3132         * pt.c (for_each_template_parm): Add htab parameter.
3133         (process_partial_specialization): Adjust call.
3134         (push_template_decl_real): Likewise.
3135         (pair_fn_data): Add visited.
3136         (for_each_template_parm_r): Avoid walking duplicates more than
3137         once.
3138         (uses_template_parms): Adjust call to for_each_template_parm.
3139
3140 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
3141
3142         * class.c (add_implicitly_declared_members): Put implicitly
3143         declared functions at the end of TYPE_METHODs when -fabi-version
3144         is at least 2.
3145
3146 2002-11-05  Geoffrey Keating  <geoffk@apple.com>
3147
3148         * decl2.c (finish_file): Correct spelling.
3149
3150 2002-11-03  Mark Mitchell  <mark@codesourcery.com>
3151
3152         * call.c (build_special_member_call): Do not try to lookup VTTs by
3153         name.
3154         * class.c (vtbl_init_data): Add generate_vcall_entries.
3155         (get_vtable_decl): Do not look up virtual tables by name.
3156         (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
3157         (set_primary_base): Do not set CLASSTYPE_RTTI.
3158         (determine_primary_base): Likewise.
3159         (get_matching_virtual): Remove.
3160         (get_vcall_index): New function.
3161         (update_vtable_entry_for_fn): Do not try to use virtual thunks
3162         when they are not required.  Assign vcall indices at this point.
3163         (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
3164         Do update dynamic_classes.
3165         (build_vtt): Do not add VTTs to the symbol table.
3166         (build_ctor_vtbl_group): Likewise.
3167         (build_vtbl_initializer): Simplify handling of vcall indices.
3168         (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
3169         for the most derived class.
3170         (add_vcall_offset_vtbl_entries_1): But do not actually add them to
3171         the vtable.
3172         * cp-tree.h (dynamic_classes): New macro.
3173         (lang_type_class): Remove rtti.  Add vtables.  Add vcall_indices.
3174         (CLASSTYPE_RTTI): Remove.
3175         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
3176         (CLASSTYPE_VCALL_INDICES): New macro.
3177         (CLASSTYPE_VTABLES): Likewise.
3178         (BV_USE_VCALL_INDEX_P): Remove.
3179         (build_vtable_path): Remove.
3180         * decl2.c (finish_vtable_vardecl): Remove.
3181         (key_method): Remove #if 0'd code.
3182         (finish_vtable_vardecl): Rename to ...
3183         (maybe_emit_vtables): ... this.
3184         (finish_file): Use it.
3185         * search.c (look_for_overrides_here): Update comment.
3186
3187 2002-11-01  Zack Weinberg  <zack@codesourcery.com>
3188
3189         PR c/7353 redux
3190         * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
3191
3192 2002-10-30  Jason Merrill  <jason@redhat.com>
3193
3194         PR c++/8186
3195         * cp-tree.h (ADDR_IS_INVISIREF): New macro.
3196         * call.c (convert_for_arg_passing): Set it.
3197         * except.c (stabilize_throw_expr): Recurse for such an arg.
3198
3199 2002-10-31  Mark Mitchell  <mark@codesourcery.com>
3200
3201         * cp-tree.h (lang_decl_flags): Remove init_priority.
3202         (lang_decl): Add delta.
3203         (GLOBAL_INIT_PRIORITY): Remove.
3204         (THUNK_DELTA): Revise definition.
3205         * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
3206         * dump.c (cp_dump_tree): Don't dump it.
3207
3208 2002-10-30  Mark Mitchell  <mark@codesourcery.com>
3209
3210         PR c++/8160
3211         * typeck2.c (process_init_constructor): Call complete_array_type.
3212
3213         PR c++/8149
3214         * decl.c (make_typename_type): Issue errors about invalid results.
3215
3216 2002-10-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3217
3218         Core issue 287, PR c++/7639
3219         * cp-tree.h (lang_type_class): Add decl_list field.
3220         (CLASSTYPE_DECL_LIST): New macro.
3221         (maybe_add_class_template_decl_list): Add declaration.
3222         * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
3223         (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
3224         (maybe_add_class_template_decl_list): New function.
3225         (add_implicitly_declared_members): Use it.
3226         * decl.c (maybe_process_template_type_declaration): Likewise.
3227         (pushtag): Likewise.
3228         * friend.c (add_friend): Likewise.
3229         (make_friend_class): Likewise.
3230         * semantics.c (finish_member_declaration): Likewise.
3231         (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
3232         * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
3233         to process members and friends in the order of declaration.
3234
3235 2002-10-29  Mark Mitchell  <mark@codesourcery.com>
3236
3237         PR c++/8287
3238         * decl.c (finish_destructor_body): Create the label to jump to
3239         when returning from a destructor here.
3240         (finish_function_body): Rather than here.
3241
3242 2002-10-25  Zack Weinberg  <zack@codesourcery.com>
3243
3244         PR c++/7266
3245         * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
3246         SCOPE_REF is not null before dereferencing it.
3247
3248 2002-10-25  Mark Mitchell  <mark@codesourcery.com>
3249
3250         * call.c (build_over_call): Use DECL_CONTEXT, not
3251         DECL_VIRTUAL_CONTEXT.
3252         * class.c (modify_vtable_entry): Don't mess with
3253         DECL_VIRTUAL_CONTEXT.
3254         (set_vindex): Remove.
3255         (set_primary_base): Remove vfuns_p parameter.
3256         (determine_primary_base): Likewise.
3257         (modify_all_vtables): Likewise.
3258         (layout_class_type): Likewise.  Adjust calls to other functions
3259         accordingly.
3260         (finish_struct_1): Adjust calls to modified functions.  Set
3261         DECL_VINDEX here.
3262         * cp-tree.h (lang_type_class): Remove vsize.
3263         (CLASSTYPE_VSIZE): Remove.
3264         (lang_decl): Remove thunks.
3265         (DECL_THUNKS): Adjust.
3266         (DECL_VIRTUAL_CONTEXT): Remove.
3267         (duplicate_decls): Don't copy it.
3268         * pt.c (build_template_decl): Don't set it.
3269         (tsubst_decl): Likewise.
3270         * typeck.c (expand_ptrmemfunc_cst): Don't use it.
3271
3272         * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
3273         (build_vtable_entry): Remove.
3274         * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
3275         (lang_decl): Add thunks.
3276         (DECL_THUNKS): New macro.
3277         * decl.c (duplicate_decls): Copy it.
3278         * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
3279         * semantics.c (emit_associated_thunks): Simplify.
3280
3281 2002-10-24  David Edelsohn  <edelsohn@gnu.org>
3282
3283         PR c++/7228
3284         * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
3285         lang_type structure exists before accessing field.
3286         (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
3287         (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
3288         (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
3289         * class.c (check_field_decls): Use new macros.
3290         * typeck2.c (process_init_constructor): Remove redundant check for
3291         existence of lang_type structure.
3292
3293 2002-10-24  Mark Mitchell  <mark@codesourcery.com>
3294
3295         * class.c (end_of_base): New method.
3296         (end_of_class): Use it.  Check indirect virtual bases.
3297
3298         * class.c (check_field_decls): Fix typo.
3299
3300 2002-10-23  Mark Mitchell  <mark@codesourcery.com>
3301
3302         PR c++/8067
3303         * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
3304         related variables.
3305
3306         PR c++/7679
3307         * spew.c (next_token): Do not return an endless stream of
3308         END_OF_SAVED_INPUT tokens.
3309         (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
3310         the cached token stream.
3311         (snarf_defarg): Likewise.
3312
3313 2002-10-23  Zack Weinberg  <zack@codesourcery.com>
3314
3315         * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
3316         variably_modified_type_p.
3317         * cp-tree.h: Remove prototype of variably_modified_type_p.
3318         * tree.c (variably_modified_type_p): Remove; now implemented
3319         in language-independent code.
3320
3321 2002-10-22  Mark Mitchell  <mark@codesourcery.com>
3322
3323         PR c++/6579
3324         * spew.c (snarf_parenthesized_expression): New function.
3325         (snarf_block): Use it.
3326
3327 2002-10-22  Richard Henderson  <rth@redhat.com>
3328
3329         * method.c (use_thunk): Always compute vcall_value; assert that
3330         it is not zero.  Use can_output_mi_thunk; use output_mi_thunk
3331         for vcall thunks as well.
3332
3333 2002-10-21  Mark Mitchell  <mark@codesourcery.com>
3334
3335         * class.c (empty_base_at_nonzero_offset_p): New function.
3336         (layout_nonempty_base_or_field): Do not check for conflicts when
3337         laying out a virtual base using the GCC 3.2 ABI.
3338         (build_base_field): Correct checking for presence of empty classes
3339         at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
3340
3341         * class.c (include_empty_classes): Use normalize_rli.
3342         (layout_class_type): Likewise.
3343
3344         * decl.c (reshape_init): Tweak handling of character arrays.
3345
3346         PR c++/8218
3347         * cp-tree.h (lang_type_class): Add contains_empty_class_p.
3348         (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
3349         * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
3350         (check_field_decls): Likewise.
3351         (layout_class_type): Likewise.
3352         (finish_struct_1): Initialize it.
3353         (walk_subobject_offsets): Use it to prune searches.
3354
3355 2002-10-20  Mark Mitchell  <mark@codesourcery.com>
3356
3357         * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
3358         * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
3359         TARGET_ASM_OUTPUT_MI_THUNK in comments.
3360
3361 2002-10-18  Zack Weinberg  <zack@codesourcery.com>
3362
3363         * decl.c (start_decl): Point users of the old initialized-
3364         typedef extension at __typeof__.
3365
3366 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
3367
3368         * Make-lang.in (method.o): Depend on TARGET_H.
3369         * method.c (target.h): Include it.
3370         (use_thunk): Use target hooks.  Use vcall thunks, if available.
3371
3372 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
3373
3374         * class.c (base_derived_from): Make sure return value is a bool.
3375
3376 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
3377
3378         * class.c (find_final_overrider_data_s): Remove overriding_fn and
3379         overriding_base.
3380         (dfs_base_derived_from): New function.
3381         (base_derived_from): Likewise.
3382         (dfs_find_final_overrider): Use base_derived_from.
3383         (find_final_overrider): Adjust.
3384
3385 2002-10-18  Jason Merrill  <jason@redhat.com>
3386
3387         PR c++/8080
3388         * semantics.c (finish_for_cond, finish_while_cond): Don't mess
3389         with condition decls in a template.
3390
3391 2002-10-17  Nathan Sidwell  <nathan@codesourcery.com>
3392
3393         * class.c (add_method): Compare template parms too.
3394
3395 2002-10-17  Mark Mitchell  <mark@codesourcery.com>
3396
3397         PR c++/7584
3398         * class.c (handle_using_decl): Allow the declaration used to be
3399         from an ambiguous base.
3400
3401         * pt.c (convert_template_argument): Revert this change:
3402                 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
3403                 * pt.c (convert_template_argument): Do not fold non-type
3404                 template rguments when inside a template.
3405
3406         * init.c (expand_default_init): Handle brace-enclosed initializers
3407         correctly.
3408
3409 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
3410
3411         * mangle.c (write_expression): Correct handling of enumeration
3412         constants.
3413         (write_template_arg): Likewise.
3414         * pt.c (convert_template_argument): Do not fold non-type template
3415         arguments when inside a template.
3416
3417         PR c++/7478
3418         * cvt.c (convert_to_reference): Allow references as the incoming
3419         type.
3420
3421 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
3422
3423         PR c++/7524
3424         * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
3425         build_qualified_type.
3426
3427 2002-10-15  Richard Henderson  <rth@redhat.com>
3428
3429         * error.c (dump_expr): Use real_to_decimal directly, and with
3430         the new arguments.
3431
3432 2002-10-15  Mark Mitchell  <mark@codesourcery.com>
3433
3434         * decl.c (reshape_init): Fix typo.
3435
3436         * cp-tree.h (operator_name_info_t): Add arity.
3437         * lex.c (init_operators): Initialize it.
3438         * mangle.c (write_conversion_operator_name): New function.