OSDN Git Service

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