OSDN Git Service

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