OSDN Git Service

dbb0d003772d929d5d4421dfcd4b4d45746ca04c
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2003-12-03  Mark Mitchell  <mark@codesourcery.com>
2
3         PR c++/13179
4         * semantics.c (finish_handler_parms): Do not call eh_type_info for
5         types used in templates.
6
7         PR c++/10771
8         * parser.c (cp_parser_check_for_invalid_template_id): New
9         function.
10         (cp_parser_simple_type_specifier): Use it.
11         (cp_parser_elaborated_type_specifier): Likewise.
12         (cp_parser_class_head): Likewise.
13
14 2003-12-02  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
15
16         PR c++/10126\r
17         * pt.c (convert_nontype_argument): Handle default conversions\r
18         while converting a pointer to member function.\r
19
20 2003-12-02  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
21
22         PR c++/12573\r
23         * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by\r
24         looking into them recursively.\r
25
26 2003-12-02  Richard Henderson  <rth@redhat.com>
27
28         * name-lookup.h (struct cp_binding_level): Use ENUM_BITFIELD.
29         * parser.c (struct cp_token): Likewise.   
30         (struct cp_parser_token_tree_map_node): Likewise.
31         * lex.c (struct resword): Move const after ENUM_BITFIELD.
32
33 2003-11-30  Mark Mitchell  <mark@codesourcery.com>
34
35         PR c++/9849
36         * parser.c (cp_lexer_prev_token): New function.
37         (cp_parser_skip_to_closing_parenthesis): Add consume_paren
38         parameter.
39         (cp_parser_nested_name_specifier_opt): Add is_declaration
40         parameter.
41         (cp_parser_nested_name_specifier): Likewise.
42         (cp_parser_class_or_namespace_name): Likewise.
43         (cp_parser_class_name): Likewise.
44         (cp_parser_template_id): Likewise.
45         (cp_parser_template_name): Likewise.
46         (cp_parser_id_expression): Adjust calls to
47         cp_parser_nested_name_specifier_op, cp_parser_template_id,
48         cp_parser_class_name.
49         (cp_parser_unqualified_id): Likewise.
50         (cp_parser_postfix_expression): Likewise.
51         (cp_parser_pseudo_destructor_name): Likewise.
52         (cp_parser_cast_expression): Likewise.
53         (cp_parser_mem_initializer_id): Likewise.
54         (cp_parser_simple_type_specifier): Likewise.
55         (cp_parser_type_name): Likewise.
56         (cp_parser_elaborated_type_specifier): Likewise.
57         (cp_parser_qualified_namespace_specifier): Likewise.
58         (cp_parser_using_declaration): Likewise.
59         (cp_parser_using_directive): Likewise.
60         (cp_parser_ptr_operator): Likewise.
61         (cp_parser_declarator_id): Likewise.
62         (cp_parser_class_head): Likewise.
63         (cp_parser_base_specifier): Likewise.
64         (cp_parser_constructor_declarator_p): Likewise.
65         (cp_parser_direct_declarator): Fix typo in comment.
66         (cp_parser_parenthesized_expression_list): Adjust call to
67         cp_parser_skip_to_closing_parenthesis.
68         (cp_parser_selection_statement): Likewise.
69
70 2003-11-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
71
72         PR c++/12924
73         * typeck.c (finish_class_member_access_expr): Handle TEMPLATE_ID_EXPR
74         with OVERLOAD and DECL nodes as the first operand.
75
76 2003-11-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
77
78         * pt.c (tsubst) <ARRAY_REF>: Remove erroneous argument to build_nt.
79
80 2003-11-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
81
82         PR c++/5369
83         * friend.c (is_friend): Handle member function of a class
84         template as template friend.
85         (do_friend): Likewise.
86         * decl2.c (check_classfn): Add template_header_p parameter.
87         * decl.c (start_decl): Adjust check_classfn call.
88         (grokfndecl): Likewise.
89         * pt.c (is_specialization_of_friend): New function.
90         (uses_template_parms_level): Likewise.
91         (push_template_decl_real): Use uses_template_parms_level.
92         (tsubst_friend_function): Adjust check_classfn call.
93         * cp-tree.h (check_classfn): Adjust declaration.
94         (uses_template_parms_level): Add declaration.
95         (is_specialization_of_friend): Likewise.
96
97 2003-11-21  Mark Mitchell  <mark@codesourcery.com>
98
99         PR c++/12515
100         * pt.c (build_non_dependent_expr): Handle GNU extension to ?:
101         operator.
102
103 2003-11-21  Jan Hubicka  <jh@suse.cz>
104
105         * parser.c (cp_parser_postfix_expression): Initialize 's' to
106         NULL_TREE.
107
108 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
109
110         * Make-lang.in (c++.extraclean): Delete.
111
112 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
113
114         * Make-lang.in (check-g++, lang_checks): Add.
115
116 2003-11-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
117
118         PR c++/12932
119         * class.c (currently_open_derived_class): Check if
120         current_class_type is NULL_TREE.
121         * semantics.c (finish_call_expr): Check if
122         currently_open_derived_class returns NULL_TREE.
123         * cp-tree.h (DERIVED_FROM_P): Add parenthesis around PARENT
124         parameter.
125
126 2003-11-17  Jason Merrill  <jason@redhat.com>
127
128         * init.c (build_new_1): Preevaluate placement args.
129         * call.c (build_op_delete_call): Don't expose placement args to
130         overload resolution.
131
132 2003-11-16  Jason Merrill  <jason@redhat.com>
133
134         * Make-lang.in (c++.tags): Create TAGS.sub files in each directory
135         and TAGS files that include them for each front end.
136
137 2003-11-15  Bernardo Innocenti  <bernie@develer.com>
138
139         PR c++/2294
140         * name-lookup.c: Revert previous patch for PR c++/2294 to prevent
141         build failure on libjava.
142
143 2003-11-14  Giovanni Bajo  <giovannibajo@libero.it>
144
145         PR c++/2294
146         * name-lookup.c (push_overloaded_decl): Always construct an OVERLOAD
147         unless the declaration is a built-in.
148         (set_namespace_binding): While binding OVERLOADs with only one
149         declaration, we still need to call supplement_binding.
150
151 2003-11-14  Mark Mitchell  <mark@codesourcery.com>
152
153         PR c++/12762
154         * parser.c (cp_parser_enclosed_template_argument_list): New
155         function.
156         (cp_parser_template_id): Use it.
157         (cp_parser_simple_type_specifier): Recognize invalid template
158         syntax.
159
160 2003-11-14  Giovanni Bajo  <giovannibajo@libero.it>
161
162         PR c++/2094
163         * pt.c (unify): Add support for PTRMEM_CST and
164         FIELD_DECL unification.
165
166 2003-11-13  Richard Earnshaw  <rearnsha@arm.com>
167
168         * decl.c (grokfndecl): Change OK to type tree.
169
170 2003-11-12  Mark Mitchell  <mark@codesourcery.com>
171
172         * tree.c (build_target_expr_with_type): Treate VA_ARG_EXPR like
173         CONSTRUCTOR.
174
175         * decl.c (cp_make_fname_decl): When creating a top-level
176         __FUNCTION__-like symbol, do register it with pushdecl.
177
178         * decl.c (finish_case_label): Do not check that we are within a
179         switch statement here.
180         * parser.c (struct cp_parser): Add in_iteration_statement_p and
181         in_switch_statement_p.
182         (cp_parser_new): Initialize them.
183         (cp_parser_labeled_statement): Check validity of case labels
184         here.
185         (cp_parser_selection_statement): Set in_switch_statement_p.
186         (cp_parser_iteration_statement): Set in_iteration_statement_p.
187         (cp_parser_jump_statement): Check validity of break/continue
188         statements here.
189
190         PR c++/12735
191         * cp-tree.h (duplicate_decls): Return a tree.
192         * decl.c (duplicate_decls): Clarify documentation.  Return
193         error_mark_node to indicate a failed redeclaration.
194         * friend.c (do_friend): Handle that case.
195         * name-lookup.c (pushdecl): Likewise.
196
197 2003-11-11  Jason Merrill  <jason@redhat.com>
198
199         * cp-tree.h (DECL_NAMESPACE_ASSOCIATIONS): New macro.
200         * name-lookup.c (parse_using_directive): New fn.
201         (is_associated_namespace): New fn.
202         (arg_assoc_namespace): Also check associated namespaces.
203         * name-lookup.h: Declare new fns.
204         * pt.c (maybe_process_partial_specialization): Allow
205         specialization in associated namespace.
206         * parser.c (cp_parser_using_directive): Accept attributes.  Use
207         parse_using_directive.
208
209 2003-11-10  Richard Henderson  <rth@redhat.com>
210
211         * cvt.c (convert_to_void): Use void_zero_node after overload failure.
212
213 2003-11-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
214
215         PR c++/12832
216         * name-lookup.c (supplement_binding): Gracefully handle names
217         used at non-class scope prior declaration.
218
219 2003-11-06  Matt Austern  <austern@apple.com>
220
221         * decl.c (duplicate_decls): copy DECL_VISIBILITY field.
222         * method.c (use_thunk): give thunk same visibility as function.
223         * optimize.c (maybe_clone_body): copy DECL_VISIBILITY field.
224         
225 2003-11-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
226
227         PR c++/11616
228         * pt.c (instantiate_pending_templates): Save and restore
229         input_location.
230
231 2003-11-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
232
233         PR c++/2019
234         * friend.c (add_friend): Don't display previous declaration in
235         case of duplicate friend warning.
236
237 2003-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
238
239         PR c++/9810
240         * call.c (build_over_call): Check access using primary template
241         if FN is a member function template.
242
243 2003-11-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
244
245         PR c++/12796
246         * class.c (handle_using_decl): Set input_location before calling
247         error_not_base_type.
248
249 2003-10-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
250
251         PR c++/10371
252         * semantics.c (finish_non_static_data_member): Handle when
253         both processing_template_decl and qualifying_scope are true.
254
255 2003-10-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
256
257         PR c++/11076
258         * class.c (handle_using_decl): Swap arguments of error_not_base_type.
259         * parser.c (cp_parser_direct_declarator): Only resolve typename for
260         namespace scope declarations.
261
262 2003-10-24  Nathan Sidwell  <nathan@codesourcery.com>
263
264         PR c++/12698, c++/12699, c++/12700, c++/12566
265         * cp-tree.h (THUNK_ALIAS_P, THUNK_ALIAS): New.
266         (debug_class, debug_thunks): New.
267         * class.c (dump_class_hierarchy_1): New break out from ...
268         (dump_class_hierarchy): ... here.
269         (dump_thunk, debug_thunks, debug_class): New.
270         (update_vtable_entry_for_fn): Add ssizetype casts. Correct
271         continued search for primary binfo via virtual.
272         (build_vtbl_initializer): Follow covariant thunk alias.
273         * method.c (make_thunk): Clear DECL_THUNKS of the thunk.
274         (finish_thunk): Look for an alias of the covariant thunk and point
275         to it.
276         (use_thunk): We should never use an alias.
277         * semantics.c (emit_associated_thunks): Do not emit aliases.
278
279         PR c++/12566
280         * cp-tree.h (cp_fname_init): Add TYPE pointer param.
281         * decl.c (cp_fname_init): Add TYPE pointer param. Set it. Don't
282         create an ad-hoc ERROR_MARK.
283         (cp_make_fname_decl): Adjust.
284         * pt.c (tsubst_expr): Adjust.
285
286 2003-10-23  Jason Merrill  <jason@redhat.com>
287
288         PR c++/12726
289         * tree.c (build_target_expr_with_type): Don't call force_rvalue
290         for CONSTRUCTORs.
291
292 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
293
294         * call.c: Fix comment formatting.
295         * class.c: Likewise.
296         * cxx-pretty-print.c: Likewise.
297         * init.c: Likewise.
298         * parser.c: Likewise.
299         * pt.c: Likewise.
300         * semantics.c: Likewise.
301         * tree.c: Likewise.
302         * typeck.c: Likewise.
303         * typeck2.c: Likewise.
304
305 2003-10-21  Mark Mitchell  <mark@codesourcery.com>
306
307         PR c++/11962
308         * typeck.c (build_x_conditional_expr): Handle missing middle
309         operands in templates.
310         * mangle.c (write_expression): Issue errors about attempts to
311         mangle a non-existant middle operator to the ?: operator.
312
313 2003-10-21  Robert Bowdidge   <bowdidge@apple.com>
314         * decl.c (cp_finish_decl): Remove clause intended for asm directives 
315           in struct or class fields: this code is never executed.
316
317 2003-10-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
318
319         * decl.c (start_decl): Exit if push_template_decl returns
320         error_mark_node.
321
322 2003-10-20  Kazu Hirata  <kazu@cs.umass.edu>
323
324         * ChangeLog: Fix typos.
325         * call.c: Fix comment typos.
326         * class.c: Likewise.
327         * cp-tree.h: Likewise.
328         * cvt.c: Likewise.
329         * cxx-pretty-print.c: Likewise.
330         * decl.c: Likewise.
331         * decl2.c: Likewise.
332         * init.c: Likewise.
333         * mangle.c: Likewise.
334         * name-lookup.c: Likewise.
335         * parser.c: Likewise.
336         * search.c: Likewise.
337         * semantics.c: Likewise.
338         * tree.c: Likewise.
339         * typeck.c: Likewise.
340
341 2003-10-20  Jan Hubicka  <jh@suse.cz>
342
343         * decl.c (start_cleanup_fn):  Set DECL_DECLARED_INLINE_P to deffer
344         the expansion.
345
346 2003-10-20  Mark Mitchell  <mark@codesourcery.com>
347
348         * Make-lang.in (c++.install-info): Remove.
349
350 2003-10-20  Jason Merrill  <jason@redhat.com>
351
352         * class.c (layout_class_type): Set DECL_ARTIFICIAL on padding
353         field.
354
355 2003-10-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
356
357         PR c++/9781, c++/10583, c++/11862
358         * decl.c (cp_finish_decl): Exit immediately if decl is an
359         error_mark_node.
360         * pt.c (push_template_decl_real): Return error_mark_node for
361         invalid template declaration of variable.
362
363 2003-10-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
364
365         PR c++/12495
366         * pt.c (lookup_template_class): Handle when current_class_type
367         is a local class.
368
369 2003-10-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
370
371         PR c++/2513
372         * decl.c (make_typename_type): Use dependent_type_p.
373         (make_unbound_class_template): Likewise.
374         * pt.c (instantiate_class_template): Increment
375         processing_template_decl during substitution of template friend
376         function.  Preincrement processing_template_decl rather than
377         postincrement.
378         (get_mostly_instantiated_function_type): Increment
379         processing_template_decl during partial substitution of function
380         type.
381
382 2003-10-15  Jan Hubicka  <jh@suse.cz>
383
384         PR c++/12574
385         * decl2.c (cxx_callgraph_analyze_expr): Deal with baselink.
386
387 2003-10-14  Jason Merrill  <jason@redhat.com>
388
389         PR c++/11878
390         * tree.c (build_target_expr_with_type): Call force_rvalue for
391         classes with non-trivial copy ctors.
392
393         PR c++/11063
394         * typeck.c (build_modify_expr): Call convert rather than abort.
395
396 2003-10-14  Gabriel Dos Reis  <gdr@integrable-solutions.net>
397
398         Breack out decl.c (3/n)
399         * name-lookup.c: Include flags.h
400         (lookup_name_current_level): Make static.
401         (add_decl_to_level): Likewise.
402         (push_local_binding): Likewise.
403         (push_overloaded_decl): Likewise.
404         (lookup_using_namespace): Likewise.
405         (qualified_lookup_using_namespace): Likewise.
406         (lookup_type_current_level): Likewise.
407         (unqualified_namespace_lookup): Likewise.
408         (namespace_ancestor): Likewise.
409         (push_using_directive): Likewise.
410         * decl.c (pushdecl): Move to name-lookup.c.
411         (pushdecl_top_level_1): Likewise.
412         (pushdecl_top_level): Likewise.
413         (pushdecl_top_level_and_finish): Likewise.
414         (maybe_push_decl): Likewise.
415         (push_using_decl): Likewise.
416         (push_overloaded_decl): Likewise.
417         (make_anon_name): Likewise.
418         (anon_cnt): Likewise.
419         (clear_anon_tags): Likewise.
420         (maybe_inject_for_scope_var): Likewise.
421         (check_for_out_of_scope_variable): Likewise.
422         * Make-lang.in (cp/name-lookup.o): Depend on flags.h.
423         * decl.c (warn_extern_redeclared_static): Export.
424         * cp-tree.h (warn_extern_redeclared_static): Declare.
425
426 2003-10-14  Nathanael Nerode  <neroden@gcc.gnu.org>
427
428         * Make-lang.in: Replace uses of $(target_alias) with
429         $(target_noncanonical).
430
431 2003-10-13  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
432
433         * ChangeLog: Add PR number to patch for PR c++/12370.
434
435 2003-10-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
436
437         * name-lookup.h (cxx_scope_find_binding_for_name): Don't export.
438         (binding_for_name): Likewise.
439         (cxx_binding_clear): Move to name-lookup.c.
440         * name-lookup.c (cxx_scope_find_binding_for_name): Now static.
441         (binding_for_name): Likewise.
442         * decl2.c (is_ancestor): Move to name-lookup.c
443         (namespace_ancestor): Likewise.
444         (add_using_namespace): Likewise.
445         (ambiguous_decl): Likewise.
446         (lookup_using_namespace): Likewise.
447         (qualified_lookup_using_namespace): Likewise.
448         (set_decl_namespace): Likewise.
449         (decl_namespace): Likewise.
450         (current_decl_namespace): Likewise.
451         (push_decl_namespace): Likewise.
452         (pop_decl_namespace): Likewise.
453         (push_scope): Likewise.
454         (pop_scope): Likewise.
455         (struct arg_lookup): Likewise.
456         (arg_assoc): Likewise.
457         (arg_assoc_args): Likewise.
458         (arg_assoc_type): Likewise.
459         (add_function): Likewise.
460         (arg_assoc_namespace): Likewise.
461         (arg_assoc_class): Likewise.
462         (arg_assoc_template_arg): Likewise.
463         (do_namespace_alias): Likewise.
464         (validate_nonmember_using_decl): Likewise.
465         (do_nonmember_using_decl): Likewise.
466         (do_toplevel_using_decl): Likewise.
467         (do_local_using_decl): Likewise.
468         (do_class_using_decl): Likewise.
469         (do_using_directive): Likewise.
470         (constructor_name_full): Likewise.
471         (constructor_name): Likewise.
472         (constructor_name_p): Likewise.
473
474 2003-10-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
475
476         Break out decl.c (2/n) 
477         * name-lookup.c: Include diagnostic.h
478         (cxx_binding_free): Make static.
479         (cxx_binding_make): Likewise.
480         (binding_table_new): Likewise
481         (binding_table_free): Likewise.
482         (binding_table_insert): Likewise.
483         (binding_table_find_anon_type): Likewise.
484         (binding_table_reverse_maybe_remap): Likewise.
485         (supplement_binding): Likewise.
486         * name-lookup.h (global_scope_name): Declare extern.
487         (global_type_node): Likewise.
488         (cxx_binding_free): Don't export.
489         (cxx_binding_make): Likewise.
490         (binding_table_new): Likewise.
491         (binding_table_free): Likewise.
492         (binding_table_insert): Likewise.
493         (binding_table_find_anon_type): Likewise.
494         (binding_table_reverse_maybe_remap): Likewise.
495         * Make-lang.in (cp/name-lookup.o): Depend on $(DIAGNOSTIC_H)
496         * decl.c (lookup_namespace_name): Move to name-lookup.c
497         (select_decl): Likewise.
498         (unqualified_namespace_lookup): Likewise.
499         (lookup_qualified_name): Likewise.
500         (lookup_name_real): Likewise.
501         (lookup_name_nonclass): Likewise.
502         (lookup_function_nonclass): Likewise.
503         (lookup_name): Likewise.
504         (lookup_name_current_level): Likewise.
505         (lookup_type_current_level): Likewise.
506         (lookup_flags): Likewise.
507         (qualify_lookup): Likewise.
508         (lookup_tag): Likewise.
509         (lookup_tag_reverse): Likewise.
510         (getdecls): Likewise.
511         (storedecls): Remove.
512         (cxx_remember_type_decls): Move to name-lookup.c.
513         (global_bindings_p): Likewise.
514         (innermost_nonclass_level): Likewise.
515         (toplevel_bindings_p): Likewise.
516         (namespace_bindings_p): Likewise.
517         (kept_level_p): Likewise.
518         (innermost_scope_kind): Likewise.
519         (template_parm_scope_p): Likewise.
520         (push_binding): Likewise.
521         (push_local_binding): Likewise.
522         (add_decl_to_level): Likewise.  Make extern.
523         (push_class_binding): Move to name-lookup.c.
524         (resume_level): Likewise.  Rename to resume_scope.
525         (begin_scope): Move to name-lookup.c.
526         (indent): Likewise.
527         (binding_depth): Likewise.
528         (is_class_level): Likewise.
529         (cxx_scope_descriptor): Likewise.
530         (cxx_scope_debug): Likewise.
531         (namespace_scope_ht_size): Likewise.
532         (leave_scope): Likewise.
533         (pushlevel_class): Likewise.
534         (poplevel_class): Likewise.
535         (clear_identifier_class_values): Likewise.
536         (pushdecl_with_scope): Likewise.
537         (pushdecl_namespace_level): Likewise.
538         (pushdecl_class_level): Likewise.
539         (push_class_level_binding): Likewise.
540         (push_using_directive): Likewise.
541         (identifier_global_value): Likewise.
542         (keep_next_level_flag): Likewise.
543         (keep_next_level): Likewise.
544         (free_binding_level): Likewise.
545         (set_class_shadows): Likewise.
546         (maybe_push_cleanup_level): Likewise.
547         (cp_namespace_decls): Likewise.
548         (bt_print_entry): Likewise.
549         (print_binding_level): Likewise.
550         (print_other_binding_stack): Likewise.
551         (print_binding_stack): Likewise.
552         (push_namespace): Likewise.
553         (pop_namespace): Likewise.
554         (push_nested_namespace): Likewise.
555         (pop_nested_namespace): Likewise.
556         (cxx_saved_binding_make): Likewise.
557         (struct cxx_saved_binding_make): Likewise.
558         (store_bindings): Likewise.
559         (maybe_push_to_top_level): Likewise.
560         (push_to_top_level): Likewise.
561         (pop_from_top_level): Likewise.
562         (identifier_type_value): Likewise.
563         (set_identifier_type_value): Likewise.
564         (set_identifier_type_value_with_scope): Likewise.
565         (pop_everything): Likewise.
566         (pushtag): Likewise.
567         (follow_tag_typedef): Likewise.
568         (maybe_process_template_type_declaration): Likewise.
569         (pop_binding): Likewise.
570         * cp-tree.h: Move corresponding declarations to name-lookup.h
571         
572 2003-10-12  Steven Bosscher  <steven@gcc.gnu.org>
573
574         * cvt.c (ocp_convert): Move warning to C common code.
575
576 2003-10-09  Jason Merrill  <jason@redhat.com>
577
578         PR c++/6392
579         * tree.c (build_cplus_array_type): Handle all quals the same.
580         (cp_build_qualified_type_real): Look through arrays first.
581
582         * tree.c (build_cplus_new): Use build_decl to create a VAR_DECL.
583         (build_target_expr_with_type): Likewise.
584
585         * pt.c (instantiate_class_template): Sanity check that our
586         enclosing class has been instantiated.
587
588 2003-10-08  Giovanni Bajo  <giovannibajo@libero.it>
589
590         * cp_tree.h: Added TFF_NO_FUNCTION_ARGUMENTS.
591         * error.c (dump_function_decl): Use it to skip the dump of the
592         arguments.
593         (dump_expr): When dumping a declaration found within an
594         expression, always set TFF_NO_FUNCTION_ARGUMENTS
595         in the flags.
596
597 2003-10-08  Giovanni Bajo <giovannibajo@libero.it>
598
599         PR c++/11097
600         * pt.c (tsubst_decl): Substitute also the DECL_NAME node of
601         USING_DECL.
602
603 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
604
605         PR c++/10147
606         * call.c (initialize_reference): Tweak error message.
607         * cxx-pretty-print.h (cxx_pretty_printer_flags): Remove
608         pp_cxx_flag_qualified_id and pp_cxx_flag_global_scope.
609         * cxx-pretty-print.c (pp_cxx_id_expression): Always display
610         qualified entities using qualified names.
611         
612         PR c++/12337
613         * init.c (build_new_1): Make sure that the expression returned is
614         not an lvalue.
615
616         PR c++/12344, c++/12236, c++/8656
617         * decl.c (start_function): Do not ignore attributes embedded in a
618         function declarator.
619
620 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
621
622         * Make-lang.in (c++.info): Remove.
623         (c++.dvi): Remove.
624         (c++.generated-manpages): Replace with ...
625         (generated-manpages): ... this.
626
627 2003-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
628
629         * decl.c (struct cp_binding_level): Move to name-lookup.h
630         (current_binding_level): Likewise.
631         (class_binding_level): Likewise.
632         * cp-tree.h (enum scope_kind): Likewise.
633
634 2003-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
635
636         * name-lookup.c (binding_entry_free): Nullify name and type
637         fields. 
638
639 2003-10-02  Mark Mitchell  <mark@codesourcery.com>
640
641         PR c++/12486
642         * typeck.c (finish_class_member_access_expr): Issue diagnostic
643         on erroneous use of qualified name.
644
645 2003-09-30  Richard Henderson  <rth@redhat.com>
646
647         PR c++/12370
648         * decl.c (duplicate_decls): Copy DECL_SAVED_INSNS too.
649
650 2003-09-30  Kelley Cook  <kelleycoook@wideopenwest.com>
651
652         * g++spec.c: Convert to ISO C90 prototypes.
653         * parser.c: Likewise.
654
655 2003-09-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
656
657         * decl.c (pop_binding): Don't mess with nullifying binding->scope
658         here. 
659         * name-lookup.c: Re-format.
660         (cxx_binding_free): Nullify binding->scope.
661
662 2003-09-29  Jan Hubicka  <jh@suse.cz>
663
664         PR C++/12047
665         * except.c (build_eh_type_type): Call mark_used on the type.
666
667 2003-09-28  Richard Henderson  <rth@redhat.com>
668
669         * typeck.c (c_expand_asm_operands): Take location_t, instead of
670         individual file and line.
671
672 2003-09-28  Andreas Jaeger  <aj@suse.de>
673
674         * decl.c (cxx_builtin_type_decls): Convert to ISO C90 function
675         definition.
676         * init.c (push_base_cleanups): Likewise.
677         * decl2.c (finish_file): Likewise.
678         * mangle.c (init_mangle): Likewise.
679         (dump_substitution_candidates): Likewise.
680         * search.c: Likewise.
681
682 2003-09-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>
683
684         * name-lookup.h (get_global_value_if_present): New function.
685         (is_typename_at_global_scope): Likewise.
686         * except.c (do_begin_catch): Use get_global_value_if_present.
687         (do_end_catch): Likewise.
688         (do_allocate_exception): Likewise.
689         (do_free_exception): Likewise.
690         (build_throw): Likewise.
691         * parser.c (cp_parser_member_declaration): Likewise.
692         * rtti.c (throw_bad_cast): Likewise.
693         (throw_bad_typeid): Likewise.
694         * decl.c (check_tag_decl): Use is_typename_at_global_scope.
695         (grokdeclarator): Likewise.
696         * cp-tree.h (global_namespace): Move to name-lookup.h
697         * call.c (call_builtin_trap): Tidy.
698
699 2003-09-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
700
701         PR c++/11415
702         * parser.c (cp_parser_nested_name_specifier_opt): Issue correct
703         error message when parser->scope is global_namespace.
704
705 2003-09-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>
706
707         * cp-tree.h, name-lookup.h, decl.c, decl2.c: Remove reference to
708         macros  BINDING_SCOPE, BINDING_VALUE and BINDING_TYPE.
709
710 2003-09-26  Gabriel Dos Reis  <gdr@integrable-solutions.net>
711
712         * decl.c (pop_binding_level, suspend_binding_level,
713         find_class_binding_level): Merge into leave_scope.  Remove.
714         (leave_scope):  New function.
715         (poplevel): Update.
716         (poplevel_class): Likewise.
717         (pop_namespace): Likewise.
718
719 2003-09-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
720
721         PR c++/5655
722         * parser.c (cp_parser_check_access_in_redeclaration): New function.
723         (cp_parser_member_declaration): Use it.
724         (cp_parser_template_declaration_after_export): Likewise.
725
726 2003-09-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
727
728         * cp-tree.h (scope_kind): Add new enumerator.
729         (keep_next_level): Change parameter type to bool.
730         (begin_scope):  Change prototype.
731         (pushlevel): Remove declaration.
732         * decl.c (push_binding_level): Fold in begin_scope.  Remove.
733         (struct cp_binding_level): Remove tag_tranparent field.  Make keep
734         of bitsize one.
735         (keep_next_level_flag): Make a bool.
736         (cxx_scope_descriptor): Update scope names table
737         (make_cxx_scope): Fold in begin_scope.  Remove..
738         (namespace_scope_ht_size): New function.
739         (begin_scope): Change prototype.  Return a scope.  Tidy.
740         (kept_level_p): Update.
741         (pushlevel): Remove.
742         (maybe_push_cleanup_level): Simplify.
743         (poplevel): Update for sk_cleanup and keep change.
744         (print_binding_level): Likewise.
745         (initial_push_namespace_scope): Fold in begin_scope.  Remove.
746         (push_namespace): Update.
747         (pushtag): Likewise.
748         (lookup_tag): Likewise.
749         (lookup_name_current_level): Likewise.
750         (lookup_type_current_level): Likewise.
751         (cxx_init_decl_processing): Likewise.
752         (start_function): Likewise.
753         (begin_function_body): Likewise.
754         (start_method): Likewise.
755         * pt.c (push_inline_template_parms_recursive): Likewise.
756         (begin_template_parm_list): Likewise.
757         (begin_specialization): Likewise.
758         * semantics.c (do_pushlevel): Likewise.
759         (begin_compound_stmt): Likewise.
760         (begin_stmt_expr): Likewise.
761
762 2003-09-21  Richard Henderson  <rth@redhat.com>
763
764         * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c,
765         method.c, optimize.c, pt.c, semantics.c, tree.c: Revert.
766
767 2003-09-21  Richard Henderson  <rth@redhat.com>
768
769         * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c,
770         method.c, optimize.c, pt.c, semantics.c, tree.c: Update for
771         DECL_SOURCE_LOCATION rename and change to const.
772
773 2003-09-20  Richard Henderson  <rth@redhat.com>
774
775         * decl.c, decl2.c, pt.c: Use %J in diagnostics.
776
777 2003-09-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
778
779         PR c++/157
780         * parser.c (cp_parser_direct_declarator): Clear
781         parser->num_template_parameter_lists when parsing function
782         parameters.
783         (cp_parser_constructor_declarator_p): Likewise.
784
785 2003-09-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
786
787         PR c++/495
788         * pt.c (tsubst_friend_class): Only use innermost template
789         arguments for the injected friend class template.
790
791 2003-09-19  Nathan Sidwell  <nathan@codesourcery.com>
792
793         PR c++/12332
794         * pt.c (instantiate_class_template): Increment
795         processing_template_decl around the tsubst of a template member
796         function.
797
798 2003-09-19  Gabriel Dos Reis  <gdr@integrable-solutions.net>
799
800         * decl.c (cxx_scope_descriptor): Fix thinko.
801         (struct cp_binding_level): Adjust type of binding_depth field. 
802
803 2003-09-18  Danny Smith  <dannysmith@users.sourceforge.net>
804
805         PR c++/12320
806         * call.c (type_passed_as): Check for incomplete type.
807         (convert_for_arg_passing): Likewise.
808
809 2003-09-18  Nathan Sidwell  <nathan@codesourcery.com>
810
811         PR c++/9848
812         * optimize.c (maybe_clone_body): Don't set MARK_USED on parameters
813         here.
814         * semantics.c (expand_body): Set it here on the remaining clones.
815
816 2003-09-18  Roger Sayle  <roger@eyesopen.com>
817
818         * lex.c (init_operators): Remove operator_name_info for FFS_EXPR.
819         * class.c (instantiate_type): Remove FFS_EXPR case.
820
821 2003-09-18  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
822
823         * ChangeLog: Fix recent commit.
824
825 2003-09-18  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
826
827         * ChangeLog: Add PR number to patch for PR c++/12316.
828
829 2003-09-18  Gabriel Dos Reis <gdr@integrable-solutions.net>
830
831         * error.c (dump_type): Simplify.  Use pp_type_specifier_seq for
832         "C" types. 
833         * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Fix thinko.
834
835 2003-09-17  Richard Henderson  <rth@redhat.com>
836
837         * semantics.c (expand_body): Don't save/restore input_location.
838
839 2003-09-17  Mark Mitchell  <mark@codesourcery.com>
840
841         PR c++/12266
842         * cp-tree.h (tsubst_flags_t): Add tf_conv.
843         * class.c (standard_conversion): Pass tf_conv to
844         instantiate_type.
845         (resolve_address_of_overloaded_function): Do not call mark_used
846         when just checking conversions.
847
848         PR debug/12066
849         * cp-lang.c (LANG_HOOKS_BUILTIN_TYPE_DECLS): Define.
850         * cp-tree.h (cxx_builtin_type_decls): Declare.
851         * decl.c (builtin_type_decls): New variables.
852         (cxx_builtin_type_decls): New function.
853         (record_builtin_type): Add to builtin_type_decls.
854
855 2003-09-17  Richard Henderson  <rth@redhat.com>
856
857         PR c++/12316
858         * semantics.c (expand_or_defer_fn): Inc/dec function_depth.
859
860 2003-09-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
861
862         PR c++/7939
863         * typeck.c (comptypes): Don't ICE when its first argument is
864         error_mark_node.
865         (compparms): Reverse the arguments of same_type_p.
866
867 2003-09-15  Nathan Sidwell  <nathan@codesourcery.com>
868
869         PR c++/12184
870         * typeck.c (convert_arguments): Return error_mark_node for an
871         incomplete parameter. Make error message more informative.
872
873 2003-09-12  Mark Mitchell  <mark@codesourcery.com>
874
875         PR c++/3907
876         * class.c (maybe_note_name_used_in_class): Refine test for whether
877         or not we are in a class scope.
878
879         * cp-tree.h (language_function): Remove x_expanding_p.
880         (expanding_p): Remove.
881         (doing_semantic_analysis_p): Remove.
882         (scope_kind): Add sk_function_parms, sk_class,
883         sk_namespace.
884         (innermost_scope_kind): New method.
885         * call.c (cxx_type_promotes_to): Use type_decays_to.
886         * cp-lang.c (LANG_HOOKS_PUSHLEVEL): Redefine.
887         (LANG_HOOKS_POPLEVEL): Likewise.
888         * decl.c (cp_binding_level): Remove parm_flag, template_parms_p,
889         template_spec_p, namespace_p, is_for_scope, is_try_scope, and
890         is_catch_scope.  Add kind and explicit_spec_p.
891         (cxx_scope_descriptor): Use a lookup table.
892         (find_class_binding_level): Use "kind" field in binding_level, not
893         the various flags.
894         (pop_binding_level): Likewise.
895         (innermost_nonclass_level): Likewise.
896         (toplevel_bindings_p): Likewise.
897         (namespace_bindings_p): Likewise.
898         (template_parm_scope_p): Likewise.
899         (innermost_scope_kind): New method.
900         (current_tmpl_spec_kind): Use "kind" field in binding_level, not
901         the various flags.
902         (pushlevel): Remove check for doing_semantic_analysis_p.
903         (begin_scope): Simplify.
904         (add_decl_to_level): Use "kind" field in binding_level, not
905         the various flags.
906         (push_local_binding): Likewise.
907         (pop_label): Remove check for doing_semantic_analysis_p.
908         (poplevel): Use "kind" field in binding_level, not
909         the various flags.
910         (set_block): Remove check for doing_semantic_analysis_p.
911         (pushlevel_class): Use "kind" field in binding_level, not
912         the various flags. 
913         (poplevel_class): Likewise.
914         (initial_push_namespace_scope): Likewise.
915         (maybe_push_to_top_level): Likewise.
916         (set_identifier_type_value_with_scope): Likewise.
917         (pop_everything): Likewise.
918         (maybe_process_template_type_declaration): Likewise.
919         (pushtag): Likewise.
920         (pushdecl): Likewise.
921         (pushdecl_with_scope): Likewise.
922         (check_previous_goto_1): Likewise.
923         (define_label): Likewise.
924         (finish_case_label): Likewise.
925         (lookup_tag): Likewise.
926         (unqualified_namespace_lookup): Likewise.
927         (lookup_name_real): Likewise.
928         (lookup_name_current_level): Likewise.
929         (lookup_type_current_level): Likewise.
930         (record_builtin_type): Likewise.
931         (cp_make_fname_decl): Likewise.
932         (maybe_inject_for_scope_var): Likewise.
933         (cp_finish_decl): Remove check for doing_semantic_analysis_p.
934         (start_function): Use begin_scope, not pushlevel.
935         (finish_function): Use "kind" field in binding_level, not
936         the various flags.
937         (start_method): Use begin_scope, not pushlevel.
938         (make_label_decl): Do not check expanding_p.
939         (save_function-data): Do not set expanding_p.
940         (cxx_push_function_context): Do not clear expanding_p.
941         * semantics.c (cxx_expand_function_start): Do not set expanding_p.
942         
943 2003-09-14  Mark Mitchell  <mark@codesourcery.com>
944
945         * class.c (layout_class_type): Make DECL_MODE match TYPE_MODE for
946         an bit-field whose width exceeds that of its type.
947
948 2003-09-14  Geoffrey Keating  <geoffk@apple.com>
949
950         * rtti.c (get_tinfo_decl): Set TREE_PUBLIC for typeinfo decls.
951
952 2003-09-14  Kazu Hirata  <kazu@cs.umass.edu>
953
954         * ChangeLog: Follow spelling conventions.
955         * parser.c: Likewise.
956
957 2003-09-13  Richard Henderson  <rth@redhat.com>
958
959         * decl2.c (finish_file): Check cgraph_assemble_pending_functions
960         during relaxation loop.
961
962 2003-09-11  David Edelsohn  <edelsohn@gnu.org>
963
964         * decl2.c (var_finalized_p): Swap arms of conditional.
965
966 2003-09-10  Nathan Sidwell  <nathan@codesourcery.com>
967
968         PR c++/11788
969         * typeck.c (build_address): If it is a function, mark it used.
970         (build_unary_op): Do not lose object's side-effects when taking
971         address of static member function.
972         * class.c (resolve_address_of_overloaded_function): Use
973         tsubst_flags_t parameter. Only expect overload sets. Adjust.
974         (instantiate_type): Adjust flags passing. Do not lose object's
975         side-effects when taking address of static member function.
976
977 2003-09-11  Richard Henderson  <rth@redhat.com>
978
979         * semantics.c (expand_or_defer_fn): Update for new
980         cgraph_finalize_function argument.
981
982 2003-09-10  Richard Henderson  <rth@redhat.com>
983
984         * decl2.c (cxx_callgraph_analyze_expr): Mark argument unused.
985
986 2003-09-10  Jan Hubicka  <jh@suse.cz>
987
988         * decl2.c (var_finalized_p): New.
989         (maybe_emit_vtables, write_out_vars, finish_file): Use it.
990
991 2003-09-10  Richard Henderson  <rth@redhat.com>
992
993         * decl2.c (cxx_callgraph_analyze_expr): New, from corpse of
994         mark_member_pointers.
995         (lower_function): Remove.
996         * cp-tree.h: Update to match.
997         * cp-lang.c (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): New.
998         (LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Remove.
999
1000 2003-09-09  Richard Henderson  <rth@redhat.com>
1001
1002         * semantics.c (expand_or_defer_fn): Update call to 
1003         cgraph_finalize_function.
1004
1005         * semantics.c (expand_or_defer_fn): Use cgraph_finalize_function
1006         always.
1007
1008         * decl2.c (finish_file): Avoid out-of-bounds array reference
1009         during memmove.
1010
1011 2003-09-09  Richard Henderson  <rth@redhat.com>
1012
1013         * decl2.c (mark_member_pointers): Rename from
1014         mark_member_pointers_and_eh_handlers and don't check eh handlers.
1015
1016 2003-09-09  Christian Ehrhardt  <ehrhardt@mathematik.uni-ulm.de>
1017
1018         PR bootstrap/12168
1019         * method.c (use_thunk): Clear DECL_RTL of copied nodes.
1020
1021 2003-09-08  Mark Mitchell  <mark@codesourcery.com>
1022
1023         * cp-lang.c (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define to
1024         c_register_builtin_type.
1025
1026         PR c++/11786
1027         * decl2.c (add_function): Do not complain about seeing the same
1028         non-function twice.
1029         * semantics.c (perform_koenig_lookup): Improve documentation.
1030
1031         PR c++/5296
1032         * pt.c (try_one_overload): Add addr_p parameter.
1033         (resolve_overloaded_unification): Pass it.
1034
1035 2003-09-08  Richard Henderson  <rth@redhat.com>
1036
1037         * optimize.c (maybe_clone_body): Inc/dec function_depth.
1038
1039 2003-09-08  Richard Henderson  <rth@redhat.com>
1040
1041         * decl.c (finish_function): Clear current_function_decl.
1042         * decl2.c (mark_used): Don't push/pop gc context.
1043         * optimize.c (optimize_function): Likewise.
1044         * tree.c (cp_cannot_inline_tree_fn): Likewise.
1045         * pt.c (instantiate_decl): Inc/dec function_depth instead.
1046         * semantics.c (expand_body): Update for tree_rest_of_compilation
1047         nested argument.
1048
1049 2003-09-07  Gabriel Dos Reis  <gcc@integrable-solutions.net>
1050
1051         PR c++/11762
1052         * error.c (dump_decl): Handle namespace-alias-definition.
1053         * decl.c (warn_extern_redeclared_static): There is no point in
1054         checking changes in storage class specifier for a namespace
1055         declaration. 
1056         (duplicate_decls): Tidy diagnostic message.
1057         * cxx-pretty-print.c (pp_cxx_left_brace): New macro.
1058         (pp_cxx_right_brace): Likewise.
1059         (pp_cxx_original_namespace_definition): New function.
1060         (pp_cxx_namespace_alias_definition): Likewise.
1061         (pp_cxx_declaration): Use them.  Handle NAMESPACE_DECLs.
1062
1063 2003-09-07  Jan Hubicka  <jh@suse.cz>
1064
1065         * decl2.c (maybe_emit_vtables, write_out_vars, finish_file):
1066         Avoid re-emitting variables in unit-at-a-time mode.
1067
1068 2003-09-06  Mark Mitchell  <mark@codesourcery.com>
1069
1070         PR c++/11867
1071         * call.c (standard_conversion): Improve comments.
1072         (perform_direct_initialization): Make sure we return an expression
1073         of the correct type.
1074         * typeck.c (build_static_cast): Check for ambiguity and
1075         accessibility when performing conversions.
1076
1077 2003-09-06  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1078
1079         * cp-tree.h (add_binding): Remove declaration.
1080         * name-lookup.h (supplement_binding): Declare.
1081         * decl.c (add_binding): Move to name-lookup.c.
1082         (push_local_binding): Adjust.
1083         (push_class_binding): Likewise.
1084         (set_identifier_type_value_with_scope): Likewise.
1085         * name-lookup.c (supplement_binding): Rename from add_binding.
1086         Return a bool.  Improve documentation. 
1087         (set_namespace_binding): Adjust.
1088         * Make-lang.in (cp/name-lookup.o): Depend on toplev.h
1089
1090 2003-09-06  Nathan Sidwell  <nathan@codesourcery.com>
1091
1092         PR c++/11794
1093         * class.c (pushclass): Push dependent using decls for nested
1094         classes of templates too.
1095
1096 2003-09-06  Roger Sayle  <roger@eyesopen.com>
1097
1098         PR c++/11409
1099         * class.c (resolve_address_of_overloaded_function): When building
1100         list of matching non-template function decls, ignore anticipated
1101         declarations of undeclared or shadowed GCC builtins.
1102
1103 2003-09-06  Steven Bosscher  <steven@gcc.gnu.org>
1104
1105         PR c++/11595
1106         * decl.c (define_label): Remove unreachable timevar pop.
1107         Always return the decl, even if the definition is invalid.
1108
1109 2003-09-06  Nathan Sidwell  <nathan@codesourcery.com>
1110
1111         PR c++/12167
1112         * parser.c (cp_parser_late_parsing_default_args): Push & pop the
1113         unparsed functions queue.
1114
1115 2003-09-05  Mark Mitchell  <mark@codesourcery.com>
1116
1117         PR c++/12163
1118         * call.c (perform_direct_initialization): Correct logic for
1119         direct-initialization of a class type.
1120
1121         PR c++/12146
1122         * pt.c (lookup_template_function): Robustify.
1123
1124 2003-09-05  Nathan Sidwell  <nathan@codesourcery.com>
1125
1126         PR c++/11922
1127         * pt.c (tsubst_qualified_id): Make sure we get a non-type.
1128         (tsubst_expr, tsubst_copy_and_build): Pass false, not zero, as
1129         is_type_p to lookup_qualified_name.
1130
1131         * semantics.c (finish_call_expr): Refactor some code.
1132
1133         PR c++/12037
1134         * cp-tree.h (COMPOUND_EXPR_OVERLOADED): New.
1135         (build_min_non_dep): Declare.
1136         * tree.c (build_min): Propagate TREE_SIDE_EFFECTS.
1137         (build_min_non_dep): New.
1138         * cvt.c (convert_to_void): Don't explicitly copy
1139         TREE_SIDE_EFFECTS, TREE_NO_UNUSED_WARNING.
1140         * call.c (build_new_method_call): Use build_min_non_dep.
1141         * decl2.c (grok_array_decl): Likewise.
1142         (build_offset_ref_call_from_tree): Likewise.
1143         * typeck.c (finish_class_member_access_expr,
1144         build_x_indirect_ref, build_x_binary_op, build_x_unary_op,
1145         build_x_conditional_expr, build_x_compound_expr): Likewise.
1146         (build_static_cast, build_reinterpret_cast,
1147         build_const_cast): Propagate TREE_SIDE_EFFECTS inside a template.
1148         * typeck2.c (build_x_arrow): Use build_min_non_dep.
1149         (build_functional_cast): Propagate TREE_SIDE_EFFECTS inside a
1150         template.
1151         * rtti.c (build_dynamic_cast_1): Set DECL_IS_PURE.
1152         (build_dynamic_cast): Set TREE_SIDE_EFFECTS.
1153         * pt.c (build_non_dependent_expr): Check COMPOUND_EXPR_OVERLOADED.
1154
1155 2003-09-04  Richard Henderson  <rth@redhat.com>
1156
1157         * decl2.c (mark_member_pointers_and_eh_handlers): Update for
1158         change in cgraph_mark_needed_node arguments.
1159
1160 2003-09-02  Geoffrey Keating  <geoffk@apple.com>
1161
1162         PR 12161
1163         * decl2.c (mark_used): Use ggc_push_context/ggc_pop_context.
1164         * tree.c (cp_cannot_inline_tree_fn): Likewise.
1165
1166 2003-09-04  Nathan Sidwell  <nathan@codesourcery.com>
1167
1168         * cp-tree.h (finish_sizeof, finish_alignof): Remove.
1169         (expr_sizeof): Replace with ...
1170         (cxx_sizeof_or_alignof_expr): ... here.
1171         (cxx_sizeof_or_alignof_type): Make complain parameter a bool.
1172         * parser.c (cp_parser_unary_expression): Commonize alignof and
1173         sizeof handling.
1174         * pt.c (tsubst_copy_and_build): Adjust alignof and sizeof
1175         substitution.
1176         * semantics.c (finish_sizeof, finish_alignof): Remove.
1177         * typeck.c (cxx_sizeof_or_alignof_type): Complain parameter
1178         becomes bool. Set TREE_READONLY.
1179         (expr_sizeof): Replace with ...
1180         (cxx_sizeof_or_alignof_expr): ... here. Clear TREE_SIDE_EFFECTS.
1181
1182 2003-09-04  Mark Mitchell  <mark@codesourcery.com>
1183
1184         Remove cast-as-lvalue extension.
1185         * call.c (build_conditional_expr): Correct formatting.
1186         (convert_like_real): Use lvalue_p, not non_cast_lvalue_p.
1187         (initialize_real): Use real_lvalue_p, not real_non_cast_lvalue_p.
1188         * cp-tree.h (non_cast_lvalue_p): Remove.
1189         (real_non_cast_lvalue_p): Remove.
1190         (non_cast_lvalue_or_else): Remove.
1191         * tree.c (lvalue_p_1): Remove allow_cast_as_lvalue parameter.
1192         (real_lvalue_p): Adjust call to lvalue_p_1.
1193         (non_cast_lvalue_p): Remove.
1194         (non_cast_lvalue_or_else): Remove.
1195         (lvalue_p): Adjust call to lvalue_p_1.
1196         (lvalue_or_else): Simplify.
1197         * typeck.c (build_unary_op): Use lvalue_or_else, not
1198         non_cast_lvalue_or_else.
1199         (build_static_cast): Use real_lvalue_p, not real_non_cast_lvalue_p.
1200
1201 2003-09-03  DJ Delorie  <dj@redhat.com>
1202
1203         * decl.c (finish_function): Pass fndecl to aggregate_value_p.
1204
1205 2003-09-03  Mark Mitchell  <mark@codesourcery.com>
1206
1207         PR c++/12053
1208         * class.c (include_empty_classes): Correct logic for ABI version 1.
1209
1210 2003-09-03  Richard Henderson  <rth@redhat.com>
1211
1212         * optimize.c (optimize_function): Push/pop ggc context around
1213         the call to optimize_inline_calls.
1214
1215 2003-09-02  Scott Brumbaugh  <scottb.lists@verizon.net>
1216
1217         PR c++/11553
1218         * parser.c (cp_parser_decl_specifier_seq): Add check for a
1219         duplicate friend decl-specifier.
1220
1221 2003-09-02  Mark Mitchell  <mark@codesourcery.com>
1222
1223         PR c++/11847
1224         * pt.c (convert_nontype_argument): Correct representation of
1225         REFERENCE_TYPE expressions.
1226
1227         PR c++/11808
1228         * cp-tree.h (KOENIG_LOOKUP_P): New macro.
1229         (finish_call_expr): Change prototype.
1230         * parser.c (cp_parser_postfix_expression): Adjust call to
1231         finish_call_expr.
1232         * pt.c (tsubst_copy_and_build): Use KOENIG_LOOKUP_P.
1233         * semantics.c (finish_call_expr): Add koenig_p parameter.
1234
1235 2003-09-01  Mark Mitchell  <mark@codesourcery.com>
1236
1237         PR c++/12114
1238         * cp-tree.h (initialize_reference): Change prototype.
1239         * call.c (initialize_reference): Add cleanup parameter.
1240         * decl.c (grok_reference_init): Likewise.
1241         (check_initializer): Likewise.
1242         (cp_finish_decl): Insert a CLEANUP_STMT if necessary.
1243         (duplicate_decls): When replacing an anticipated builtin, do not
1244         honor TREE_NOTHROW.
1245         * typeck.c (convert_for_initialization): Correct call to
1246         initialize_reference.
1247
1248         PR c++/11972
1249         * pt.c (dependent_type_p_r): Pass only the innermost template
1250         arguments to any_dependent_template_arguments_p.
1251
1252 2003-09-01  Josef Zlomek  <zlomekj@suse.cz>
1253
1254         * error.c (dump_expr): Kill BIT_ANDTC_EXPR.
1255         * lex.c (init_operators): Kill BIT_ANDTC_EXPR.
1256         * pt.c (tsubst_copy): Kill BIT_ANDTC_EXPR.
1257         * typeck.c (build_binary_op): Kill BIT_ANDTC_EXPR.
1258         (tsubst_copy_and_build): Kill BIT_ANDTC_EXPR.
1259
1260 2003-08-29  Mark Mitchell  <mark@codesourcery.com>
1261
1262         PR c++/12093
1263         * pt.c (build_non_dependent_expr): Do not build a
1264         NON_DEPENDENT_EXPR for a STRING_CST.
1265
1266         PR c++/11928
1267         * search.c (add_conversions): Avoid adding two conversion
1268         operators for the same type.
1269
1270 2003-08-29  Mark Mitchell  <mark@codesourcery.com>
1271
1272         PR c++/6196
1273         * pt.c (tsubst_copy_and_build): Correct handling of
1274         address-of-label extension.
1275         * semantics.c (finish_goto_stmt): The address of a label must go
1276         through the lvalue-to-rvalue conversion.
1277
1278 2003-08-29  Richard Henderson  <rth@redhat.com>
1279             Jason Merrill <jason@redhat.com>
1280
1281         * cp-lang.c (LANG_HOOKS_RTL_EXPAND_START): New.
1282         (LANG_HOOKS_RTL_EXPAND_STMT): New.
1283         * cp-tree.h (cxx_expand_function_start): Declare.
1284         * decl.c (start_function): Use allocate_struct_function.
1285         Move stmts_are_full_exprs_p assertion from expand_body.
1286         Do not free_after_parsing or free_after_compilation.
1287         (cxx_push_function_context): Move code to set struct function
1288         data from genrtl_start_function.
1289         * optimize.c (optimize_function): Don't inc/dec function_depth.
1290         * semantics.c (expand_body): Use tree_rest_of_compilation.
1291         (cxx_expand_function_start): Rename from genrtl_start_function,
1292         omit bits done by tree_rest_of_compilation.
1293         (genrtl_finish_function): Remove.
1294         (clear_decl_rtl): Move to ../tree-optimize.c.
1295
1296 2003-08-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1297
1298         PR c++/11811
1299         * cxx-pretty-print.c (pp_cxx_canonical_template_parameter): New
1300         function. 
1301         * cxx-pretty-print.h: Declare.
1302         * error.c (dump_template_parameter): Use it.
1303         (dump_type): Likewise.
1304
1305 2003-08-28  Mark Mitchell  <mark@codesourcery.com>
1306
1307         * init.c (decl_constant_value): Deal with COND_EXPR specially.
1308         * call.c (build_conditional_expr): Revert previous patch.
1309
1310         PR optimization/5079
1311         * call.c (build_conditional_expr): Use decl_constant_value to
1312         simplify the arguments.
1313
1314 2003-08-26  Dan Nicolaescu  <dann@ics.uci.edu>
1315
1316         * parser.c (struct cp_token): Use enum bitfields.
1317         (CP_TOKEN_BLOCK_NUM_TOKENS): Make sure cp_token_block fits in a
1318         512B allocation unit.
1319         (cp_parser_token_tree_map_node): Use enum bitfields.
1320
1321 2003-08-26  Nathan Sidwell  <nathan@codesourcery.com>
1322
1323         PR c++/11871
1324         * decl.c (push_class_level_binding): Correct old_decl value from
1325         my 2003-07-29 reorganization.
1326
1327         * call.c (build_call): Don't set TREE_SIDE_EFFECTS here.
1328         (build_new_method_call): Add goto finish.
1329         * semantics.c (simplify_aggr_init_exprs_r): Don't set
1330         TREE_SIDE_EFFECTS on a call.
1331
1332 2003-08-25  Richard Henderson  <rth@redhat.com>
1333
1334         * cxx-pretty-print.c (pp_cxx_class_name): Remove unused function.
1335
1336 2003-08-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1337
1338         * cxx-pretty-print.h (pp_cxx_flag_default_argument): New flag.
1339         (cxx_pretty_printer): Adjust base type.
1340         (pp_cxx_function_specifier): Declare.
1341         * cxx-pretty-print.c (pp_cxx_whitespace): New macro.
1342         (pp_cxx_left_paren): Likewise.
1343         (pp_cxx_right_paren): Likewise.
1344         (pp_cxx_dot): Likewise.
1345         (pp_cxx_arrow): Likewise.
1346         (pp_cxx_semicolon): Likewise.
1347         (pp_cxx_identifier): Likewise.
1348         (pp_cxx_cv_qualifier_seq): Likewise.
1349         (pp_cxx_storage_class_specifier): Likewise.
1350         (pp_cxx_expression_list): Likewise.
1351         (pp_cxx_space_for_pointer_operator): Likewise.
1352         (pp_cxx_init_declarator): Likewise.
1353         (pp_cxx_call_argument_list): Likewise.
1354         (pp_cxx_nonconsecutive_character): Tidy.
1355         (pp_cxx_conversion_function_id): New function.
1356         (pp_cxx_template_id): Likewise.
1357         (pp_cxx_template_keyword_if_needed): Likewise.
1358         (pp_cxx_nested_name_specifier): Likewise.
1359         (pp_cxx_unqualified_id): Tidy
1360         (pp_cxx_qualified_id): Handle more nodes.
1361         (pp_cxx_primary_expression): Tidy.
1362         (pp_cxx_postfix_expression): Likewise.
1363         (pp_cxx_new_expression): Tidy.
1364         (pp_cxx_delete_expression): Likewise.
1365         (pp_cxx_cast_expression): New function.
1366         (pp_cxx_pm_expression): Tidy.
1367         (pp_cxx_conditional_expression): Likewise.
1368         (pp_cxx_assignment_operator): New function.
1369         (pp_cxx_assignment_expression): Tidy.
1370         (pp_cxx_expression): New function.
1371         (pp_cxx_function_specifier): Likewise.
1372         (pp_cxx_decl_specifier_seq): Likewise.
1373         (pp_cxx_simple_type_specifier): Tidy.
1374         (pp_cxx_type_specifier_seq): Likewise.
1375         (pp_cxx_ptr_operator): New function.
1376         (pp_cxx_implicit_parameter_type): Likewise.
1377         (pp_cxx_parameter_declaration): Tidy.
1378         (pp_cxx_parameter_declaration_clause): New function.
1379         (pp_cxx_exception_specification): Likewise.
1380         (pp_cxx_direct_declarator): Tidy.
1381         (pp_cxx_declarator): Likewise.
1382         (pp_cxx_ctor_initializer): New function.
1383         (pp_cxx_function_definition): Likewise.
1384         (pp_cxx_abstract_declarator): Tidy.
1385         (pp_cxx_direct_abstract_declarator): Likewise.
1386         (pp_cxx_type_id): Likewise.
1387         (pp_cxx_exception_declaration): New function.
1388         (pp_cxx_statement): Likewise.
1389         (pp_cxx_simple_declaration): Likewise.
1390         (pp_cxx_template_parameter_list): Likewise.
1391         (pp_cxx_template_parameter): Likewise.
1392         (pp_cxx_template_declaration): Likewise.
1393         (pp_cxx_explicit_specialization): Likewise.
1394         (pp_cxx_explicit_instantiation): Likewise.
1395         (pp_cxx_declaration): Tidy.
1396         (pp_cxx_pretty_printer_init): Initialize more fields.
1397
1398 2003-08-25  Mark Mitchell  <mark@codesourcery.com>
1399
1400         PR c++/8795
1401         * cp-tree.h (build_cplus_method_type): Remove.
1402         * call.c (standard_conversion): Use build_method_type_directly
1403         instead of build_cplus_method_type.
1404         * class.c (build_clone): Likewise.
1405         (adjust_clone_args): Likewise.
1406         * decl.c (build_ptrmem_type): Likewise.
1407         (grokdeclarator): Likewise.
1408         (check_function_type): Likewise.
1409         * decl2.c (grok_method_quals): Likewise.
1410         (maybe_retrofit_in_chrg): Likewise.
1411         * pt.c (copy_default_args_to_explicit_spec): Likewise.
1412         (tsubst_function_type): Likewise.
1413         (tsubst): Likewise.
1414         * tree.c (build_cplus_method_type): Remove.
1415         * typeck.c (merge_types): Use build_method_type_directly.
1416
1417 2003-08-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1418
1419         PR c++/3765
1420         * search.c (dfs_access_in_type): Fix typo in comment.
1421         (dfs_accessible_queue_p): Likewise.
1422         (dfs_accessible_p): Only terminate when a friend is found.
1423         (accessible_p): Return immediately if access_in_type allows
1424         access.
1425
1426 2003-08-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1427
1428         PR c++/641, c++/11876
1429         * friend.c (add_friend): Add complain parameter.
1430         (make_friend_class): Likewise.
1431         (do_friend): Adjust add_friend call.
1432         * decl.c (grokdeclarator): Adjust make_friend_class call.
1433         * parser.c (cp_parser_member_declaration): Likewise.
1434         (cp_parser_template_declaration_after_export): Likewise.
1435         * pt.c (instantiate_class_template): Adjust make_friend_class
1436         and add_friend call.
1437         * cp-tree.h (make_friend_class): Adjust declaration.
1438         (add_friend): Likewise.
1439
1440 2003-08-21  Jason Merrill  <jason@redhat.com>
1441
1442         PR c++/11283
1443         * call.c (build_conditional_expr): Ignore cv-qual differences for
1444         non-class types.
1445
1446 2003-08-21  Mark Mitchell  <mark@codesourcery.com>
1447
1448         PR c++/11551
1449         * parser.c (cp_parser_id_expression): Add declarator_p parameter.
1450         (cp_parser_primary_expression): Adjust call to
1451         cp_parser_id_expression.
1452         (cp_parser_unqualified_id): Complain about the use of
1453         typedef-names in a destructor declarator.
1454         (cp_parser_postfix_expression): Adjust call to
1455         cp_parser_id_expression.
1456         (cp_parser_type_parameter): Likewise.
1457         (cp_parser_template_argument): Likewise.
1458         (cp_parser_declarator_id): Likewise.
1459
1460         PR c++/11919
1461         * call.c (standard_conversion): Use same_type_p, not pointer
1462         equality, to compare types.
1463
1464         PR c++/10762
1465         * parser.c (cp_parser_using_declaration): Check for invalid uses
1466         of template-ids here...
1467         * decl2.c (do_class_using_decl): ... rather than here.
1468
1469 2003-08-20  Mark Mitchell  <mark@codesourcery.com>
1470
1471         PR c++/11834
1472         * pt.c (more_specialized): Bump processing_template_decl.
1473
1474 2003-08-21  Jason Merrill  <jason@redhat.com>
1475
1476         PR c++/11614
1477         * decl.c (grokdeclarator): Recognize a flexible array based on the
1478         type, not the form of the declarator.
1479
1480 2003-08-20  Jason Merrill  <jason@redhat.com>
1481
1482         * semantics.c (simplify_aggr_init_expr): Split out from
1483         simplify_aggr_init_exprs_r.  Convert slot address to match
1484         the return type.
1485         * cp-tree.h: Declare it.
1486         * tree.c (cp_copy_res_decl_for_inlining): Don't clobber the
1487         DECL_NAME of a user variable.
1488
1489 2003-08-20  Nathan Sidwell  <nathan@codesourcery.com>
1490
1491         PR c++/11945
1492         * pt.c (build_non_dependent_expr): Look inside COND_EXPR and
1493         COMPOUND_EXPR.
1494         * semantics.c (finish_expr_stmt): Always convert to void.
1495         * typeck.c (build_x_compound_exp): Always convert to void.
1496
1497 2003-08-19  Mark Mitchell  <mark@codesourcery.com>
1498
1499         PR c++/11684
1500         * cp-tree.h (grok_op_properties): Change prototype.
1501         * decl.c (grok_op_properties): Add complain parameter.
1502         (grokfndecl): Pass it.
1503         * pt.c (tsubst_decl): Adjust accordingly.
1504
1505         PR c++/10926
1506         * decl.c (start_method): Return immediately if push_template_decl
1507         does not like the declaration.
1508         * pt.c (push_template_decl_real): Disallow member template
1509         destructors.
1510
1511         PR c++/11036
1512         * cp-tree.h (add_binding): Add prototype.
1513         * class.c (add_method): Set TYPE_HAS_DESTRUCTOR if appropriate.
1514         (maybe_warn_about_overly_private_class): Use
1515         CLASSTYPE_DESTRUCTORS.
1516         (pushclass): Adjust call to set_identifier_type_value.
1517         * decl.c (add_binding): Give it external linkage.
1518         (push_local_binding): Adjust call to add_binding.
1519         (push_class_binding): Likewise.
1520         (set_identifier_type_value_with_scope): Change prototype.  Use
1521         add_binding for global bindings.
1522         (set_identifier_type_value): Adjust accordingly.
1523         (pushtag): Likewise.
1524         (pushdecl): Use set_identifier_type_value, not
1525         set_identifier_type_value_with_scope.
1526         (pushdecl_namespace_level): Adjust calls to
1527         SET_IDENTIFIER_TYPE_VALUE to pass a DECL.
1528         (pushdecl_class_level): Likewise.
1529         (lookup_tag): Use select_decl.
1530         (select_decl): Improve comment.
1531         (record_builtin_type): Do not call pushdecl.
1532         (cxx_init_decl_processing): Do not call xref_tag for bad_alloc.
1533         (cp_finish_decl): Adjust call to set_identifier_type_value.
1534         (check_elaborated_type_specifier): Improve checks for invalid uses
1535         of typedefs.
1536         (xref_tag): Adjust call to check_elaborated_type_specifier.
1537         * decl2.c (grokclassfn): Do not set TYPE_HAS_DESTRUCTOR.
1538         * name-lookup.c (set_namespace_binding): Use add_binding.
1539         * parser.c (cp_parser_simple_type_specifier): Return a TYPE_DECL,
1540         rather than an IDENTIFIER_NODE, to represent built-in types, if
1541         requested by the caller.
1542         (cp_parser_postfix_expression): Adjust call.
1543         (cp_parser_type_specifier): Likewise.
1544         (cp_parser_elaborated_type_specifier): Adjust call to
1545         check_elaborated_type_specifier.
1546         * typeck2.c (build_functional_cast): Do not perform name lookups.
1547
1548         PR c++/10717
1549         * decl.c (expand_static_init): Remove unnecessary code.
1550
1551 2003-08-19  Andrew Pinski  <pinskia@physics.uc.edu>
1552
1553         PR c++/10538, PR c/5582
1554         * cp/cp-lang.c (LANG_HOOKS_DECL_UNINIT): Define.
1555
1556 2003-08-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1557
1558         PR c++/11174
1559         * init.c (build_offset_ref): Perform access checking for
1560         pointer to member correctly.
1561
1562 2003-08-19  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1563
1564         * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTICS): Fix spelling.
1565
1566 2003-08-18  Nathan Sidwell  <nathan@codesourcery.com>
1567
1568         PR c++/11957
1569         * cp-tree.h (finish_stmt_expr): Add bool parameter.
1570         * init.c (finish_init_stmts): Pass true to finish_stmt_expr. Don't
1571         adjust the stmt_expr here.
1572         (build_vec_init): Use finish_stmt_expr_expr, convert result to
1573         array type.
1574         * parser.c (cp_parser_primar_expression): Adjust finish_stmt_expr
1575         call.
1576         * pt.c (tsubst_copy): Likewise.
1577         * semantics.c (finish_stmt_expr): Add parameter.
1578
1579         * pt.c (instantiate_class_template): Push to class's scope before
1580         tsubsting base.
1581
1582 2003-08-17  Jan Hubicka  <jh@suse.cz>
1583
1584         PR C++/11702
1585         * semantics.c (finish_id_expression): Mark all functions as used.
1586
1587 2003-08-16  Nathan Sidwell  <nathan@codesourcery.com>
1588
1589         PR c++/11512
1590         * cvt.c (convert_to_void): Indicate which side of conditional has
1591         no effects, and rhs of comma operator. Test for no sideeffect
1592         expressions here and always build a convert expr.
1593         * init.c (expand_default_init): Convert the init to void.
1594         * typeck.c (build_x_compound_expr): Do not check for side effects
1595         here.
1596         (build_compound_expr): Do not convert lhs when building a
1597         template.
1598
1599 2003-08-15  Nathan Sidwell  <nathan@codesourcery.com>
1600
1601         * cp-tree.def (NON_DEPENDENT_EXPR): Add operand.
1602         * decl2.c (build_offset_ref_call_from_tree): Use
1603         build_non_dependent_expr.
1604         * error.c (dump_expr) <NON_DEPENDENT_EXPR case>: Dump the operand.
1605         * pt.c (build_non_dependent_expr): Set operand.
1606
1607 2003-08-14  Jan Hubicka  <jh@suse.cz>
1608
1609         * decl2.c (mark_member_pointers): Rename to...
1610         (mark_member_pointers_and_eh_tinfos): ... this one; deal with eh tinfos
1611         (lower_function): Update call.
1612         * except.c (eh_type_info): Break out from ...
1613         (build_eh_type): ... here; tinfo is already used.
1614         (finish_eh_spec_block): Mark tinfos as used.
1615         * semantics.c (finish_handler_params): Mark tinfo as used.
1616         * cp-tree.h (eh_type_info): Declare.
1617
1618 2003-08-15  Nathan Sidwell  <nathan@codesourcery.com>
1619
1620         * pt.c (instantiate_class_template): Set location before
1621         substuting bases.
1622
1623         * decl.c (make_typename_type): Use my_friendly_assert.
1624         * pt.c (tsubst_aggr_type): Rearrange context substitution.
1625
1626 2003-08-14  Jan Hubicka  <jh@suse.cz>
1627
1628         * method.c (use_thunk): Expand body directly.
1629
1630 2003-08-12  Mark Mitchell  <mark@codesourcery.com>
1631
1632         PR c++/11703
1633         * call.c (type_passed_as): Use TYPE_SIZE, not TYPE_PRECISION to
1634         determine whether or not to promote types.
1635         (convert_for_arg_passing): Likewise.
1636         * decl2.c (cp_build_parm_decl): Do not set DECL_ARG_TYPE in
1637         templates.
1638         * pt.c (tsubst_decl): Do not expect it to be set.
1639
1640         PR c++/9512
1641         PR c++/10923
1642         * cp-tree.h (check_elaborated_type_specifier): Declare.
1643         (handle_class_head): Remove.
1644         (note_got_semicolon): Likewise.
1645         (note_list_got_semicolon): Likewise.
1646         (finish_class_definition): Likewise.
1647         * decl.c (check_elaborated_type_specifier): Make it public.
1648         Robustify.
1649         (handle_class_head): Remove.
1650         * parser.c (cp_parser_elaborated_type_specifier): Use
1651         check_elaborated_type_specifier.
1652         (cp_parser_class_specifier): Do not call finish_class_definition.
1653         (cp_parser_class_head): Or handle_class_head.  Check for
1654         over-qualified names.
1655         * semantics.c (finish_class_definition): Remove.
1656
1657         * parser.c (cp_parser_check_for_definition_in_return_type): New
1658         function.
1659         (cp_parser_simple_declaration): Adjust call to
1660         cp_parser_init_declarator.
1661         (cp_parser_decl_specifier_seq): Change type of
1662         declares_class_or_enum parameter.
1663         (cp_parser_explicit_instantiation): Adjust accordingly.
1664         (cp_parser_type_specifier): Change type of
1665         declares_class_or_enum parameter.
1666         (cp_parser_init_declarator): Add declares_class_or_enum
1667         parameter.
1668         (cp_parser_parameter_declaration): Adjust call to
1669         cp_parser_decl_specifier_seq.
1670         (cp_parser_function_definition): Likewise.
1671         (cp_parser_member_declaration): Likewise.
1672         (cp_parser_single_declaration): Likewise.
1673
1674         * cp-tree.h (lang_type_class): Remove has_call_overloaded,
1675         has_array_ref_overloaded, has_arrow_overloaded, and got_semicolon.
1676         (TYPE_OVERLOADS_CALL_EXPR): Remove.
1677         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
1678         (TYPE_OVERLOADS_ARROW): Likewise.
1679         (CLASSTYPE_GOT_SEMICOLON): Likewise.
1680         * class.c (check_bases): Do not set them.
1681         (finish_struct_1): Likewise.
1682         * decl.c (cp_finish_decl): Do not set CLASSTYPE_GOT_SEMICOLON.
1683         (build_ptrmemfunc_type): Likewise.
1684         (grok_op_properties): Do not set TYPE_OVERLOADS_*.
1685         (start_function): Do not check CLASSTYPE_GOT_SEMICOLON.
1686         * decl2.c (grokfield): Do not set CLASSTYPE_GOT_SEMICOLON.
1687         * lex.c (note_got_semicolon): Remove.
1688         (note_list_got_semicolon): Likewise.
1689         * parser.c (cp_parser_simple_declaration): Do not call
1690         note_list_got_semicolon.
1691         * pt.c (list_eq): Remove.
1692         (lookup_template_class): Do not set CLASSTYPE_GOT_SEMICOLON.
1693         (instantiate_class_template): Do not set TYPE_OVERLOADS*.
1694         (instantiate_class_template): Do not set CLASSTYPE_GOT_SEMICOLON.
1695         * ptree.c (cxx_print_type): Do not print them.
1696         * semantics.c (finish_member_class_template): Do not call
1697         note_list_got_semicolon.
1698
1699 2003-08-11  Aldy Hernandez  <aldyh@redhat.com>
1700
1701         * call.c (standard_conversion): Opaque pointers interconvert.
1702
1703         * testsuite/g++.dg/other/opaque-3.C: New.
1704
1705 2003-08-11  Mark Mitchell  <mark@codesourcery.com>
1706
1707         * typeck.c (merge_types): Handle cv-qualified pointer-to-member
1708         types correctly.
1709
1710 2003-08-10  Mark Mitchell  <mark@codesourcery.com>
1711
1712         PR c++/11789
1713         * cp-tree.h (get_vbase): Remove.
1714         (get_vbase_types): Remove.
1715         * init.c (expand_member_init): Correct logic for looking up base
1716         classes.
1717
1718 2003-08-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1719
1720         * error.c (dump_expr): Tidy.
1721         * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): New.
1722         (pp_cxx_begin_template_argument_list): Likewise.
1723         (pp_cxx_end_template_argument_list): Likewise.
1724         (is_destructor_name): Likewise.
1725         (pp_cxx_unqualified_id): Likewise.
1726         (pp_cxx_qualified_id): Likewise.
1727         (pp_cxx_id_expression): Likewise.
1728         (pp_cxx_new_expression): Likewise.
1729         (pp_cxx_delete_expression): Likewise.
1730         (pp_cxx_pm_expression): Likewise.
1731         (pp_cxx_type_specifier): Rework.
1732         (pp_cxx_type_id): Likewise.
1733         (pp_cxx_primary_expression): Likewise.
1734         (pp_cxx_postfix_expression): Likewise.
1735         (pp_cxx_unary_expression): Likewise.
1736         (pp_cxx_multiplicative_expression): Likewise.
1737         (pp_cxx_conditional_expression): Likewise.
1738         (pp_cxx_assignment_expression): Likewise.
1739         (pp_cxx_pretty_printer_init): Tidy.
1740
1741 2003-08-10  Nathan Sidwell  <nathan@codesourcery.com>
1742
1743         * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): non-NULL
1744         NODE is always a TREE_VEC of nonzero size.
1745         (NUM_TMPL_ARGS): NODE is always a TREE_VEC.
1746         * decl2.c (arg_assoc): Template args will be a vec.
1747         * error.c (dump_decl) <TEMPLATE_ID_EXPR case>: Call
1748         dump_template_argument_list.
1749         (dump_template_parms): Args will be a vec.
1750         * parser.c (cp_parser_template_argument_list): Produce a
1751         vector, not a list.
1752         * pt.c (coerce_template_parms): Args are always vectors.
1753         (mangle_class_name_for_template): Likewise.
1754         (lookup_template_function): Likewise.
1755         (lookup_template_class): Likewise.
1756         (tsubst_template_args): Likewise.
1757         (tsubst_baselink): Use tsubst_template_args.
1758         (tsubst_qualified_id): Likewise.
1759         (tsubst_copy) <TEMPLATE_ID_EXPR case>: Likewise.
1760         (tsubst_copy_and_build) <TEMPLATE_ID_EXPR case>: Likewise.
1761         (any_dependent_template_args_p):  Args are always vectors.
1762         * tree.c (cp_tree_equal): Add TEMPLATE_ID_EXPR case.
1763
1764         PR c++/11670
1765         * call.c (convert_like_real): Add rvalue binding error message.
1766         * error.c (dump_expr) <NOP_EXPR case>: Detect when the no expr is
1767         really a cast.
1768
1769         PR c++/10530
1770         * pt.c (dependent_type_p_r): A dependent template-id is a class
1771         type with dependent template arguments, or a bound template
1772         template parameter.
1773         (type_dependent_expression_p): A template function decl cannot
1774         have a dependent context.
1775
1776 2003-08-07  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1777
1778         PR c++/5767
1779         * parser.c (cp_parser_class_name): Return immediately when scope
1780         is error_mark_node.
1781
1782 2003-08-07  Aldy Hernandez  <aldyh@redhat.com>
1783
1784         * cp/Make-lang.in (cp/call.o): Add dependency for target.h.
1785
1786         * cp/call.c (standard_conversion): Support opaque types.
1787         Include target.h.
1788         (strip_top_quals): Use cp_build_qualified_type instead of
1789         TYPE_MAIN_VARIANT.
1790
1791         * cp/typeck.c (convert_for_assignment): Support opaque types.
1792
1793         * testsuite/g++.dg/other/opaque-1.C: New.
1794
1795         * testsuite/g++.dg/other/opaque-2.C: New.
1796
1797 2003-08-06  Aldy Hernandez  <aldyh@redhat.com>
1798
1799         * decl.c (grokparms): Use cp_build_qualified_type instead
1800         TYPE_MAIN_VARIANT.
1801
1802 2003-08-05  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1803
1804         * cxx-pretty-print.h: New file.
1805         * cxx-pretty-print.c: Likewise.
1806         * error.c (scratch_pretty_printer): Change type.
1807         (init_error): Tidy.
1808         (dump_aggr_type): Likewise.
1809         (dump_global_iord): Likewise.
1810         (dump_expr): Likewise.
1811         (dump_char): Remove.
1812         * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTITCS): Define.
1813         (cxx_initialize_diagnostics): New function.
1814         * Make-lang.in (CXX_OBJS): Add cp/cxx-pretty-print.o
1815         (CXX_PRETTY_PRINT_H): New variable.
1816         (cp/cxx-pretty-print.o): New rule.
1817         (cp/cp-lang.o): Update dependence.
1818         (cp/error.o): Likewise.
1819
1820 2003-08-05  Steven Bosscher  <steven@gcc.gnu.org>
1821
1822         * cp-tree.h (struct lang_decl): Don't include c_lang_decl.
1823         (DECL_DECLARED_INLINE_P): Remove.
1824         * decl2.c (import_export_decl): Only look at DECL_DECLARED_INLINE_P
1825         if decl is a FUNCTION_DECL.  This never made sense, but now it is
1826         required to avoid a tree check failure.
1827         * decl.c (grokfndecl): Don't touch DID_INLINE_FUNC.
1828         * optimize.c (maybe_clone_body): Likewise.
1829
1830 2003-08-04  Roger Sayle  <roger@eyesopen.com>
1831
1832         * decl.c (cxx_insert_default_attributes): Delete.
1833         * cp-tree.h (cxx_insert_default_attributes): Don't prototype.
1834         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Don't define.
1835
1836 2003-08-03  Nathan Sidwell  <nathan@codesourcery.com>
1837
1838         PR c++/11704
1839         * pt.c (type_dependent_expression_p): Cope with COMPONENT_REF with
1840         unknown type.
1841
1842         PR c++/11766
1843         * typeck.c (comp_ptr_ttypes_real): Don't loop on pointers to
1844         member functions.
1845
1846 2003-08-02  Nathan Sidwell  <nathan@codesourcery.com>
1847
1848         PR c++/9447
1849         * cp-tree.def (USING_DECL): Document its type.
1850         * class.c (pushclass): If we're entering a template, push any
1851         dependent using decls it has.
1852         * decl2.c (do_class_using_decl): Refactor. Type is NULL iff it is
1853         a dependent scope.
1854         * pt.c (tsubst_decl) <USING_DECL case>: Set type.
1855         (tsubst): Remove USING_DECL checks.
1856         (type_dependent_expression_p): Remove USING_DECL case.
1857         * semantics.c (finish_member_declaration): A USING_DECL's type
1858         indicates whether it is dependent.
1859
1860 2003-08-02  Nathan Sidwell  <nathan@codesourcery.com>
1861
1862         * cp-tree.h (pushclass): Remove unneeded parameter.
1863         * class.c (pushclass): Remove unneeded MODIFY parm. Adjust.
1864         (push_nested_class): Adjust pushclass call.
1865         * pt.c (instantiate_class_template): Likewise.
1866         * semantics.c (begin_class_definition): Likewise.
1867
1868 2003-08-01  Nathanael Nerode  <neroden@gcc.gnu.org>
1869
1870         * typeck2.c (add_exception_specifier): Use 'bool' where appropriate.
1871
1872 2003-08-01  Mark Mitchell  <mark@codesourcery.com>
1873
1874         PR c++/11697
1875         * decl.c (decls_match): Don't ignore the types of template
1876         classes.
1877
1878         PR c++/11744
1879         * pt.c (tsubst_copy_and_build): Refine Koenig lookup logic.
1880
1881 2003-08-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1882
1883         PR c++/8442, c++/8806
1884         * decl.c (qualify_lookup): Accept TEMPLATE_DECL if types are
1885         preferred.
1886         (check_elaborated_type_specifier): Add allow_template_p
1887         parameter.  Check tag mismatch and class template.
1888         (xref_tag): Add template_header_p parameter.  Add assertion
1889         that name is an IDENTIFIER_NODE.  Remove implicit typename
1890         warning.  Simplify lookup process if globalize is true.
1891         (cxx_init_decl_processing): Adjust call to xref_tag.
1892         (xref_tag_from_type): Likewise.
1893         * decl2.c (handle_class_head): Likewise.
1894         * parser.c (cp_parser_elaborated_type_specifier,
1895         cp_parser_class_head): Likewise.
1896         * rtti.c (init_rtti_processing, build_dynamic_cast1,
1897         tinfo_base_init, emit_support_tinfos): Likewise.
1898         * class.c (is_base_of_enclosing_class): Remove.
1899         * pt.c (convert_template_argument): Don't accept RECORD_TYPE as
1900         template template argument.
1901         * cp-tree.h (xref_tag): Adjust declaration.
1902         (is_base_of_enclosing_class): Remove.
1903         * NEWS: Document template template argument change.
1904
1905 2003-08-01  Nathan Sidwell  <nathan@codesourcery.com>
1906
1907         * parser.c (cp_parser_init_declarator,
1908         cp_paser_member_declaration): Reformat.
1909         * pt.c (lookup_template_class, type_unification_real, unify,
1910         type_dependent_expression_p): Reformat.
1911
1912         PR c++/11295
1913         * cp-tree.h (tubst_flags_t): Add tf_stmt_expr_cmpd,
1914         tf_stmt_expr_body.
1915         (finish_stmt_expr_expr): Declare.
1916         * parser.c (cp_parser_primary_expression): Tell
1917         cp_parser_compount_statement that it is a statement expression.
1918         (cp_parser_statement, cp_parser_labeled_statement,
1919         cp_parser_compound_statement, cp_parser_statement_seq_opt): Add
1920         in_statement_expr_p parameter.
1921         (cp_parser_expression_statement): Likewise. Call
1922         finish_stmt_expr_expr for final expression of a statement
1923         expression.
1924         (cp_parser_for_init_statement,
1925         cp_parser_implicitly_scoped_statement,
1926         cp_parser_already_scoped_statement, cp_parser_function_definition,
1927         cp_parser_try_block, cp_parser_handled): Adjust.
1928         * pt.c (tsubst_copy) <STMT_EXPR case>: Pass tf_stmt_expr.
1929         (tsubst_expr): Process tf_stmt_expr and tf_stmt_exprs flags.
1930         (tsubst_expr) <EXPR_STMT case>: Check tf_stmt_exprs flag.
1931         * semantics.c (finish_expr_stmt): Do not deal with statement
1932         expressions.
1933         (begin_stmt_expr): Clear last_expr_type.
1934         (finish_stmt_expr_expr): New.
1935         (finish_stmt_expr): Process the value expression.
1936
1937         * typeck.c (build_compound_expr): If RHS is a TARGET_EXPR, put the
1938         compound expr inside the target's initializer.
1939
1940         PR c++/11525
1941         * parser.c (cp_parser_primary_expression): Do not set
1942         non-constant-p merely because it is a dependent scope.
1943
1944         PR c++/9447
1945         * decl2.c (do_class_using_decl): Set type to NULL_TREE.
1946         * semantics.c (finish_expr_stmt): Do not convert to void in a
1947         template.
1948
1949 2003-07-31  Nathan Sidwell  <nathan@codesourcery.com>
1950
1951         * pt.c (coerce_template_parms): Refactor.
1952         (fn_type_unification): Increment processing_template_decl when
1953         tsubsting an incomplete set of explicit args.
1954
1955         PR c++/11347
1956         * pt.c (instantiate_class_template): Increment
1957         processing_template_decl around the tsubst of a template member
1958         class.
1959         (tsubst_qualified_id): Assert we do not have a dependent scope.
1960
1961         * pt.c (coerce_template_template_parms, lookup_template_class,
1962         can_complete_type_without_circularity, instantiate_class_template,
1963         tsubst_decl, unify): Reformat.
1964
1965 2003-07-31  Jan Hubicka  <jh@suse.cz>
1966
1967         * decl2.c (maybe_make_one_only): Use mark_referenced.
1968         * method.c (use_thunk): Likewsie.
1969
1970 2003-07-30  Jan Hubicka  <jh@suse.cz>
1971
1972         * class.c (build_vtable_entry_ref): Kill.
1973         (build_vtbl_ref_1): Do not call build_vtable_entry_ref.
1974         (build_vfn_ref): Do not call build_vtable_entry_ref.
1975         * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Kill.
1976         * cp-tree.h (prepare_assemble_variable): Kill.
1977         * cp-decl.c (prepare_assemble_variable): Kill.
1978
1979 2003-07-29  Geoffrey Keating  <geoffk@apple.com>
1980
1981         * parser.c (cp_lexer_new_main): Use c_common_no_more_pch instead
1982         of setting valid_pch by hand.
1983
1984 2003-07-29  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
1985
1986         * decl.c (finish_enum): Initialize underlying_type.
1987
1988 2003-07-29  Nathan Sidwell  <nathan@codesourcery.com>
1989
1990         PR c++/9447
1991         * decl.c (add_binding): Add bval local variable.
1992         (push_class_level_binding): Likewise. Allow a USING_DECL to be
1993         pushed.
1994         * decl2.c (do_class_using_decl):  The type of a using decl is
1995         unknown.
1996         * parser.c (cp_parser_postfix_expression): Refactor unqualified-id
1997         function call lookup code.
1998         * pt.c (tsubst): A USING_DECL will have unknown type.
1999         (tsubst_copy_and_build): Allow a using decl.
2000         (type_dependent_expression_p): A USING_DECL will make it
2001         dependent.
2002         * semantics.c (finish_member_declaration): Push a dependent using
2003         declaration.
2004
2005 2003-07-28  Mark Mitchell  <mark@codesourcery.com>
2006
2007         PR c++/11530
2008         * parser.c (cp_parser_postfix_expression): Do not call mark_used.
2009         * semantics.c (finish_id_expression): Call mark_used for all
2010         declarations.
2011
2012 2003-07-28  Mark Mitchell  <mark@codesourcery.com>
2013
2014         PR c++/11667
2015         * call.c (standard_conversion): Allow all integral->enumeral
2016         conversions, after marking them as bad.
2017         * decl.c (finish_enum): Make sure that all enumerators are
2018         properly converted to the underlying type.
2019         (build_enumerator): Set DECL_CONTEXT for namespace-scope
2020         enumeration types.
2021         * pt.c (tsubst_copy): Adjust handling of CONST_DECLs accordingly.
2022         (tsubst_enum): Tidy.
2023
2024         * Make-lang.in (typeck.o): Depend on convert.h.
2025         (class.o): Likewise.
2026         (rtti.o): Likewise.
2027         * call.c: Include convert.h.
2028         (convert_arg_to_ellipsis): Use convert_to_real.
2029         * class.c: Include convert.h.
2030         (build_base_path): Use convert_to_integer.
2031         * rtti.c: Include convert.h.
2032         (build_headof): Use convert_to_integer.
2033         * typeck.c: Include convert.h.
2034         (decay_conversion): Use convert_to_integer.
2035         (build_unary_op): Use build_nop.
2036         (get_delta_difference): Use convert_to_integer.
2037         (build_ptrmemfunc): Avoid unnecessary conversions.
2038
2039 2003-07-28  Jan Hubicka  <jh@suse.cz>
2040
2041         * decl2.c (mark_member_pointers): Verify that member pointer points to
2042         the function.
2043
2044 2003-07-28  Nathan Sidwell  <nathan@codesourcery.com>
2045
2046         * cp-tree.h (begin_compound_stmt): No scope arg is a bool.
2047         (finish_compound_stmt): Remove no scope arg.
2048         * decl.c (register_dtor_fn): Adjust begin_compound_stmt and
2049         end_compound_stmt calls.
2050         (expand_static_init, begin_destructor_body, begin_function_body,
2051         finish_function_body): Likewise.
2052         * decl2.c (start_objects, finish_objects,
2053         start_static_storage_duration_function,
2054         finish_static_storage_duration_function): Likewise.
2055         * init.c (begin_init_stmts, finish_init_stmts,
2056         construct_virtual_base, build_vec_init): Likewise.
2057         * method.c (do_build_assign_ref, synthesize_method): Likewise.
2058         * parser.c (cp_parser_compound_statement,
2059         cp_parser_implicitly_scoped_statement,
2060         cp_parser_already_scoped_statement): Likewise.
2061         * pt.c (tsubst_expr): Likewise.
2062         * semantics.c (begin_compound_stmt): No scope arg is a bool.
2063         (finish_compound_stmt): Remove no scope arg.
2064
2065         * error.c (dump_expr) <COMPOUND_EXPR case>: A compound expr is
2066         always dyadic.
2067
2068 2003-07-27  Mark Mitchell  <mark@codesourcery.com>
2069
2070         * call.c (standard_conversion): Tweak handling of
2071         pointer-to-member types.
2072         * pt.c (tsubst): Correctly qualify pointers-to-data member types.
2073         * typeck.c (comp_ptr_ttypes_real): Check qualifiers on
2074         pointer-to-data member types.
2075
2076 2003-07-27  Nathan Sidwell  <nathan@codesourcery.com>
2077
2078         * parser.c (cp_parser_type_parameter): Reformat.
2079         (cp_parser_parameter_declaration): Deprecate default args where
2080         not allowed.
2081
2082 2003-07-26  Nathan Sidwell  <nathan@codesourcery.com>
2083
2084         * cfns.h: Rebuilt.
2085
2086         * cp-tree.h (begin_init_stmts, finish_init_stmts): Remove.
2087         (begin_global_stmt_expr, finish_global_stmt_expr): Remove.
2088         * init.c (begin_init_stmts): Make static. Return is_global
2089         value. Always call begin_stmt_expr.
2090         (finish_init_stmts): Make static. Add is_global parm. Always
2091         building a stmt tree.
2092         (build_aggr_init): Adjust begin_init_stmts, finish_init_stmts calls.
2093         (build_vec_init): Likewise. Always building a stmt tree.
2094         (expand_default_init): Always building a stmt tree.
2095         (get_temp_regvar): Likewise.
2096         * semantics.c (begin_global_stmt_expr,
2097         finish_global_stmt_expr): Remove.
2098
2099 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
2100
2101         * cp-tree.h (build_compound_expr): Take LHS & RHS args.
2102         (build_x_compound_expr_from_list): Declare.
2103         * typeck.c (build_x_compound_expr_from_list): New.
2104         (build_x_compound_expr): Adjust.
2105         (build_compound_expr): Remove unreachable code. Take two
2106         parameters, adjust.
2107         * decl.c (grok_reference_init): Use
2108         build_x_compound_expr_from_list.
2109         (expand_static_init): Adjust build_compound_expr call.
2110         (cxx_maybe_build_cleanup): Likewise.
2111         * init.c (perform_member_init): Use
2112         build_x_compound_expr_from_list.
2113         (build_new_1): Likewise.
2114         (build_vec_delete): Adjust build_compound_expr calls.
2115         (build_vbase_delete): Likewise.
2116         * typeck2.c (store_init_value): Use
2117         build_x_compound_expr_from_list.
2118         (build_functional_cast): Likewise.
2119
2120 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
2121
2122         * cp-tree.h (enum tsubst_flags_t): Add tf_user.
2123         * decl.c (make_typename_type): Pass it.
2124         * pt.c (lookup_template_class): Use it.
2125         (resolve_typename_type): Pass it.
2126         * semantics.c (finish_template_type): Pass it.
2127
2128 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
2129
2130         PR c++/11617
2131         * cp-tree.h (qualified_name_lookup_error): Declare.
2132         * pt.c (tsubst_qualified_id): Use qualified_name_lookup_error for
2133         errors.
2134         (tsubst_expr) <DECL_STMT case>: Likewise.
2135         (tsubst_copy_and_build) <COMPONENT_REF case>: Likewise.
2136         * semantics.c (qualified_name_lookup_error): New, broken out of ...
2137         (finish_id_expression): ... here. Use it.
2138
2139 2003-07-25  Falk Hueffner  <falk.hueffner@student.uni-tuebingen.de>
2140
2141         * cfns.gperf: Add '%%' delimiter to placate gperf 3.0.
2142
2143 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
2144
2145         PR c++/11596
2146         * pt.c (maybe_fold_nontype_arg, maybe_fold_nontype_args): Remove.
2147         (tsubst_template_arg): New.
2148         (tsubst_template_arg_vector): Rename to ...
2149         (tsubst_template_args): ... this. Accept a TREE_LIST form. Use
2150         tsubst_template_arg.
2151         (coerce_template_parms): Use tsubst_template_arg for default
2152         value.
2153         (tsubst_template_parms): Likewise.
2154         (tsubst_aggr_type): Adjust.
2155         (tsubst_decl): Likewise.
2156         (tsubst): Use tsubst_template_arg for a DOMAIN. Adjust.
2157         (tsubst_copy) <TEMPLATE_ID_EXPR case>: Use tsubst_template_args.
2158
2159 2003-07-25 Gabriel Dos Reis  <gdr@integrable-solutions.net>
2160
2161         * Make-lang.in (cp/error.o): Depend on DIAGNOSTIC_H.
2162         * error.c: Use the new pretty-printer framework.
2163
2164 2003-07-24  Per Bothner  <pbothner@apple.com>
2165
2166         * decl.c (pushdecl_class_level): Don't use push_srcloc/pop_srcloc
2167         which causes errors messages to incorrectly mention included files.
2168
2169 2003-07-24  Mark Mitchell  <mark@codesourcery.com>
2170
2171         * cp-tree.h (convert_to_base_statically): Declare.
2172         * call.c (build_special_member_call): Convert INSTANCE to the base
2173         type.
2174         * class.c (convert_to_base_statically): New method.
2175         * init.c (construct_virtual_base): Use it.
2176         * method.c (do_build_assign_ref): Fix typo in comment.
2177
2178 2003-07-24  Jason Merrill  <jason@redhat.com>
2179
2180         * decl.c: Just set truthvalue_* to boolean_*.
2181
2182 2003-07-24  Nathan Sidwell  <nathan@codesourcery.com>
2183
2184         * decl.c (reshape_init): Remove unreachable code.
2185
2186 2003-07-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2187
2188         PR c++/11513
2189         * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): Use current_scope.
2190
2191 2003-07-23  Mark Mitchell  <mark@codesourcery.com>
2192
2193         PR c++/11645
2194         * cp-tree.h (accessible_base_p): Declare.
2195         * call.c (build_over_call): Use it.
2196         * search.c (accessible_base_p): New function, split out from ...
2197         (lookup_base): ... here.
2198
2199         PR c++/11517
2200         * call.c (build_conditional_expr): Use perform_implicit_conversion
2201         and error_operand_p.  Robustify.
2202         * typeck.c (build_unary_op): Use perform_implicit_conversion.
2203
2204 2003-07-23  Nathan Sidwell  <nathan@codesourcery.com>
2205
2206         PR c++/10953
2207         * parser.c (cp_parser_nested_name_specifier): Reset scope on
2208         failure.
2209         (cp_parser_elaborated_type_specifier): Likewise.
2210
2211 2003-07-22  Mark Mitchell  <mark@codesourcery.com>
2212
2213         Eliminate use of POINTER_TYPE for pointers-to-members.
2214         * call.c (standard_conversion): Rework pointer-to-member handling.
2215         Add comments.
2216         (add_builtin_candidate): Likewise.
2217         (resolve_scoped_fn_name): Remove.
2218         (build_conditional_expr): Rework pointer-to-member handling.
2219         (compare_ics): Likewise.
2220         * class.c (check_field_decls): Use TYPE_PTR_P.
2221         * cp-lang.c (cp_var_mod_type_p): Rework pointer-to-member
2222         handling.
2223         * cp-tree.h (SCALAR_TYPE_P): Use TYPE_PTR_TO_MEMBER_P.
2224         (TYPE_PTRMEM_P): Add comment.
2225         (TYPE_PTR_P): Simplify.
2226         (TYPE_PTROB_P): Correct definition.
2227         (TYPE_PTR_TO_MEMBER_P): New macro.
2228         (TYPE_PTRMEM_CLASS_TYPE): Adjust.
2229         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
2230         (resolved_scoped_fn_name): Remove declaration.
2231         (build_offset_ref): Change prototype.
2232         (resolve_offset_ref): Remove.
2233         (comp_target_types): Remove.
2234         * cvt.c (cp_convert_to_pointer): Rework pointer-to-member
2235         handling.
2236         (convert_to_reference): Use can_convert.
2237         (ocp_convert): Improve error handling.  Rework pointer-to-member
2238         handling.
2239         (perform_qualification_conversions): Rework pointer-to-member
2240         handling.
2241         * decl.c (build_ptrmem_type): Handle functions too.
2242         (create_array_type_for_decl): Remove OFFSET_TYPE error message.
2243         (grokdeclarator): Use OFFSET_TYPE for pointers to data members.
2244         (grokparms): Remove OFFSET_TYPE error message.
2245         * dump.c (cp_dump_tree): Rework pointer-to-member handling.
2246         * error.c (dump_type_prefix): Likewise.
2247         * expr.c (cplus_expand_constant): Use build_nop.
2248         * init.c (build_offset_ref): Add address_p parameter.  Fold in
2249         necessary bits from resolve_offset_ref.
2250         (resolve_offset_ref): Remove.
2251         * parser.c (cp_parser_postfix_expression): Remove special case
2252         code for OFFSET_TYPE.
2253         * pt.c (convert_nontype_argument): Rework pointer-to-member
2254         handling.
2255         (convert_template_argument): Likewise.
2256         (unify): Likewise.
2257         (invalid_nontype_parm_type_p): Likewise.
2258         (dependent_type_p_r): Likewise.
2259         * rtti.c (get_tinfo_decl): Remove OFFSET_TYPE special case.
2260         (target_incomplete_p_): Rework pointer-to-member
2261         handling.
2262         (get_pseudo_ti_init): Likewise.
2263         (get_pseudo_ti_desc): Likewise.
2264         * semantics.c (finish_qualified_id_expr): Adjust call to
2265         build_offset_ref.  Remove use of resolve_offset_ref.
2266         * tree.c (pod_type_p): Use TYPE_PTR_TO_MEMBER_P.
2267         * typeck.c (target_type): Use TYPE_PTRMEM_P.
2268         (type_unknown_p): Remove obsolete code about the time before
2269         non-dependent expressions were handled correctly.
2270         (qualify_type_recursive): Remove.
2271         (composite_pointer_type_r): New function.
2272         (composite_pointer_type): Use it.
2273         (merge_types): Remove dead comments.
2274         (comp_cv_target_types): Remove.
2275         (comp_target_types): Likewise.
2276         (comp_target_parms): Likewise.
2277         (cxx_sizeof_or_alignof_type): Remove OFFSET_TYPE error.
2278         (build_indirect_ref): Use TYPE_PTR_TO_MEMBER_P.
2279         (build_binary_op): Do not use of comp_target_types.
2280         (pointer_diff): Remove OFFSET_TYPE case.
2281         (build_unary_op): Adjust pointer-to-member handling.
2282         (unary_complex_lvalue): Likewise.
2283         (check_for_casting_away_constness): Add description parameter.
2284         (build_static_cast): Pass it.
2285         (build_reinterpret_cast): Use check_for_casting_away_constness.
2286         (build_const_cast): Adjust pointer-to-member handling.
2287         (build_c_cast): Likewise.
2288         (convert_for_assignment): Remove OFFSET_TYPE error message.
2289         (comp_ptr_ttypes_real): Adjust pointer-to-member handling.
2290         (comp_ptr_ttypes_reinterpret): Remove.
2291         (casts_away_constness_r): Adjust pointer-to-member handling.
2292         (casts_away_constness): Liekwise.
2293         (strip_all_pointer_quals): Remove.
2294         * typeck2.c (digest_init): Adjust pointer-to-member handling.
2295         (build_m_component_ref): Likewise.
2296
2297 2003-07-22  Wolfgang Bangerth  <bangerth@dealii.org>
2298
2299         * lex.c (unqualified_fn_lookup_error): Mention that the error
2300         message needs to be kept in synch with the manual.
2301
2302 2003-07-22  Nathan Sidwell  <nathan@codesourcery.com>
2303
2304         PR c++/11614
2305         * decl.c (grokdeclarator): An array member is only a flexible
2306         array member if the field itself is the array.
2307
2308 2003-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2309
2310         PR c++/10793
2311         * decl.c (xref_basetypes): Handle error_mark_node.
2312
2313 2003-07-22  Nathan Sidwell  <nathan@codesourcery.com>
2314
2315         * cp-tree.h (enum cp_lvalue_kind): Add clk_packed.
2316         * tree.c (lvalue_p_1): Set it.
2317         * class.c (check_field): Don't allow non-packed non-POD fields to
2318         be packed.
2319         * call.c (reference_binding): Need a temporary for all bitfield
2320         and packed fields.
2321         (convert_like_real): Check it is ok to make a temporary here.
2322
2323 2003-07-21  Nathan Sidwell  <nathan@codesourcery.com>
2324
2325         * cp-tree.h (hack_identifier): Remove.
2326         * method.c (hack_identifier): Remove.
2327         * semantics.c (finish_id_expression): Expand hack_identifier
2328         here. Simplify.
2329
2330 2003-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2331
2332         * call.c class.c decl.c decl2.c g++spec.c lex.c parser.c pt.c rtti.c
2333         semantics.c typeck.c: Remove unnecessary casts.
2334
2335 2003-07-18  Nathan Sidwell  <nathan@codesourcery.com>
2336
2337         * cp-tree.h (hack_identifier): Remove.
2338         * method.c (hack_identifier): Remove.
2339         * semantics.c (finish_id_expression): Expand hack_identifier
2340         here. Simplify.
2341
2342 2003-07-18  Nathan Sidwell  <nathan@codesourcery.com>
2343
2344         * cp-tree.h (finish_non_static_data_member): Add object param.
2345         * method.c (hack_identifier): Adjust.
2346         * pt.c (tsubst_copy_and_build) <COMPONENT_REF case>: Don't search
2347         again for a FIELD_DECL.
2348         * semantics.c (finish_non_static_data_member): Add object
2349         parameter. Always save the DECL in the COMPONENT_REF.
2350         * call.c (resolve_scoped_fn_name): Adjust.
2351
2352 2003-07-17  Zack Weinberg  <zack@codesourcery.com>
2353
2354         * pt.c (get_bindings): Make definition consistent with
2355         forward declaration.
2356
2357 2003-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2358
2359         PR c++/7809
2360         * friend.c (add_friend): Check access for member functions
2361         and templates.
2362
2363 2003-07-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2364
2365         PR c++/10668
2366         * typeck.c (build_class_member_access_expr): Improve diagnostic.
2367
2368 2003-07-16  Mark Mitchell  <mark@codesourcery.com>
2369
2370         PR c++/11547
2371         * cp-tree.h (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P): New
2372         macro.
2373         (DECL_PRETTY_FUNCTION_P): Use VAR_DECL_CHECK.
2374         * decl.c (duplicate_decls): Merge
2375         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2376         * parser.c (cp_parser_postfix_expression): Adjust call to
2377         cp_parser_initializer_list and
2378         cp_parser_parenthesized_expression_list.
2379         (cp_parser_parenthesized_expression_list): Add non_constant_p.
2380         (cp_parser_new_placement): Adjust call to
2381         cp_parser_parenthesized_expression_list.
2382         (cp_parser_direct_new_declarator): Likewise.
2383         (cp_parser_conditional_expression): Remove.
2384         (cp_parser_constant_expression): Parse an assignment-expression,
2385         not a conditional-expression.
2386         (cp_parser_simple_declaration): Resolve expression/declaration
2387         ambiguity more quickly.
2388         (cp_parser_mem_initializer): Adjust call to
2389         cp_parser_parenthesized_expression_list.
2390         (cp_parser_init_declarator): Keep track of whether or not the
2391         initializer is a constant-expression.
2392         (cp_parser_initializer): Add non_constant_p parameter.
2393         (cp_parser_initializer_clause): Likewise.
2394         (cp_parser_initializer_list): Likewise.
2395         (cp_parser_attribute_list): Adjust call to
2396         cp_parser_parenthesized_expression_list.
2397         (cp_parser_functional_cast): Likewise.
2398         * pt.c (tsubst_decl): Copy
2399         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2400         (tsubst_expr): Tweak use of DECL_PRETTY_FUNCTION_P.
2401         * semantics.c (finish_id_expression): Use
2402         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2403
2404 2003-07-16  Neil Booth  <neil@daikokuya.co.uk>
2405
2406         * lang-options.h: Remove.
2407
2408 2003-07-16  Andrew Pinski  <pinskia@physics.uc.edu>
2409
2410         PR c/10962
2411         * class.c (field_decl_cmp): Remove.
2412         (resort_field_decl_cmp): Remove.
2413         (resort_sorted_fields): Remove.
2414         (add_fields_to_vec): Rename to ...
2415         (add_fields_to_record_type): this.
2416         (finish_struct_1): Change to be using
2417         sorted_fields_type's fields.
2418         * cp-tree.h (lang_decl): In lang_decl_u3
2419         change sorted_fields to be a pointer to
2420         sorted_fields_type.
2421         (resort_sorted_fields): Remove prototype.
2422         * search.c (lookup_field_1): Change to be using
2423         sorted_fields_type's fields.
2424
2425 2003-07-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2426
2427         PR c++/5421
2428         * decl.c (grokdeclarator): Handle TEMPLATE_ID_EXPR if friend
2429         is a member of other class.
2430         * friend.c (do_friend): Don't build TEMPLATE_DECL if friend
2431         is a specialization of function template.
2432
2433 2003-07-16  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2434
2435         PR c++/10903
2436         * pt.c (convert_nontype_argument): Fix thinko in diagnostic.
2437         Improve.
2438
2439 2003-07-15  Mark Mitchell  <mark@codesourcery.com>
2440
2441         * cp-tree.def (LOOKUP_EXPR): Remove.
2442         * cp-tree.h (cp_id_kind): Add CP_ID_KIND_UNQUALIFIED_DEPENDENT.
2443         (LOOKUP_EXPR_GLOBAL): Remove.
2444         (get_bindings): Remove.
2445         (is_aggr_type_2): Remove.
2446         * call.c (resolved_scoped_fn_name): Remove support for
2447         LOOKUP_EXPR.
2448         * decl.c (grokfndecl): Likewise.
2449         (grokdeclarator): Likewise.
2450         * error.c (dump_decl): Likewise.
2451         (dump_expr): Likewise.
2452         * friend.c (do_friend): Likewise.
2453         * init.c (build_offset_ref): Likewise.
2454         * lex.c (unqualified_fn_lookup_error): Use pedwarn.  Do not create
2455         LOOKUP_EXPRs
2456         * mangle.c (write_expression): Remove support for LOOKUP_EXPR.
2457         * parser.c (cp_parser_postfix_expression): Modify Koenig lookup
2458         test.
2459         * pt.c (get_bindings): Give it internal linkage.
2460         (check_explicit_specialization): Remove support for LOOKUP_EXPR.
2461         (lookup_template_function): Likewise.
2462         (for_each_tempalte_parm_r): Likewise.
2463         (tsubst_decl): Likewise.
2464         (tsubst_qualified_id): Handle template template parameters.
2465         (tsubst_copy): Remove support for LOOKUP_EXPR.
2466         (tsubst_copy_and_build): Likewise.
2467         (most_general_template): Likewise.
2468         (value_dependent_expression_p): Likewise.
2469         (type_dependent_expression_p): Note that IDENTIFIER_NODEs are
2470         always dependent.
2471         * semantics.c (perform_koenig_lookup): Do not create
2472         IDENTIFIER_NODEs.
2473         (finish_fname): Likewise.
2474         (finish_id_expression): Likewise.
2475         * tree.c (is_aggr_type_2): Remove.
2476
2477 2003-07-16  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2478
2479         PR c++/11531
2480         * typeck.c (check_return_expr): Fix thinko in diagnostic.
2481
2482 2003-07-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2483
2484         PR c++/10108
2485         * pt.c (tsubst_decl) <TEMPLATE_DECL>: Add a check for
2486         error_mark_node.
2487
2488 2003-07-14  Mark Mitchell  <mark@codesourcery.com>
2489
2490         PR c++/11509
2491         * pt.c (dependent_scope_ref_p): New function.
2492         (value_dependent_expression_p): Use it.
2493         (type_dependent_expression_p): Likewise.
2494
2495         * pt.c (tsubst_friend_function): Use reregister_specialization.
2496
2497         PR c++/7019
2498         * cp-tree.h (lookup_qualified_name): Adjust prototype.
2499         * decl.c (lookup_qualified_name): Add complain parameter.  Adjust
2500         call to is_aggr_type.
2501         * parser.c (cp_parser_lookup_name): Adjust call to
2502         lookup_qualified_name.
2503         * pt.c (tsubst_qualified_id): Likewise.
2504         (tsubst_copy_and_build): Likewise.
2505         * semantics.c (finish_qualified_id_expr): Deal with erroneous
2506         expressions.
2507
2508 2003-07-14  Gabriel Dos Reis <gdr@integrable-solutions.net>
2509
2510         PR c++/11510
2511         * call.c (op_error): Properly format  REALPART_EXPR and
2512         IMAGPART_EXPR.
2513         * error.c (dump_expr): Likewise.
2514
2515 2003-07-14  Gabriel Dos Reis <gdr@integrable-solutions.net>
2516
2517         * error.c (dump_expr): Handle EMPTY_CLASS_EXPR.
2518
2519 2003-07-14  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2520
2521         PR c++/5293
2522         * call.c (initialize_reference): Improve diagnostic.
2523
2524 2003-07-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2525
2526         PR c++/11154
2527         * pt.c (more_specialized_class): Add full_args parameter.
2528         (most_specialized_class): Adjust calls to more_specialized_class.
2529         * cp-tree.h (more_specialized_class): Adjust declaration.
2530
2531 2003-07-14  Dan Nicolaescu  <dann@ics.uci.edu>
2532
2533         * lex.c (enum tree_node_kind): Delete.
2534
2535 2003-07-13  Mark Mitchell  <mark@codesourcery.com>
2536
2537         PR c++/11503
2538         * cp-tree.h (DECL_SELF_REFERENCE_P): New macro.
2539         (SET_DECL_SELF_REFERENCE_P): Likewise.
2540         * class.c (build_self_reference): Use SET_DECL_SELF_REFERENCE_P.
2541         * pt.c (tsubst_decl): Copy it.
2542         * search.c (lookup_base): Use DECL_SELF_REFERENCE_P.
2543
2544         * pt.c (reregister_specialization): Fix thinko in previous change.
2545
2546         * cp-tree.h (cp_id_kind): New type.
2547         (unqualified_name_lookup_error): Change prototype.
2548         (unqualified_fn_lookup_error): New function.
2549         (do_identifier): Remove.
2550         (do_scoped_id): Likewise.
2551         (tsubst_copy_and_build): Change prototype.
2552         (reregister_specialization): New function.
2553         (perform_koenig_lookup): Likewise.
2554         (finish_id_expression): Likewise.
2555         * call.c (build_method_call): Adjust call to
2556         unqualified_name_lookup_error.
2557         * decl.c (duplicate_decls): Use reregister_specialization.
2558         * lex.c (is_global): Remove.
2559         (unqualified_name_lookup_error): Return a value.
2560         (do_identifier): Remove.
2561         (do_scoped_id): Likewise.
2562         (identifier_typedecl_value): Remove.
2563         (unqualified_fn_lookup_error): New function.
2564         * parser.c (cp_parser_id_kind): Remove.
2565         (cp_parser_non_constant_id_expression): Remove.
2566         (cp_parser_primary_expression): Use finish_id_expression.
2567         (cp_parser_class_or_namespace_name): Use cp_id_kind, not
2568         cp_parser_id_kind.
2569         (cp_parser_postfix_expression): Use perform_koenig_lookup.
2570         (cp_parser_template_argument): Use cp_id_kind.
2571         (cp_parser_fold_non_dependent_expr): Adjust call to
2572         tsubst_copy_and_build.
2573         * pt.c (unregister_specialization): Rename to ...
2574         (reregister_specialization): This.
2575         (tsubst_friend_function): Use it.
2576         (maybe_fold_nontype_arg): Adjust call to tsubst_copy_and_build.
2577         (tsubst_qualified_id): Likewise.
2578         (tsubst_expr): Likewise.
2579         (tsubst_copy_and_build): Add function_p parameter.  Use
2580         finish_id_expression.  Introduce RECUR macro.
2581         (tsubst_non_call_postfix_expression): New function.
2582         (regenerate_decl_from_template): Use reregister_specialization.
2583         * semantics.c (perform_koenig_lookup): New function.
2584         (finish_id_expression): Likewise.
2585
2586 2003-07-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2587
2588         * pt.c (push_access_scope_real): Remove.
2589         (push_access_scope): Move code from push_access_scope_real.
2590         (pop_access_scope): Don't check for TEMPLATE_DECL.
2591         (instantiate_template): Defer access checking during template
2592         substitution.
2593         (regenerate_decl_from_template): Tidy.
2594
2595 2003-07-11  Nathanael Nerode  <neroden@gcc.gnu.org>
2596
2597         PR c++/11437
2598         * operators.def: Add definitions for __imag__, __real__.
2599
2600 2003-07-11  Nathan Sidwell  <nathan@codesourcery.com>
2601
2602         PR c++/11050
2603         * parser.c (cp_parser_expression_list): Rename to ...
2604         (cp_parser_parenthesized_expression_list): ... here. Add attribute
2605         parameter, parse the surounding parentheses.
2606         (cp_parser_skip_to_closing_parenthesis): Add recover and or_comma
2607         parameters. Return int.
2608         (cp_parser_skip_to_closing_parenthesis or comma): Remove.
2609         (cp_parser_postfix_expression): Adjust function call parsing.
2610         (cp_parser_new_placement): Adjust.
2611         (cp_parser_new_initializer): Likewise.
2612         (cp_parser_cast_expression): Likewise.
2613         (cp_parser_selection_statement): Likewise.
2614         (cp_parser_mem_initializer): Likewise.
2615         (cp_parser_asm_definition): Likewise.
2616         (cp_parser_init_declarator): Likewise.
2617         (cp_parser_declarator): Make
2618         cdtor_or_conv_p an int ptr.
2619         (cp_parser_direct_declarator): Likewise. Check for a parameter
2620         list on cdtors & conv functions.
2621         (cp_parser_initializer): Adjust.
2622         (cp_parser_member_declaration): Adjust.
2623         (cp_parser_attribute_list): Move code into
2624         cp_parser_parens_expression_list.
2625         (cp_parser_functional_cast): Adjust.
2626         * pt.c (type_dependent_expression_p): Erroneous expressions are
2627         non-dependent.
2628
2629 2003-07-11  Geoffrey Keating  <geoffk@apple.com>
2630
2631         * decl.c (cp_finish_decl): Handle 'used' attribute.
2632
2633         * cp-lang.c (c_reset_state): New dummy routine.
2634         * cp-tree.h (finish_file): Move prototype to c-common.h.
2635         * parser.c (c_parse_file): Rename from yyparse; don't call finish_file.
2636
2637 2003-07-11  Mark Mitchell  <mark@codesourcery.com>
2638
2639         PR c++/8327
2640         * pt.c (tsubst_qualified_id): Implement suggested resolution for
2641         Core Issue 2.
2642         (type_dependent_expression_p): Likewise.
2643
2644 2003-07-10  Mark Mitchell  <mark@codesourcery.com>
2645
2646         * typeck.c (build_binary_op): Do not warn about signed
2647         vs. unsigned comparisons in the bodies of templates.
2648
2649         PR c++/9411
2650         * parser.c (cp_parser_postfix_expression): Check dependency of
2651         functions.
2652
2653 2003-07-09  Mark Mitchell  <mark@codesourcery.com>
2654
2655         PR c++/10032
2656         * decl.c (cxx_init_decl_processing): With -pedantic, pedwarns are
2657         still errors.
2658
2659         PR c++/10527
2660         * error.c (decl_to_string): Do not print default argument
2661         expressions.
2662
2663         * cp-tree.h (break_out_calls): Remove declaration.
2664         * tree.c (break_out_calls): Remove.
2665         * typeck.c (build_modify_expr): Avoid invalid sharing of trees.
2666
2667 2003-07-09  Nathan Sidwell  <nathan@codesourcery.com>
2668
2669         PR c++ 9483
2670         * class.c (check_field_decls): Pass DECL_NAME to constructor_name_p.
2671         * decl2.c (constructor_name_p): Avoid repeated constructor_name
2672         calls.
2673         * decl.c (grokdeclarator): Refactor ctor/dtor detection.
2674
2675 2003-07-09  Mark Mitchell  <mark@codesourcery.com>
2676
2677         * typeck.c (build_x_unary_op): Take note of the fact that
2678         PREINCREMENT_EXPR and POSTINCREMENT_EXPR are binary operations on
2679         trees.
2680
2681         * parser.c (cp_parser_primary_expression): Preserve the form of
2682         qualified expressions in templates, even if they are not
2683         dependent.
2684         * pt.c (convert_nontype_argument): Handle non-dependent SCOPE_REFs.
2685         (tsubst_qualified_id): Likewise.
2686         * search.c (accessible_p): Treat everything in the body of a
2687         template as accessible.
2688
2689 2003-07-08  Mark Mitchell  <mark@codesourcery.com>
2690
2691         * cp-tree.def (NON_DEPENDENT_EXPR): New node.
2692         * cp-tree.h (build_call_from_tree): Remove.
2693         (build_member_call): Likewise.
2694         (dependent_template_arg_p): Remove.
2695         (any_dependent_template_arguments_p): New function.
2696         (dependent_template_id_p): Likewise.
2697         (any_type_dependent_arguments_p): Likewise.
2698         (build_non_dependent_expr): Likewise.
2699         (build_non_dependent_args): Likewise.
2700         (build_x_compound_expr): Adjust prototype.
2701         * call.c (build_new_method_call): Handle non-dependent expressions
2702         correctly.
2703         * decl2.c (grok_array_decl): Likewise.
2704         (build_offset_ref_call_from_tree): Likewise.
2705         (build_call_from_tree): Remove.
2706         * error.c (dump_decl): Handle NON_DEPENDENT_EXPR.
2707         (dump_expr): Likewise.
2708         * init.c (build_member_call): Remove.
2709         * mangle.c (write_expression): Update handling for template-ids.
2710         * parser.c (cp_parser_primary_expression): Use
2711         any_dependent_template_arguments_p.  Update constant-expression
2712         handling.
2713         (cp_parser_postfix_expression): Use
2714         any_type_dependent_arguments_p.  Simplify call processing.
2715         (cp_parser_unary_expression): Simplify.
2716         (cp_parser_expression): Adjust for changes to
2717         build_x_compound_expr.
2718         (cp_parser_template_argument): Implement standard-conforming
2719         parsing of non-type template arguments.
2720         (cp_parser_direct_declarator): Use
2721         cp_parser_fold_non_dependent_expr.
2722         (cp_parser_fold_non_dependent_expr): New function.
2723         (cp_parser_next_token_ends_template_argument_p): Likewise.
2724         * pt.c (convert_template_argument): Do not call
2725         maybe_fold_nontype_arg.
2726         (tsubst_baselink): Likewise.
2727         (tsubst_copy_and_build): Share common code.  Make sizeof/alignof
2728         processing work correctly for non-dependent expressions.  Adjust
2729         handling of COMPOUND_EXPR.  Simplify call processing.
2730         (value_dependent_expression_p): Deal with functional casts and
2731         sizeof/alignof correctly.
2732         (type_dependent_expression_p): Handle overloaded functions.
2733         (any_type_dependent_arguments_p): New function.
2734         (any_dependent_template_arguments_p): Likewise.
2735         (dependent_template_p): Treat SCOPE_REFs as dependent.
2736         (dependent_template_id_p): Simplify.
2737         (build_non_dependent_expr): New function.
2738         (build_non_dependent_args): Likewise.
2739         * semantics.c (finish_stmt_expr): Don't make dependent
2740         statement-expresions have void type.
2741         (finish_call_expr): Handle non-dependent expressions
2742         correctly.
2743         * tree.c (lvalue_p_1): Treat NON_DEPENDENT_EXPRs as lvalues.
2744         * typeck.c (cxx_sizeof_or_alignof_type): Give the expression
2745         type size_t, even in templates.
2746         (expr_sizeof): Likewise.
2747         (finish_class_member_access_expr): Handle non-dependent expressions
2748         correctly.
2749         (build_x_indirect_ref): Likewise.
2750         (build_x_binary_op): Likewise.
2751         (build_x_unary_op): Likewise.
2752         (build_x_conditional_expr): Likewise.
2753         (build_x_compound_expr): Likewise.
2754         * typeck2.c (build_x_arrow): Likewise.
2755
2756 2003-07-09  Jan Hubicka  <jh@suse.cz>
2757
2758         * cp-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New.
2759         * decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS.
2760         (start_function): Use DECL_ESTIMATED_INSNS.
2761         * optimize.c (maybe_clone_body): Use DECL_ESTIMATED_INSNS.
2762
2763         * decl2.c (maybe_emit_vtables): Fix marking vtables as needed in
2764         unit-at-a-time
2765
2766 2003-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2767
2768         PR c++/11030
2769         * pt.c (instantiate_class_template): Don't call xref_tag to
2770         inject name when the friend class is a specialization.
2771
2772 2003-07-07  Mark Mitchell  <mark@codesourcery.com>
2773
2774         * cp-tree.h (build_scoped_method_call): Remove.
2775         (lookup_qualified_name): Remove parameter.
2776         (tsubst_copy_and_build): Declare.
2777         (finish_qualified_object_call_expr): Remove.
2778         (check_accessibility_of_qualified_id): New function.
2779         (finish_qualified_id_expr): Likewise.
2780         (non_reference): Likewise.
2781         (build_expr_from-tree): Remove.
2782         * call.c (non_reference): Remove.
2783         (build_scoped_method_call): Likewise.
2784         (build_method_call): Use error_operand_p.  Assert that we are not
2785         processing a template.
2786         (standard_conversion): Use non_reference.
2787         * class.c (build_vtbl_entry_ref): Likewise.
2788         (build_vtbl_ref_1): Likewise.
2789         * cvt.c (build_expr_type_conversion): Use non_reference.
2790         * decl.c (lookup_qualified_name): Remove flags parameter.
2791         (grok_op_properties): Use non_reference.
2792         * decl2.c (grok_array_decl): Likewise.
2793         (build_expr_from_tree): Remove.
2794         (build_offset_ref_call_from_tree): Update comment.
2795         * error.c (parm_to_string): Call reinit_global_formatting_buffer.
2796         * except.c (prepare_eh_types): Use non_reference.
2797         (can_convert_eh): Likewise.
2798         * init.c (build_dtor_call): Avoid using build_method_call.
2799         * mangle.c (write_template_param): Remove misleading comment.
2800         * method.c (locate_copy): Use non_reference.
2801         * parser.c (cp_parser_scope_through_which_access_occurs): Remove.
2802         (cp_parser_primary_expression): Do not create SCOPE_REFs is
2803         non-dependent contexts.
2804         (cp_parser_postfix_expression): Use finish_qualified_id_expr.
2805         (cp_parser_direct_declarator): Use tsubst_copy_and_build, not
2806         build_expr_from_tree.
2807         (cp_parser_lookup_name): Adjust call to lookup_qualified_name.
2808         Use check_accessibility_of_qualified_id.
2809         * pt.c (maybe_fold_nontype_arg): Use tsubst_copy_and_build, not
2810         build_expr_from_tree.
2811         (tsubst_baselink): New function.
2812         (tsubst_qualified_id): Likewise.
2813         (tsubst_copy): Use them.  Remove support for METHOD_CALL_EXPR.
2814         (tsubst_expr): Adjust call to lookup_qualified_name.
2815         (tsubst_copy_and_build): Handle SCOPE_REFs specially.  Adjust
2816         handling of CALL_EXPRs.
2817         (value_dependent_expression_p): Use INTEGRAL_OR_ENUMERATION_TYPE_P.
2818         * rtti.c (get_tinfo_decl_dynamic): Use non_reference.
2819         * search.c (check_final_overrider): Likewise.
2820         * semantics.c (check_accessibility_of_qualified_id): New function.
2821         (finish_qualified_object_call_expr): Remove.
2822         * typeck.c (target_type): Use non_reference.
2823         (cxx_sizeof_or_alignof_type): Likewise.
2824         (dubious_conversion_warnings): Likewise.
2825         (convert_for_initialization): Likewise.
2826         (non_reference): New function.
2827
2828 2003-07-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2829
2830         * decl.c (print_binding_level, print_other_binding_stack,
2831         print_binding_stack): Merge uses of HOST_PTR_PRINTF with adjacent
2832         stdio calls.
2833         * ptree.c (cxx_print_decl, cxx_print_binding): Likewise.
2834
2835 2003-07-07  Andreas Jaeger  <aj@suse.de>
2836
2837         * friend.c: Convert to ISO C90 prototypes.
2838
2839         * Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output
2840         language.
2841         * cfns.h: Regenerate.
2842
2843         * typeck.c: Convert remaining prototypes to ISO C90.
2844         * search.c: Likewise.
2845
2846         * decl2.c (build_expr_from_tree): Convert prototype to ISO C90.
2847         * semantics.c (expand_or_defer_fn): Likewise
2848         * mangle.c (discriminator_for_string_literal): Likewise.
2849         * g++spec.c (lang_specific_driver): Likewise.
2850
2851         * search.c (lookup_base_r): Remove unused variable.
2852
2853 2003-07-07  Nathan Sidwell  <nathan@codesourcery.com>
2854
2855         * semantics.c: (genrtl_try_block) Adjust emit_line_note
2856         calls.
2857
2858 2003-07-07  Andreas Jaeger  <aj@suse.de>
2859
2860         * search.c (lookup_base_r): Remove unused variable.
2861
2862 2003-07-06  Michael Chastain  <mec@shout.net>
2863
2864         PR debug/10055
2865         * lex.c (cxx_init): Call push_srcloc and pop_srcloc rather than
2866         assigning to input_filename directly.
2867
2868 2003-07-06  Kazu Hirata  <kazu@cs.umass.edu>
2869
2870         * call.c: Fix comment formatting.
2871         * class.c: Likewise.
2872         * cp-tree.h: Likewise.
2873         * decl.c: Likewise.
2874         * decl2.c: Likewise.
2875         * error.c: Likewise.
2876         * method.c: Likewise.
2877         * name-lookup.c: Likewise.
2878         * parser.c: Likewise.
2879         * pt.c: Likewise.
2880         * rtti.c: Likewise.
2881         * search.c: Likewise.
2882         * typeck.c: Likewise.
2883
2884 2003-07-06  Mark Mitchell  <mark@codesourcery.com>
2885
2886         PR c++/11345
2887         * search.c (lookup_base_r): Remove is_non_public and
2888         within_current_scope parameters.  Remove other dead code.
2889         (lookup_base): Adjust call to lookup_base_r.
2890         (adjust_result_of_qualified_name_lookup): Improve comment.
2891         * semantics.c (finish_call_expr): Use maybe_dummy_object.
2892
2893 2003-07-06  Neil Booth  <neil@daikokuya.co.uk>
2894
2895         * cp-lang.c (LANG_HOOKS_HANDLE_FILENAME,
2896         LANG_HOOKS_MISSING_ARGUMENT): Override.
2897
2898 2003-07-05  Mark Mitchell  <mark@codesourcery.com>
2899
2900         PR c++/11431
2901         * typeck.c (build_static_cast): Check for reference conversions
2902         earlier.
2903
2904 2003-07-04  Mark Mitchell  <mark@codesourcery.com>
2905
2906         * cp-tree.h (perform_integral_promotions): Declare.
2907         * call.c (build_addr_func): Use decay_conversion.
2908         (convert_arg_to_ellipsis): Likewise.  Remove misleading comment.
2909         (convert_for_arg_passing): Use perform_integral_promotions.
2910         * cvt.c (build_expr_type_conversion): Use decay_conversion.
2911         (type_promotes_to): Do not return a cv-qualified type.
2912         * decl.c (grok_reference_init): Fix formatting.
2913         (get_atexit_node): Use decay_conversion.
2914         (build_enumerator): Use perform_integral_promotions.
2915         * init.c (build_vec_init): Use decay_conversion.
2916         * semantics.c (finish_expr_stmt): Likewise.
2917         (finish_switch_cond): Use perform_integral_promotions.
2918         * typeck.c (default_conversion): Likewise.
2919         (perform_integral_promotions): New function.
2920         (build_indirect_ref): Use decay_conversion.
2921         (build_array_ref): Use perform_integral_promotions.
2922         (convert_arguments): Use decay_conversion.
2923         (build_unary_op): Use perform_integral_promotions.
2924         (build_c_cast): Use decay_conversion.
2925         (build_modify_expr): Likewise.
2926         (convert_for_initialization): Likewise.
2927         * typeck2.c (build_x_arrow): Likewise.
2928
2929 2003-07-04  Kazu Hirata  <kazu@cs.umass.edu>
2930
2931         * call.c: Fix comment typos.
2932         * class.c: Likewise.
2933         * cp-tree.h: Likewise.
2934         * cvt.c: Likewise.
2935         * decl2.c: Likewise.
2936         * decl.c: Likewise.
2937         * init.c: Likewise.
2938         * mangle.c: Likewise.
2939         * parser.c: Likewise.
2940         * pt.c: Likewise.
2941         * search.c: Likewise.
2942         * semantics.c: Likewise.
2943         * tree.c: Likewise.
2944         * typeck.c: Likewise.
2945
2946 2003-07-04  Zack Weinberg  <zack@codesourcery.com>
2947
2948         * parser.c (cp_lexer_read_token): No need to handle string
2949         constant concatenation.
2950
2951 2003-07-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2952
2953         * cp-tree.h (GCC_DIAG_STYLE, ATTRIBUTE_GCC_CXXDIAG): Define.
2954         (cp_error_at, cp_warning_at, cp_pedwarn_at): Mark with
2955         ATTRIBUTE_GCC_CXXDIAG.
2956
2957 2003-07-03  Mark Mitchell  <mark@codesourcery.com>
2958
2959         * call.c (build_addr_func): Handle bound pointers-to-members.
2960         (build_method_call): Do not call resolve_offset_ref.
2961         (implicit_conversion): Likewise.
2962         (resolve_scoped_fn_name): Use finish_non_static_data_member, not
2963         resolve_offset_ref.
2964         (resolve_args): Do not call resolve_offset_ref.
2965         (build_conditional_expr): Likewise.
2966         (build_new_method_call): Likewise.
2967         * cp-tree.def (OFFSET_REF): Update documentation.
2968         * cvt.c (cp_convert_to_pointer): Update handling of conversions from
2969         pointers to members to pointers.
2970         (ocp_convert): Do not call resolve_offset_ref.
2971         (convert_to_void): Likewise.
2972         (build_expr_type_conversion): Likewise.
2973         * decl2.c (delete_sanity): Likewise.
2974         * init.c (resolve_offset_ref): Simplify greatly.
2975         (build_vec_delete): Do not call resolve_offset_ref.
2976         * parser.c (cp_parser_postfix_expression): Call resolve_offset_ref
2977         if appropriate.
2978         (cp_parser_unary_expression): Use
2979         cp_parser_simple_cast_expression.
2980         (cp_parser_delete_expression): Likewise.
2981         (cp_parser_cast_expression): Likewise.
2982         (cp_parser_pm_expression): Use cp_parser_binary_op.
2983         (cp_parser_simple_cast_expression): New function.
2984         * rtti.c (build_dynamic_cast_1): Do not call resolve_offset_ref.
2985         * semantics.c (finish_increment_expr): Likewise.
2986         (finish_typeof): Likewise.
2987         * tree.c (lvalue_p_1): Do not handle OFFSET_REF.
2988         * typeck.c (require_complete_type): Do not handle OFFSET_REFs.
2989         (decay_conversion): Do not call resolve_offset_ref.
2990         (finish_class_member_access_expr): Likewise.
2991         (convert_arguments): Likewise.
2992         (build_x_binary_op): Handle DOTSTAR_EXPR.
2993         (condition_conversion): Do not call resolve_offset_ref.
2994         (unary_complex_lvalue): Likewise.
2995         (build_static_cast): Likewise.
2996         (build_reinterpret_cast): Likewise.
2997         (build_const_cast): Likewise.
2998         (build_c_cast): Likewise.
2999         (build_modify_expr): Likewise.
3000         (convert_for_assignment): Likewise.
3001         (convert_for_initialization): Likewise.
3002         * typeck2.c (build_x_arrow): Likewise.
3003         (build_m_component_ref): Simplify.
3004
3005         * call.c (build_scoped_method_call): Use convert_to_void.
3006         (build_method_call): Likewise.
3007         * class.c (check_field_decls): Remove dead code.
3008         * cvt.c (convert_from_reference): Remove OFFSET_TYPE handling.
3009         * decl2.c (grok_array_decl): Remove dead code.
3010         (arg_assoc_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
3011         as pointer-to-member representation.
3012         * init.c (build_offset_ref): Tidy.
3013         (build_vec_delete_1): Use convert_to_void.
3014         * mangle.c (write_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
3015         as pointer-to-member representation.
3016
3017 2003-07-03  Nathan Sidwell  <nathan@codesourcery.com>
3018
3019         PR c++/9162
3020         * decl.c (grokdeclarator): Return friend decls, not
3021         void_type_node.
3022         * decl2.c (grokfield): Alter friend decl check.
3023         * parser.c (struct cp_parser): Document default_arg chain on
3024         unparsed_functions_queue.
3025         (cp_parser_save_default_args): New.
3026         (cp_parser_init_declarator, cp_parser_function_definition,
3027         cp_parser_member_declaration): Call it.
3028         (cp_parser_class_specifier): Remove unused variable. Alter
3029         processing of unparsed_functions_queue.
3030
3031 2003-07-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3032
3033         * class.c (add_method, check_field_decl): Fix format specifier.
3034         * decl.c (duplicate_decls, pushdecl, check_goto,
3035         fixup_anonymous_aggr, maybe_commonize_var, grokdeclarator,
3036         start_enum): Likewise.
3037         * decl2.c (ambiguous_decl): Likewise.
3038         * pt.c (redeclare_class_template): Likewise.
3039
3040 2003-07-02  Nathan Sidwell  <nathan@codesourcery.com>
3041
3042         PR c++/10219
3043         * pt.c (type_unification_real): Don't unify exprs of error type.
3044         * tree.c (error_type): Don't die on error_type.
3045
3046         PR c++/9779
3047         * decl2.c (arg_assoc_class): Don't die on NULL type.
3048         * typeck.c (type_unknown_p): Don't die on untyped expressions.
3049
3050 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
3051
3052         PR c++/6949
3053         * decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local
3054         classes.
3055
3056 2003-07-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3057
3058         * error.c (locate_error): %P takes an `int', not a `tree'.
3059
3060 2003-07-02  Jan Hubicka  <jh@suse.cz>
3061
3062         * decl2.c (defer_fn): Set DECL_DEFER_OUTPUT.
3063         (finish-file): Do not process function with DECL_DEFER_OUTPUT clear;
3064         clear DECL_DEFER_OUTPUT once function is processed; avoid flags
3065         massaging.
3066
3067         * cp-tree.h (DECL_NEEDED_P): Support unit-at-a-time
3068         (expand_or_defer_fn): Declare.
3069         (lower_function): Declare.
3070         * decl.c (start_cleanup_fn): Use expand_or_defer_fn.
3071         * decl2.c: Include cgraph.h and varpool.h
3072         (maybe_emit_vtables):  Make explicit instantations as needed.
3073         (mark_member_pointers, lower_function): New functions.
3074         (finish_file): Do unit-at-a-time.
3075         * method.c (synthesize_method): Use expand_or_defer_fn.
3076         * optimize.c (maybe_clone_body): Use expand_or_defer_fn.
3077         * parser.c (cp_parser_function_definition_after_decl): Use
3078         expand_or_defer_fn.
3079         * pt.c (instantiate_decl): Likewise.
3080         * semantics.c: Include cgraph.h
3081         (expand_or_defer_fn): Break out from ...
3082         (expand_body): ... here; deal with unit-at-a-time.
3083         * cp-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION,
3084         LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Define.
3085
3086 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
3087
3088         * call.c (resolve_scoped_fn_name): Return error_mark_node for
3089         erroneous cases.
3090
3091 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
3092
3093         PR c++/11149
3094         * call.c (resolve_scoped_fn_name): Check that the qualifying scope
3095         is a class type.
3096
3097 2003-07-01  Giovanni Bajo  <giovannibajo@libero.it>
3098
3099         PR c++/8046
3100         * error.c (dump_decl): Handle BIT_NOT_EXPR as
3101         pseudo destructor calls.
3102
3103 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
3104
3105         * cp-tree.h (define_label): Replace filename and lineno
3106         arguments with a location_t.
3107         * decl.c (pop_label): Adjust define_label call.
3108         (define_label): Replace filename and lineno arguments with a
3109         location_t.
3110         * semantics.c (finish_label): Adjust define_label call.
3111
3112 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
3113
3114         PR c++/9559
3115         * decl2.c (grokfield): Do not build NOP_EXPRs around the
3116         error_mark_node.
3117
3118 2003-06-30  Neil Booth  <neil@daikokuya.co.uk>
3119
3120         * Make-lang.in: Update.
3121         * cp-lang.c (c_language): Define.
3122         (LANG_HOOKS_INIT_OPTIONS): Use common hook.
3123         * cp-tree.h (cxx_init_options): Remove.
3124         * lex.c: Don't include diagnostic.h.
3125         (cxx_init_options): Remove.
3126
3127 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
3128
3129         PR c++/4933
3130         * error.c (dump_expr): Support correctly the COMPOUND_EXPR
3131         tree generated within a template. Use dump_expr to dump an
3132         expression sizeof.
3133
3134 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
3135
3136         * mangle.c (write_expression): Exit gracefully when trying to
3137         mangle a CALL_EXPR.
3138
3139 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
3140
3141         PR c++/10750
3142         * parser.c (cp_parser_primary_expression): A VAR_DECL with a
3143         (value- or type-) dependent expression as DECL_INITIAL is a
3144         valid constant-expression (at parser time).
3145
3146 2003-06-30  Giovanni Bajo <giovannibajo@libero.it>
3147
3148         PR c++/11106
3149         * error.c (dump_decl): Call dump_decl to dump the DECL_NAME for a
3150         USING_DECL, instead of print_tree_identifier.
3151
3152 2003-06-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3153
3154         * cp-tree.h (language_to_string): Adjust declaration.
3155         * dump.c (cp_dump_tree): Adjust usage.
3156         * error.c (dump_char): Use output_formatted_scalar. Tidy.
3157         (parm_to_string): Lose unused parameter.  Tidy.
3158         (expr_to_string): Likewise.
3159         (code_to_string): Likewise.
3160         (language_to_string): Likewise.
3161         (op_to_string): Likewise.
3162         (assop_to_string): Likewise.
3163         (digit_buffer): Remove.
3164         (dump_type): Format builtin vector type as __vector__.
3165
3166 2003-06-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3167
3168         * error.c (print_integer): Remove.
3169         (dump_type_suffix): Adjust.
3170         (dump_expr): Likewise.
3171
3172 2003-06-28  Nathan Sidwell  <nathan@codesourcery.com>
3173
3174         * error.c (print_instantiation_partial_context): Take a
3175         location_t.
3176         (print_instantiation_full_context): Adjust.
3177         (print_instantiation_context): Adjust.
3178
3179         * cp-tree.h (cp_line_of, cp_file_of): Remove.
3180         * error.c (cp_line_of, cp_file_of): Merge into ...
3181         (location_of): ... here. Make static, return a location_t.
3182         (cp_error_at, cp_warning_at, cp_pedwarn_at): Adjust.
3183
3184 2003-06-28  Nathan Sidwell  <nathan@codesourcery.com>
3185
3186         PR c++/10784
3187         * call.c (joust): Move warn_conversion check outwards.
3188
3189 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
3190
3191         * decl.c (build_typename_type)
3192         * mangle.c (write_template_template_arg)
3193         * parser.c (cp_parser_scope_through_which_access_occurs)
3194         * pt.c (push_access_scope_real, push_access_scope, pop_access_scope)
3195         * repo.c (get_base_filename)
3196         * semantics.c (maybe_convert_cond):
3197         Mark the definition static, matching the forward declaration.
3198
3199 2003-06-27  Mark Mitchell  <mark@codesourcery.com>
3200
3201         PR c++/10468
3202         * pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly.
3203
3204 2003-06-27  Mark Mitchell  <mark@codesourcery.com>
3205
3206         PR c++/10796
3207         * decl.c (finish_enum): Implement DR377.
3208
3209         * decl.c (cp_finish_decl): Don't make variables with reference
3210         type readonly while they are being initialized.
3211
3212 2003-06-26  Mark Mitchell  <mark@codesourcery.com>
3213
3214         PR c++/11332
3215         * typeck.c (build_static_cast): Avoid returning expressions with
3216         reference type.
3217
3218 2003-06-26  Nathan Sidwell  <nathan@codesourcery.com>
3219
3220         * call.c (build_op_delete_call): Use strip_array_call. Correct
3221         error message to say 'delete' or 'delete[]'.
3222
3223 2003-06-26  Giovanni Bajo  <giovannibajo@libero.it>
3224
3225         PR c++/8266
3226         * pt.c (check_explicit_specialization): When looking up a
3227         template function from an identifier outside class-scope, bind
3228         it to CP_DECL_CONTEXT.
3229
3230 2003-06-25  Mark Mitchell  <mark@codesourcery.com>
3231
3232         PR c++/10990
3233         * search.c (lookup_base_r): Rely on accessible_p, rather than
3234         trying to emulate that logic here.
3235
3236         PR c++/10931
3237         * call.c (convert_like): Pass issue_conversion_warnings.
3238         (convert_like_with_context): Likewise.
3239         (convert_like_real): Add issue_conversion_warnings parameter.
3240         (perform_direct_initialization_if_possible): New function.
3241         * cp-tree.h (perform_direct_initialization_if_possible): Declare it.
3242         * typeck.c (check_for_casting_away_constness): New function.
3243         (build_static_cast): Rewrite.
3244
3245 2003-06-24  Nathan Sidwell  <nathan@codesourcery.com>
3246
3247         * call.c (enforce_access): Assert we get a binfo.
3248         (build_op_delete_call): Pass a binfo to
3249         perform_or_defer_access_check.
3250         * class.c (alter_access): Likewise.
3251         * decl.c (make_typename_type): Likewise.
3252         (make_unbound_class_template): Likewise.
3253         * lex.c (do_identifier): Likewise.
3254         * method.c (hack_identifier): Likewise.
3255         * parser.c (cp_parser_lookup_name): Likewise.
3256         * search.c (lookup_member): Likewise. Move IDENTIFIER_CLASS_VALUE
3257         test.
3258         * semantics.c (finish_non_static_data_member): Likewise.
3259         (perform_or_defer_access_check): Expect a binfo.
3260         * typeck.c (comptypes): Expect types.
3261
3262         * mangle.c (find_substitution): Don't pass a non-type to same_type_p
3263         * friend.c (make_friend_class): Likewise.
3264         * pt.c (check_default_tmpl_args): Likewise.
3265         (lookup_template_class): Likewise.
3266
3267 2003-06-24  Jan Hubicka  <jh@suse.cz>
3268
3269         * method.c (thunk_labelno): Move outside ifdef block to make garbage
3270         collector happy.
3271
3272 2003-06-24  Jan Hubicka  <jh@suse.cz>
3273
3274         * class.c (build_vtable): Make vtables.
3275         * cp-tree.h (DECL_VTABLE_OR_VTT_P): New macro.
3276         * decl2.c (output_vtable_inherit): Rename to ...
3277         (prepare_assemble_variable): ... this one; change interface.
3278         (maybe_emit_vtables): Do not call output_vtable_inherit.
3279         * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Define.
3280         * cp-tree.h (prepare_assemble_variable): New.
3281
3282 2003-06-23  Andrew Pinski <pinskia@physics.uc.edu>
3283
3284         * method.c: add prototype for make_alias_for_thunk.
3285         (thunk_labelno, make_alias_for_thunk): only define
3286         if ASM_OUTPUT_DEF is defined.
3287
3288 2003-06-23  Jakub Jelinek  <jakub@redhat.com>
3289
3290         * method.c (thunk_labelno): New variable.
3291         (make_alias_for_thunk): New function.
3292         (use_thunk): Use it if defined ASM_OUTPUT_DEF.  Put the thunk
3293         into the same section as the function it is calling.
3294         Include gt-cp-method.h.
3295         * Make-lang.in (gt-cp-method.h): Depend on s-gtype.
3296         (cp/method.o): Depend on gt-cp-method.h.
3297         * config-lang.in (gtfiles): Add $(srcdir)/cp/method.c.
3298
3299 2003-06-23  Jan Hubicka  <jh@suse.cz>
3300
3301         * decl.c (register_dtor_fn): Mark cleanup as used.
3302         * decl2.c (mark_vtable_entries): Skip nops.
3303         * rtti.c (get_tinfo_ptr): Mark tinfo as used.
3304         (build_dynamic_cast_1): Likewise.
3305         (tinfo_base_init): Likewise.
3306         (emit_tinfo_decl): Likewise.
3307
3308 2003-06-23  Jakub Jelinek  <jakub@redhat.com>
3309
3310         * mangle.c (hash_type): Val is the TREE_LIST itself, not a pointer
3311         to it.
3312
3313 2003-06-21  Gabriel Dos Reis <gdr@integrable-solutions.net>
3314
3315         PR c++/10784
3316         * call.c (joust): Warn about choosing conversion sequence only if
3317         -Wconversion.
3318
3319 2003-06-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3320
3321         PR c++/10864
3322         * call.c (op_error): Tidy.
3323         * error.c (dump_expr): Properly format 'T()' when T is an
3324         aggregate type.
3325
3326 2003-06-21  Gabriel Dos Reis <gdr@integrable-solutions.net>
3327
3328         PR c++/10915
3329         * decl.c (grok_op_properties): Warn possible confusing conversion
3330         only if -Wconversion.
3331
3332 2003-06-20  Mark Mitchell  <mark@codesourcery.com>
3333
3334         PR c++/10749
3335         * parser.c (cp_parser_class_head): See through dependent names
3336         when parsing a class-head.
3337
3338         PR c++/10845
3339         * pt.c (try_class_unification): Correct handling of member class
3340         templates.
3341
3342 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
3343
3344         * semantics.c (genrtl_finish_function): Adjust
3345         expand_function_end call.
3346
3347 2003-06-19  Mark Mitchell  <mark@codesourcery.com>
3348
3349         PR c++/10939
3350         * pt.c (tsubst_decl): Do not try to substitute into non-dependent
3351         functions.
3352         (value_dependent_expression_p): Correct logic for FUNCTION_DECLs.
3353
3354         PR c++/9649
3355         * cp-tree.h (pushdecl_class_level): Change prototype.
3356         (push_class_level_binding): Likewise.
3357         * decl.c (add_binding): Reject duplicate static data members.
3358         (pushdecl_class_level): Return a value indicating whether or not
3359         the binding was valid.
3360         (push_class_level_binding): Likewise.
3361         * semantics.c (finish_member_declaration): Don't keep invalid
3362         declarations.
3363
3364         PR c++/11041
3365         * call.c (initialize_reference): Do not use cp_finish_decl to emit
3366         temporary variables.
3367         * cp-tree.h (static_aggregates): Declare.
3368         (pushdecl_top_level_and_finish): Likewise.
3369         * decl.c (pushdecl_top_level_1): New function.
3370         (pushdecl_top_level): Use it.
3371         (pushdecl_top_level_and_finish): New function.
3372         (initialize_local_var): Remove redundant code.
3373         (cp_finish_decl): Remove support for RESULT_DECLs.  Don't check
3374         building_stmt_tree.
3375         * decl.h (static_aggregates): Remove.
3376         * decl2.c (get_guard): Use pushdecl_top_level_and_finish.
3377         * rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish.
3378         (tinfo_base_init): Likewise.
3379
3380 2003-06-19  Matt Austern  <austern@apple.com>
3381
3382         PR c++/11228
3383         * init.c (build_zero_init): Assert that number of array elements
3384         is an integer constant.
3385         (build_default_init) Don't use build_zero_init for arrays with
3386         variable number of elements.
3387
3388 2003-06-19  Andreas Jaeger  <aj@suse.de>
3389
3390         * cp-tree.h: Remove duplicated declarations.
3391
3392 2003-06-18  Nathanael Nerode  <neroden@gcc.gnu.org>
3393
3394         * pt.c: Convert to ISO C.
3395         * semantics.c: Convert to ISO C.
3396
3397 2003-06-18  Nathan Sidwell  <nathan@codesourcery.com>
3398
3399         * cp-tree.h (comp_except_specs, compparms, cp_has_mutable_p,
3400         at_least_as_qualified_p, more_qualified_p): Return bool.
3401         * typeck.c: ANSIFY function definitions.
3402         (comp_array_types): Take redeclaration bool parameter.
3403         (comptypes): Rearrange STRICT handling.
3404         (at_least_as_qualified_p, more_qualified_p,
3405         comp_cv_qualification): Cache cv quals.
3406         (compparms): Rearrange loop.
3407
3408 2003-06-18  Nathan Sidwell  <nathan@codesourcery.com>
3409
3410         * cp-tree.h (COMPARE_RELAXED): Rename to ...
3411         (COMPARE_DERIVED): ... here. Adjust comment.
3412         (resolve_typename_type_in_current_instantiation): Remove.
3413         (cp_tree_equal, comptypes): Return a bool.
3414         * cvt.c (convert_to_reference): Adjust comptypes call.
3415         * pt.c (template_args_equal, unify,): Adjust cp_tree_equal call.
3416         (resolve_typename_type_in_current_instantiation): Remove.
3417         * tree.c (cp_tree_equal): Return bool. Cope with TEMPLATE_DECLs and
3418         IDENTIFIER_NODEs. Abort if undeciderable. Adjust recursive
3419         calls. Refactor code.
3420         * typeck.c (comp_array_types): Return bool. Lose callback.
3421         parameter. Adjust cp_tree_equal calls.
3422         (comptypes): Return bool. Adjust strict handling. Remove relaxed
3423         enumeration and java type handling. Deal with typename types here.
3424         Adjust recursive and cp_tree_equals calls. Adjust base and derived
3425         checking.
3426         (comp_target_types): Remove unreachable code. Adjust
3427         same_or_base_type_p calls.
3428         (ptr_reasonably_similar): Adjust base and derived check.
3429
3430         * typeck.c (maybe_warn_about_returning_address_of_local): Remove
3431         unused calculation.
3432         (check_return_expr): Adjust error messages.
3433         * cp-tree.def (SCOPE_REF): Correct comment.
3434
3435 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
3436
3437         * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
3438         string again.
3439
3440 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
3441
3442         * optimize.c (dump_function): Form complete flag name by
3443         prefixing 'fdump-' to string returned by dump_flag_name().
3444
3445 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
3446
3447         * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
3448         string.
3449
3450 2003-06-17  Jason Merrill  <jason@redhat.com>
3451
3452         PR c++/10929
3453         * decl.c (grokfndecl): Don't mark a function inline for
3454         -finline-functions if it isn't defined.
3455
3456 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
3457
3458         PR c++/10712
3459         * class.c (handle_using_decl): Robustify.
3460
3461         PR c++/11105
3462         * cp-tree.h (DECL_CONV_FN_TYPE): New method.
3463         * mangle.c (struct globals): Remove internal_mangling_p.
3464         (write_unqualified_name): Use DECL_CONV_FN_TYPE.
3465         (write_template_parm): Don't write out the level number.
3466         (conv_type_names): New variable.
3467         (hash_type): New function.
3468         (compare_type): Likewise.
3469         (mangle_conv_op_name_for_type): Don't try to mangle conversion
3470         operator names.
3471         * search.c (lookup_conversion_operator): New function.
3472         (lookup_fnfields_1): Use it.
3473
3474 2003-06-17  Andreas Jaeger  <aj@suse.de>
3475
3476         * except.c: Remove duplicate declaration of push_eh_cleanup.
3477
3478         * call.c: Remove extra declaration of inhibit_warnings.
3479
3480 2003-06-16  Nathanael Nerode  <neroden@gcc.gnu.org>
3481
3482         2003-06-16  Jens-Michael Hoffmann  <jensmh@gmx.de>
3483         * mangle.c: Convert to ISO C.
3484
3485 2003-06-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3486
3487         * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR
3488         macro.
3489
3490 2003-06-16  Nathanael Nerode  <neroden@gcc.gnu.org>
3491
3492         * tree.c: Convert to ISO C.
3493
3494 2003-06-16  Kazu Hirata  <kazu@cs.umass.edu>
3495
3496         * cp-tree.h: Follow spelling conventions.
3497         * mangle.c: Likewise.
3498         * method.c: Likewise.
3499         * parser.c: Likewise.
3500
3501 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
3502
3503         * decl.c (start_function): Adjust init_function_start call.
3504         * method.c (use_thunk): Likewise.
3505         * semantics.c (genrtl_start_function): Likewise.
3506
3507 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
3508
3509         * Make-lang.in: Remove c-options.o.
3510
3511 2003-06-13  Nathanael Nerode  <neroden@gcc.gnu.org>
3512
3513         * lex.c: Convert to ISO C.
3514
3515         2003-05-19  Jens-Michael Hoffmann  <jensmh@gmx.de>
3516         * init.c: removes use of PARAMS macro.  Use ISO style function
3517         declarations.  (Not copyright-significant change.)
3518
3519         * rtti.c: Remove PARAMS.
3520
3521         * typeck2.c: Convert to ISO C.
3522
3523 2003-06-12  Mark Mitchell  <mark@codesourcery.com>
3524
3525         PR c++/10635
3526         * typeck.c (build_c_cast): Check that the destination type is
3527         complete.
3528
3529 2003-06-11  Mark Mitchell  <mark@codesourcery.com>
3530
3531         PR c++/10432
3532         * cp-tree.h (finish_declarator): Remove.
3533         * decl.c (cp_finish_decl): Make sure to pop_nested_class even for
3534         erroneous declarations.
3535         * semantics.c (finish_declarator): Remove.
3536
3537 2003-06-11  Roger Sayle  <roger@eyesopen.com>
3538
3539         * decl2.c (generate_ctor_or_dtor_function): Avoid expanding a
3540         global static constructor/destructor if it will be empty, i.e.
3541         either doesn't call any ctors/dtors or only calls pure or const
3542         ctors/dtors.
3543
3544 2003-06-11  Mark Mitchell  <mark@codesourcery.com>
3545
3546         * mangle.c (tm_p.h): Include it.
3547         * Make-lang.in (cp/mangle.o): Depend on $(TM_P_H).
3548
3549         PR c++/11131
3550         * tree.c (cp_cannot_inline_fn): Check for "inline" before
3551         instantiation.
3552
3553 2003-06-10  Jason Merrill  <jason@redhat.com>
3554
3555         PR c++/10968
3556         * pt.c (mark_decl_instantiated): Clear DECL_COMDAT.
3557
3558 2003-06-10  Andrew Pinski  <pinskia@physics.uc.edu>
3559
3560         * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY.
3561         (start_cleanup_cnt): New.
3562
3563 2003-06-10  Mark Mitchell  <mark@codesourcery.com>
3564
3565         PR c++/11131
3566         * cp-tree.h (template_for_substitution): Declare.
3567         * decl2.c (mark_used): Use it when figuring out whether or not a
3568         function is inline.
3569         * pt.c (template_for_substitution): Give it external linkage.
3570         * tree.c (cp_cannot_inline_tree_fn): Instantiate as early as
3571         possible.
3572
3573 2003-06-09  Zack Weinberg  <zack@codesourcery.com>
3574
3575         PR 8861
3576         * mangle.c (write_real_cst): New function.  Implement
3577         ABI-compliant mangling of floating-point literals when
3578         -fabi-version>=2; provide backward compatibility with 3.3 when
3579         -fabi-version=1 (with warning).  Clarify commentary.
3580         (write_template_arg_literal): Use write_real_cst.
3581
3582 2003-06-07  Andreas Jaeger  <aj@suse.de>
3583
3584         * cp/decl.c (xref_tag): Remove undefined macro NONNESTED_CLASSES.
3585
3586 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
3587
3588         * cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
3589         (LANG_HOOKS_HANDLE_OPTION): Override.
3590         * cp-tree.h (cxx_init_options): Update.
3591         * lex.c (cxx_init_options): Update.
3592
3593 2003-06-05  Jan Hubicka  <jh@suse.cz>
3594
3595         * Make-lang.in:  Add support for stageprofile and stagefeedback
3596
3597 2003-06-04  J"orn Rennecke <joern.rennecke@superh.com>
3598
3599         * decl.c (grokdeclarator): Error_mark_node in, error_mark_node out.
3600
3601 2003-06-04  Andreas Jaeger  <aj@suse.de>
3602
3603         * g++spec.c (lang_specific_driver): Remove ALT_LIBM usage.
3604
3605 2003-06-03  Jason Merrill  <jason@redhat.com>
3606
3607         * cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors.
3608
3609         * cp/decl.c (reshape_init): Handle vectors.
3610
3611         * testsuite/g++.dg/init/array10.C: New.
3612
3613 2003-06-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3614
3615         PR c++/10940
3616         * pt.c (check_explicit_specialization): Check for 'static'
3617         earlier.
3618
3619 2003-05-31  Diego Novillo  <dnovillo@redhat.com>
3620
3621         * class.c (dump_array): Call CONSTRUCTOR_ELTS to access
3622         the operand of a CONSTRUCTOR node.
3623
3624 2003-05-31  Gabriel Dos Reis <gdr@integrable-solutions.net>
3625
3626         * decl.c (cp_binding_level::this_entity): Rename from this_class.
3627         (cxx_scope_descriptor): New function.
3628         (cxx_scope_debug): Likewise.
3629         (push_binding_level): Use it.
3630         (pop_binding_level): Likewise.
3631         (suspend_binding_level): Likewise.
3632         (resume_binding_level): Likewise.
3633         (pushlevel_class): Adjust use of this_class.
3634         (pushtag): Likewise.
3635         (lookup_name_real): Likewise.
3636         (global_scope_name): New variable.
3637         (initialize_predefined_identifiers): Initialize it.
3638         (push_namespace): Use it.
3639         (make_cxx_scope): New function.
3640         (pushlevel): Use it.
3641         (pushlevel_class): Likewise.
3642         (push_binding_level): Simplify.  Loose the last two arguments.
3643         (make_binding_level): Remove.
3644         (initial_push__namespace_scope): New function.
3645         (push_namespace): Use it.  Simplify.
3646         (cxx_init_decl_processing): Likewise.
3647         (declare_namespace_level): Remove.
3648
3649 2003-05-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3650
3651         PR c++/10956
3652         * pt.c (instantiate_decl): Don't use full template arguments if
3653         we are dealing with specializations.
3654
3655 2003-05-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3656
3657         * decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS.
3658         (binding_depth): Unconditionally define.
3659         (is_class_level): Likewise.
3660         (indent): Likewise.  Take an indenting parameter.
3661         (push_binding_level): Remove conditional definittion.
3662         (pop_binding_level): Likewise.
3663         (suspend_binding_level): Likewise.
3664         (resume_binding_level): Likewise.
3665         (pushlevel): Likewise.
3666         (pushlevel_class): Likewise.
3667         (poplevel_class): Likewise.
3668         (pop_everything): Likewise.
3669
3670 2003-05-27  Gabriel Dos Reis <gdr@integrable-solutions.net>
3671
3672         * name-lookup.h (global_scope_p): New macro.
3673         * decl.c (pop_binding_level): Use it.  Don't refer directly to
3674         global_binding_level.
3675         (suspend_binding_level): Likewise.
3676         (global_bindings_p): Likewise.
3677         (print_other_binding_stack): Likewise.
3678         (print_binding_stack): Likewise.
3679         (maybe_push_to_top_level): Likewise.
3680         (pushdecl_namespace_level): Likewise.
3681         (cxx_init_decl_processing): Likewise.
3682         (start_decl): Likewise.
3683         (cp_finish_decl): Likewise.
3684         (start_function): Likewise.
3685         (global_binding_level): Remove.
3686
3687 2003-05-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3688
3689         * parser.c (cp_parser_explicit_instantiation): Restore old
3690         access before template instantiation.
3691
3692 2003-05-23  Geoffrey Keating  <geoffk@apple.com>
3693
3694         * lang-specs.h: Use -o to specify preprocessor's output file.
3695         Make -no-integrated-cpp work when building PCH files.
3696
3697 2003-05-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3698
3699         PR c++/10682
3700         * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
3701         check for implicitly created typedef to an enum.
3702
3703 2003-05-21  Jason Merrill  <jason@redhat.com>
3704
3705         * init.c (build_vec_delete): Copy the address into a temporary
3706         variable before calling build_vec_delete_1.
3707         * decl2.c (delete_sanity): Don't call stabilize_reference.
3708
3709 2003-05-21  Nathan Sidwell  <nathan@codesourcery.com>
3710
3711         * pt.c (register_specialization): Update the decl's location,
3712         if necessary.
3713         (check_explicit_specialization): Likewise.
3714
3715 2003-05-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3716
3717         * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX.
3718
3719 2003-05-21  Danny Smith  <dannysmith@users.sourceforge.net>
3720
3721         PR c++/9738
3722         * decl.c (duplicate_decls): Re-invoke make_decl_rtl
3723         if the old decl had instantiated DECL_RTL.
3724         (Base on Richard Henderson 2003-05-13 patch to c-decl.c).
3725
3726 2003-05-19  Matt Austern  <austern@apple.com>
3727
3728         * lang-options.h: Document -Wno-invalid-offsetof
3729         * typeck.c (build_class_member_access_expr): Don't complain about
3730         (Foo *)p->x for non-POD Foo if warn_invalid_offset is zero.
3731
3732 2003-05-18 Andrew Pinski <pinskia@physics.uc.edu>
3733
3734         * name-lookup.c (free_binding_entry): fix where the GTY markers are.
3735         (binding_entry_make): Make entry->chain NULL after getting an entry.
3736         fix the spelling of chain in a comment.
3737         (binding_table_free): speed up by having temporary variable.
3738         (binding_table_new): set table->chain to be NULL after allocating
3739         a table.
3740         (cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set
3741         binding->previous to NULL after getting an binding for speed.
3742
3743 2003-05-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3744
3745         * cp-tree.h (struct lang_type_class): Replace data member tags
3746         with hash-table nested_udts.
3747         (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS.
3748         * class.c (unreverse_member_declarations): Don't touch
3749         CLASSTYPE_TAGS.
3750         (pushclass): Use cxx_remember_type_decls.
3751         * decl.c (struct cp_binding_level): Replace data member tags with
3752         hash-table type_decls.
3753         (pop_binding_level): Handle level->type_decls.
3754         (kept_level_p): Adjust.
3755         (poplevel): Remove unused local variable.
3756         (bt_print_entry): New function.
3757         (print_binding_level): Use it.
3758         (push_namespace): Build current_binding_level->type_decls.
3759         (maybe_process_template_type_declaration): Adjust.
3760         (pushtag): Likewise.
3761         (clear_anon_tags): Use binding_table_remove_anonymous_types.
3762         (gettags): Remove.
3763         (cxx_remember_type_decls):  Rename from storetags.  Adjust.
3764         (lookup_tag): Use binding_table_find_anon_type.  Tidy.
3765         (lookup_tag_reverse): Use binding_table_reverse_maybe_remap.
3766         (cxx_init_decl_processing): Build global_binding_level->type_decls.
3767         (store_parm_decls): Remove pointless code.
3768         * name-lookup.c (free_binding_entry): New variable.
3769         (ENTRY_INDEX): New macro.
3770         (struct binding_table_s): New datatype.
3771         (binding_entry_make): New function.
3772         (binding_entry_free): Likewise.
3773         (binding_table_construct): Likewise.
3774         (binding_table_free): Likewise.
3775         (binding_table_new): Likewise.
3776         (binding_table_expand): Likewise.
3777         (binding_table_insert): Likewise.
3778         (binding_table_find): Likewise.
3779         (binding_table_find_anon_type): Likewise.
3780         (binding_table_reverse_maybe_remap): Likewise.
3781         (binding_table_remove_anonymous_types): Likewise.
3782         (binding_table_foreach): Likewise.
3783         * name-lookup.h (binding_table): New type.
3784         (binding_entry): Likewise.
3785         (bt_foreach_proc): Likewise.
3786         (struct binding_entry_s): New datatype.
3787         (SCOPE_DEFAULT_HT_SIZE): New macro.
3788         (CLASS_SCOPE_HT_SIZE): Likewise.
3789         (NAMESPACE_ORDINARY_HT_SIZE): Likewise.
3790         (NAMESPACE_STD_HT_SIZE): Likewise.
3791         (GLOBAL_SCOPE_HT_SIZE): Likewise.
3792         (binding_table_new): Declare.
3793         (binding_table_free): Likewise.
3794         (binding_table_insert): Likewise.
3795         (binding_table_find_anon_type): Likewise.
3796         (binding_table_reverse_maybe_remap): Likewise.
3797         (binding_table_remove_anonymous_types): Likewise.
3798         (binding_table_foreach): Likewise.
3799         (binding_table_find): Likewise.
3800         (cxx_remember_type_decls): Likewise.
3801         * pt.c (bt_instantiate_type_proc): New function.
3802         (do_type_instantiation): Use it.
3803         * search.c (lookup_field_r): Use binding_table_find.
3804
3805 2003-05-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3806
3807         * semantics.c (perform_deferred_access_checks): Don't discard
3808         checked access.
3809
3810 2003-05-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3811
3812         * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
3813         libiberty VA_ macros, always use stdarg.
3814         * rtti.c (create_pseudo_type_info): Likewise.
3815         * tree.c (build_min_nt, build_min): Likewise.
3816
3817 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3818
3819         * ptree.c (cxx_print_type, cxx_print_xnode): Use string
3820         concatentation on HOST_WIDE_INT_PRINT_* format specifier to
3821         collapse multiple function calls into one.
3822         * tree.c (debug_binfo): Likewise.
3823
3824 2003-05-15  Jason Merrill  <jason@redhat.com>
3825
3826         PR c++/5388
3827         * call.c (conditional_conversion): Don't consider implicit
3828         conversions if T2 is a base of T1.
3829         * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
3830         (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
3831
3832         * parser.c (cp_parser_primary_expression): Convert a static data
3833         member from reference.
3834
3835 2003-05-15  Mark Mitchell  <mark@codesourcery.com>
3836
3837         * call.c (build_op_delete_call): Avoid creating unnecessary types.
3838         * class.c (instantiate_type): Remove tests for tf_no_attributes.
3839         * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
3840         (COMPARE_NO_ATTRIBUTES): Remove.
3841         * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
3842
3843         PR c++/8385
3844         * semantics.c (finish_typeof): Refine type-dependency check.
3845
3846 2003-05-13  Jason Merrill  <jason@redhat.com>
3847
3848         * typeck.c (build_modify_expr): Don't always stabilize the lhs and
3849         rhs.  Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
3850
3851 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3852
3853         * method.c (synthesize_method): Call push/pop_deferring_access_checks.
3854
3855 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3856
3857         PR c++/10230, c++/10481
3858         * semantics.c (finish_non_static_data_member): Handle when the
3859         non-static member is not from a base of the current class type.
3860
3861 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3862
3863         PR c++/10552
3864         * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
3865         template and has dependent context.
3866
3867 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3868
3869         * pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
3870
3871 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3872
3873         PR c++/9252
3874         * cp-tree.h (saved_scope): Remove check_access field.
3875         (tsubst_flags_t): Remove tf_parsing.
3876         * decl.c (maybe_push_to_top_level): Don't initialize
3877         scope_chain->check_access.
3878         (make_typename_type, make_unbound_class_template): Don't use
3879         tf_parsing.
3880         (register_dtor_fn): Use push/pop_deferring_access_checks
3881         instead of scope_chain->check_access.
3882         * method.c (use_thunk): Likewise.
3883         * parser.c (cp_parser_explicit_instantiation
3884         (cp_parser_constructor_declarator_p): Don't call
3885         push/pop_deferring_access_checks here.
3886         (cp_parser_template_argument, cp_parser_class_name): Don't use
3887         tf_parsing.
3888         (yyparse): Check flag_access_control.
3889         * pt.c (instantiate_class_template): Call
3890         push/pop_deferring_access_checks.
3891         * semantics.c (push_deferring_access_checks): Propagate
3892         dk_no_check.
3893         (perform_or_defer_access_check): Make sure basetype_path is
3894         a type before comparison.
3895         * call.c (build_op_delete_call, build_over_call): Use
3896         perform_or_defer_access_check.
3897         * class.c (alter_access): Likewise.
3898         * init.c (build_offset_ref): Likewise.
3899         * lex.c (do_identifier): Likewise.
3900         * method.c (hack_identifier): Likewise.
3901         * search.c (lookup_member): Likewise.
3902         * semantics.c (finish_non_static_data_member): Likewise.
3903         (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
3904         instead of flag_access_control.
3905
3906 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3907
3908         PR c++/9554
3909         * parser.c (cp_parser_class_name): Remove check_access parameter.
3910         All caller adjusted.  Update declaration.
3911         (cp_parser_lookup_name): Likewise.
3912         * semantics.c (push_deferring_access_checks): Change parameter type
3913         to enum deferring_kind.  All caller adjusted.
3914         (resume_deferring_access_checks): Adjust to use new enum.
3915         (stop_deferring_access_checks): Likewise.
3916         (perform_or_defer_access_check): Likewise.
3917         * cp-tree.h (deferring_kind): New enum.
3918         (deferred_access): Adjust field type.
3919         (push_deferring_access_checks): Update declaration.
3920
3921 2003-05-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3922
3923         PR c++/10555, c++/10576
3924         * pt.c (lookup_template_class): Handle class template with
3925         multiple levels of parameters when one of the levels contain
3926         errors.
3927
3928 2003-05-08  Jason Merrill  <jason@redhat.com>
3929
3930         * init.c (build_new_1): Don't reuse a TARGET_EXPR in an
3931         expression.  Undo some of the recent reorg.
3932
3933 2003-05-07  Richard Henderson  <rth@redhat.com>
3934
3935         PR c++/10570
3936         * cfns.gperf: Comment out POSIX thread cancellation points,
3937         plus abort and raise.
3938         * cfns.h: Regenerate.
3939
3940 2003-05-07  Jason Merrill  <jason@redhat.com>
3941
3942         * call.c (build_conditional_expr): Don't assume that the folded
3943         expression has result_type.
3944
3945 2003-05-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3946
3947         * typeck.c (build_unary_op): Deal with const qualifier in
3948         invalid pointer-to-member earlier.
3949
3950 2003-05-05  Jason Merrill  <jason@redhat.com>
3951
3952         PR c++/9537
3953         * call.c (conditional_conversion): Build an RVALUE_CONV if
3954         we're just changing the cv-quals.
3955         (build_conditional_expr): Don't call convert to change
3956         cv-quals.
3957
3958 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3959
3960         PR c++/10496
3961         * typeck.c (build_unary_op): Don't output const qualifier when
3962         output invalid pointer-to-member diagnostics.
3963
3964 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3965
3966         * decl.c: Fix typos.
3967
3968 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3969
3970         PR c++/4494
3971         * decl.c (start_function): Use same_type_p to check return type
3972         of main.
3973
3974 2003-05-03  Zack Weinberg  <zack@codesourcery.com>
3975
3976         PR c/10604
3977         * cp/typeck.c (build_x_compound_expr): No need to check
3978         extra_warnings as well as warn_unused_value.
3979
3980 2003-05-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3981
3982         PR c++/9364, c++/10553, c++/10586
3983         * decl.c (make_typename_type): Don't crash on illegal code.
3984
3985 2003-05-03  Nathan Sidwell  <nathan@codesourcery.com>
3986
3987         * class.c (finish_struct): Use location_t and input_location
3988         directly.
3989         * decl.c (make_label_decl): Likewise.
3990         (use_label): Likewise.
3991         * decl2.c (warn_if_unknown_interface): Likewise.
3992         (start_static_initialization_or_destruction): Likewise.
3993         (generate_ctor_or_dtor_function): Likewise.
3994         (finish_file): Likewise.
3995         * error.c (print_instantiation_full_context): Likewise.
3996         * init.c (create_temporary_var): Likewise.
3997         * method.c (synthesize_method): Likewise.
3998         * parser.c (cp_token): Likewise.
3999         (cp_lexer_set_source_position_from_token): Likewise.
4000         (cp_lexer_get_preprocessor_token): Likewise.
4001         (cp_parser_statement): Likewise.
4002         * pt.c (tsubst_friend_function): Likewise.
4003         (instantiate_class_template): Likewise.
4004         (tsubst_decl): Likewise.
4005         (tsubst): Likewise.
4006         (instantiate_decl): Likewise.
4007         * semantics.c (begin_class_definition): Likewise.
4008         (expand_body): Likewise.
4009
4010 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
4011
4012         * class.c (finish_struct): Rename lineno to input_line.
4013         * decl.c (push_binding_level, pop_binding_level,
4014         suspend_binding_level, resume_binding_level, make_label_decl,
4015         use_label, start_function): Likewise.
4016         * decl2.c (warn_if_unknown_interface,
4017         start_static_initialization_or_destruction,
4018         generate_ctor_or_dtor_function, finish_file): Likewise.
4019         * error.c (cp_line_of, print_instantiation_full_context,
4020         print_instantiation_context): Likewise.
4021         * except.c (check_handlers_1, check_handlers): Likewise.
4022         * init.c (create_temporary_var): Likewise.
4023         * method.c (use_thunk, synthesize_method): Likewise.
4024         * parser.c (cp_lexer_set_source_position_from_token,
4025         cp_lexer_get_preprocessor_token): Likewise.
4026         * pt.c (push_tinst_level, pop_tinst_level,
4027         tsubst_friend_function, instantiate_class_template, tsubst_decl,
4028         tsubst, tsubst_expr, instantiate_decl): Likewise.
4029         * semantics.c (genrtl_try_block, finish_label_stmt,
4030         begin_class_definition, expand_body,
4031         genrtl_finish_function): Likewise.
4032         * tree.c (build_min_nt, build_min): Likewise.
4033
4034 2003-05-01  Mark Mitchell  <mark@codesourcery.com>
4035
4036         * decl2.c (comdat_linkage): Don't externalize explicit
4037         instantiations.
4038
4039 2003-05-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4040
4041         PR c++/10554
4042         * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
4043         is not NULL.
4044
4045 2003-05-01  Steven Bosscher  <steven@gcc.gnu.org>
4046
4047         * cp-tree.h (struct lang_id2): Remove.  Move fields from here...
4048         (struct lang_identifier): ... to here.
4049         (LANG_ID_FIELD): Remove.
4050         (SET_LANG_ID): Remove.
4051         (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
4052         (SET_IDENTIFIER_LABEL_VALUE): Likewise.
4053         (IDENTIFIER_IMPLICIT_DECL): Likewise.
4054         (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
4055         (IDENTIFIER_ERROR_LOCUS): Likewise.
4056         (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
4057
4058 2003-05-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4059
4060         PR c++/8772
4061         * pt.c (convert_template_argument): Correct diagnostic.
4062
4063 2003-04-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4064
4065         PR c++/9432, c++/9528
4066         * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
4067
4068 2003-04-30  Garbiel Dos Reis  <gcc@integrable-solutions.net>
4069
4070         * decl.c (check_previous_goto_1): Adjust prototype.
4071         (check_previous_goto): Adjust use.
4072         (check_switch_goto): Likewise.
4073         (use_label): Adjust.
4074         (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
4075         (struct named_label_use_list): Use location_t datatype.
4076
4077 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
4078
4079         PR c++/10551
4080         * pt.c (mark_decl_instantiated): Defer all explicit instantiations
4081         that have not yet been written out.
4082
4083 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
4084
4085         PR c++/10549
4086         * class.c (layout_class_type): Mark overlong bitfields as having
4087         the maximum size permitted by their type, after layout.
4088
4089         PR c++/10527
4090         * error.c (dump_expr): Correctly handling of NEW_EXPR.4
4091
4092 2003-04-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4093
4094         * call.c (build_operator_new_call): Fix typo.
4095         * lang-options.h: Likewise.
4096
4097 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
4098
4099         PR c++/10515
4100         * cp-tree.h (lookup_field_1): Declare it.
4101         * search.c (lookup_field_1): Make it public.
4102         * decl.c (reshape_init): Handle designated initializers.
4103
4104         * decl.c (maybe_commonize_var): Further tweak support for systems
4105         without weak symbols.
4106
4107 2003-04-27  Mark Mitchell  <mark@codesourcery.com>
4108
4109         * decl.c (maybe_commonize_var): Fix thinko in last patch.
4110
4111 2003-04-27  Mark Mitchell  <mark@codesourcery.com>
4112
4113         PR c++/10506
4114         * method.c (use_thunk): Decrement immediate_size_expand.
4115
4116         PR c++/10503
4117         * cp-tree.h (DECL_VAR_MARKED_P): New macro.
4118         (DECL_MAYBE_TEMPLATE): Remove.
4119         * class.c (fixed_type_or_null): Avoid infinite recursion.
4120
4121         * decl.c (maybe_commonize_var): Make the code match the comments.
4122         * pt.c (instantiate_decl): Move call to import_export_decl.
4123
4124 2003-04-26  Mark Mitchell  <mark@codesourcery.com>
4125
4126         * decl2.c (finish_file): Fix merge botch.
4127
4128 2003-04-25  Mark Mitchell  <mark@codesourcery.com>
4129
4130         * decl2.c (finish_file): Don't call import_export_decl for
4131         functions that are not defined.
4132         (handle_class_head): Robustify.
4133         * pt.c (instantiate_decl): Do not call cp_finish_decl for
4134         variables that are not defined.
4135
4136 2003-04-24  Sylvain Pion  <Sylvain.Pion@mpi-sb.mpg.de>
4137
4138         * call.c (print_z_candidates): Fix off by one error.
4139
4140 2003-04-24  Nathan Sidwell  <nathan@codesourcery.com>
4141
4142         PR c++/10337
4143         * call.c (joust): Don't warn about conversion ops that are exact
4144         or cv-conversions. Rearrange to avoid multiple type comparisons.
4145
4146 2003-04-23  Mark Mitchell  <mark@codesourcery.com>
4147
4148         PR c++/10471
4149         * call.c (build_cxx_call): Robustify.
4150
4151 2003-04-23  Neil Booth  <neil@daikokuya.co.uk>
4152
4153         * Make-lang.in (lex.o): Remove mbchar.h.
4154         * lex.c (MULTIBYTE_CHARS): Lose.
4155         * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
4156         in c-lex.c.
4157
4158 2003-04-23  Mark Mitchell  <mark@codesourcery.com>
4159
4160         PR c++/9847
4161         * cp-tree.h (duplicate_tag_error): Remove.
4162         * class.c (duplicate_tag_error): Remove.
4163         * semantics.c (begin_class_definition): Return immediately for a
4164         duplicate class definition.
4165
4166         PR c++/10451
4167         * decl.c (grokdeclarator): Correct logic for "mutable" errors.
4168
4169 2003-04-22  Mark Mitchell  <mark@codesourcery.com>
4170
4171         PR c++/10446
4172         * search.c (lookup_fnfields_1): Handle empty slots in the method
4173         vector.
4174
4175         PR c++/10428
4176         * decl.c (check_elaborated_type_specifier): New function, split
4177         out from ...
4178         (xref_tag): ... here.  Use the new function in more places.
4179
4180         * rtti.c (throw_bad_typeid): Use build_cxx_call.
4181
4182 2003-04-21  Mark Mitchell  <mark@codesourcery.com>
4183
4184         * call.c (build_over_call): Use build_cxx_call.
4185         (build_cxx_call): New method, split out of build_over_call.
4186         * cp-tree.h (language_function): Add can_throw.
4187         (build_cxx_call): Declare it.
4188         * decl.c (finish_function): If a function does not contain any
4189         calls to functions that can throw an exception, indicate that
4190         fact.
4191         * decl2.c (mark_used): Do not defer the instantiation of
4192         functions, if the current function does not throw.
4193         * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
4194         * pt.c (instantiate_decl): Make sure import_export_decl is called
4195         before emitting things.
4196         * rtti.c (throw_bad_cast): Use build_cxx_call.
4197         (build_dynamic_cast_1): Likewise.
4198         * typeck.c (build_function_call): Likewise.
4199
4200 2003-04-21  Nathan Sidwell  <nathan@codesourcery.com>
4201
4202         PR c++/9881
4203         * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
4204         expressions. Reverts my 2002-08-08 patch.
4205
4206         * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
4207         cheaper early exit.
4208
4209 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
4210
4211         * cp/decl2.c (start_static_storage_duration_function): Take count
4212         arg, don't check if it wraps round.
4213         (generate_ctor_or_dtor_function): Add locus arg, use it.
4214         (generate_ctor_and_dtor_functions_for_priority): Data arg is a
4215         locus.
4216         (finish_file): Set line numbers to past EOF for synthesized
4217         functions.
4218
4219 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
4220
4221         PR c++/10405
4222         * search.c (lookup_field_1): Final scan goes backwards for
4223         types, forwards for non-types.
4224
4225 2003-04-17  Roger Sayle  <roger@eyesopen.com>
4226
4227         PR c/10375
4228         * decl.c (duplicate_decls): Preserve "const", "noreturn" and
4229         "nothrow" function attributes.
4230
4231 2003-04-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4232
4233         PR c++/10347
4234         * pt.c (type_dependent_expression_p): Handle array new.
4235
4236 2003-04-15  Mark Mitchell  <mark@codesourcery.com>
4237
4238         PR c++/10381
4239         * parser.c (cp_parser_primary_expression): Reorganize logic for
4240         dealing with name lookup failures.
4241
4242 2003-04-15  Jason Merrill  <jason@redhat.com>
4243
4244         * decl2.c (mark_used): Don't instantiate anything if
4245         skip_evaluation.
4246
4247 2003-04-14  Ziemowit Laski  <zlaski@apple.com>
4248
4249         * tree.c (build_cplus_array_type_1): Do not call
4250         uses_template_parms() on a NULL index_type.
4251
4252 2003-04-13  Roger Sayle  <roger@eyesopen.com>
4253
4254         * decl.c (duplicate_decls): Preserve pure and malloc attributes.
4255
4256 2003-04-12  Mark Mitchell  <mark@codesourcery.com>
4257
4258         PR c++/10300
4259         * init.c (build_new_1): Reorganize.
4260
4261 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
4262
4263         * class.c (initialize_array)
4264         * decl.c (reshape_init)
4265         * decl2.c (build_expr_from_tree)
4266         * init.c (build_zero_init)
4267         * pt.c (tsubst_copy, tsubst_copy_and_build)
4268         * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
4269         (ptm_initializer, class_initializer, get_pseudo_ti_init)
4270         * semantics.c (finish_compound_literal)
4271         * typeck.c (build_ptrmemfunc1)
4272         * typeck2.c (store_init_value, process_init_constructor)
4273         (build_functional_cast): Use build_constructor.
4274
4275 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
4276
4277         * call.c (print_z_candidates): Use gcc_gettext_width, not
4278         strlen, to determine how much padding to use.
4279
4280 2003-04-10  Zack Weinberg  <zack@codesourcery.com>
4281
4282         * decl.c: Update all calls to shadow_warning.
4283
4284 2003-04-10  Mark Mitchell  <mark@codesourcery.com>
4285
4286         * class.c (layout_class_type): Correct handling for overlong
4287         bit-fields whose width is the same as an integer type.
4288
4289 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
4290
4291         * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
4292         * cp-lang.c (cp_tree_size): New function.
4293         (LANG_HOOKS_TREE_SIZE): Override.
4294
4295         * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
4296         tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
4297         (union lang_tree_node): Remove common and srcloc members.
4298         (build_srcloc_here): Don't prototype.
4299         * decl.c (cp_tree_node_structure): Kill SRCLOC case.
4300         * pt.c (pending_templates): Correct comment.
4301         * tree.c (build_srcloc, build_srcloc_here): Kill.
4302
4303 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
4304
4305         * call.c: Include intl.h.
4306         (print_z_candidate): Always use inform; get rid of errfn
4307         argument. Reorganize so that all the strings get picked up
4308         by xgettext.  Note obligation of caller to pass first argument
4309         through gettext.
4310         (print_z_candidates): Update to match.  Indent second and
4311         successive candidates by strlen() of translated message.
4312         (joust): Restructure ambiguous-conversion pedwarn so that
4313         translators see a complete sentence.  Update calls to
4314         print_z_candidate.
4315
4316         * Make-lang.in (cp/call.o): Update dependencies.
4317
4318 2003-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4319
4320         * decl.c (set_current_binding_level): Delete, revert last change.
4321         (current_binding_level): Modify to allow it as as lvalue.
4322
4323 2003-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4324
4325         * name-lookup.c (find_binding): Pass appropriate pointer type to
4326         POP_TIMEVAR_AND_RETURN.
4327
4328 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4329
4330         * Make-lang.in (cp-warn): Add $(STRICT_WARN).
4331         * cp-tree.h: Don't insist on having GNUC.
4332
4333 2003-04-03  Jason Merrill  <jason@redhat.com>
4334
4335         * cvt.c (ocp_convert): Only abort if we try to convert an object
4336         of TREE_ADDRESSABLE type.
4337
4338         * class.c (build_vtable): Set DECL_ALIGN here.
4339         (get_vtable_decl): Not here.
4340         (layout_vtable_decl): Or here.
4341         (create_vtable_ptr): Or here.
4342         (layout_class_type): Or here.
4343         (check_bitfield_decl): Don't mess with field alignment.
4344
4345 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4346
4347         * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
4348         DEF_ASSN_OPERATOR): Delete spurious semi-colon.
4349         * rtti.c (dfs_class_hint_mark): Likewise.
4350
4351         * decl.c (push_local_name, push_class_level_binding,
4352         maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
4353         functions returning void.
4354         * decl2.c (add_using_namespace): Likewise.
4355
4356         * decl.c (print_binding_level, print_other_binding_stack,
4357         print_binding_stack): Cast argument of %p specifier to void*.
4358         * ptree.c (cxx_print_decl): Likewise.
4359
4360         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
4361         VAR_FUNCTION_OR_PARM_DECL_CHECK,
4362         VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
4363         BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
4364         LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
4365
4366         * decl.c (set_current_binding_level): New macro.  Use throughout
4367         when setting the current binding level.
4368
4369         * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
4370         in enum.
4371         * method.c (mangling_flags): Likewise.
4372
4373         * cp-tree.h (lang_type_header): Add __extension__ and use
4374         CHAR_BITFIELD for members.
4375
4376 2003-04-02  Geoffrey Keating  <geoffk@apple.com>
4377
4378         PR other/9274
4379         * mangle.c: Include gt-cp-mangle.h.
4380         (subst_identifiers): Mark with GTY.
4381         * config-lang.in (gtfiles): Add cp/mangle.c.
4382         * Make-lang.in: (gt-cp-mangle.h): New rule.
4383         (cp/mangle.o): Depends on gt-cp-mangle.h.
4384
4385 2003-04-01  Andrew Pinski  <pinskia@physics.uc.edu>
4386
4387         * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
4388         after \$(srcdir)/cp/name-lookup.h.
4389         * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
4390         of ggc_alloc.  Include gt-cp-name-lookup.h at the end of the file.
4391         * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
4392         (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
4393
4394 2003-03-31  Jason Merrill  <jason@redhat.com>
4395
4396         PR java/10145
4397         * class.c (check_field_decl): Don't set DECL_ALIGN.
4398
4399 2003-03-30  Mark Mitchell  <mark@codesourcery.com>
4400
4401         PR c++/7647
4402         * decl.c (grokdeclarator): Tidy, slightly.
4403         * search.c (lookup_field_1): Add want_type parameter.
4404         (lookup_field_r): Adjust call to lookup_field_1.
4405
4406 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4407
4408         * Make-lang.in (cp/name-lookup.o): Add more dependencies.
4409
4410 2003-03-30  Gabriel Dos Reis <gdr@integrable-solutions.net>
4411
4412         * cp-tree.h (binding_for_name: Move to name-lookup.h  Adjust
4413         prototype.
4414         (cxx_scope_find_binding_for_name): Likewise.
4415         * decl.c (find_binding: Move to name-lookup.c.
4416         (binding_for_name): Likewise.
4417         (cxx_scope_find_binding_for_name): Likewise.
4418         (BINDING_LEVEL):  Remove.
4419         (push_binding): Tidy.
4420         (push_class_binding): Likewise.
4421         (pop_binding): Likewise.
4422         (poplevel): Likewise.
4423         (poplevel_class): Likewise.
4424         (set_identifier_type_value_with_scope): Likewise.
4425         (push_overloaded_decl): Likewise.
4426         (lookup_tag): Likewise.
4427         (unqualified_namespace_lookup): Likewise.
4428         (lookup_name_current_level): Likewise.
4429         (maybe_inject_for_scope_var): Likewise.
4430         (namespace_binding): Move to name-lookup.c.
4431         (set_namespace_binding): Likewise.
4432         * decl2.c (lookup_using_namespace): Tidy.
4433         (qualified_lookup_using_namespace): Likewise.
4434         (do_toplevel_using_decl): Likewise.
4435         * name-lookup.c: Include "timevar.h"
4436         * name-lookup.h (cxx_scope):  Declare.
4437         (struct cxx_binding): Lose member "has_level".  Adjust "scope"
4438         member declaration.
4439         (BINDING_SCOPE): Adjust definition.
4440         (BINDING_HAS_LEVEL_P): Remove.
4441
4442 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4443
4444         * name-lookup.c: New file.
4445         * name-lookup.h: Likewise..
4446         * decl.c (push_binding): Adjust use cxx_binding_make.
4447         (free_bindings): Move to name-lookup.c
4448         (pop_binding): Use cxx_binding_free.
4449         (binding_for_name): Tidy.
4450         * cp-tree.h: Include "name-lookup.h"
4451         (cxx_binding_make): Move to name-lookup.h
4452         (cxx_binding_clear): Likewise.
4453         (struct cxx_binding): Likewise.
4454         (LOCAL_BINDING_P): Likewise.
4455         (INHERITED_VALUE_BINDING_P): Likewise.
4456         (BINDING_SCOPE): Likewise.
4457         (BINDING_HAS_LEVEL_P): Likewise.
4458         (BINDING_VALUE): Likewise.
4459         (BINDING_TYPE): Likewise.
4460         * config-lang.in (gtfiles): Add cp/name-lookup.h
4461         * Make-lang.in (cp/name-lookup.o): New rule.
4462         (CXX_OBJS): Add cp/name-lookup.o
4463         (CXX_TREE_H): Add cp/name-lookup.h
4464
4465 2003-03-28  Jason Merrill  <jason@redhat.com>
4466
4467         PR c++/10245
4468         * cvt.c (force_rvalue): New fn.
4469         * call.c (build_conditional_expr): Use it.
4470         * cp-tree.h: Declare it.
4471
4472 2003-03-28  Mike Stump  <mrs@apple.com>
4473
4474         * error.c (dump_expr): Add 0x to printed hex numbers to make
4475         output match source code better.
4476
4477 2003-03-28  Mark Mitchell  <mark@codesourcery.com>
4478
4479         PR c++/10218
4480         * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
4481         definitions.
4482
4483         * decl2.c (generate_ctor_or_dtor_function): Tolerate a
4484         non-existant ssdf_decls array.
4485         (finish_file): Call generator_ctor_or_dtor_function when there are
4486         static constructors or destructors and no other static
4487         initializations.
4488
4489 2003-03-28  Nathan Sidwell  <nathan@codesourcery.com>
4490
4491         PR c++/10047
4492         * decl2.c (finish_file): Don't warn about explicitly instantiated
4493         inline decls.
4494
4495 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
4496
4497         PR c++/10224
4498         * pt.c (lookup_template_class): Only check instantiated args if
4499         they do not contain template parameters.
4500
4501 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
4502
4503         PR c++/10158
4504         * parser.c (cp_parser_function_definition): Set
4505         DECL_INITIALIZED_IN_CLASS for members.
4506         * pt.c (instantiate_decl): Only reduce the template args for
4507         friends that are not defined in class.
4508
4509 2003-03-25  Jason Merrill  <jason@redhat.com>
4510
4511         * call.c (print_z_candidate): Change name of first arg to msgid.
4512         (joust): Add comment for translators.
4513
4514 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
4515
4516         PR c++/9898, PR c++/383, DR 322
4517         * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
4518         through reference types on both PARM and ARG.
4519
4520 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
4521
4522         PR c++/10119
4523         * error.c (dump_expr) <BASELINK>: Use dump_expr.
4524         * pt.c (maybe_fold_nontype_args): New function.
4525         (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
4526         <TEMPLATE_ID_EXPR>: Break out folding code, call it.
4527         (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
4528         maybe_fold_nontype_args.
4529
4530 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
4531
4532         PR c++/10026
4533         * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
4534
4535 2003-03-23  Mark Mitchell  <mark@codesourcery.com>
4536
4537         PR c++/7086
4538         * typeck.c (cxx_mark_addressable):  Adjust call to
4539         gen_mem_addressof or put_var_into_stack.
4540
4541 2003-03-22  Nathan Sidwell  <nathan@codesourcery.com>
4542
4543         PR c++/9978, c++/9708
4544         * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
4545         * call.c (add_template_candidate_real): Adjust
4546         instantiate_template call.
4547         * class.c (resolve_address_of_overloaded_function): Likewise.
4548         * decl.c (build_enumerator): Set TREE_CONSTANT.
4549         * pt.c (check_instantiated_args): New.
4550         (push_inline_template_parms_recursive): Set TREE_CONSTANT,
4551         TREE_READONLY.
4552         (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
4553         (reduce_template_parm_level): Likewise.
4554         (process_template_parm): Likewise.
4555         (check_explicit_specialization): Adjust instantiate_template call.
4556         (convert_template_argument): Don't check non-type argument here.
4557         (lookup_template_class): Check them here.
4558         (tsubst_friend_function): Adjust instantiate_template call.
4559         (instantiate_template): Add tsubst_flags parameter, use it. Check
4560         instantiated args.
4561
4562 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
4563
4564         * decl.c: Update calls to shadow_warning.
4565
4566 2003-03-21  Nathan Sidwell  <nathan@codesourcery.com>
4567
4568         PR c++/9898
4569         * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
4570         (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
4571
4572 2003-03-20  Mark Mitchell  <mark@codesourcery.com>
4573
4574         * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
4575         friends.
4576         * cp/pt.c (instantiate_class_template): Fix formatting.
4577
4578 2003-03-14  Matt Austern  <austern@apple.com>
4579
4580         * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
4581         (unemitted_tinfo_decl_p): Remove.
4582         (emit_tinfo_decl): Change declaration to remove unused parameter.
4583         * decl2.c (finish_file): Change tinfo emission to loop through
4584         unemitted_tinfo_decls array instead of looping through all decls.
4585         * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
4586         unused second parameter.
4587         (init_rtti_processing): initialize unemitted_tinfo_decls varray.
4588         (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
4589         (emit_tinfo_decl): remove unused second parameter, add assertion
4590         that decl hasn't already been emitted.
4591
4592 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
4593
4594         * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
4595         type from 'int' to 'bool'. Replace 0 and 1 with true and false in
4596         return statements.
4597
4598 2003-03-19  Jason Merrill  <jason@redhat.com>
4599
4600         PR c++/8316, c++/9315, c++/10136
4601         * call.c (print_z_candidate): Split out from...
4602         (print_z_candidiates): ...here.
4603         (joust): Use it.
4604
4605 2003-03-17  Roger Sayle  <roger@eyesopen.com>
4606
4607         PR c++/10031
4608         * decl.c (duplicate_decls): Use the new type when prototyping
4609         anticipated decls, even when the types match.  This defines the
4610         exception list for the built-in function.
4611
4612 2003-03-17  Jason Merrill  <jason@redhat.com>
4613
4614         PR c++/10091
4615         * typeck.c (build_class_member_access_expr): Compare
4616         TYPE_MAIN_VARIANTs.
4617
4618 2003-03-17  Mark Mitchell  <mark@codesourcery.com>
4619
4620         PR c++/9639
4621         * parser.c (cp_parser_declarator_id): Clear parser->scope.
4622
4623 2003-03-16  Jason Merrill  <jason@redhat.com>
4624
4625         PR c++/9993
4626         * decl.c (finish_function): Only allow the NRVO to use variables
4627         declared at function scope.
4628
4629 2003-03-17  Andreas Jaeger  <aj@suse.de>
4630
4631         * Make-lang.in (cp/TAGS): Remove.
4632
4633 2003-03-16  Nathan Sidwell  <nathan@codesourcery.com>
4634
4635         PR c++/9629
4636         * cp-tree.h (struct language_function): Add in_base_initializer.
4637         (in_base_initializer): define it.
4638         (expand_member_init): Remove INIT param.
4639         * init.c (expand_member_init): Remove INIT param, return the member.
4640         (emit_mem_initializers): Set in_base_initializer.
4641         * class.c (build_base_path): Check in_base_initializer.
4642         * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
4643         * pt.c (tsubst_initializer_list): Likewise.
4644
4645 2003-03-16   Gabriel Dos Reis <gdr@integrable-solutions.net>
4646
4647         * decl.c (binding_for_name): Fix initialization thinko.
4648
4649 2003-03-15  Gabriel Dos Reis <gdr@integrable-solutions.net>
4650
4651         Compile-time improvement: 2/n.
4652         * cp-tree.h (struct cxx_binding): New datatype;
4653         (struct lang_identifier): Use it.
4654         (LOCAL_BINDING_P): Adjust definition.
4655         (INHERITED_VALUE_BINDING_P): Likewise.
4656         (BINDING_SCOPE): Likewise.
4657         (BINDING_HAS_LEVEL_P): Likewise.
4658         (BINDING_VALUE): Likewise.
4659         (BINDING_TYPE): Likewise.
4660         (IDENTIFIER_VALUE): Likewise.
4661         (struct tree_binding): Remove.
4662         (TS_CP_BINDING): Likewise.
4663         ((union lang_tree_node): Remove field "binding".
4664         (cxx_binding_clear): New macro.
4665         (binding_for_name): Adjust return type.
4666         (qualified_lookup_using_namespace): Adjust prototype.
4667         (lookup_using_namespace): Adjust prototype.
4668         (cxx_scope_find_binding_for_name): Declare.
4669         * cp-tree.def: Remove CPLUS_BINDING definition.
4670         * decl.c (push_binding): Adjust local variable type.
4671         (add_binding): Likewise.
4672         (push_class_binding): Likewise.
4673         (pop_binding): Likewise.
4674         (poplevel): Likewise.
4675         (poplevel_class): Likewise.
4676         (free_bindings):  Adjust type.
4677         (find_binding): Adjust return type, add a third parameter. Remove
4678         non-useful assertion now that we use static typing.
4679         (cxx_scope_find_binding_for_name): New function.
4680         (binding_for_name): Use it.  Adjust local variable type. Simplify.
4681         (namespace_binding):  Simplify.
4682         (set_namespace_binding): Likewise.
4683         (set_identifier_type_value_with_scope): Adjust local variable type.
4684         (lookup_tag): Don't type-abuse of local variable 'old'.
4685         (lookup_namespace_name): Likewise.  Allocate binding on stack.
4686         (select_decl): Adjust prototype.
4687         (unqualified_namespace_lookup):  Allocate binding on stack.
4688         Don't type-abuse of local variable 'val'.
4689         (lookup_name_real): Likewise.
4690         (maybe_inject_for_scope_var): Adjust local variable type.
4691         (cp_tree_node_structure): Remove CPLUS_BINDING case label.
4692         (namespace_binding): Adjust logic, simplify.
4693         (BINDING_LEVEL): Adjust definition.
4694         (push_class_level_binding): Adjust local variable type.
4695         (struct cxx_saved_binding): Adjust field 'binding' type.
4696         * decl2.c (ambiguous_decl): Adjust prototype.
4697         (lookup_using_namespace): Adjust local variable type.
4698         (qualified_lookup_using_namespace): Catch type error and correct
4699         ensueing logic error.
4700         (do_nonmember_using_decl): Adjust local variable type.  Allocate
4701         temporary cxx_binding on stack.
4702         (do_toplevel_using_decl): Adjust local variable type.
4703         * ptree.c (cxx_print_cxx_binding): New function.
4704         (cxx_print_identifier): Use it.
4705         (cxx_print_xnode): Delete CPLUS_BINDING case label.
4706
4707 2003-03-15  Roger Sayle  <roger@eyesopen.com>
4708
4709         * tree.c (count_functions): Fix whitespace.
4710
4711 2003-03-15  Neil Booth  <neil@daikokuya.co.uk>
4712
4713         * Make-lang.in: Update.
4714
4715 2003-03-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4716
4717         PR c++/6440
4718         * pt.c (maybe_process_partial_specialization): Handle
4719         member class template when enclosing class template is
4720         explicit specialized.
4721         (most_general_template): Stop looking when DECL is already
4722         specialized.
4723
4724 2003-03-13  Jason Merrill  <jason@redhat.com>
4725
4726         PR c++/9420
4727         * search.c (lookup_conversions): Call complete_type here.
4728         * call.c (implicit_conversion): Not here.
4729
4730 2003-03-13  Mark Mitchell  <mark@codesourcery.com>
4731
4732         * decl2.c (do_nonmember_using_decl): Correct handling of
4733         simultaneous type/non-type bindings.
4734
4735         * call.c (initialize_reference): Remove bogus assertion.
4736         * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
4737
4738 2003-03-12  Andrew Lewycky  <andrew@mxc.ca>
4739
4740         PR c++/7050
4741         * expr.c (cxx_expand_expr): Return const0_rtx for throw
4742         expressions.
4743
4744 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
4745
4746         PR c++/9474
4747         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
4748         to merge old and new declarations.
4749
4750 2003-03-12  Alexandre Oliva  <aoliva@redhat.com>
4751
4752         * g++.1: Remove.
4753         * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
4754         (cp/g++.1): Build it from scratch in the build tree.
4755         (c++.install-man): Depend on it.  Install it from the build tree.
4756         (c++.mostlyclean): Clean it.
4757
4758 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
4759
4760         PR c++/9474
4761         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
4762         to merge old and new declarations.
4763
4764         PR c++/9924
4765         * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
4766
4767 2003-03-11  Jason Merrill  <jason@redhat.com>
4768
4769         PR c++/9820
4770         * search.c (lookup_member): Fix handling of functions in a class
4771         being defined.
4772
4773 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
4774
4775         PR c++/8700
4776         * call.c (convert_class_to_reference): Adjust usage of
4777         splice_viable.
4778         (any_viable): Remove.
4779         (splice_viable): Combine with any_viable.
4780         (print_z_candidates): Avoid printing duplicates.
4781         (build_user_type_conversion_1): Adjust usage of splice_viable.
4782         (build_new_function_call): Likewise.
4783         (build_operator_new_call): Likewise.
4784         (build_object_call): Likewise.
4785         (build_conditional_expr): Likewise.
4786         (build_new_op): Likewise.
4787         (build_new_method_call): Likewise.
4788         (joust): Remove spurious comment.
4789         * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
4790         * decl2.c (arg_assoc_class): Simplify.
4791         * friend.c (add_friend): Likewise.
4792
4793 2003-03-11  Jason Merrill  <jason@redhat.com>
4794
4795         PR c++/8660
4796         * decl2.c (check_classfn): A member template only matches a
4797         member template.
4798
4799 2003-03-11  Neil Booth  <neil@daikokuya.co.uk>
4800
4801         * Make-lang.in (CXX_C_OBJS): Update.
4802         * lang-specs.h: Don't define __GNUG__ here.
4803
4804 2003-03-10  Mark Mitchell  <mark@codesourcery.com>
4805
4806         * call.c (perform_overload_resolution): New function.
4807         (build_new_function_call): Use it.
4808         (build_operator_new_call): Likewise.
4809         (add_candidates): Add explicit_targs and template_only parameters.
4810         (build_new_op): Adjust accordingly.
4811         * cp-tree.h (build_operator_new_call): New function.
4812         (build_function_call_real): Remove.
4813         (build_function_call_maybe): Likewise.
4814         * init.c (build_new_1): Use build_operator_new_call.
4815         * typeck.c (build_function_call_real): Rename to ...
4816         (build_function_call): ... this.
4817
4818 2003-03-10  Devang Patel  <dpatel@apple.com>
4819
4820         PR c++/9394
4821         * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
4822
4823 2003-03-10  Jason Merrill  <jason@redhat.com>
4824
4825         PR c++/9798
4826         * decl.c (push_using_directive): Push before recursing.
4827
4828         PR c++/9868, c++/9524
4829         * call.c (resolve_scoped_fn_name): Handle the case of a function
4830         pointer member.
4831
4832         * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
4833         argument in the pointer-to-member case.
4834
4835 2003-03-09  Mark Mitchell  <mark@codesourcery.com>
4836
4837         PR c++/9373
4838         * cp-lang.c (cxx_get_alias_set): Use alias set zero for
4839         pointers to member functions.
4840
4841         PR c++/8534
4842         * decl.c (build_ptrmemfunc_type): Do not allow default arugments
4843         in pointer-to-member-function types.
4844
4845 2003-03-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4846
4847         * expr.c (cplus_expand_constant): Use C90 prototype style.
4848         (cxx_expand_expr): Likewise.
4849
4850 2003-03-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4851
4852         PR c++/9970
4853         * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
4854         functions.
4855
4856 2003-03-08  Geoffrey Keating  <geoffk@apple.com>
4857
4858         * lang-specs.h (c++-header): Change .pch to .gch.
4859
4860 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
4861
4862         * cp-tree.h (cxx_init): Update prototype.
4863         * lex.c (cxx_init): Similarly.
4864
4865 2003-03-08  Mark Mitchell  <mark@codesourcery.com>
4866
4867         PR c++/9823
4868         * cp-tree.h (begin_mem_initializers): Remove.
4869         * parser.c (cp_parser_mem_initializer_list): Inline it here.
4870         Do not call finish_mem_initializers if not in a constructor.
4871         (cp_parser_class_head): Fix typo in error message.
4872         * semantics.c (begin_mem_initializers): Remove.
4873         * testsuite/g++.dg/parser/constructor1.C: New test.
4874
4875         PR c++/9809
4876         * call.c (add_function_candidate): Skip builtin fuctions that have
4877         not yet been declared.
4878
4879         PR c++/9982
4880         * init.c (build_new_1): Correct logic for determining whether or
4881         not to use an array cookie.
4882
4883         PR c++/9524
4884         * parser.c (cp_parser_postfix_expression): Call
4885         finish_non_static_data_member, even when processing_template_decl.
4886
4887         PR c++/9912
4888         * cp-tree.h (is_ancestor): New function.
4889         (handle_class_head): Change prototype.
4890         * decl2.c (is_namespace_ancestor): Rename to ...
4891         (namespace_anecestor): ... this.
4892         (set_decl_namespace): Adjust accordingly.
4893         (handle_class_head): Remove unnecessary parameters.
4894         * parser.c (cp_parser_class_head): Check that
4895         nested-name-specifiers are used appropriately.
4896
4897 2003-03-07  Mark Mitchell  <mark@codesourcery.com>
4898
4899         * call.c (reference_binding): Remove REF_IS_VAR parameter.
4900         (implicit_conversion): Adjust call to reference_binding.
4901         (make_temporary_var_for_ref_to_type): Add TYPE parameter.
4902         (initialize_reference): Adjust handling for references bound to
4903         rvalues.
4904         * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
4905         prototype.
4906         (real_non_cast_lvalue_p): New method.
4907         * cvt.c (build_up_reference): Adjust use of
4908         make_temporary_var_for_ref_to_temp.
4909         * tree.c (real_non_cast_lvalue_p): New method.
4910
4911 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4912
4913         * except.c (init_exception_processing): Use C90 prototype style.
4914         (cp_protect_cleanup_actions): Likewise.
4915         (prepare_eh_type): Likewise.
4916         (build_eh_type_type): Likewise.
4917         (build_exc_ptr): Likewise.
4918         (do_begin_catch): Likewise.
4919         (dtor_nothrow): Likewise.
4920         (do_end_catch): Likewise.
4921         (push_eh_cleanup): Likewise.
4922         (decl_is_java_type): Likewise.
4923         (choose_personality_routine): Likewise.
4924         (initialize_handler_parm): Likewise.
4925         (expand_start_catch_block): Likewise.
4926         (expand_end_catch_block): Likewise.
4927         (begin_eh_spec_block): Likewise.
4928         (finish_eh_spec_block): Likewise.
4929         (do_allocate_exception): Likewise.
4930         (do_free_exception): Likewise.
4931         (wrap_cleanups_r): Likewise.
4932         (stabilize_throw_expr): Likewise.
4933         (build_throw): Likewise.
4934         (complete_ptr_ref_or_void_ptr_p): Likewise.
4935         (is_admissible_throw_operand): Likewise.
4936         (nothrow_libfn_p): Likewise.
4937         (can_convert_eh): Likewise.
4938         (check_handlers_1): Likewise.
4939         (check_handlers): Likewise.
4940
4941 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
4942
4943         * call.c (merge_conversion_sequences): New function.
4944         (build_conv): Set ICS_USER_FLAG for USER_CONVs.
4945         (convert_class_to_reference): Correct handling of second
4946         standard conversion sequence in a user-defined conversion
4947         sequence.
4948         (build_user_type_conversion_1): Use merge_conversion_sequences.
4949         * cp-tree.def: Add comments for CONV nodes.
4950         * rtti.c (get_tinfo_decl): Use build_address/build_nop.
4951
4952 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4953
4954         * error.c (init_error): Use C90 prototype style.
4955         (dump_scope): Likewise.
4956         (dump_qualifiers): Likewise.
4957         (dump_template_argument): Likewise.
4958         (dump_template_argument_list): Likewise.
4959         (dump_template_parameter): Likewise.
4960         (dump_template_bindings): Likewise.
4961         (dump_type): Likewise.
4962         (dump_typename): Likewise.
4963         (class_key_or_enum): Likewise.
4964         (dump_aggr_type): Likewise.
4965         (dump_type_prefix): Likewise.
4966         (dump_type_suffix): Likewise.
4967         (dump_global_iord): Likewise.
4968         (dump_simple_decl): Likewise.
4969         (dump_decl): Likewise.
4970         (dump_template_decl): Likewise.
4971         (dump_function_decl): Likewise.
4972         (dump_parameters): Likewise.
4973         (dump_exception_spec): Likewise.
4974         (dump_function_name): Likewise.
4975         (dump_template_parms): Likewise.
4976         (dump_char): Likewise.
4977         (dump_expr_list): Likewise.
4978         (dump_expr): Likewise.
4979         (dump_binary_op): Likewise.
4980         (dump_unary_op): Likewise.
4981         (type_as_string): Likewise.
4982         (expr_as_string): Likewise.
4983         (decl_as_string): Likewise.
4984         (context_as_string): Likewise.
4985         (lang_decl_name): Likewise.
4986         (cp_file_of): Likewise.
4987         (cp_line_of): Likewise.
4988         (decl_to_string): Likewise.
4989         (expr_to_string): Likewise.
4990         (fndecl_to_string): Likewise.
4991         (code_to_string): Likewise.
4992         (language_to_string): Likewise.
4993         (parm_to_string): Likewise.
4994         (op_to_string): Likewise.
4995         (type_to_string): Likewise.
4996         (assop_to_string): Likewise.
4997         (args_to_string): Likewise.
4998         (cv_to_string): Likewise.
4999         (cxx_print_error_function): Likewise.
5000         (cp_diagnostic_starter): Likewise.
5001         (cp_diagnostic_finalizer): Likewise.
5002         (cp_print_error_function): Likewise.
5003         (function_category): Likewise.
5004         (print_instantiation_full_context): Likewise.
5005         (print_instantiation_partial_context): Likewise.
5006         (maybe_print_instantiation_context): Likewise.
5007         (print_instantiation_context): Likewise.
5008         (cp_printer): Likewise.
5009         (print_integer): Likewise.
5010         (print_non_consecutive_character): Likewise.
5011         (locate_error): Likewise.
5012
5013 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
5014
5015         PR c++/9965
5016         * call.c (reference_binding): Add ref_is_var parameter.
5017         (implicit_conversion): Adjust call to reference_binding.
5018         (initialize_reference): Likewise.
5019
5020         PR c++/9400
5021         * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
5022         PARM_DECLs.
5023
5024         PR c++/9791
5025         * class.c (get_basefndecls): Use lookup_fnfields_1.
5026
5027 2003-03-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5028
5029         PR c++/9188
5030         * parser.c (cp_parser_type_parameter): Remove redundant `expect'
5031         in error message.
5032         (cp_parser_single_declaration): Likewise.
5033
5034 2003-03-05  Jason Merrill  <jason@redhat.com>
5035
5036         PR c++/9440
5037         * call.c (build_conditional_expr): Use convert rather than an
5038         explicit NOP_EXPR.
5039
5040 2003-03-02  Matt Austern  <austern@apple.com>
5041
5042         * decl.c (cp_binding_level): Add static_decls varray member.
5043         (add_decl_to_level): Add static/inline namespace scope
5044         declarations to static_decls array.
5045         (wrapup_global_for_namespace): Pass static_decls only, instead of
5046         all decls, to wrapup_global_declarations/check_global_declarations.
5047         (push_namespace): Initialize static_decls for ordinary namespaces.
5048         (cxx_init_decl_processing): Initialize static_decls for global
5049         namespace.
5050
5051 2003-03-05  Mark Mitchell  <mark@codesourcery.com>
5052
5053         * class.c (end_of_class): Correct thinko.
5054
5055 2003-03-04  Nathanael Nerode  <neroden@gcc.gnu.org>
5056
5057         * config-lang.in: Replace ${libstdcxx_version} by its value.
5058
5059 2003-03-04  Gabriel Dos Reis <gdr@integrable-solutions.net>
5060
5061         * cp-tree.h (cxx_saved_binding): Declare.
5062         (struct saved_scope): Adjust type of field 'old_binding'.
5063         * decl.c (cxx_saved_binding_make): New macro.
5064         (struct cxx_saved_binding): Define.
5065         (store_bindings): Adjust prototype.  Use cxx_saved_binding to save
5066         C++ bindings.
5067         (maybe_push_to_top_level): Adjust local variable type.
5068         (pop_from_top_level): Likewise.
5069
5070 2003-03-04  Tom Tromey  <tromey@redhat.com>
5071
5072         * Make-lang.in (c++.tags): New target.
5073
5074 2003-03-04  Neil Booth  <neil@daikokuya.co.uk>
5075
5076         * Make-lang.in: Update.
5077
5078 2003-03-03  Jason Merrill  <jason@redhat.com>
5079
5080         * decl.c (finish_enum): Do set the type in a template. Simplify.
5081         * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
5082
5083 2003-03-03  Mark Mitchell  <mark@codesourcery.com>
5084
5085         PR c++/9878
5086         * call.c (convert_class_to_reference): Correct conversion
5087         sequences.
5088         (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
5089         (implicit_conversion): Adjust call to reference_binding.
5090         (add_candidate): Change type of candidates parameter.
5091         (add_function_candidate): Likewise.
5092         (add_conv_candidate): Likewise.
5093         (build_builtin_candidate): Likewise.
5094         (add_builtin_candidate): Likewise.
5095         (add_builtin_candidates): Likewise.
5096         (add_template_candidate_real): Likewise.
5097         (add_template_candidate): Likewise.
5098         (add_template_conv_candidate): Likewise.
5099         (build_user_type_conversion_1): Adjust accordingly.
5100         (build_object_call): Likewise.
5101         (build_conditional_expr): Likewise.
5102         (add_candidates): Likewise.
5103         (build_new_op): Likewise.
5104         (convert_like_real): Use USER_CONV_CAND.  Use build_nop.
5105         (build_new_method_call): Adjust calls to add_function_candidate.
5106         (make_temporary_var_for_ref_to_temp): New function.
5107         (initialize_reference): Add decl parameter.
5108         * class.c (build_rtti_vtbl_entries): Use build_address and
5109         build_nop.
5110         * cp-tree.h (initialize_reference): Change prototype.
5111         (make_temporary_var_for_ref_to_temp): New function.
5112         (build_type_conversion): Change prototype.
5113         (build_address): New function.
5114         (build_nop): Likewise.
5115         * cvt.c (cp_convert_to_pointer): Adjust call to
5116         build_type_conversion.  Avoid indicating redundant NOP_EXPRs.
5117         Use build_nop.
5118         (convert_to_pointer_force): Use build_nop.
5119         (build_up_reference): Use make_temporary_var_for_ref_to_temp.
5120         (convert_to_reference): Adjust call to build_type_conversion.
5121         (ocp_convert): Likewise.
5122         (build_type_conversion): Remove for_sure parameter.
5123         * decl.c (grok_reference_init): Use initialize_reference.
5124         * typeck.c (build_address): New function.
5125         (build_nop): Likewise.
5126         (build_unary_op): Use them.
5127         (build_ptrmemfunc): Tidy slightly.
5128         (convert_for_initialization): Adjust call to
5129         initialize_reference.
5130         * typeck2.c (store_init_value): Remove #if 0'd code.
5131
5132 2003-03-03  Jason Merrill  <jason@redhat.com>
5133
5134         * decl.c (start_function): Clear DECL_NUM_STMTS.
5135
5136         * class.c (get_vtable_decl): Use vtbl_type_node.
5137         (build_primary_vtable): Check for it.
5138
5139 2003-03-02  Aldy Hernandez  <aldyh@redhat.com>
5140
5141         * decl.c (check_initializer): Check for vector_opaque_p.
5142
5143 2003-03-02  Ashif Harji  <asharji@uwaterloo.ca>
5144
5145         * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
5146           invoke an external cpp during compilation.
5147
5148 2003-03-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5149
5150         * decl.c (duplicate_decls): Convert use of warning_with_decl() to
5151         that of warning().
5152         (start_decl): Likewise.
5153         (start_function): Likewise.
5154
5155 2003-03-01  Neil Booth  <neil@daikokuya.co.uk>
5156
5157         * Make-lang.in (CXX_C_OBJS): Update.
5158
5159 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
5160
5161         PR c++/9892
5162         * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
5163         instantiating it.
5164
5165 2003-02-28  Aldy Hernandez  <aldyh@redhat.com>
5166
5167         * parser.c (cp_parser_init_declarator): Revert opaque
5168         vector_opaque_p change.
5169         Do not include target.h.
5170
5171 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
5172
5173         PR c++/9879
5174         * cp-tree.h (build_zero_init): Add parameter.
5175         * decl.c (cp_finish_decl): Adjust call.
5176         * init.c (build_zero_init): Add nelts parameter.  Adjust recursive
5177         calls.
5178         (build_default_init): Add nelts parameter.  Adjust calls to
5179         build_zero_init.
5180         (build_new_1): Adjust call to build_default_init.
5181         * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
5182
5183 2003-02-26  Devang Patel  <dpatel@apple.com>
5184
5185         * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
5186         required.  Postpone enum setting for template decls.
5187         (build_enumerator): Delay copying value node until finish_enum
5188         (). Remove #if 0'ed code.
5189         * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
5190         (tsubst_copy): Add check for enum type.
5191
5192 2003-02-25  Mark Mitchell  <mark@codesourcery.com>
5193
5194         PR c++/9683
5195         * decl2.c (prune_vars_needing_no_initialization): Do not throw
5196         away initializations for DECL_EXTERNAL VAR_DECLs.
5197         (finish_file): Adjust accordingly.
5198         * pt.c (instantiate_decl): Do not defer VAR_DECLs.
5199
5200 2003-02-24 Gabriel Dos Reis  <gdr@integrable-solutions.net>
5201
5202         * decl.c (add_binding): Time TV_NAME_LOOKUP.
5203         (push_class_binding): Likewise.
5204         (set_namespace_binding): Likewise.
5205
5206 2003-02-24  Mark Mitchell  <mark@codesourcery.com>
5207
5208         PR c++/9836
5209         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
5210         specializations back to the main template.
5211         * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
5212         * pt.c (resolve_typename_type): Likewise.
5213
5214 2003-02-24  Jeffrey D. Oldham  <oldham@codesourcery.com>
5215
5216         PR c++/9778
5217         * pt.c (tsubst_copy_and_build): For a templated function inside a
5218         scope, process template arguments.
5219
5220 2003-02-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5221
5222         PR c++/9602
5223         * typeck2.c (abstract_virtuals_error): Don't check when
5224         TYPE is still template parameter dependent.
5225
5226 2003-02-23  Mark Mitchell  <mark@codesourcery.com>
5227
5228         PR c++/5333
5229         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
5230         * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
5231         * pt.c (instantiate_class_template): Don't try to instantiate
5232         dependent types.
5233         (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
5234
5235 2003-02-21  Mark Mitchell  <mark@codesourcery.com>
5236
5237         PR c++/9749
5238         * decl.c (grokdeclarator): Do not allow parameters with variably
5239         modified types.
5240
5241 2003-02-21  Nathan Sidwell  <nathan@codesourcery.com>
5242
5243         * search.c (grow_bfs_bases): Remove. Fold into ...
5244         (bfs_walk): ... here, fix fencepost error. Fix merge lossage
5245         in previous patch.
5246
5247 2003-02-20  Mark Mitchell  <mark@codesourcery.com>
5248
5249         PR c++/9729
5250         * mangle.c (mangle_conv_op_name_for_type): Issue an error message
5251         when the G++ 3.2 ABI prevents correct compilation.
5252
5253 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
5254
5255         Change base class access representation. Share virtual base
5256         binfos.
5257         * cp/call.c (build_special_member_call): Remove binfo_for_vbase
5258         call.
5259         * cp/class.c (build_base_path): Likewise.
5260         (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
5261         (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
5262         (make_new_vtable): Adjust.
5263         (force_canonical_binfo_r): Delete.
5264         (force_canonical_binfo): Delete.
5265         (mark_primary_virtual_base): Delete.
5266         (dfs_unshared_virtual_bases): Delete.
5267         (mark_primary_bases): Adjust.
5268         (maybe_warn_about_overly_private_class): Adjust.
5269         (dfs_base_derived_from): Delete.
5270         (base_derived_from): Follow the inheritance chain.
5271         (struct find_final_overrider_data): Add vpath member.
5272         (dfs_find_final_overrider): Adjust.
5273         (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
5274         (find_final_overrider): Adjust.
5275         (update_vtable_entry_for_fn): Adjust.
5276         (modify_all_vtables): Adjust.
5277         (walk_subobject_offsets): Adjust.
5278         (layout_nonempty_base_or_field): Adjust.
5279         (layout_empty_base): Remove last parameter. Adjust.
5280         (build_base_field): Adjust.
5281         (build_base_fields): Adjust.
5282         (propagate_binfo_offsets): Remove last parameter. Adjust.
5283         (dfs_set_offset_for_unshared_vbases): Delete.
5284         (layout_virtual_bases): Adjust.
5285         (finish_struct_1): Adjust.
5286         (init_class_processing): Don't init access nodes.
5287         (dfs_get_primary_binfo): Delete.
5288         (get_primary_binfo): Adjust.
5289         (dump_class_hierarchy_r): Remove most derived arg, add IGO
5290         parameter. Adjust.
5291         (dump_class_hierarchy): Adjust.
5292         (finish_vtbls): Adjust.
5293         (get_original_base): Delete.
5294         (build_vtt_inits): Adjust.
5295         (dfs_build_secondary_vptr_vtt_inits): Adjust.
5296         (dfs_ctor_vtable_bases_queue_p): Adjust.
5297         (build_ctor_vtbl_group): Adjust.
5298         (dfs_accumulate_vtbl_inits): Adjust.
5299         (build_vtbl_initializer): Adjust.
5300         (build_vbase_offset_vtbl_entries): Adjust.
5301         (add_vcall_offset_vtbl_entries_1): Adjust.
5302         * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
5303         (access_*_node): Remove.
5304         (CANONICAL_BINFO): Delete.
5305         (BINFO_UNSHARED_MARKED): Remove.
5306         (BINFO_MARKED): Set LANG_FLAG_0 directly.
5307         (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
5308         (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
5309         (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
5310         Delete.
5311         (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
5312         (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
5313         (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
5314         Delete.
5315         (BINFO_DEPENDENT_BASE_P): New.
5316         (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
5317         index.
5318         (markedp, unmarkedp): Adjust.
5319         (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
5320         dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
5321         find_vbase_instance, binfo_for_vbase): Delete.
5322         (copied_binfo, original_binfo): Declare.
5323         (finish_base_specifier): Add virtual_p arg.
5324         (unshare_base_binfos): Delete.
5325         (copy_base_binfos): Declare.
5326         (reverse_path): Delete.
5327         * cp/decl.c (xref_basetypes): Access and virtuality passed
5328         differently. Don't copy direct base binfos here. Call
5329         copy_base_binfos.
5330         * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
5331         (initialize_vtbl_ptrs): Adjust.
5332         (expand_member_init): Adjust.
5333         * cp/parser.c (cp_parser_base_specifier): Adjust.
5334         * cp/pt.c (instantiate_class_template): Adjust.
5335         (get_template_base_recursive): Adjust.
5336         * cp/rtti.c (get_pseudo_ti_init): Adjust.
5337         (get_pseudo_ti_desc): Adjust.
5338         * cp/tree.c (unshare_base_binfos): Rename to ...
5339         (copy_base_binfos): ... here, reimplement.
5340         (make_binfo): Set BINFO_DEPENDENT_BASE_P.
5341         (reverse_path): Remove.
5342         * cp/typeck.c (get_delta_difference): Adjust error messages.
5343         * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
5344         * cp/search.c (lookup_base_r): Adjust.
5345         (dynamic_cast_base_recurse): Adjust.
5346         (canonical_binfo): Remove.
5347         (dfs_canonical_queue): Remove.
5348         (dfs_assert_unmarked_p): Remove.
5349         (assert_canonical_unmarked): Remove.
5350         (shared_marked_p, shared_unmarked_p): Remove.
5351         (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
5352         (dfs_access_in_type): Adjust.
5353         (access_in_type): Adjust.
5354         (dfs_accessible_queue_p): Adjust.
5355         (dfs_accessible_p): Adjust.
5356         (is_subobject_of_p_1, is_subobject_of_p): Remove.
5357         (struct lookup_field_info): Remove from_dep_base_p field.
5358         (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
5359         (lookup_field_r): Remove dependent base code.
5360         (lookup_member): Likewise.
5361         (dfs_walk, dfs_walk_real): Add access arg to queue fn.
5362         (dfs_unmarked_real_bases_queue_p): Remove.
5363         (dfs_marked_real_bases_queue_p): Remove.
5364         (dfs_skip_vbases): Remove.
5365         (dfs_get_pure_virtuals): Adjust.
5366         (markedp, unmarkedp): Adjust.
5367         (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
5368         (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
5369         (dfs_unmark): Adjust.
5370         (dfs_get_vbase_types):Remove.
5371         (dfs_build_inheritance_graph_order): Remove.
5372         (get_vbase_types): Remove
5373         (dfs_find_vbase_instance): Remove.
5374         (find_vbase_instance): Remove.
5375         (dfs_debug_unmarkedp): Adjust.
5376         (dependent_base_p): Remove.
5377         (dfs_push_type_decls): Adjust.
5378         (dfs_push_decls): Adjust.
5379         (dfs_no_overlap_yet): Adjust.
5380         (copied_binfo): New function.
5381         (original_binfo): New function.
5382         (binfo_for_vbase): Remove.
5383
5384 2003-02-18  Zack Weinberg  <zack@codesourcery.com>
5385
5386         * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
5387         (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
5388         vectors, for speed.
5389
5390 2003-02-18  Mark Mitchell  <mark@codesourcery.com>
5391
5392         PR c++/9704
5393         * class.c (layout_class_type): In the 3.2 ABI, take into account
5394         trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
5395
5396 2003-02-18  Matt Austern <austern@apple.com>
5397
5398         * cp/cp-lang.c: Change lang hooks so that final_write_globals does
5399         nothing for C++.
5400         * cp/decl.c (wrapup_globals_for_namespace): Remove special
5401         handling of global namespace.
5402
5403 2003-02-18  Geoffrey Keating  <geoffk@apple.com>
5404
5405         * cp-tree.h (rid_to_yy): Delete.
5406         (C_RID_YYCODE): Delete.
5407         (finish_file): Delete redundant declaration.
5408
5409 2003-02-18  Jason Merrill  <jason@redhat.com>
5410
5411         PR c++/9623
5412         * decl.c (reshape_init): Don't mess with initializer labels.
5413
5414         PR c++/9485
5415         * parser.c (cp_parser_postfix_expression): Set idk properly for
5416         object->scope::member.
5417
5418 2003-02-18  Ben Elliston  <bje@redhat.com>
5419
5420         PR other/7350
5421         * decl.c (duplicate_decls): Fix typo in comment.
5422
5423 2003-02-17  Michael Elizabeth Chastain <mec@shout.net>
5424
5425         PR debug/9717
5426         * class.c (build_base_field): Mark fields for base classes with
5427         DECL_IGNORED_P.
5428
5429 2003-02-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5430
5431         PR c++/9457
5432         * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
5433         CONSTRUCTOR_ELTS only once.
5434
5435 2003-02-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5436
5437         PR c++/9459
5438         * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
5439         (dump_type_suffix): Likewise.
5440
5441 2003-02-14  Nathan Sidwell  <nathan@codesourcery.com>
5442
5443         * search.c: ANSIfy function declarations and definitions.
5444         * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
5445         * call.c (build_method_call, resolve_scoped_fn_name,
5446         build_java_interface_fn_ref): Adjust lookup_field, lookup_member
5447         calls.
5448         * class.c (handle_using_decl): Likewise.
5449         * decl.c (make_typename_type, make_unmound_class_template,
5450         start_decl, compute_array_index_type): Likewise.
5451         * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
5452         * init.c (expand_member_init, build_member_call): Likewise.
5453         * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
5454         resolve_typename_type): Likewise.
5455         * typeck.c (lookup_destructor, finish_class_member_access_exprm
5456         build_prememfunc_access_expr): Likewise.
5457
5458 2003-02-13  Gabriel Dos Reis <gdr@integrable-solutions.net>
5459
5460         * decl2.c: Include "timevar.h".
5461         (namespace_ancestor): Time name lookup.
5462         (add_using_namespace): Likewise.
5463         (lookup_using_namespace): Likewise.
5464         (qualified_lookup_using_namespace): Likewise.
5465         (decl_namespace): Likewise.
5466         (lookup_arg_dependent): Likewise.
5467         * lex.c (do_identifier): Likewise.
5468         (do_scoped_id): Likewise.
5469         * pt.c (lookup_template_class): Likewise.
5470
5471 2003-02-14   Andrew Pinski <pinskia@physics.uc.edu>
5472
5473         * decl.c: (define_label): Fix warning for return 0 instead of NULL.
5474
5475 2003-02-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5476
5477         * decl.c: Include "timevar.h".
5478         (poplevel): Time name lookup.
5479         (find_binding): Likewise.
5480         (push_namespace): Likewise.
5481         (pop_nested_namespace): Likewise.
5482         (store_bindings): Likewise.
5483         (maybe_push_to_top_level): Likewise.
5484         (pop_from_top_level): Likewise.
5485         (push_local_name): Likewise.
5486         (pushtag): Likewise.
5487         (pushdecl): Likewise.
5488         (pushdecl_with_scope): Likewise.
5489         (pushdecl_namespace_level): Likewise.
5490         (pushdecl_top_level): Likewise.
5491         (pushdecl_class_level): Likewise.
5492         (push_class_level_binding): Likewise.
5493         (push_using_decl): Likewise.
5494         (push_using_directive): Likewise.
5495         (push_overloaded_decl): Likewise.
5496         (lookup_label): Likewise.
5497         (define_label): Likewise.
5498         (lookup_tag): Likewise.
5499         (lookup_tag_reverse): Likewise.
5500         (lookup_namespace_name): Likewise.
5501         (select_decl): Likewise.
5502         (unqualified_namespace_lookup): Likewise.
5503         (lookup_name_real): Likewise.
5504         (lookup_name_current_level): Likewise.
5505         (lookup_type_current_level): Likewise.
5506         (maybe_inject_for_scope_var): Likewise.
5507         (xref_tag): Likewise.
5508
5509         * Make-lang.in (cp/decl.o): Add dependency on timevar.h
5510
5511 2003-02-12  Phil Edwards  <pme@gcc.gnu.org>
5512
5513         * decl.c (build_enumerator):  Remove unneeded test.
5514
5515 2003-02-09  Dan Nicolaescu  <dann@ics.uci.edu>
5516
5517         * cp-tree.h (struct lang_type_header): Make all fields unsigned
5518         char.
5519
5520 2003-02-03  Mark Mitchell  <mark@codesourcery.com>
5521
5522         PR c++/7129
5523         * call.c (z_candidate): Add args.
5524         (convert_class_to_reference): Set it.
5525         (implicit_conversion): Tidy.
5526         (add_candidate): Add args parameter.
5527         (add_function_candidate): Adjust call to add_candidate.
5528         (add_conv_candidate): Likewise.
5529         (build_builtin_candidate): Likewise.
5530         (build_user_type_conversion_1): Eliminate wasteful tree_cons
5531         usage.
5532         (build_new_function_call): Likewise.
5533         (build_object_call): Likewise.
5534         (add_candidates): New function.
5535         (build_new_op): Use it.
5536         (covert_like_real): Adjust call to build_over_call.
5537         (build_over_call): Remove args parameter.
5538         * operators.def: Add <?= and >?=.
5539
5540 2003-02-01  Richard Sandiford  <rsandifo@redhat.com>
5541
5542         * typeck.c (build_indirect_ref): Don't check flag_volatile.
5543
5544 2003-01-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5545
5546         PR c++/8849
5547         * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
5548
5549 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
5550
5551         * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
5552         BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
5553         (BINFO_LANG_ELTS): New #define.
5554         * tree.c (make_binfo): Use BINFO_LANG_ELTS.
5555
5556 2003-01-30  Geoffrey Keating  <geoffk@apple.com>
5557
5558         * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
5559
5560 2003-01-30  Mark Mitchell  <mark@codesourcery.com>
5561
5562         * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
5563         for class types.
5564         * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
5565         rather than TYPE_LANG_FLAG_0.
5566         (TYPE_BUILT_IN): Remove.
5567         (TYPE_DEPENDENT_P): New macro.
5568         (TYPE_DEPENDENT_P_VALID): Likewise.
5569         (lang_type_class): Add fields_readonly.
5570         * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
5571         * pt.c (dependent_type_p_r): New function, split out from ...
5572         (dependent_type_p): ... here.  Memoize results.
5573         * search.c (dependent_base_p): Use dependent_type_p, not
5574         uses_template_parms.
5575         * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
5576         for class types.
5577
5578 2003-01-29  Mark Mitchell  <mark@codesourcery.com>
5579
5580         * call.c (build_field_call): Use build_new_op, not build_opfncall.
5581         (prep_operand): New function.
5582         (build_new_op): Use it.  Remove dead code.
5583         * class.c (pushclass): Change "modify" parameter type from int to
5584         bool.
5585         (currently_open_class): Use same_type_p, not pointer equality.
5586         (push_nested_class): Adjust calls to pushclass, remove modify
5587         parameter.
5588         * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
5589         (pushclass): Change prototype.
5590         (push_nested_class): Likewise.
5591         (grokoptypename): Remove.
5592         (build_opfncall): Remove.
5593         (value_dependent_expression_p): Declare.
5594         (resolve_typename_type): Likewise.
5595         (resolve_typename_type_in_current_instantiation): Likewise.
5596         (enter_scope_of): Remove.
5597         (tsubst): Remove.
5598         (tsubst_expr): Likewise.
5599         (tsubst_copy): Likewise.
5600         (tsubst_copy_and_build): Likewise.
5601         * decl.c (warn_about_implicit_typename_lookup): Remove.
5602         (finish_case_label): Return error_mark_node for erroneous labels.
5603         (start_decl): Adjust calls to push_nested_class.
5604         (grokfndecl): Call push_scope/pop_scope around call to
5605         duplicate_decls.
5606         (grokdeclarator): Do not call tsubst.
5607         (start_function): Adjust calls to push_nested_class.
5608         * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
5609         (check_classfn): Use push_scope/pop_scope around type comparisions.
5610         (grokoptypename): Remove.
5611         (push_sscope): Adjust call to push_nested_class.
5612         * error.c (dump_type): Show cv-qualification of typename types.
5613         * init.c (build_member_call): Use build_new_op, not
5614         build_opfncall.
5615         * method.c (build_opfncall): Remove.
5616         * parser.c (cp_parser): Add allow_non_constant_expression_p and
5617         non_constant_expression_p.
5618         (cp_parser_constant_expression): Adjust prototype.
5619         (cp_parser_resolve_typename_type): Remove.
5620         (cp_parser_non_constant_expression): New function.
5621         (cp_parser_non_constant_id_expression): Likewise.
5622         (cp_parser_new): Set allow_non_constant_expression_p and
5623         non_constant_expression_p.
5624         (cp_parser_primary_expression): Reject `this' and `va_arg' in
5625         constant-expressions.  Note that dependent names aren't really
5626         constant.
5627         (cp_parser_postfix_expression): Reject conversions to non-integral
5628         types in constant-expressions.  Neither are increments or
5629         decrements.
5630         (cp_parser_unary_expression): Reject increments and decrements in
5631         constant-expressions.
5632         (cp_parser_direct_new_declarator): Adjust call to
5633         cp_parser_constant_expression.
5634         (cp_parser_cast_expression): Reject conversions to non-integral
5635         types in constant-expressions.
5636         (cp_parser_assignment_expression): Rejects assignments in
5637         constant-expressions.
5638         (cp_parser_expression): Reject commas in constant-expressions.
5639         (cp_parser_labeled_statement): Adjust call to
5640         cp_parser_constant_expression.
5641         (cp_parser_direct_declarator): Simplify array bounds, even in
5642         templates, when they are non-dependent.  Use
5643         resolve_typename_type, not cp_parser_resolve_typename_type.
5644         (cp_parser_class_head): Use resolve_typename_type, not
5645         cp_parser_resolve_typename_type.
5646         (cp_parser_member_declaration): Adjust call to
5647         cp_parser_constant_expression.
5648         (cp_parser_constant_initializer): Likewise.
5649         (cp_parser_constructor_declarator): Use resolve_typename_type, not
5650         cp_parser_resolve_typename_type.
5651         (cp_parser_late_parsing_default_args): Adjust call to
5652         push_nested_class.
5653         * pt.c (tsubst): Give it internal linkage.
5654         (tsubst_expr): Likewise.
5655         (tsubst_copy): Likewise.
5656         (tsubst_copy_and_build): Likewise.
5657         (push_access_scope_real): Likewise.
5658         (tsubst_friend_class): Likewise.
5659         (instantiate_class_template): Adjust call to pushclass.
5660         (value_dependent_expression_p): Give it external linkage.
5661         Robustify.
5662         (resolve_typename_type): New function.
5663         * semantics.c (finish_call_expr): Use build_new_op, not
5664         build_opfncall.
5665         (begin_constructor_declarator): Remove.
5666         (begin_class_definition): Adjust call to pushclass.
5667         (enter_scope_of): Remove.
5668         * typeck.c (comptypes): Resolve typename types as appropriate.
5669         (build_x_indirect_ref): Use build_new_op, not build_opfncall.
5670         (build_x_compound_expr): Likewise.
5671         (build_modify_expr): Likewise.
5672         (build_x_modify_expr): Likewise.
5673         * typeck2.c (build_x_arrow): Likewise.
5674
5675 2003-01-29  Fariborz Jahanian  <fjahanian@apple.com>
5676
5677         * pt.c (last_pending_template) Declare GTY().
5678
5679 2003-01-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5680
5681         PR c++/8591
5682         * parser.c (cp_parser_elaborated_type_specifier): Convert
5683         TEMPLATE_DECL to TYPE_DECL only when processing template friends.
5684         (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
5685
5686 2003-01-28  Nathan Sidwell  <nathan@codesourcery.com>
5687
5688         PR c++/9437
5689         * pt.c (unify): Don't unify '*T' with 'U C::*'.
5690
5691         PR c++/3902
5692         * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
5693         inside a declarator.
5694
5695 2003-01-27  Nathan Sidwell  <nathan@codesourcery.com>
5696
5697         * class.c (update_vtable_entry_for_fn): Add index parameter.
5698         Generate vcall thunk for covariant overriding from a virtual
5699         primary base.
5700         (dfs_modify_vtables): Adjust.
5701
5702 2003-01-25  Nathan Sidwell  <nathan@codesourcery.com>
5703
5704         PR c++/9403
5705         * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
5706         template keyword.
5707         (cp_parser_base_specifier): Look for and consume a
5708         TEMPLATE keyword. Replace switch with array index.
5709
5710         PR c++/795
5711         * semantics.c (finish_non_static_data_member): Remember the
5712         field's type even in a template.
5713
5714         PR c++/9415
5715         * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
5716         already scoped.
5717
5718         PR c++/8545
5719         * parser.c (cp_parser_cast_expression): Be more tentative.
5720
5721 2003-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5722
5723         * cp-tree.h (flagged_type_tree_s): Remove.
5724         (check_for_new_type): Likewise.
5725         * typeck2.c (check_for_new_type): Likewise.
5726
5727 2003-01-23  Nathanael Nerode  <neroden@gcc.gnu.org>
5728
5729         * dump.c: ANSIfy function declarations and definitions.
5730
5731         * cp-tree.h, decl.h: Get rid of PARAMS.  Again.
5732
5733 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
5734
5735         PR c++/9354
5736         * init.c (build_new): Set the type of the new-expression, even
5737         when processing_templte_decl.
5738
5739         PR c++/9216
5740         * parser.c (cp_parser_primary_expression): Improve error message
5741         for templates used in an expression context.
5742
5743         PR c++/8696
5744         * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
5745         parse when encountering "typedef".
5746
5747 2003-01-22  Nathanael Nerode  <neroden@gcc.gnu.org>
5748
5749         * class.c, parser.c: ANSIfy function definitions and declarations.
5750
5751 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
5752
5753         PR c++/9328
5754         * error.c (dump_decl): For an OVERLOAD, just print the name of the
5755         function; it doesn't make sense to try to print its type.
5756         * semantics.c (finish_typeof): Issue errors about invalid uses.
5757
5758         PR c++/9298
5759         * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
5760         function.
5761         (cp_parser_expression_statement): Use it.
5762         (cp_parser_explicit_instantiation): Likewise.
5763         * pt.c (do_decl_instantiation): Improve error handling logic.
5764
5765 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
5766
5767         PR c++/9384
5768         * parser.c (cp_parser_using_declaration): Issue error messages
5769         about name resolution failures here.
5770
5771         PR c++/9388
5772         * class.c (currently_open_derived_class): Use dependent_type_p.
5773         * cp-tree.h (dependent_type_p): New function.
5774         (dependent_template_arg_p): Likewise.
5775         (dependent_template_p): Likewise.
5776         (type_dependent_expression_p): Likewise.
5777         * parser.c (cp_parser_dependent_type_p): Remove.
5778         (cp_parser_value_dependent_type_p): Likewise.
5779         (cp_parser_type_dependent_expression_p): Likewise.
5780         (cp_parser_dependent_template_arg_p): Likewise.
5781         (cp_parser_dependent_template_id_p): Likewise.
5782         (cp_parser_dependent_template_p): Likewise.
5783         (cp_parser_diagnose_invalid_type_name): Replace
5784         cp_parser_dependent_type_p with dependent_type_p, etc.
5785         (cp_parser_primary_expresion): Likewise.
5786         (cp_parser_nested_name_specifier_opt): Likewise.
5787         (cp_parser_postfix_expression): Likewise.
5788         (cp_parser_unary_expression): Likewise.
5789         (cp_parser_template_name): Likewise.
5790         (cp_parser_class_name): Likewise.
5791         (cp_parser_lookup_name): Likewise.
5792         * pt.c (dependent_type_p): New function.
5793         (value_dependent_expression_p): Likewise.
5794         (type_dependent_expression_p): Likewise.
5795         (dependent_template_arg_p): Likewise.
5796         (dependent_template_id_p): Likewise.
5797         (dependent_template_p): Likewise.
5798
5799         PR c++/9285
5800         PR c++/9294
5801         * parser.c (cp_parser_simple_declaration): Return quickly when
5802         encountering errors.
5803
5804 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5805
5806         Make-lang.in (cp/decl.o-warn): Add -Wno-error.
5807
5808 2003-01-17  Jason Merrill  <jason@redhat.com>
5809
5810         PR c++/9167, c++/9358
5811         * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
5812
5813 2003-01-17  Jason Merrill  <jason@redhat.com>
5814
5815         PR c++/9342
5816         * call.c (build_conditional_expr): Always do lvalue-rvalue
5817         conversion.
5818
5819 2003-01-17  Mark Mitchell  <mark@codesourcery.com>
5820
5821         PR c++/9294
5822         * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
5823         * cp-tree.h (BASELINK_BINFO): Adjust.
5824         (BASELINK_FUNCTIONS): Likewise.
5825         (BASELINK_ACCESS_BINFO): Likewise.
5826         (tree_baselink): New structure.
5827         (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
5828         (lang_tree_node): Add baselink.
5829         * decl.c (cp_tree_node_structure): Add BASELINK case.
5830         * search.c (build_baselink): Adjust.
5831         * tree.c (cp_walk_subtrees): Add BASELINK case.  Remove BASELINK_P
5832         test from TREE_LIST case.
5833
5834         PR c++/9272
5835         * parser.c (cp_parser_constructor_declarator_p): Do not assume
5836         that a constructor cannot be declared outside of its own class.
5837
5838         * parser.c (cp_parser_resolve_typename_type): If the scope cannot
5839         be resolved, neither can the qualified name.
5840
5841         * rtti.c (get_pseudo_ti_desc): Fix thinko.
5842
5843 2003-01-16  Jason Merrill  <jason@redhat.com>
5844
5845         PR c++/8564
5846         * init.c (build_vec_init): Re-add maxindex parm.
5847         (perform_member_init, build_aggr_init): Pass it.
5848         (build_new_1): Pass it. Use an incomplete array type for full_type.
5849         * typeck.c (build_modify_expr): Pass it.
5850         * cp-tree.h: Adjust.
5851
5852 2003-01-16  Jeffrey D. Oldham  <oldham@codesourcery.com>
5853
5854         * cp-tree.h (tsubst_copy_and_build): New declaration.
5855         * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
5856         (tsubst_expr): Use 'tsubst_copy_and_build'.  Update initial comment.
5857         (tsubst_copy_and_build): New function.
5858
5859 2003-01-16  Mark Mitchell  <mark@codesourcery.com>
5860
5861         * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
5862         (PARTIAL_INSTANTIATION_P): Remove.
5863         (IMPLICIT_TYPENAME_P): Likewise.
5864         (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
5865         (build_typename_type): Remove declaration.
5866         (parmlist_is_exprlist): Likewise.
5867         * decl.c (build_typename_type): Make it static, remove third
5868         parameter.
5869         (push_class_binding): Don't do implicit typename stuff.
5870         (make_typename_type): Likewise.
5871         (lookup_name_real): Likewise.
5872         (grokdeclarator): Don't try to convert declarations into
5873         initializations.  Don't do implicit typename stuff.
5874         (parmlist_is_exprlist): Remove.
5875         (xref_basetypes): Simplify.
5876         * decl2.c (grokfield): Don't try to convert declarations into
5877         initializations.
5878         (build_anon_union_vars): Do this while processing templates, too.
5879         (finish_anon_union): Likewise.
5880         * error.c (dump_type): Remove implicit typename handling.
5881         * parser.c (cp_parser_diagnose_invalid_type_name): New method.
5882         (cp_parser_primary_expression): Correct handling of names not
5883         found by unqualified name lookup in templates.
5884         (cp_parser_nested_name_specifier_opt): Avoid checking dependency
5885         of types when possible.
5886         (cp_parser_simple_declaration): Complain intelligently about some
5887         invalid declarations.
5888         (cp_parser_member_declaration): Likewise.
5889         (cp_parser_constructor_declarator_p): Don't check when we're in a
5890         function scope.
5891         * pt.c (instantiate_class_template): Remove
5892         PARTIAL_INSTANTIATION_P gunk.
5893         * search.c (lookup_field_r): Don't build implicit typenames.
5894         (marked_pushdecls_p): Don't enter dependent base types.
5895         (unmarked_pushdecls_p): Likewise.
5896         * semantics.c (begin_class_definition): Remove implicit typename
5897         stuff.
5898
5899 2003-01-16  Nathan Sidwell  <nathan@codesourcery.com>
5900
5901         PR c++/9212
5902         * parser.c (cp_parser_direct_declarator): If accepting either
5903         abstract or named, the name must be an unqualified-id.
5904
5905 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5906
5907         * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
5908
5909 2003-01-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5910
5911         * decl2.c (check_classfn): Fix uninitialized warning.
5912         (build_anon_union_vars): Likewise.
5913         * pt.c (tsubst_copy): Likewise.
5914
5915 2003-01-14  Jeffrey D. Oldham  <oldham@codesourcery.com>
5916
5917         Further conform g++'s __vmi_class_type_info to the C++ ABI
5918         specification.
5919         * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
5920         the specification.
5921         (class_hint_flags): Likewise.
5922
5923 2003-01-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5924
5925         * config-lang.in: Add semantics.c to gtfiles.
5926         * cp-tree.h (flagged_type_tree_s): Remove lookups field.
5927         (saved_scope): Likewise.
5928         (type_lookups): Remove.
5929         (deferred_access): New structure.
5930         (type_access_control): Remove.
5931         (save_type_access_control): Likewise.
5932         (reset_type_access_control): Likewise.
5933         (decl_type_access_control): Likewise.
5934         (push_deferring_access_checks): Declare.
5935         (resume_deferring_access_checks): Likewise.
5936         (stop_deferring_access_checks): Likewise.
5937         (pop_deferring_access_checks): Likewise.
5938         (get_deferred_access_checks): Likewise.
5939         (pop_to_parent_deferring_access_checks): Likewise.
5940         (perform_deferred_access_checks): Likewise.
5941         (perform_or_defer_access_check): Likewise.
5942         * decl.c (make_typename_type): Use perform_or_defer_access_check.
5943         (make_unbound_class_template): Likewise.
5944         (grokdeclarator): Don't call decl_type_access_control.
5945         * parser.c (cp_parser_context): Remove deferred_access_checks
5946         and deferring_access_checks_p fields.
5947         (cp_parser_context_new): Adjust.
5948         (cp_parser): Remove access_checks_lists.
5949         (cp_parser_defer_access_check): Remove.
5950         (cp_parser_start_deferring_access_checks): Remove.
5951         (cp_parser_stop_deferring_access_checks): Remove.
5952         (cp_parser_perform_deferred_access_checks): Remove.
5953         (cp_parser_nested_name_specifier_opt): Use new deferred access
5954         functions.
5955         (cp_parser_simple_declaration): Likewise.
5956         (cp_parser_template_id): Likewise.
5957         (cp_parser_function_definition): Likewise.
5958         (cp_parser_class_specifier): Likewise.
5959         (cp_parser_lookup_name): Likewise.
5960         (cp_parser_single_declaration): Likewise.
5961         (cp_parser_pre_parsed_nested_name_specifier): Likewise.
5962         (cp_parser_parse_tentatively): Likewise.
5963         (cp_parser_parse_definitely): Likewise.
5964         (yyparse): Likewise.
5965         (cp_parser_init_declarator): Remove access_checks parameter.
5966         Use new deferred access functions.
5967         (cp_parser_function_definition_from_specifiers_and_declarator):
5968         Likewise.
5969         (cp_parser_class_head): Remove deferring_access_checks_p and
5970         saved_access_checks parameters.  Use new deferred access functions.
5971         (cp_parser_member_specification_opt): Don't call
5972         reset_type_access_control.
5973         * search.c (type_access_control): Remove.
5974         * semantics.c: Include "gt-cp-semantics.h".
5975         (deferred_type_access_control): Remove.
5976         (deferred_access_stack): New variable.
5977         (deferred_access_free_list): Likewise.
5978         (push_deferring_access_checks): New function.
5979         (resume_deferring_access_checks): Likewise.
5980         (stop_deferring_access_checks): Likewise.
5981         (pop_deferring_access_checks): Likewise.
5982         (get_deferred_access_checks): Likewise.
5983         (pop_to_parent_deferring_access_checks): Likewise.
5984         (perform_deferred_access_checks): New function, adapted from
5985         cp_parser_perform_deferred_access_checks.
5986         (perform_or_defer_access_check): New function, adapted from
5987         cp_parser_defer_access_check.
5988         (current_type_lookups): Remove.
5989         (deferred_type_access_control): Likewise.
5990         (decl_type_access_control): Likewise.
5991         (save_type_access_control): Likewise.
5992         (reset_type_access_control): Likewise.
5993         (begin_function_definition): Adjust.
5994         (begin_class_definiton): Likewise.
5995
5996 2003-01-13  Jason Merrill  <jason@redhat.com>
5997
5998         PR c++/8748
5999         * class.c (build_base_path): Take the address before calling save_expr.
6000
6001         * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
6002         all the ambiguous conversions are bad.
6003
6004         * class.c (maybe_warn_about_overly_private_class): Don't stop
6005         searching when we find a nonprivate method.
6006
6007         * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
6008
6009 2003-01-12  Mark Mitchell  <mark@codesourcery.com>
6010
6011         * cp-tree.h (get_arglist_len_in_bytes): Remove.
6012
6013         PR c++/9264
6014         * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
6015         typeame types more robustly.
6016
6017 2003-01-11  Phil Edwards  <pme@gcc.gnu.org>
6018
6019         * parser.c:  Fix comment typos.
6020
6021 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
6022
6023         PR c++/9099
6024         * parser.c (cp_parser_scope_through_which_access_occurs): Handle
6025         an object_type which is not a class type.
6026
6027 2003-01-10  Geoffrey Keating  <geoffk@apple.com>
6028
6029         * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
6030         (cp_parser_late_parsing_default_args): Likewise.
6031
6032 2003-01-10  Nathanael Nerode  <neroden@gcc.gnu.org>
6033
6034         * cfns.gperf: ANSIfy function declarations.
6035         * cfns.h: Regenerate.
6036         * cp-tree.h: ANSIfy function declarations.
6037
6038 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
6039
6040         * cp-tree.h (reparse_absdcl_as_expr): Remove.
6041         (reparse_absdcl_as_casts): Likewise.
6042         (reparse_decl_as_expr): Likewise.
6043         (finish_decl_parsing): Likewise.
6044         * decl2.c (reparse_absdcl_as_expr): Remove.
6045         (reparse_absdcl_as_casts): Likewise.
6046         (repase_decl_as_expr): Likewise.
6047         (finish_decl_parsing): Likewise.
6048
6049         PR c++/9128
6050         PR c++/9153
6051         PR c++/9171
6052         * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
6053         function.
6054         (cp_parser_nested_name_specifier_opt): Correct the
6055         check_dependency_p false.
6056         (cp_parser_postfix_expression): Fix formatting.
6057         (cp_parser_decl_specifier_seq): Avoid looking for constructor
6058         declarators when possible.
6059         (cp_parser_template_id): Avoid performing name-lookup when
6060         possible.
6061         (cp_parser_class_head): Do not count specializations when counting
6062         levels of templates.
6063         (cp_parser_constructor_declarator_p): Return immediately if
6064         there's no chance that the tokens form a constructor declarator.
6065         * rtti.c (throw_bad_typeid): Add comment.  Do not return an
6066         expression with reference type.
6067         (get_tinfo_decl_dynamic): Do not return an expression with
6068         reference type.
6069         (build_typeid): Add comment.  Do not return an expression with
6070         reference type.
6071         * typeck.c (build_class_member_access_expr): Improve handling of
6072         conditionals and comma-expressions as objects.
6073
6074 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
6075
6076         * cfns.gperf: ANSIfy function declarations.
6077         * cfns.h: Regenerate.
6078         * cp-tree.h: ANSIfy function declarations.
6079         * parser.c: ANSIfy function declarations & definitions.
6080
6081         * decl.c (bad_specifiers): Fix parameter order error I introduced.
6082
6083 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
6084
6085         Merge from pch-branch:
6086
6087         2003-01-09  Geoffrey Keating  <geoffk@apple.com>
6088
6089         Merge to tag pch-merge-20030102:
6090
6091         * semantics.c (finish_translation_unit): Don't call finish_file.
6092         * parser.c: Don't include ggc.h.
6093         (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
6094         read first token here.  Don't allow PCH files after the first
6095         token is read.
6096         (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
6097         (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
6098         (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
6099         (cp_parser_late_parsing_for_member): Don't duplicate call to
6100         cp_lexer_set_source_position_from_token.
6101         (cp_parser_late_parsing_default_args): Likewise.
6102         (yyparse): Call finish_file after clearing the_parser.
6103
6104         2002-12-11  Geoffrey Keating  <geoffk@apple.com>
6105
6106         * Make-lang.in: Remove $(GGC_H) from all dependencies.
6107         (CXX_TREE_H): Add $(GGC_H).
6108         * class.c: Don't include ggc.h.
6109         (field_decl_cmp): Make parameters be 'const void *' to match qsort.
6110         (method_name_cmp): Likewise.
6111         (resort_data): New variable.
6112         (resort_field_decl_cmp): New.
6113         (resort_method_name_cmp): New.
6114         (resort_sorted_fields): New.
6115         (resort_type_method_vec): New.
6116         (finish_struct_methods): Delete cast.
6117         (finish_struct_1): Delete cast.
6118         * cp-tree.h: Include ggc.h.
6119         (struct lang_type_class): Add reorder attribute to field `methods'.
6120         (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
6121         (resort_sorted_fields): New prototype.
6122         (resort_type_method_vec): New prototype.
6123         * call.c: Don't include ggc.h.
6124         * decl.c: Likewise.
6125         * decl2.c: Likewise.
6126         * init.c: Likewise.
6127         * lex.c: Likewise.
6128         * method.c: Likewise.
6129         * optimize.c: Likewise.
6130         * parse.y: Likewise.
6131         * pt.c: Likewise.
6132         * repo.c: Likewise.
6133         * search.c: Likewise.
6134         * semantics.c: Likewise.
6135         * spew.c: Likewise.
6136         * tree.c: Likewise.
6137
6138         * lang-specs.h: Remove comment.
6139
6140         2002-12-03  Geoffrey Keating  <geoffk@apple.com>
6141
6142         * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
6143         (operator_name_info): Mark to be saved for PCH, specify size.
6144         (assignment_operator_name_info): Likewise.
6145
6146         2002-11-19  Geoffrey Keating  <geoffk@apple.com>
6147
6148         * decl.c (anon_cnt): Mark to be saved for PCH.
6149
6150         2002-10-25  Geoffrey Keating  <geoffk@apple.com>
6151
6152         * lex.c  (init_reswords): Delete now-untrue comment.
6153         Allocate ridpointers using GGC.
6154
6155         2002-10-04  Geoffrey Keating  <geoffk@apple.com>
6156
6157         * cp-tree.h (union lang_decl_u2): Add tags to all fields.
6158
6159         * g++spec.c (lang_specific_driver): Don't include standard
6160         libraries in `added'.
6161
6162         2002-08-27  Geoffrey Keating  <geoffk@redhat.com>
6163
6164         * decl2.c (finish_file): Call c_common_write_pch.
6165         * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
6166
6167         2002-08-17  Geoffrey Keating  <geoffk@redhat.com>
6168
6169         * g++spec.c (lang_specific_driver): Treat .h files as C++ header
6170         files when using g++.
6171         * lang-specs.h: Handle compiling C++ header files.
6172
6173 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
6174
6175         * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
6176
6177 2003-01-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6178
6179         * pt.c (push_access_scope_real): Call push_to_top_level for
6180         function in namespace scope.
6181         (pop_access_scope): Call pop_from_top_level for function in
6182         namespace scope.
6183
6184 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
6185
6186         * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
6187
6188 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
6189
6190         * Make-lang.in (c++.install-common, c++.install-man,
6191         c++.uninstall): Prepend $(DESTDIR) to destination paths in
6192         all (un)installation commands.
6193         (c++.install-common): Rewrite $(LN) commands to support
6194         DESTDIR with "ln" as well as with "ln -s".
6195
6196 2003-01-08  Jason Merrill  <jason@redhat.com>
6197
6198         * parser.c (cp_parser_primary_expression): See through explicitly
6199         scoped ALIAS_DECLs, too.
6200
6201 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
6202
6203         * decl.c: Remove some #if 0 code.
6204
6205         * decl.c: ANSIfy function declarations.
6206
6207 2003-01-07  Mark Mitchell  <mark@codesourcery.com>
6208
6209         * parser.c (cp_parser_asm_definition): Correct handling of omitted
6210         operands.
6211
6212 2003-01-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6213
6214         PR c++/9030
6215         * decl.c (make_typename_type): Check access only when tf_error.
6216         (make_unbound_class_template): Likewise.
6217         * pt.c (saved_access_scope): New variable.
6218         (push_access_scope_real): New function.
6219         (push_access_scope): Likewise.
6220         (pop_access_scope): Likewise.
6221         (tsubst_default_argument): Use them.
6222         (instantiate_template): Likewise.
6223         (regenerate_decl_from_template): Likewise.
6224         (instantiate_decl): Likewise.
6225         (get_mostly_instantiated_function_type): Likewise.
6226
6227 2003-01-07  Nathanael Nerode <neroden@gcc.gnu.org>
6228
6229         * tree.c: Delete bogus #if 0 code.
6230
6231 2003-01-07  Andreas Schwab  <schwab@suse.de>
6232
6233         * class.c (layout_class_type): Don't use
6234         PCC_BITFIELD_TYPE_MATTERS if not defined.
6235
6236 2003-01-06  Mark Mitchell  <mark@codesourcery.com>
6237
6238         PR c++/9165
6239         * decl2.c (build_cleanup): Mark the object as used.
6240
6241         * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
6242         (hash_local_specialization): New function.
6243         (register_local_specialization): Revert 2003-01-05 change.
6244         (instantiate_decl): Use hash_local_specialization when creating
6245         the local_specializations table.
6246
6247         * decl2.c (mark_used): Do not synthesize thunks.
6248
6249         * class.c (layout_class_type): Correct handling of unnamed
6250         bitfields wider than their types.
6251
6252         PR c++/9189
6253         * parser.c (cp_parser): Remove default_arg_types.  Update
6254         documentation for unparsed_functions_queues.
6255         (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
6256         parameter.
6257         (cp_parser_new): Don't set parser->default_arg_types.
6258         (cp_parser_function_definition): Adjust usage of
6259         unparsed_funtions_queues.
6260         (cp_parser_class_specifier): Don't mess with
6261         parser->default_arg_types.  Handle default argument processing in
6262         a separate phase from function body processing.
6263         (cp_parser_template_declaration_after_export): Adjust usage of
6264         unparsed_functions_queues.
6265         (cp_parser_late_parsing_for_member): Do not handle default
6266         arguments.
6267
6268 2003-01-06  Nathan Sidwell  <nathan@codesourcery.com>
6269
6270         PR c++/9109
6271         * parser.c (cp_parser_declarator_kind): New enum.
6272         (cp_parser_declarator): Adjust.
6273         (cp_parser_direct_declarator): Adjust. Allow for either named or
6274         abstract declarator. Prefer abstract, if possible. Allow
6275         parenthesized function name.
6276         (cp_parser_condition): Adjust cp_parser_declarator call.
6277         (cp_parser_explicit_instantiation): Likewise.
6278         (cp_parser_init_declarator): Likewise.
6279         (cp_parser_type_id): Likewise.
6280         (cp_parser_function_definition): Likewise.
6281         (cp_parser_member_declaration): Likewise.
6282         (cp_parser_parameter_declaration): Use cp_parser_declarator to do
6283         the tentative parsing.
6284         (cp_parser_exception_declaration): Likewise.
6285
6286 2003-01-05  Mark Mitchell  <mark@codesourcery.com>
6287
6288         * parser.c (cp_parser_template_parameter): Adjust call to
6289         cp_parser_parameter_declaration.
6290         (cp_parser_parameter_declaration_list): Likewise.
6291         (cp_parser_parameter_declaration): Replace
6292         greater_than_is_operator_p with template_parm_p parameter.  Do not
6293         cache tokens for template default arguments.
6294
6295         * pt.c (retrieve_local_specialization): Use htab_find, not
6296         htab_find_with_hash.
6297         (register_local_specialization): Use htab_find_slot, not
6298         htab_find_slot_with_hash.
6299         (instantiate_decl): Pass a hash function to htab_create.
6300
6301 2003-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6302
6303         * parser.c (cp_parser_binary_expression,
6304         cp_parser_multiplicative_expression,
6305         cp_parser_additive_expression, cp_parser_shift_expression,
6306         cp_parser_relational_expression, cp_parser_equality_expression,
6307         cp_parser_and_expression, cp_parser_exclusive_or_expression,
6308         cp_parser_inclusive_or_expression,
6309         cp_parser_logical_and_expression, cp_parser_logical_or_expression,
6310         cp_parser_binary_expression): Const-ify.
6311
6312 2003-01-04  Mark Mitchell  <mark@codesourcery.com>
6313
6314         * method.c (use_thunk): Disable access control while building the
6315         body of the thunk.
6316
6317 2003-01-03  Nathanael Nerode  <neroden@gcc.gnu.org>
6318
6319         * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
6320         front end.
6321
6322 2003-01-03  Matt Austern  <austern@apple.com>
6323
6324         * cp-tree.h (struct lang_type_class): add field for key method
6325         (cp_global_trees): rename dynamic_classes to keyed_classes
6326         (key_method): add definition
6327         * class.c (finish_struct_1): compute class's key method, and add
6328         the class to keyed_classes list if there is no key method.
6329         * decl.c (finish_function): add class to keyed_classes list if we
6330         see a definition of the class's key method.
6331         * pt.c (instantiate_class_template): add template specialization
6332         of a dynamic class to keyed_classes list.
6333         * decl2.c (key_method): remove
6334         (finish_file): iterate only through keyed_classes list when
6335         deciding whether to emit vtables, remove class from its list after
6336         we do the emission.
6337
6338 2003-01-02  Jason Merrill  <jason@redhat.com>
6339
6340         * call.c (build_conditional_expr): Stabilize lvalues properly.
6341         * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
6342         * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
6343         Don't allow CALL_EXPR or VA_ARG_EXPR, either.
6344
6345         * call.c (convert_like_real): Call decl_constant_value for an
6346         IDENTITY_CONV even if there are no more conversions.
6347
6348         * cvt.c (build_up_reference): Don't push unnamed temps.
6349
6350         * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
6351
6352         * dump.c (cp_dump_tree): Don't try to dump class-specific fields
6353         for a backend struct.
6354
6355         * except.c (wrap_cleanups_r, build_throw): Make
6356         MUST_NOT_THROW_EXPRs void.
6357         * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
6358
6359         * init.c (build_vec_delete_1): Pre-evaluate the base address.
6360
6361         * init.c (get_temp_regvar): Simplify logic.
6362
6363         * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
6364         our replacement is a decl.
6365
6366         * decl.c (cp_make_fname_decl): Push the decls inside the
6367         outermost scope.
6368
6369 2003-01-03  Nathan Sidwell  <nathan@codesourcery.com>
6370
6371         PR c++/45, c++/3784
6372         * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
6373         the same too.
6374
6375 2003-01-03  Graham Stott  <graham.stott@btinternet.com>
6376
6377         * parser.c (struct cp_parser): Add access_checks_lists field
6378         (cp_parser_simple_declaration): Use.
6379         (cp_parser_init_declarator): Likewise.
6380
6381 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
6382
6383         * parser.c (cp_parser_declaration): Accept the __extension__
6384         keyword before the declaration.
6385
6386         PR c++/2843
6387         * parser.c (cp_parser_parameter_declaration): Allow attributes to
6388         appear after the declarator.
6389
6390         * call.c (build_new_method_call): Fix typo in message format
6391         string.
6392
6393 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
6394
6395         * parser.c (cp_lexer_next_token_is): Declare it inline.
6396         (cp_lexer_set_source_position_from_token): Likewise.
6397         (cp_lexer_debugging_p): Likewise.
6398         (cp_parser_parsing_tentatively): Likewise.
6399         (cp_parser_nested_name_specifier_opt): Reduce the number of calls
6400         to the cp_lexer_peek_token.
6401
6402         * parser.c (cp_parser_sizeof_operand): Do not evaluate the
6403         expression.
6404
6405 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
6406
6407         * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
6408         cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
6409         cp/repo.c: Fix copyright years.
6410
6411 2003-01-01  Neil Booth  <neil@daikokuya.co.uk>
6412
6413         * lex.c: Remove superfluous include of cpplib.h.
6414         (CONSTRAINT): Define without conditions.
6415         (init_cp_pragma): Use c_register_pragma.
6416
6417 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
6418
6419         * .cvsignore: Remove.
6420
6421 2002-12-31  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6422
6423         * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
6424           except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
6425           lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
6426           pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
6427           typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
6428           copyright header.
6429         * lex.h: parse.y is dead, so don't mention it.  Also replace the
6430           copyright header with the default GNU copyright header.
6431
6432 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
6433
6434         * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
6435         (lookup_name_namespace_only): Likewise.
6436         (begin_only_namespace_names): Likewise.
6437         (end_only_namespace_names): Likewise.
6438         * decl.c (only_namespace_names): Remove.
6439         (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
6440         (lookup_name_real): Do not check only_namespace_names.
6441         (lookup_name_namespace_only): Remove.
6442         (begin_only_namespace_names): Likewise.
6443         (end_only_namespace_names): Likewise.
6444         * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
6445         nested-name-specifiers more gracefully.
6446         (cp_parser_class_or_namespace_name): Avoid looking up namespace
6447         names when they cannot possibly appear.
6448         (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
6449         (cp_parser_elaborated_type_specifier): Likewise.
6450         (cp_parser_namespace_name): Only look for namespace names.
6451         (cp_parser_lookup_name): Add is_namespace parameter.
6452         (cp_parser_lookup_name_simple): Adjust call to
6453         cp_parser_lookup_name.
6454
6455         * parser.c (cp_parser_dependent_type_p): Fix thinko.
6456
6457 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
6458
6459         * .cvsignore: Update.
6460
6461 2002-12-31  Nathan Sidwell  <nathan@codesourcery.com>
6462
6463         * class.c (modify_vtable_entry): Remove unused variable.
6464         (get_vcall_index): Always expect a non-thunk.
6465         (update_vtable_entry_for_fn): Combine covariant adjustments, when
6466         overriding a thunk. Pass get_vcall_index a non-thunk.
6467
6468         * decl2.c (finish_file): Mark undefined inlines as extern.
6469
6470 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
6471
6472         * cp-tree.def (RETURN_INIT): Remove.
6473         * cp-tree.h (DECL_IN_MEMORY_P): Remove.
6474         (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
6475         (note_level_for_for): Remove.
6476         (note_level_for_try): Likewise.
6477         (note_level_for_catch): Likewise.
6478         (finish_named_return_value): Likewise.
6479         (do_pushlevel): Change prototype.
6480         (pending_lang_change): Remove.
6481         * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
6482         sk_for.
6483         (note_level_for_for): Remove.
6484         (note_level_for_try): Likewise.
6485         (note_level_for_catch): Likewise.
6486         (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
6487         * parser.c (cp_parser_context_free_list): Make it "deletable".
6488         (cp_parser_template_argument): Remove misleading comment.
6489         * pt.c (tsubst_expr): Remove RETURN_INIT code.
6490         * semantics.c (genrtl_named_return_value): Remove.
6491         (do_pushlevel): Take a scope kind as an argument.
6492         (begin_if_stmt): Adjust.
6493         (begin_while_stmt): Likewise.
6494         (begin_for_stmt): Likewise.
6495         (finish_for_init_stmt): Likewise.
6496         (begin_switch_stmt): Likewise.
6497         (begin_handler): Likewise.
6498         (begin_compound_stmt): Likewise.
6499         (finish_named_return_value): Remove.
6500         (cp_expand_stmt): Remove RETURN_INIT case.
6501         * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
6502
6503 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
6504
6505         PR c++/9112
6506         * parser.c (cp_parser_direct_declarator): Handle erroneous
6507         parenthesized declarators correctly.
6508
6509 2002-12-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6510
6511         * cp-tree.h (pending_lang_change): Declare.
6512
6513 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
6514
6515         * parser.c (cp_parser_context_free_list): New variable.
6516         (cp_parser_context_new): Use it.
6517         (cp_parser_error): Check return code from
6518         cp_parser_simulate_error.
6519         (cp_parser_simulate_error): Return a value.
6520         (cp_parser_id_expression): Optimize common case.
6521         (cp_parser_class_name): Likewise.
6522         (cp_parser_class_specifier): Adjust call to
6523         cp_parser_late_parsing_default_args.
6524         (cp_parser_lookup_name): Optimize common case.
6525         (cp_parser_late_parsing_for_member): Adjust call to
6526         cp_parser_late_parsing_default_args.
6527         (cp_parser_late_parsing_default_args): Add scope parameter.
6528         (cp_parser_require): Avoid creating the error message unless it's
6529         needed.
6530         (cp_parser_parse_definitely): Place free'd contexts on the free
6531         list.
6532
6533         * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
6534
6535 2002-12-30  David Edelsohn  <edelsohn@gnu.org>
6536
6537         * parser.c (cp_parser_parameter_declaration_clause): Treat system
6538         header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
6539
6540 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
6541
6542         * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
6543         GCC, not GNU CC.
6544
6545 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
6546
6547         * parse.y: Remove.
6548         * spew.c: Likewise.
6549         * Make-lang.in (gt-cp-spew.h): Remove.
6550         * cp-tree.h (do_pending_lang_change): Remove.
6551         (do_identifier): Change prototype.
6552         (finish_id_expr): Remove.
6553         * decl.c (lookup_name_real): Remove yylex variable.
6554         * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
6555         * lex.c (init_cpp_parse): Remove.
6556         (reduce_cmp): Likewise.
6557         (token_cmp): Likewise.
6558         (yychar): Likewise.
6559         (lastiddecl): Likewise.
6560         (token_count): Likewise.
6561         (reduce_count): Likewise.
6562         (yyhook): Likewise.
6563         (print_parse_statistics): Likewise.
6564         (do_pending_lang_change): Likewise.
6565         (do_identifier): Remove parsing parameter.
6566         * lex.h (lastiddecl): Remove.
6567         (looking_for_typename): Remove.
6568         (looking_for_template): Likewise.
6569         (pending_lang_change): Likewise.
6570         (yylex): Likewise.
6571         * semantics.c (finish_id_expr): Remove.
6572
6573         * decl.c (grokdeclarator): Diagnost "extern thread" and "static
6574         thread" correctly.
6575
6576 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
6577
6578         * decl.c, decl2.c, decl.h:  GCC, not GNU CC.  This is the C++ front
6579         end, not the C front end.
6580
6581 2002-12-30  Nathan Sidwell  <nathan@codesourcery.com>
6582
6583         * cp-tree.h (THUNK_TARGET): New macro.
6584         (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
6585         (finish_thunk): Remove offset parms.
6586         * class.c (find_final_overrider): Look through thunks.
6587         (get_vcall_index): Use THUNK_TARGET.
6588         (update_vtable_entry_for_fn): Look through thunks. Set covariant
6589         fixed offset here. Adjust finish_thunk call.
6590         (build_vtbl_initializer): Adjust finish_thunk calls.
6591         * mangle.c (mangle_call_offset): Remove superfluous if.
6592         (mangle_thunk): Adjust.
6593         * method.c (make_thunk): Adjust.
6594         (finish_thunk): Adjust.
6595         (thunk_adjust): Remove assert.
6596         (use_thunk): Use THUNK_TARGET
6597         * dump1.c (cp_dump_tree): Adjust thunk dumping.
6598
6599         PR c++/9054
6600         * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
6601         * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
6602
6603 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6604
6605         Remove traditional C constructs 4/n.
6606         * decl2.c (grok_method_quals, warn_if_unknown_interface,
6607         grok_x_components, cp_build_parm_decl, build_artificial_parm,
6608         maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
6609         delete_sanity, check_member_template, check_java_method,
6610         check_classfn, finish_static_data_member_decl, grokfield,
6611         grokbitfield, grokoptypename, grok_function_init,
6612         cplus_decl_attributes, constructor_name, defer_fn,
6613         build_anon_union_vars, finish_anon_union, coerce_new_type,
6614         coerce_delete_type, comdat_linkage, maybe_make_one_only,
6615         key_method, import_export_vtable, import_export_class,
6616         output_vtable_inherit, import_export_decl, import_export_tinfo,
6617         build_cleanup, get_guard, get_guard_bits, get_guard_cond,
6618         set_guard, start_objects, finish_objects,
6619         start_static_storage_duration_function,
6620         finish_static_storage_duration_function, get_priority_info,
6621         start_static_initialization_or_destruction,
6622         finish_static_initialization_or_destruction,
6623         do_static_initialization, do_static_destruction,
6624         prune_vars_needing_no_initialization, write_out_vars,
6625         reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
6626         add_using_namespace, merge_functions, ambiguous_decl,
6627         lookup_using_namespace, lookup_using_namespace,
6628         qualified_lookup_using_namespace, set_decl_namespace,
6629         decl_namespace, current_decl_namespace, push_decl_namespace,
6630         pop_decl_namespace, push_scope, pop_scope, add_function,
6631         arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
6632         lookup_arg_dependent, do_namespace_alias,
6633         validate_nonmember_using_decl, do_nonmember_using_decl,
6634         do_toplevel_using_decl, do_local_using_decl,
6635         do_class_using_decl, do_using_directive, check_default_args,
6636         mark_used, handle_class_head): Use C90 prototypings.  Use booleans.
6637         * parser.c (cp_parser_class_head): Use booleanss.
6638         * decl.c (walk_globals, walk_vtables): Likewise.
6639         * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
6640         walk_globals): Change return type from 'int' to 'bool'.
6641         * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
6642         throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
6643         build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
6644         get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
6645         qualifier_flags, tinfo_base_init, generic_initializer,
6646         ptr_initializer, dfs_class_hint_mark, ptm_initializer,
6647         dfs_class_hint_unmark, class_hint_flags, class_initializer,
6648         typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
6649         get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
6650         unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
6651         * repo.c (repo_compile_flags, repo_template_declared,
6652         repo_template_defined, repo_class_defined, repo_get_id,
6653         repo_template_used, repo_vtable_used, repo_inline_used,
6654         repo_tinfo_used, repo_template_instantiated, extract_string,
6655         open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
6656         finish_repo): Likewise.
6657         * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
6658         cxx_print_xnode): Likewise..
6659         * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
6660         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
6661         * cxxfilt.c (demangle_it, print_demangler_list, usage,
6662         standard_symbol_characters, hp_symbol_characters, main, fatal):
6663         Likewise.
6664         (strip_underscore):  Change type from 'int' to 'bool'.
6665         (main): Use boolean constants.
6666
6667 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6668
6669         Remove traditional C constructs 3/n.
6670         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
6671         build_up_reference, warn_ref_binding, convert_to_reference,
6672         convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
6673         convert_to_void, convert, convert_force, build_type_conversion,
6674         build_expr_type_conversion, type_promotes_to,
6675         perform_qualification_conversions): Use C90 prototyping style.
6676         * decl2.c (grok_array_decl): Use boolean constant.
6677         (delete_sanity): Likewise.
6678         * typeck.c (build_unary_op): Likewise.
6679         * semantics.c (finish_switch_cond): Likewise.
6680         * parser.c (cp_parser_direct_new_declarator): Likewise.
6681         * init.c (build_new): Likewise.
6682
6683 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
6684
6685         * Make-lang.in (po-generated): Remove parse.c.
6686         (CXX_OBJS): Remove parse.o and spew.o.  Add parser.o.
6687         ($(srcdir)/cp/parse.h): Remove target.
6688         ($(srcdir)/cp/parse.c): Likewise.
6689         (gt-cp-parse.h): Likewise.
6690         (gt-cp-parser.h): New target.
6691         (c++.distclean): Do not remove parse.output.
6692         (c++.maintainer-clean): Do not remove parse.c or parse.h.
6693         (cp/spew.o): Remove target.
6694         (cp/lex.o): Adjust dependencies.
6695         (cp/pt.o): Likewise.
6696         (cp/parse.o): Likewise.
6697         (cp/TAGS): Do not mention parse.c.
6698         (cp/parser.o): New target.
6699         * NEWS: Mention the new parser.
6700         * call.c (build_scoped_method_call): Simplify.
6701         (build_method_call): Likewise.
6702         (build_new_function_call): Adjust calls to add_function_candidate
6703         and add_template_candidate.
6704         (build_new_op): Improve handling of erroroneous operands.
6705         (convert_default_arg): Remove circular argument processing.
6706         (name_as_c_string): New function.
6707         (build_new_method_call): Use it.
6708         (perform_implicit_conversion): Use error_operand_p.
6709         * class.c (finish_struct_anon): Use constructor_name_p.
6710         (check_field_decls): Likewise.
6711         (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
6712         (resolve_address_of_overloaded_function): Likewise.
6713         (instantiate_type): Tweak pointer-to-member handling.
6714         (get_primary_binfo): Remove incorrect assertion.
6715         * config-lang.in (gtfiles): Add parser.c, remove parse.c.
6716         * cp-tree.h (DEFARG_TOKENS): New macro.
6717         (default_arg): New structure.
6718         (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
6719         (lang_tree_node): Add default_arg.
6720         (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
6721         (type_info_ref_type): New macro.
6722         (saved_scope): Make processing_explicit_instantiation a boolean.
6723         (check_access): New field.
6724         (unparsed_text): Remove.
6725         (language_function): Remove unparsed_inlines.
6726         (error_operand_p): New macro.
6727         (lang_decl): Adjust pending_inline_info.
6728         (DEFARG_POINTER): Remove.
6729         (tag_types): Add typenames.
6730         (lookup_ualified_name): Declare.
6731         (lookup_name_real): Likewise.
6732         (shadow_tag): Adjust prototype.
6733         (get_scope_of_declarator): Declare it.
6734         (process_next_inline): Remove it.
6735         (check_for_missing_semicolon): Likewise.
6736         (maybe_get_template_decl_from_type_decl): Declare it.
6737         (finish_label_stmt): Adjust prototype.
6738         (finish_non_static_data_meber): Declare it.
6739         (finish_pseudo_destructor_call_expr): Rename to ...
6740         (finish_pseudo_destructor_expr): ... this.
6741         (finish_compound_literal): Declare it.
6742         (begin_inline_definitions): Remove it.
6743         (init_spew): Remove.
6744         (peekyylex): Likewise.
6745         (arbitrate_lookup): Likewise.
6746         (frob_opname): Likewise.
6747         (maybe_snarf_defarg): Likewise.
6748         (add_defarg_fn): Likewise.
6749         (do_pending_defargs): Likewise.
6750         (done_pending_defargs): Likewise.
6751         (unprocessed_defarg_fn): Likewise.
6752         (replace_defarg): Likewise.
6753         (end_input): Likewise.
6754         (get_overloaded_fn): Likewise.
6755         * cvt.c (convert_to_reference): Improve error handling.
6756         * decl.c (lookup_name_real): Do not declare it static.
6757         (maybe_push_to_top_level): Set check_access.
6758         (identifier_type_value): Adjust call to lookup_name_real.
6759         (lookup_qualified_name): New method.
6760         (lookup_name_real): Remove special-case parsing code.
6761         (lookup_name-nonclass): Adjust call to lookup_name_real.
6762         (lookup_name_namespace_only): Likewise.
6763         (lookup_name): Likewise.
6764         (check_tag_decl): Return the type declared.
6765         (shadow_tag): Likewise.
6766         (register_dtor_fn): Tweak check_access.
6767         (grokfndecl): Use constructor_name_p.
6768         (get_scope_of_declarator): New function.
6769         (grokdeclarator): Obscure tweaks for slightly different declarator
6770         representations.
6771         (start_method): Return error_mark_node to indicate failure.
6772         (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
6773         * decl2.c (constructor_name_full): Simplify.
6774         (constructor_name): Use it.
6775         (build_expr_from_tree): Adjust for changes to do new parser.
6776         (push_scope): Improve robustness.
6777         (validate_nonmember_using_decl): Process declarations, not names.
6778         (do_class_using_decl): Likewise.
6779         (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
6780         here.
6781         * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
6782         * expr.c (cxx_expand_expr): Handle BASELINKs.
6783         * init.c (member_init_ok_or_else): Issue more errors.
6784         (build_offset_ref): Tweak handling of FUNCTION_DECLs.
6785         * lex.c: Do not include parse.h.
6786         (yypring): Do not declare.
6787         (yylval): Likewise.
6788         (make_reference_declarator): Remove error-generating code.
6789         (rid_to_yy): Remove.
6790         (cxx_init): Do not call init_spew.
6791         (yypring): Remove.
6792         (check_for_missing_semicolon): Remove.
6793         * lex.h (got_scope): Remove.
6794         (got_object): Remove.
6795         * method.c (hack_identifier): Use finish_non_static_data_member.
6796         (implicitly_declare_fn): Adjust use of constructor_name.
6797         * parser.c: New file.
6798         * pt.c (parse.h): Do not include it.
6799         (maybe_get_template_decl_from_template): Do not declare it.
6800         (finish_member_template_decl): Tweak.
6801         (begin_explicit_instantiation): Adjust for
6802         processing_explicit_instantiation being boolean.
6803         (end_explicit_instantiation): Likewise.
6804         (maybe_process_partial_specialization): Tighten specialization
6805         test.
6806         (retrieve_local_specialization): Adjust ue of hash table.
6807         (eq_local_specializations): New function.
6808         (register_local_specialization): Likewise.
6809         (push_template_decl_real): Remove unnecessary test.
6810         (maybe_get_template_decl_from_type_decl): Don't make it static.
6811         (for_each_template_parm_r): Handle TYPEOF_TYPE.
6812         (tsubst_copy): Use retrieive_local_specialization to handle
6813         PARM_DECL.  Adjust handling of CONST_DECLs.  Handle BASELINKs.
6814         Handle COMPONENT_REFs with pseudo-destructor-expressions.
6815         Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
6816         (tsubst_expr): Pass decls, not names, to do_local_using_decl.
6817         (unify): Tweak handling of CONST_DECLs.
6818         (regenerate_decl_from_template): Use push_nested_class.
6819         (template_for_substitution): New funciton.
6820         (instantiate_decl): Use it.  Register parameters as local
6821         specializations.
6822         * rtti.c (init_rtti_processing): Set type_info_ref_type.
6823         (build_typeid): Use it.
6824         (get_typeid): Likeise.
6825         * search.c (accessible_p): Use check_access, not
6826         flag_access_control.
6827         (adjust_result_of_qualified_name_lookup): Pay attention to the
6828         context_class.
6829         * semantics.c (finish_asm_stmt): Adjust error handling.
6830         (finish_label_stmt): Return the statement.
6831         (finish_non_static_data_member): New function.
6832         (finish_class_expr): Handle BASELINKs.
6833         (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
6834         (finish_object_call_expr): Simplify handling during templates.
6835         (finish_pseudo_destructor_call_expr): Rename to ...
6836         (finish_pseudo_dtor_expr): ... this.
6837         (finish_compound_literal): New function.
6838         (begin_inline_definitions): Remove.
6839         (finish_sizeof): Remove special template handling.
6840         * spew.c: Do not include parse.h.
6841         * tree.c (get_overloaded_fn): Remove.
6842         * typeck.c (build_class_member_access_expr): Handle
6843         PSEUDO_DTOR_EXPR.  Adjust handling of static member functions.
6844         (lookup_destructor): New function.
6845         (finish_class_member_access_expr): Use it.
6846         (convert_arguments): Simplify.
6847         (build_unary_op): Handle BASELINKs.
6848
6849 2002-12-26  Nathan Sidwell  <nathan@codesourcery.com>
6850
6851         PR c++/4803
6852         * decl2.c (mark_used): Defer inline functions.
6853         (finish_file): Merge deferred_fns loops. Check all used
6854         inline functions have a definition.
6855         * method.c (make_thunk): Thunks are not inline.
6856
6857         PR c++/5116, c++/764
6858         * call.c (build_new_op): Make sure template class operands are
6859         instantiated.
6860
6861 2002-12-24  Nathan Sidwell  <nathan@codesourcery.com>
6862
6863         PR C++/7964
6864         * cp-tree.h (resolve_scoped_fn_name): Prototype.
6865         * call.c (resolve_scoped_fn_name): New function. Deal with
6866         more template expansion. Broken out of ...
6867         * parse.y (parse_finish_call_expr): ... here. Call it.
6868         * decl2.c (build_expr_from_tree, CALL_EXPR): Use
6869         resolve_scoped_fn_name and build_call_from_tree.
6870
6871         PR c++/9053
6872         * decl.c (duplicate_decls): Templates may be disambiguated by
6873         return type.
6874
6875         PR c++/8702
6876         * decl2.c (check_classfn): Use lookup_fnfield_1. List all
6877         conversion operators on failure.
6878
6879 2002-12-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6880
6881         Remove traditional C constructs 2/n.
6882         * call.c (tourney, build_field_call, equal_functions, joust,
6883         compare_ics, build_over_call, build_java_interface_fn_ref,
6884         convert_like_real, op_error, build_object_call, resolve_args,
6885         build_vfield_ref, check_dtor_name, build_scoped_method_call,
6886         build_addr_func, build_call, build_method_call, null_ptr_cst_p,
6887         sufficient_parms_p, build_conv, non_reference, strip_top_quals,
6888         standard_conversion, reference_related_p,
6889         reference_compatible_p, convert_class_to_reference,
6890         direct_reference_binding, reference_binding,
6891         ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
6892         add_template_conv_candidate, any_viable, any_strictly_viable,
6893         build_this, splice_viable, print_z_candidates,
6894         build_user_type_conversion, build_new_function_call,
6895         conditional_conversion, build_conditional_expr, build_new_op,
6896         build_op_delete_call, enforce_access, call_builtin_trap,
6897         convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
6898         convert_default_arg, type_passed_as, convert_for_arg_passing,
6899         in_charge_arg_for_name, is_properly_derived_from,
6900         maybe_handle_implicit_object, maybe_handle_ref_bind,
6901         source_type, add_warning, can_convert, can_convert_arg,
6902         perform_implicit_conversion, can_convert_arg_bad,
6903         initialize_reference, add_conv_candidate,
6904         add_template_candidate_real, add_template_candidate): Ansify.
6905
6906 2002-12-22  Nathan Sidwell  <nathan@codesourcery.com>
6907
6908         PR c++/8572
6909         * cp-tree.h (grokoptypename): Add SCOPE parameter.
6910         * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
6911         if in a template scope.
6912         * parse.y (unoperator): Return the scope.
6913         (operator_name): Adjust grokoptypename call.
6914
6915 2002-12-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6916
6917         * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
6918         * decl.c (make_unbound_class_template): Adjust.  Check for tf_error.
6919         * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
6920
6921 2002-12-20  Kazu Hirata  <kazu@cs.umass.edu>
6922
6923         * ChangeLog: Fix a typo.
6924         * class.c: Fix comment typos.
6925         * cp-tree.h: Likewise.
6926
6927 2002-12-18  Jason Merrill  <jason@redhat.com>
6928
6929         Handle anonymous unions at the tree level.
6930         C++ ABI change: Mangle anonymous unions using the name of their
6931         first named field (by depth-first search).  Should not cause
6932         binary compatibility problems, though, as the compiler previously
6933         didn't emit anything for affected unions.
6934         * cp-tree.def (ALIAS_DECL): New tree code.
6935         * decl2.c (build_anon_union_vars): Build ALIAS_DECLs.  Return the
6936         first field, not the largest.
6937         (finish_anon_union): Don't mess with RTL.  Do set DECL_ASSEMBLER_NAME,
6938         push the decl, and write it out at namespace scope.
6939         * decl.c (lookup_name_real): See through an ALIAS_DECL.
6940         (pushdecl): Add namespace bindings for ALIAS_DECLs.
6941         * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
6942         of a decl which doesn't have one.
6943         * typeck.c (build_class_member_access_expr): Don't recurse if
6944         we already have the type we want.
6945
6946 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6947
6948         PR c++/8099
6949         * friend.c (make_friend_class): Allow partial specialization
6950         when declaration is not a template friend.
6951
6952 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6953
6954         PR c++/3663
6955         * pt.c (lookup_template_class): Copy TREE_PRIVATE and
6956         TREE_PROTECTED to created decl nodes.
6957
6958 2002-12-18  Mark Mitchell  <mark@codesourcery.com>
6959
6960         * class.c (build_base_field): Do not set DECL_PACKED on the
6961         FIELD_DECL.
6962
6963 2002-12-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6964
6965         * cp-tree.h (struct tree_srcloc): Use location_t.
6966         (SOURCE_LOCUS): New.
6967         (SRCLOC_FILE, SRCLOC_LINE): Adjust.
6968
6969 2002-12-17  Jason Merrill  <jason@redhat.com>
6970
6971         * decl.c (finish_function): Also complain about no return in
6972         templates.
6973         * semantics.c (finish_return_stmt): Also call check_return_expr in
6974         templates.
6975         * typeck.c (check_return_expr): In a template, just remember that we
6976         saw a return.
6977
6978 2002-12-16  Jason Merrill  <jason@redhat.com>
6979
6980         * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
6981         of the CALL_EXPR.
6982
6983         * semantics.c (do_pushlevel): Call pushlevel after adding the
6984         SCOPE_STMT.
6985         (do_poplevel): Call poplevel before adding the SCOPE_STMT.
6986         * parse.y (function_body): Go back to using compstmt.
6987         * decl.c (pushdecl): Skip another level to get to the parms level.
6988
6989         * call.c (build_new_method_call): Use is_dummy_object to determine
6990         whether or not to evaluate the object parameter to a static member
6991         function.
6992
6993 2002-12-14  Jason Merrill  <jason@redhat.com>
6994
6995         * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
6996         return slot for normal functions.  Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
6997         * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
6998         don't bother with an AGGR_INIT_EXPR.
6999         (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
7000         just generate a new decl normally.  Take return slot parm.
7001         * cp-tree.h: Adjust prototype.
7002
7003 2002-12-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7004
7005         PR C++/8031
7006         * cvt.c (convert_to_pointer_force): Don't try comparing against
7007         erronous type.
7008
7009 2002-12-13  Geoffrey Keating  <geoffk@apple.com>
7010
7011         * cp-tree.h: Have the multiple-include guards around
7012         the entire file.
7013
7014 2002-12-10  David Edelsohn  <edelsohn@gnu.org>
7015
7016         * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
7017         for SPEW_DEBUG.
7018         (snarf_method): Same.
7019         (snarf_defarg): Same.
7020
7021 2002-12-10  Mark Mitchell  <mark@codesourcery.com>
7022
7023         PR c++/8372
7024         * pt.c (tsubst_copy): Handle destructor names more correctly.
7025
7026 2002-12-10  Matt Austern   <austern@apple.com>
7027
7028         * cp-tree.h: get rid of needs_virtual_reinit bit.
7029
7030 2002-12-09  Mark Mitchell  <mark@codesourcery.com>
7031
7032         * NEWS: Document removal of in-class initialization extension for
7033         static data members of non-arithmetic, non-enumeration type.
7034         * decl.c (check_static_variable_definition): Do not allow that
7035         extension.
7036         * decl2.c (grokfield): Do not call digest_init when processing
7037         templates.
7038
7039 2002-12-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7040
7041         * error.c (dump_expr): Fix format specifier warning.
7042
7043 2002-12-04  Geoffrey Keating  <geoffk@apple.com>
7044
7045         * class.c (finish_struct_1): Correct comment.
7046         * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
7047
7048 2002-12-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7049
7050         PR C++/8799
7051         * error.c (dump_expr): Don't ever try to dump a non-existent
7052         expression.
7053
7054 2002-12-03  Nathan Sidwell  <nathan@codesourcery.com>
7055
7056         Implement covariant returns.
7057         * cp-tree.h (IS_AGGR_TYPE_2): Remove.
7058         (struct lang_decl_flags): Add this_thunk_p flag.
7059         Rename vcall_offset to virtual_offset.
7060         (struct lang_decl): Rename delta to fixed_offset.
7061         (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
7062         (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
7063         (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
7064         (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
7065         (make_thunk): Add this_adjusting arg.
7066         (finish_thunk): Declare.
7067         (mangle_thunk): Add this_adjusting arg.
7068         * class.c (get_vcall_index): Use base function for lookup.
7069         (update_vtable_entry_for_fn): Generate covariant thunk.
7070         (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
7071         (build_vtbl_initializer): Use base function for lookup.
7072         Finish covariant thunk here. Adjust thunk generation.
7073         * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
7074         Adjust thunk dumping.
7075         * mangle.c (mangle_call_offset): New function.
7076         (mangle_thunk): Adjust for covariant thunks.
7077         * method.c (make_thunk): Adjust. Do not set name here.
7078         (finish_thunk): New function. Set name here.
7079         (use_thunk): Generate covariant thunks too.
7080         (thunk_adjust): New function.
7081         * search.c (covariant_return_p): Remove. Fold into ...
7082         (check_final_overrider): ... here. Simplify.
7083         * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
7084
7085 2002-12-03  Jason Merrill  <jason@redhat.com>
7086
7087         PR c++/8674
7088         * call.c (build_over_call): Check specifically for TARGET_EXPR
7089         when eliding.
7090
7091         PR c++/8461, c++/8625
7092         * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
7093         (cp_convert_parm_for_inlining): Remove.
7094         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
7095         Remove.
7096         * cp-tree.h (ADDR_IS_INVISIREF): Remove.
7097         * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
7098
7099         * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
7100         an ambiguous conversion.
7101
7102 2002-12-03  Mark Mitchell  <mark@codesourcery.com>
7103
7104         PR c++/8688
7105         * decl.c (reshape_init): Handle erroneous initializers.
7106
7107 2002-12-02  Mark Mitchell  <mark@codesourcery.com>
7108
7109         PR c++/8720
7110         * spew.c (remove_last_token): Make sure that last_chunk is set
7111         correctly.
7112
7113         PR c++/8615
7114         * error.c (dump_expr): Handle character constants with
7115         TREE_OVERFLOW set.
7116
7117 2002-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7118
7119         DR 180
7120         * decl.c (grokdeclarator): Require class-key for all friend class.
7121         Output the correct type and context in the error message.
7122
7123 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
7124
7125         PR c++/5919
7126         * pt.c (unify): Use variably_modified_type_p to test validity of
7127         template argument types.
7128
7129         PR c++/8727
7130         * cp-tree.h (lang_type_class): Add typeinfo_var.
7131         (CLASSTYPE_TYPEINFO_VAR): New macro.
7132         * rtti.c (get_tinfo_decl): Use it.
7133
7134         PR c++/8663
7135         * init.c (expand_member_init): Always get the main variant of a
7136         base class.
7137
7138 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
7139
7140         PR c++/8332
7141         PR c++/8493
7142         * decl.c (cxx_init_decl_processing): Use size_type_node, not
7143         c_size_type_node.
7144         * decl2.c (coerce_new_type): Likewise.
7145         * except.c (do_allocate_exception): Likewise.
7146
7147 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
7148
7149         * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
7150         dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
7151         lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
7152         repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
7153         typeck2.c: Include coretypes.h and tm.h.
7154         * Make-lang.in: Update dependencies.
7155
7156 2002-11-30  Mark Mitchell  <mark@codesourcery.com>
7157
7158         PR c++/8227
7159         * decl.c (layout_var_decl): Deal gracefully with erroneous types.
7160         (check_initializer): Validate the type of the initialized
7161         variable, even if the initializer is absent.
7162         * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
7163
7164         PR c++/8214
7165         * typeck.c (convert_for_assignment): Do not use
7166         decl_constant_value on the operand.
7167
7168         PR c++/8511
7169         * pt.c (instantiate_decl): Handle template friends defined outside
7170         of the class correctly.
7171
7172 2002-11-29  Joe Buck <jbuck@synopsys.com>
7173
7174         * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
7175         anonymous structs.
7176
7177 2002-11-29  Mark Mitchell  <mark@codesourcery.com>
7178
7179         * class.c (walk_subobject_offsets): Recur on binfos as well as on
7180         types.
7181         (layout_nonempty_base_or_field): Pass it a binfo when processing a
7182         base class.
7183         (layout_empty_base): Likewise.
7184         (build_base_field): Likewise.
7185
7186 2002-11-27  Mark Mitchell  <mark@codesourcery.com>
7187
7188         * class.c (build_base_field): Make sure we get the canonical base
7189         when descending through primary bases.
7190
7191 2002-11-26  Geoffrey Keating  <geoffk@apple.com>
7192
7193         * decl.c (check_initializer): Don't error on initialisation of
7194         a scalar with a brace-enclosed expression.
7195
7196 2002-11-26  Nathan Sidwell  <nathan@codesourcery.com>
7197
7198         * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
7199         (template_parms_equal): Remove prototype.
7200         * typeck.c (buuld_indirect_ref): Reformat.
7201
7202 2002-11-25  Jason Merrill  <jason@redhat.com>
7203
7204         * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
7205         and a DO_STMT.
7206
7207 2002-11-25  Mark Mitchell  <mark@codesourcery.com>
7208
7209         * tree.c (cp_build_qualified_type_real): Correct handling of
7210         array types.
7211         * class.c (walk_subobject_offsets): Fix thinko.
7212         (build_base_field): Record offsets of empty bases in primary
7213         virtual bases.
7214         (layout_class_type): Record offsets of empty bases in fields.
7215
7216         * search.c (is_subobject_of_p_1): Fix thinko.
7217         (lookup_field_queue_p): Likewise.
7218
7219 2002-11-24  Mark Mitchell  <mark@codesourcery.com>
7220
7221         * class.c (layout_class_type): Reuse tail padding when laying out
7222         virtual bases.
7223
7224 2002-11-22  Mark Mitchell  <mark@codesourcery.com>
7225
7226         * rtti.c (qualifier_flags): Fix thinko.
7227
7228 2002-11-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7229
7230         Remove traditional C constructs 1/n.
7231         * cp-tree.h (init_method, set_mangled_name_for_decl,
7232         build_opfncall, hack_identifier, make_thunk, use_thunk,
7233         synthesize_method, implicitly_declare_fn,
7234         skip_artificial_parms_for, optimize_function, calls_setjmp_p,
7235         maybe_clone_body): Remove use of PARAMS.
7236
7237         * method.c (do_build_assign_ref, do_build_copy_constructor,
7238         synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
7239         Likewise.
7240         (synthesize_method): Use 'bool' type and constants instead of
7241         'int'.
7242         (locate_copy): Likewise.
7243         (implicitly_declare_fn): Likewise.
7244
7245         * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
7246         Remove old-style declaration.
7247         (maybe_clone_body): Use 'bool' type and constants.
7248
7249 2002-11-21  Glen Nakamura  <glen@imodulo.com>
7250
7251         PR c++/8342
7252         * typeck.c (get_member_function_from_ptrfunc): Make sure that a
7253         SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
7254         of the branches of a COND_EXPR.
7255
7256 2002-11-19  Mark Mitchell  <mark@codesourcery.com>
7257
7258         * pt.c (for_each_template_parm): Free allocated memory.
7259         * search.c (is_subobject_of_p_1): New function.
7260         (is_subobject_of_p): Avoid walking virtual bases multiple times.
7261
7262 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
7263
7264         * g++spec.c (lang_specific_spec_functions): New.
7265
7266 2002-11-15  Kazu Hirata  <kazu@cs.umass.edu>
7267
7268         * ChangeLog: Follow spelling conventions.
7269         * class.c: Likewise.
7270         * decl2.c: Likewise.
7271
7272 2002-11-14  Zack Weinberg  <zack@codesourcery.com>
7273
7274         * search.c (dfs_push_decls): Do not try to reorder elements
7275         3..n of method_vec if method_vec has only two elements.
7276         Reverse order of two tests to avoid accessing unallocated
7277         memory.
7278
7279 2002-11-14  Mark Mitchell  <mark@codesourcery.com>
7280
7281         * class.c (dfs_find_final_overrider): Adjust so that the most
7282         derived object is a binfo, rather than a class type.
7283         (find_final_overrider): Likewise.
7284         (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
7285         (add_vcall_offset): Likewise.
7286
7287 2002-11-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7288
7289         PR c++/8389
7290         * pt.c (instantiate_template): Push class scope for member
7291         functions.
7292         (get_mostly_instantiated_function_type): Likewise.  Don't call
7293         tsubst on context.  Remove CONTEXTP and TPARMSP parameters.
7294         * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
7295         * mangle.c (write_encoding, write_unqualified_name): Adjust.
7296
7297 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
7298
7299         * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
7300         vcall offfsets.  Split out ...
7301         (add_vcall_offset): ... new function.
7302
7303         PR c++/8338
7304         * pt.c (for_each_template_parm): Add htab parameter.
7305         (process_partial_specialization): Adjust call.
7306         (push_template_decl_real): Likewise.
7307         (pair_fn_data): Add visited.
7308         (for_each_template_parm_r): Avoid walking duplicates more than
7309         once.
7310         (uses_template_parms): Adjust call to for_each_template_parm.
7311
7312 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
7313
7314         * class.c (add_implicitly_declared_members): Put implicitly
7315         declared functions at the end of TYPE_METHODs when -fabi-version
7316         is at least 2.
7317
7318 2002-11-05  Geoffrey Keating  <geoffk@apple.com>
7319
7320         * decl2.c (finish_file): Correct spelling.
7321
7322 2002-11-03  Mark Mitchell  <mark@codesourcery.com>
7323
7324         * call.c (build_special_member_call): Do not try to lookup VTTs by
7325         name.
7326         * class.c (vtbl_init_data): Add generate_vcall_entries.
7327         (get_vtable_decl): Do not look up virtual tables by name.
7328         (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
7329         (set_primary_base): Do not set CLASSTYPE_RTTI.
7330         (determine_primary_base): Likewise.
7331         (get_matching_virtual): Remove.
7332         (get_vcall_index): New function.
7333         (update_vtable_entry_for_fn): Do not try to use virtual thunks
7334         when they are not required.  Assign vcall indices at this point.
7335         (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
7336         Do update dynamic_classes.
7337         (build_vtt): Do not add VTTs to the symbol table.
7338         (build_ctor_vtbl_group): Likewise.
7339         (build_vtbl_initializer): Simplify handling of vcall indices.
7340         (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
7341         for the most derived class.
7342         (add_vcall_offset_vtbl_entries_1): But do not actually add them to
7343         the vtable.
7344         * cp-tree.h (dynamic_classes): New macro.
7345         (lang_type_class): Remove rtti.  Add vtables.  Add vcall_indices.
7346         (CLASSTYPE_RTTI): Remove.
7347         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
7348         (CLASSTYPE_VCALL_INDICES): New macro.
7349         (CLASSTYPE_VTABLES): Likewise.
7350         (BV_USE_VCALL_INDEX_P): Remove.
7351         (build_vtable_path): Remove.
7352         * decl2.c (finish_vtable_vardecl): Remove.
7353         (key_method): Remove #if 0'd code.
7354         (finish_vtable_vardecl): Rename to ...
7355         (maybe_emit_vtables): ... this.
7356         (finish_file): Use it.
7357         * search.c (look_for_overrides_here): Update comment.
7358
7359 2002-11-01  Zack Weinberg  <zack@codesourcery.com>
7360
7361         PR c/7353 redux
7362         * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
7363
7364 2002-10-30  Jason Merrill  <jason@redhat.com>
7365
7366         PR c++/8186
7367         * cp-tree.h (ADDR_IS_INVISIREF): New macro.
7368         * call.c (convert_for_arg_passing): Set it.
7369         * except.c (stabilize_throw_expr): Recurse for such an arg.
7370
7371 2002-10-31  Mark Mitchell  <mark@codesourcery.com>
7372
7373         * cp-tree.h (lang_decl_flags): Remove init_priority.
7374         (lang_decl): Add delta.
7375         (GLOBAL_INIT_PRIORITY): Remove.
7376         (THUNK_DELTA): Revise definition.
7377         * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
7378         * dump.c (cp_dump_tree): Don't dump it.
7379
7380 2002-10-30  Mark Mitchell  <mark@codesourcery.com>
7381
7382         PR c++/8160
7383         * typeck2.c (process_init_constructor): Call complete_array_type.
7384
7385         PR c++/8149
7386         * decl.c (make_typename_type): Issue errors about invalid results.
7387
7388 2002-10-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7389
7390         Core issue 287, PR c++/7639
7391         * cp-tree.h (lang_type_class): Add decl_list field.
7392         (CLASSTYPE_DECL_LIST): New macro.
7393         (maybe_add_class_template_decl_list): Add declaration.
7394         * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
7395         (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
7396         (maybe_add_class_template_decl_list): New function.
7397         (add_implicitly_declared_members): Use it.
7398         * decl.c (maybe_process_template_type_declaration): Likewise.
7399         (pushtag): Likewise.
7400         * friend.c (add_friend): Likewise.
7401         (make_friend_class): Likewise.
7402         * semantics.c (finish_member_declaration): Likewise.
7403         (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
7404         * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
7405         to process members and friends in the order of declaration.
7406
7407 2002-10-29  Mark Mitchell  <mark@codesourcery.com>
7408
7409         PR c++/8287
7410         * decl.c (finish_destructor_body): Create the label to jump to
7411         when returning from a destructor here.
7412         (finish_function_body): Rather than here.
7413
7414 2002-10-25  Zack Weinberg  <zack@codesourcery.com>
7415
7416         PR c++/7266
7417         * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
7418         SCOPE_REF is not null before dereferencing it.
7419
7420 2002-10-25  Mark Mitchell  <mark@codesourcery.com>
7421
7422         * call.c (build_over_call): Use DECL_CONTEXT, not
7423         DECL_VIRTUAL_CONTEXT.
7424         * class.c (modify_vtable_entry): Don't mess with
7425         DECL_VIRTUAL_CONTEXT.
7426         (set_vindex): Remove.
7427         (set_primary_base): Remove vfuns_p parameter.
7428         (determine_primary_base): Likewise.
7429         (modify_all_vtables): Likewise.
7430         (layout_class_type): Likewise.  Adjust calls to other functions
7431         accordingly.
7432         (finish_struct_1): Adjust calls to modified functions.  Set
7433         DECL_VINDEX here.
7434         * cp-tree.h (lang_type_class): Remove vsize.
7435         (CLASSTYPE_VSIZE): Remove.
7436         (lang_decl): Remove thunks.
7437         (DECL_THUNKS): Adjust.
7438         (DECL_VIRTUAL_CONTEXT): Remove.
7439         (duplicate_decls): Don't copy it.
7440         * pt.c (build_template_decl): Don't set it.
7441         (tsubst_decl): Likewise.
7442         * typeck.c (expand_ptrmemfunc_cst): Don't use it.
7443
7444         * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
7445         (build_vtable_entry): Remove.
7446         * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
7447         (lang_decl): Add thunks.
7448         (DECL_THUNKS): New macro.
7449         * decl.c (duplicate_decls): Copy it.
7450         * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
7451         * semantics.c (emit_associated_thunks): Simplify.
7452
7453 2002-10-24  David Edelsohn  <edelsohn@gnu.org>
7454
7455         PR c++/7228
7456         * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
7457         lang_type structure exists before accessing field.
7458         (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
7459         (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
7460         (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
7461         * class.c (check_field_decls): Use new macros.
7462         * typeck2.c (process_init_constructor): Remove redundant check for
7463         existence of lang_type structure.
7464
7465 2002-10-24  Mark Mitchell  <mark@codesourcery.com>
7466
7467         * class.c (end_of_base): New method.
7468         (end_of_class): Use it.  Check indirect virtual bases.
7469
7470         * class.c (check_field_decls): Fix typo.
7471
7472 2002-10-23  Mark Mitchell  <mark@codesourcery.com>
7473
7474         PR c++/8067
7475         * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
7476         related variables.
7477
7478         PR c++/7679
7479         * spew.c (next_token): Do not return an endless stream of
7480         END_OF_SAVED_INPUT tokens.
7481         (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
7482         the cached token stream.
7483         (snarf_defarg): Likewise.
7484
7485 2002-10-23  Zack Weinberg  <zack@codesourcery.com>
7486
7487         * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
7488         variably_modified_type_p.
7489         * cp-tree.h: Remove prototype of variably_modified_type_p.
7490         * tree.c (variably_modified_type_p): Remove; now implemented
7491         in language-independent code.
7492
7493 2002-10-22  Mark Mitchell  <mark@codesourcery.com>
7494
7495         PR c++/6579
7496         * spew.c (snarf_parenthesized_expression): New function.
7497         (snarf_block): Use it.
7498
7499 2002-10-22  Richard Henderson  <rth@redhat.com>
7500
7501         * method.c (use_thunk): Always compute vcall_value; assert that
7502         it is not zero.  Use can_output_mi_thunk; use output_mi_thunk
7503         for vcall thunks as well.
7504
7505 2002-10-21  Mark Mitchell  <mark@codesourcery.com>
7506
7507         * class.c (empty_base_at_nonzero_offset_p): New function.
7508         (layout_nonempty_base_or_field): Do not check for conflicts when
7509         laying out a virtual base using the GCC 3.2 ABI.
7510         (build_base_field): Correct checking for presence of empty classes
7511         at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
7512
7513         * class.c (include_empty_classes): Use normalize_rli.
7514         (layout_class_type): Likewise.
7515
7516         * decl.c (reshape_init): Tweak handling of character arrays.
7517
7518         PR c++/8218
7519         * cp-tree.h (lang_type_class): Add contains_empty_class_p.
7520         (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
7521         * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
7522         (check_field_decls): Likewise.
7523         (layout_class_type): Likewise.
7524         (finish_struct_1): Initialize it.
7525         (walk_subobject_offsets): Use it to prune searches.
7526
7527 2002-10-20  Mark Mitchell  <mark@codesourcery.com>
7528
7529         * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
7530         * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
7531         TARGET_ASM_OUTPUT_MI_THUNK in comments.
7532
7533 2002-10-18  Zack Weinberg  <zack@codesourcery.com>
7534
7535         * decl.c (start_decl): Point users of the old initialized-
7536         typedef extension at __typeof__.
7537
7538 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
7539
7540         * Make-lang.in (method.o): Depend on TARGET_H.
7541         * method.c (target.h): Include it.
7542         (use_thunk): Use target hooks.  Use vcall thunks, if available.
7543
7544 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
7545
7546         * class.c (base_derived_from): Make sure return value is a bool.
7547
7548 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
7549
7550         * class.c (find_final_overrider_data_s): Remove overriding_fn and
7551         overriding_base.
7552         (dfs_base_derived_from): New function.
7553         (base_derived_from): Likewise.
7554         (dfs_find_final_overrider): Use base_derived_from.
7555         (find_final_overrider): Adjust.
7556
7557 2002-10-18  Jason Merrill  <jason@redhat.com>
7558
7559         PR c++/8080
7560         * semantics.c (finish_for_cond, finish_while_cond): Don't mess
7561         with condition decls in a template.
7562
7563 2002-10-17  Nathan Sidwell  <nathan@codesourcery.com>
7564
7565         * class.c (add_method): Compare template parms too.
7566
7567 2002-10-17  Mark Mitchell  <mark@codesourcery.com>
7568
7569         PR c++/7584
7570         * class.c (handle_using_decl): Allow the declaration used to be
7571         from an ambiguous base.
7572
7573         * pt.c (convert_template_argument): Revert this change:
7574                 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
7575                 * pt.c (convert_template_argument): Do not fold non-type
7576                 template rguments when inside a template.
7577
7578         * init.c (expand_default_init): Handle brace-enclosed initializers
7579         correctly.
7580
7581 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
7582
7583         * mangle.c (write_expression): Correct handling of enumeration
7584         constants.
7585         (write_template_arg): Likewise.
7586         * pt.c (convert_template_argument): Do not fold non-type template
7587         arguments when inside a template.
7588
7589         PR c++/7478
7590         * cvt.c (convert_to_reference): Allow references as the incoming
7591         type.
7592
7593 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
7594
7595         PR c++/7524
7596         * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
7597         build_qualified_type.
7598
7599 2002-10-15  Richard Henderson  <rth@redhat.com>
7600
7601         * error.c (dump_expr): Use real_to_decimal directly, and with
7602         the new arguments.
7603
7604 2002-10-15  Mark Mitchell  <mark@codesourcery.com>
7605
7606         * decl.c (reshape_init): Fix typo.
7607
7608         * cp-tree.h (operator_name_info_t): Add arity.
7609         * lex.c (init_operators): Initialize it.
7610         * mangle.c (write_conversion_operator_name): New function.
7611         (write_unqualified_name): Use it.
7612         (write_template_args): Accept template arguments as a TREE_LIST.
7613         (write_expression): Adjust handling of qualified names to match
7614         specification.
7615
7616 2002-10-15  Jason Merrill  <jason@redhat.com>
7617
7618         * call.c (call_builtin_trap): New fn.
7619         (convert_arg_to_ellipsis): Use it.  Downgrade error to warning.
7620         (build_call): Don't set current_function_returns_abnormally outside
7621         a function.
7622
7623 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
7624
7625         * class.c (check_field_decls): Remove empty_p parameter.  Instead,
7626         clear CLASSTYPE_EMPTY_P.
7627         (build_base_field): Likewise.
7628         (build_base_fields): Likewise.
7629         (check_bases_and_members): Likewise.
7630         (create_vtbl_ptr): Likewise.
7631         (layout_class_type): Likewise.  Ensure that empty classes have
7632         size zero when used as base classes in the 3.2 ABI.
7633         (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
7634         CLASSTYPE_NEARLY_EMPTY_P.  Adjust calls to avoid passing empty_p
7635         parameter.
7636         (is_empty_class): Correct definition when using post-3.2 ABI.
7637         * cp-tree.h (lang_type_class): Add empty_p.
7638         (CLASSTYPE_EMPTY_P): New macro.
7639
7640 2002-10-12  Nathan Sidwell  <nathan@codesourcery.com>
7641
7642         * init.c (build_delete): Do not apply save_expr for arrays.
7643         (build_vec_delete): Likewise.
7644
7645 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
7646
7647         * decl.c (layout_var_decl): Call layout_decl even for variables
7648         whose type is an array with unspecified bounds.
7649
7650         PR c++/7176
7651         * lex.c (do_identifier): Add another option for the parsing
7652         parameter.
7653         * parse.y (do_id): Use it.
7654
7655 2002-10-11  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7656
7657         PRs C++/6803, C++/7721 and C++/7803
7658         * decl.c (grokdeclarator): Gracefully handle template-name as
7659         decl-specifier.
7660
7661 2002-10-11  Jason Molenda  <jmolenda@apple.com>
7662
7663         * init.c (build_field_list): Provide uses_unions_p with a default
7664         value.
7665
7666 2002-10-11  Mark Mitchell  <mark@codesourcery.com>
7667
7668         PR c++/5661
7669         * cp-tree.h (variably_modified_type_p): New function.
7670         (grokdeclarator) Tighten check for variably modified types as
7671         fields.
7672         * pt.c (convert_template_argument): Do not allow variably modified
7673         types as template arguments.
7674         * tree.c (variably_modified_type_p): New function.
7675
7676         * NEWS: Document removal of "new X = ..." extension.
7677         * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
7678         brace-enclosed initializers.
7679         * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
7680         (initialize_local_var): Remove declaration.
7681         (expand_static_init): Likewise.
7682         * decl.c (next_initializable_field): New function.
7683         (reshape_init): Likewise.
7684         (check_initializer): Use them.  Build dynamic initializer for
7685         aggregates here too.
7686         (initialize_local_var): Simplify, and incorporate cleanup
7687         insertion code as well.
7688         (destroy_local_var): Remove.
7689         (cp_finish_decl): Tidy.
7690         (expand_static_init): Fold checks for whether or not a variable
7691         needs initialization into this function.  Simplify.
7692         * decl2.c (do_static_initialization): Simplify.
7693         * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
7694         be done for us automatically.
7695         (expand_default_init): Handle brace-enclosed initializers
7696         correctly.
7697         (expand_aggr_init_1): Remove RTL-generation code.
7698         (build_vec_init): Remove "new X = ..." support.
7699         * parse.y (new_initializer): Likewise.
7700         * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
7701         brace-enclosed initializer.
7702         (create_pseudo_type_info): Likewise.
7703         * typeck2.c (store_init_value): Don't try to handle digest_init
7704         being called more than once.
7705         (digest_init): Tidy handling of brace-enclosed initializers.
7706
7707 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7708
7709         * decl.c (typename_hash): Use htab_hash_pointer.
7710
7711 2002-10-10  Jim Wilson  <wilson@redhat.com>
7712
7713         * decl.c (duplicate_decls): Don't call decl_attributes.
7714
7715 2002-10-09  Zack Weinberg  <zack@codesourcery.com>
7716
7717         PR c/7353
7718         * decl.c (start_decl): Unconditionally issue error for
7719         'typedef foo = bar'.
7720         (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
7721         (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
7722
7723 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7724
7725         * decl2.c (prune_vtable_vardecl): Delete unused function.
7726
7727 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
7728
7729         PR c++/7754
7730         * decl2.c (finish_anon_union): Do not expand anonymous unions when
7731         procesing template functions.
7732         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
7733         type. Call layout_decl.
7734         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
7735
7736 2002-10-07  Richard Henderson  <rth@redhat.com>
7737
7738         * decl2.c, pt.c: Revert c++/7754 fix.
7739
7740 2002-10-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7741
7742         PR c++/7804
7743         * error.c (dump_expr) [REAL_CST]: Output in decimal format.
7744
7745 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
7746
7747         PR c++/7931
7748         * pt.c (for_each_template_parm_r): Handle BASELINKs.
7749
7750         PR c++/7754
7751         * decl2.c (finish_anon_union): Do not expand anonymous unions when
7752         procesing template functions.
7753         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
7754         type. Call layout_decl.
7755         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
7756
7757 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
7758
7759         PR c++/8006
7760         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
7761         template parameters.
7762         (globals): Add entity and need_abi_warning.
7763         (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
7764         CLASSTYPE_TEMPLATE_INFO.
7765         (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
7766         TYPE_TI_TEMPLATE.
7767         (write_prefix): Handle typename types correctly.
7768         (write_template_prefix): Handle template template parameters
7769         correctly.
7770         (start_mangling): Add entity parameter.
7771         (finish_mangling): Warn about names whose mangling will change.
7772         (mangle_decl_string): Adjust.
7773         (mangle_type_string): Likewise.
7774         (mangle_special_for_type): Likewise.
7775         (mangle_ctor_vtbl_for_type): Likewise.
7776         (mangle_thunk): Likewise.
7777         (mangle_guard_variable): Likewise.
7778         (mangle_ref_init_variable): Likewise.
7779
7780 2002-10-02  Mark Mitchell  <mark@codesourcery.com>
7781
7782         PR c++/7188.
7783         * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
7784         * cp-tree.h (emit_base_init): Rename to ....
7785         (emit_mem_initializers): ... this.
7786         (expand_member_init): Change prototype.
7787         * init.c (perform_member_init): Compute explicit, rather than
7788         requiring it as a parameter.
7789         (sort_member_init): Rename to ...
7790         (sort_mem_initializers): ... this.  Process bases and data members
7791         together.
7792         (sort_base_init): Remove.
7793         (emit_base_init): Rename to ...
7794         (emit_mem_initializers): ... this.
7795         (expand_aggr_vbase_init_1): Remove.
7796         (construct_virtual_bases): Rename to ...
7797         (construct_virtual_base): ... this.
7798         (expand_member_init): Rework handling of base initializers.
7799         * method.c (do_build_copy_constructor): Use
7800         finish_mem_initializers.
7801         * parse.y (member_init): Adjust calls to expand_member_init.
7802         * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
7803         (tsubst_initializer_list): Use expand_member_init.
7804         * semantics.c (finish_mem_intiailizers): Simplify.
7805
7806 2002-10-02  Matt Austern  <austern@apple.com>
7807         * decl.c (walk_vtables_r): Fixed typo that caused result to
7808         never get a nonzero value.
7809
7810 2002-10-02  Roger Sayle  <roger@eyesopen.com>
7811
7812         PR optimization/6627
7813         * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
7814         from here, and move it to tree.h.
7815         * decl.c (cxx_init_decl_processing): If storing the vbit
7816         in function pointers, ensure that force_align_functions_log
7817         is atleast one.
7818
7819 2002-10-02  Matt Austern  <austern@apple.com>
7820
7821         * class.c (check_field_decls): Changed warning about const member
7822         variables so that it doesn't get issued for a class aggregate.
7823
7824 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
7825
7826         * decl.c (cp_finish_decl): Make sure array types are laid out,
7827         even if the array bounds are unknown.
7828
7829 2002-10-01  Steve Ellcey  <sje@cup.hp.com>
7830
7831         * class.c (build_vtbl_initializer): Change build_c_cast
7832         to build1.
7833
7834 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
7835
7836         * decl.c (cp_finish_decl): Make sure array types are laid out,
7837         even if the array bounds are unknown.
7838
7839         * decl.c (cp_finish_decl): Correct check for dynamic
7840         initialization of thread-local storage.
7841
7842 2002-09-30  Nathan Sidwell  <nathan@codesourcery.com>
7843
7844         * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
7845         overloaded.
7846
7847 2002-09-30  Steve Ellcey  <sje@cup.hp.com>
7848
7849         * class.c (build_vtbl_initializer): Add cast.
7850         (add_vcall_offset_vtbl_entries_1):
7851         Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
7852
7853 2002-09-30  Mark Mitchell  <mark@codesourcery.com>
7854
7855         * class.c (walk_subobject_offsets): Correct the calculation of
7856         offsets for virtual bases.  Correct the counting of array
7857         elements.
7858         (layout_nonempty_base_or_field): Simplify.  Correct the
7859         calculation of offsets to be propagated through the binfo
7860         hierarchy.
7861         (build_base_field): Avoid creating a FIELD_DECL for empty bases.
7862         Add the FIELD_DECL to TYPE_FIELDS.
7863         (build_base_fields): Adjust accordingly.
7864         (layout_virtual_bases): Use build_base_field.
7865         (end_of_class): Return a tree, not an integer.
7866         (warn_about_ambiguous_direct_bases): Rename to ...
7867         (warn_about_ambiguous_bases): ... this.
7868         (include_empty_classes): New function.
7869         (layout_class_type): Create an alternative version of the type to
7870         be used when as a base class type.  Do not call
7871         finish_record_layout until we are done laying out the class.
7872         * cp-tree.h (lang_type_class): Remove size, size_unit.  Add
7873         as_base.
7874         (CLASSTYPE_SIZE): Reimplement.
7875         (CLASSTYPE_SIZE_UNIT): Likewise.
7876         (CLASSTYPE_ALIGN): Likweise.
7877         (CLASSTYPE_USER_ALIGN): Likewise.
7878         (CLASSTYPE_AS_BASE): New macro.
7879         (DECL_INITIALIZED_P): Likewise.
7880         (extract_init): Remove prototype.
7881         (build_forced_zero_init): Rename to ...
7882         (build_zero_init): ... this.
7883         (force_store_init_value): Remove.
7884         * decl.c (obscure_complex_init): Remove.
7885         (duplicate_decls): Copy DECL_INITIALIZED_P.
7886         (check_initializer): Do not leave junk in DECL_INITIAL.
7887         (cp_finish_decl): Handle zero-initialization of entities with
7888         static storage duration.
7889         * expr.c (extract_init): Remove.
7890         * init.c (build_forced_zero_init): Remove.
7891         (build_zero_init): New function.
7892         (build_default_init): Use it.
7893         (build_field_list): Skip FIELD_DECLs for base subobjects.
7894         (push_base_cleanups): Likewise.
7895         * method.c (do_build_assign_ref): Likewise.
7896         (synthesize_exception_spec): Likewise.
7897         * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
7898         (regenerate_decl_from_template): To not set DECL_INITIAL for a
7899         static data member whose initialization took place in its class.
7900         (instantiate_decl): Do not pass an initializer to cp_finish_decl
7901         in that situation.
7902         * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
7903         (dfs_unuse_fields): Likewise.
7904         * tree.c (pod_type_p): Handle error_mark_node.
7905         (zero_init_p): Likewise.
7906         * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
7907         subobjects.
7908         * typeck2.c (store_init_value): Remove #if 0'd code.
7909         (force_store_init_value): Remove.
7910         (process_init_constructor): Use build_zero_init.
7911
7912 2002-09-29  Nathan Sidwell  <nathan@codesourcery.com>
7913
7914         PR c++/7788
7915         * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
7916
7917 2002-09-29  Kazu Hirata  <kazu@cs.umass.edu>
7918
7919         * cp-tree.h: Fix comment typos.
7920         * decl.c: Likewise.
7921         * pt.c: Likewise.
7922
7923 2002-09-25  Mark Mitchell  <mark@codesourcery.com>
7924
7925         * cp/class.c (contains_empty_class_p): New method.
7926         (walk_subobject_offsets): Correct computation of field offset.
7927         (layout_empty_base): Correct placement of emtpy base classes.
7928         (layout_class_type): Warn about ABI changes.
7929
7930 2002-09-23  Mark Mitchell  <mark@codesourcery.com>
7931
7932         * cp/class.c (layout_virtual_bases): Do not round the size of the
7933         type to a multiple of the alignment before laying out virtual bases.
7934         (layout_class_type): Correct handling of bit-fields that are wider
7935         than their type inside unions.  Round the size of the type to a
7936         even number of bytes when computing the size without virtual
7937         bases.
7938         * cp/cp-tree.h (abi_version_at_least): New macro.
7939
7940 2002-09-21  Kazu Hirata  <kazu@cs.umass.edu>
7941
7942         * ChangeLog: Follow spelling conventions.
7943         * ChangeLog.2: Likewise.
7944         * call.c: Likewise.
7945         * class.c: Likewise.
7946         * cp-tree.h: Likewise.
7947         * cvt.c: Likewise.
7948         * decl.c: Likewise.
7949         * decl2.c: Likewise.
7950         * except.c: Likewise.
7951         * friend.c: Likewise.
7952         * g++spec.c: Likewise.
7953         * init.c: Likewise.
7954         * lex.c: Likewise.
7955         * mangle.c: Likewise.
7956         * method.c: Likewise.
7957         * operators.def: Likewise.
7958         * optimize.c: Likewise.
7959         * pt.c: Likewise.
7960         * rtti.c: Likewise.
7961         * search.c: Likewise.
7962         * semantics.c: Likewise.
7963         * spew.c: Likewise.
7964         * tree.c: Likewise.
7965         * typeck.c: Likewise.
7966
7967 2002-09-18  Devang Patel  <dpatel@apple.com>
7968
7969         * cp/cp-tree.h: New prototype for walk_vtabls().
7970         * cp/decl.c (walk_vtables_r): New function.
7971         (struct cp_binding_level): Add new members, namespaces,
7972         names_size and vtables.
7973         (add_decl_to_level): Add decl in namespaces or vtables
7974         chain, if conditions match.
7975         (walk_vtables): New function.
7976         (walk_namespaces_r): Travers separate namespace chain
7977         for namespace decls.
7978         (wrapup_globals_for_namespace): Use names_size instead
7979         of list_length().
7980         * cp/decl2.c (finish_file): Use walk_vtables() instead of
7981         walk_globals() to walk vtable decls.
7982
7983 2002-09-18  Nathan Sidwell  <nathan@codesourcery.com>
7984
7985         * decl.c (grokdeclarator): Use assert, not internal_error. Don't
7986         ICE with invalid pointers & references.
7987
7988 2002-09-17  Zack Weinberg  <zack@codesourcery.com>
7989
7990         * Make-lang.in: Remove all references to the demangler.
7991         * cxxfilt.c: Moved to binutils.
7992
7993 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
7994
7995         PR c++/7718
7996         * pt.c (tsubst_decl): Remove assert.
7997
7998         Remove DR 295 implementation.
7999         * pt.c (check_cv_quals_for_unify): Disable function & method cases.
8000         * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
8001         about ignoring volatile qualifiers.
8002
8003         * search.c (lookup_member): Correct documentation.
8004
8005 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
8006
8007         * cp-tree.h (union lang_tree_node): Add chain_next option.
8008
8009 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
8010
8011         * parse.y (parse_finish_call_expr): Check lookup_member result.
8012
8013         PR c++/7015
8014         * semantic.c (finish_asm_stmt): Fix operand/output_operands
8015         thinko.
8016         * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
8017
8018 2002-09-15  Nathan Sidwell  <nathan@codesourcery.com>
8019
8020         PR c++/7919
8021         * call.c (build_over_call): Convert this pointer for fns found by
8022         using decls.
8023
8024 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
8025
8026         * ChangeLog: Follow spelling conventions.
8027         * ChangeLog.1: Likewise.
8028
8029 2002-09-14  Nathan Sidwell  <nathan@codesourcery.com>
8030
8031         PR c++/7768
8032         * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
8033
8034 2002-09-14  Kazu Hirata  <kazu@cs.umass.edu>
8035
8036         * error.c: Fix comment formatting.
8037         * except.c: Likewise.
8038         * expr.c: Likewise.
8039         * friend.c: Likewise.
8040         * g++spec.c: Likewise.
8041         * init.c: Likewise.
8042         * lex.c: Likewise.
8043         * mangle.c: Likewise.
8044         * method.c: Likewise.
8045         * optimize.c: Likewise.
8046         * pt.c: Likewise.
8047         * rtti.c: Likewise.
8048         * search.c: Likewise.
8049         * semantics.c: Likewise.
8050         * spew.c: Likewise.
8051         * tree.c: Likewise.
8052         * typeck.c: Likewise.
8053         * typeck2.c: Likewise.
8054
8055 2002-09-13  Matt Austern  <austern@apple.com>
8056
8057         PR C++/7828
8058         * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
8059         * cp/call.c: Change call-by-const-reference mechanism to use
8060         non_cast_lvalue_p when deciding whether the create a temporary.
8061         We need a temporary when passing, e.g. (long) x by const ref.
8062
8063 2002-09-13  Nathan Sidwell  <nathan@codesourcery.com>
8064
8065         * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
8066
8067 2002-09-13  Kazu Hirata  <kazu@cs.umass.edu>
8068
8069         * decl.c: Fix comment formatting.
8070         * decl2.c: Likewise.
8071
8072 2002-09-12  Kazu Hirata  <kazu@cs.umass.edu>
8073
8074         * call.c: Fix comment formatting.
8075         * class.c: Likewise.
8076         * cp-lang.c: Likewise.
8077         * cp-tree.h: Likewise.
8078         * cvt.c: Likewise.
8079
8080 2002-09-11  Zack Weinberg  <zack@codesourcery.com>
8081
8082         * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
8083         and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
8084         * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
8085         minor adjustments (use version_string, eliminate yet another
8086         duplicate of xmalloc)
8087
8088 2002-09-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8089
8090         * cp-tree.h (require_complete_eh_spec_types): Add prototype.
8091
8092 2002-09-05  Jason Merrill  <jason@redhat.com>
8093
8094         * typeck2.c (add_exception_specifier): Only pedwarn for an
8095         incomplete type.
8096         (require_complete_eh_spec_types): New fn.
8097         (cxx_incomplete_type_diagnostic): Also support pedwarning.
8098         * typeck.c (complete_type_or_diagnostic): Likewise.
8099         * call.c (build_call): Call require_complete_eh_spec_types.
8100         * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
8101         on an incomplete type.
8102
8103 2002-09-04  Jakub Jelinek  <jakub@redhat.com>
8104
8105         * decl.c (start_cleanup_fn): Clear interface_only before
8106         start_function, restore it afterwards.
8107
8108 2002-09-02  Nathan Sidwell  <nathan@codesourcery.com>
8109
8110         * cp-tree.h (finish_builtin_type): Remove.
8111         * decl2.c (finish_builtin_type): Move to common code.
8112         * decl.c (build_ptrmemfunc_type): Adjust.
8113         * rtti.c (create_pseudo_type_info): Adjust.
8114         (create_tinfo_types): Adjust.
8115
8116 2002-08-31  Jason Merrill  <jason@redhat.com>
8117
8118         * cp-lang.c (cp_expr_size): Allow initialization from a
8119         CONSTRUCTOR.
8120
8121 2002-08-30  Richard Henderson  <rth@redhat.com>
8122
8123         PR opt/7515
8124         * tree.c: Include target.h.
8125         (cp_cannot_inline_tree_fn): Don't auto-inline functions that
8126         don't bind locally.
8127         * Makefile.in (tree.o): Update.
8128
8129 2002-08-27  Mark Mitchell  <mark@codesourcery.com>
8130
8131         * class.c (layout_virtual_bases): Warn about bugs in G++ that
8132         result in incorrect object layouts.
8133         (layout_class_type): Likewise.
8134
8135 2002-08-24  Matt Austern  <austern@apple.com>
8136
8137         * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
8138         are allowable.
8139         (real_lvalue_p): Update caller.
8140         (lvalue_p): Ditto.
8141         (non_cast_lvalue_or_else): New.
8142         * tree.h: Declare it.
8143         * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
8144
8145 2002-08-22  Mark Mitchell  <mark@codesourcery.com>
8146
8147         * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
8148         and COND_EXPR specially; fix error message output.
8149
8150 2002-08-22  Jason Merrill  <jason@redhat.com>
8151
8152         * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
8153         * semantics.c (nullify_returns_r): Likewise.
8154
8155 2002-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
8156
8157         Fix PR/7621
8158         * typeck.c (finish_class_member_access_expr): Diagnose cases where
8159         name lookup finds nothing.
8160
8161 2002-08-15  Jason Merrill  <jason@redhat.com>
8162
8163         * semantics.c (finish_then_clause): Remove redundant assignment.
8164         (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
8165         extra binding level outside the if/switch statement.
8166         (finish_while_cond, finish_for_cond): Rewrite complex condition
8167         into the loop body.
8168
8169 2002-08-15  Alexandre Oliva  <aoliva@redhat.com>
8170
8171         * parse.y (sizeof, alignof, typeof): New non-terminals to
8172         increment skip_evaluation.  Replace terminals with them and
8173         decrement skip_evaluation at the end of rules using them.
8174         * decl2.c (mark_used): Don't assemble_external if
8175         skipping evaluation.
8176
8177 2002-08-15  Gabriel Dos Reis  <gdr@nerim.net>
8178
8179         Fix PR/7504
8180         * parse.y (parse_finish_call_expr): Handle incomplete
8181         type used to name a scope.
8182
8183 2002-08-15  Nathan Sidwell  <nathan@codesourcery.com>
8184
8185         PR c++/7598
8186         * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
8187         regression caused by my 2002-08-08 patch.
8188
8189 2002-08-13  Mark Mitchell  <mark@codesourcery.com>
8190
8191         * decl.c (pushdecl_class_level): Honor requests to bind names to
8192         OVERLOADs.
8193
8194 2002-08-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8195
8196         * decl2.c (build_call_from_tree): Fix uninitialized variable.
8197         * parse.y (parse_finish_call_expr): Likewise.
8198         * repo.c (old_args, old_dir, old_main): Const-ify.
8199
8200 2002-08-11  Gabriel Dos Reis  <gdr@nerim.net>
8201
8202         * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
8203         DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
8204         * optimize.c (maybe_clone_body): Likewise.
8205         * pt.c (tsubst_enum): Likewise.
8206         (lookup_template_class): Likewise.
8207         * tree.c (cp_copy_res_decl_for_inlining): Likewise.
8208
8209 2002-08-10  Neil Booth  <neil@daikokuya.co.uk>
8210
8211         * lang-specs.h: Remove -ansi.
8212
8213 2002-08-10  Nathan Sidwell  <nathan@codesourcery.com>
8214
8215         * tree.c (maybe_dummy_object): Replace // with /* */
8216
8217 2002-08-09  Mark Mitchell  <mark@codesourcery.com>
8218
8219         * call.c (standard_conversion): Use build_ptrmem_type.
8220         * cp-tree.h (build_ptrmem_type): New function.
8221         (adjust_result_of_qualified_name_lookup): Likewise.
8222         * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
8223         static data members.
8224         (build_ptrmem_type): New function.
8225         (grokdeclarator): Do not use build_offset_type when encountering a
8226         qualified name.
8227         * parse.y (parse_finish_call_expr): Use
8228         adjust_result_of_qualified_name_lookup.
8229         * search.c (adjust_result_of_qualified_name_lookup): New function.
8230         * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
8231         accessing OFFSET_TYPEs directly.
8232
8233 2002-08-08  Mike Stump  <mrs@apple.com>
8234
8235         * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
8236         (type_decays_to): Likewise.
8237         * class.c (find_final_overrider): Likewise.
8238         (maybe_note_name_used_in_class): Likewise.
8239         * decl.c (current_tmpl_spec_kind): Likewise.
8240         (add_binding): Likewise.
8241         (push_class_binding): Likewise.
8242         (duplicate_decls): Likewise.
8243         (layout_var_decl): Likewise.
8244         (grokfndecl): Likewise.
8245         (grokdeclarator): Likewise.
8246         (check_default_argument): Likewise.
8247         * decl2.c (handle_class_head): Likewise.
8248         * error.c (dump_template_decl): Likewise.
8249         * init.c (build_offset_ref): Likewise.
8250         * pt.c (check_specialization_scope): Likewise.
8251         (determine_specialization): Likewise.
8252         (check_explicit_specialization): Likewise.
8253         (maybe_check_template_type): Likewise.
8254         (process_partial_specialization): Likewise.
8255         (check_default_tmpl_args): Likewise.
8256         (push_template_decl_real): Likewise.
8257         (convert_template_argument): Likewise.
8258         (try_class_unification): Likewise.
8259         (get_bindings_real): Likewise.
8260         (do_decl_instantiation): Likewise.
8261         * semantics.c (begin_function_definition): Likewise.
8262         (finish_member_declaration): Likewise.
8263         (check_multiple_declarators): Likewise.
8264         * typeck.c (comp_array_types): Likewise.
8265         (comptypes): Likewise.
8266         (expr_sizeof): Likewise.
8267         (build_binary_op): Likewise.
8268         (dubious_conversion_warnings): Likewise.
8269         (check_return_expr): Likewise.
8270
8271 2002-08-08  Mark Mitchell  <mark@codesourcery.com>
8272
8273         * typeck.c (build_class_member_access_expr): Do not return
8274         error_mark_node when no error has occurred.
8275
8276 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
8277
8278         * typeck.c (build_component_addr): Remove.
8279         (build_unary_op): Just check it's not a bitfield, and then build
8280         an ADDR_EXPR.
8281
8282 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
8283
8284         * class.c (convert_to_base): Correct check for error_mark_node.
8285         (create_vtable_ptr): Remove unused VFUNS_P parm.
8286
8287 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
8288
8289         * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
8290
8291 2002-08-07  Mark Mitchell  <mark@codesourcery.com>
8292
8293         Rework build_component_ref.
8294         * call.c (build_vfield_ref): Do not go through build_component_ref.
8295         (build_field_call): Use build_class_member_access_expr.
8296         (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
8297         (build_object_call): Likewise.
8298         * class.c (convert_to_base): New function.
8299         (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
8300         (instantiate_type): Handle BASELINKs.
8301         * cp-tree.def (BASELINK): New tree code.
8302         * cp-tree.h (BASELINK_P): Reimplement.
8303         (SET_BASELINK_P): Remove.
8304         (BASELINK_BINFO): Reimplement.
8305         (BASELINK_FUNCTIONS): Likewise.
8306         (BASELINK_ACCESS_BINFO): Likewise.
8307         (BASELINK_OPTYPE): Likewise.
8308         (convert_to_base): New function.
8309         (name_p): Likewise.
8310         (build_object_ref): Remove.
8311         (build_component_ref_1): Likewise.
8312         (build_component_ref): Likewise.
8313         (build_x_component_ref): Likewise.
8314         (build_class_member_access_expr): New function.
8315         (finish_class_member_access_expr): Likewise.
8316         (build_ptrmemfunc_access_expr): Likewise.
8317         * decl.c (grokdeclarator): Handle BASELINKs.
8318         * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
8319         finish_class_member_access_expr.
8320         (arg_assoc): Handle BASELINKs.
8321         (do_class_using_decl): Likewise.
8322         * error.c (dump_decl): Likewise.
8323         (dump_expr): Use build_ptrmemfunc_access_expr.
8324         * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
8325         destructors.
8326         (build_throw): Use BASELINK_FUNCTIONS.
8327         * init.c (perform_member_init): Use
8328         build_class_member_access_expr.
8329         (build_offset_ref): Handle BASELINKs.  Use
8330         build_class_member_access_expr.
8331         * method.c (hack_identifier): Likewise.
8332         * parse.y (do_id): Use BASELINK, not TREE_LIST.
8333         (primary): Remove uses of build_object_ref.
8334         * pt.c (lookup_template_function): Handle BASELINKs.
8335         (resolve_overloaded_unification): Likewise.
8336         * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
8337         (lookup_field): Use BASELINK, not TREE_LIST.
8338         (lookup_fnfiels): Likewise.
8339         (setup_class_bindings): Likewise.
8340         * semantics.c (finish_object_call_expr): Do not use
8341         build_method_call when we already know what function is being
8342         called.
8343         * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
8344         * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
8345         TREE_CHAIN.
8346         (name_p): New function.
8347         * typeck.c (build_object_ref): Remove.
8348         (build_component_ref_1): Likewise.
8349         (build_x_component_ref): Likewise.
8350         (build_class_member_access_expr): New function.
8351         (finish_class_member_access_expr): Likewise.
8352         (build_ptrmemfunc_access_expr): Likewise.
8353         (get_member_function_from_ptrfunc): Use
8354         build_ptrmemfunc_access_expr.
8355         (build_binary_op): Likewise.
8356         (build_unary_op): Likewise.
8357         (build_ptrmemfunc): Likewise.
8358         (pfn_from_ptrmemfunc): Likewise.
8359         * typeck2.c (build_m_component_ref): Adjust comment.
8360
8361 2002-08-07  Neil Booth  <neil@daikokuya.co.uk>
8362
8363         * Make-lang.in (CXX_C_OBJS): Update.
8364         * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
8365         * cp-tree.h (cxx_decode_option): Remove.
8366         * decl2.c (compare_options, lang_f_options, unsupported_options,
8367         cxx_decode_option): Remove.
8368
8369 2002-08-06  Gabriel Dos Reis  <gdr@nerim.net>
8370
8371         * typeck.c (build_x_unary_op): Handle pointer-to-member.
8372
8373 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
8374
8375         * class.c: Don't include obstack.h.
8376         (popclass):
8377         * decl2.c: Delete bogus comment.
8378         * error.c: Don't include obstack.h.
8379         * except.c: Likewise.
8380         (dump_type): Correct comment.
8381         * method.c: Don't include obstack.h.
8382         * tree.c: Likewise.
8383
8384 2002-08-04  Gabriel Dos Reis  <gdr@nerim.net>
8385
8386         Fix PR/2213
8387         * cvt.c (cp_convert_to_pointer): Reject conversions from integral
8388         expressions to pointer-to-data-member of pointer-to-member-functions.
8389
8390 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
8391
8392         * cvt.c (ocp_convert): Delete obsolete code.
8393         * parse.y (permanent_obstack): Delete declaration.
8394         * pt.c (permanent_obstack): Delete declaration.
8395         * repo.c (permanent_obstack): Delete declaration.
8396         (open_repo_file): Use xmalloc instead of permanent_obstack.
8397         (init_repo): Use xstrdup instead of permanent_obstack.
8398
8399 2002-08-04  Nathan Sidwell  <nathan@codesourcery.com>
8400
8401         * cp-tree.h (VF_DERIVED_VALUE): Remove.
8402         * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
8403
8404 2002-08-03  Nathan Sidwell  <nathan@codesourcery.com>
8405
8406         PR 7470.
8407         C++ ABI change - vfunc ordering.
8408         * class.c (add_virtual_function): Remove.
8409         (dfs_modify_all_vtables): Take list of all declared
8410         virtuals. Assign all that are not in primary base.
8411         (check_for_override): Adjust comments.
8412         (create_vtable_ptr): Take single list of virtuals. Build chain
8413         of declared virtuals here.
8414         (layout_class_type): Take single list of virtuals. Adjust.
8415         (finish_struct_1): Keep virtuals on single list. Adjust.
8416
8417 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
8418
8419         * init.c (build_member_call): Use build_new_method_call, not
8420         build_method_call.
8421
8422 2002-08-02  Krister Walfridsson  <cato@df.lth.se>
8423
8424         * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
8425
8426 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
8427
8428         * call.c (build_method_call): Issue a more helpful error message
8429         about ambiguous method names.
8430
8431 2002-08-02  Nathan Sidwell  <nathan@codesourcery.com>
8432
8433         * tree.c (build_shared_int_cst): Make cache file scope, and
8434         GTY it.
8435
8436 2002-08-02  Jason Merrill  <jason@redhat.com>
8437
8438         * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
8439         (cp_expr_size): New fn.
8440         * call.c (build_over_call): Lose empty class hackery.
8441         (convert_arg_to_ellipsis): Promote non-POD warning to error.
8442         * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
8443
8444         * semantics.c (expand_body): Do tree optimization in the function
8445         context, too.
8446
8447 2002-08-01  Neil Booth  <neil@daikokuya.co.uk>
8448
8449         * cp-tree.h: Move all warning and flag declarations to c-common.h.
8450         * decl.c: Move all warning and flag variables to c-common.c.
8451         * decl2.c: Move all warning and flag variables to c-common.c.
8452         * lex.c (flag_digraphs): Remove.
8453         (warn_traditional): Now in c-common.c.
8454
8455 2002-07-31  Mark Mitchell  <mark@codesourcery.com>
8456
8457         * call.c (build_field_call): Do not look up the field by name.
8458         (build_method_call): Simplify.
8459         (struct z_candidate): Add access_path and conversion_path.  Remove
8460         basetype_path.
8461         (convert_class_to_reference): Adjust use of
8462         add_function_candidate.
8463         (add_candidate): Add conversion_path argument.
8464         (add_function_candidate): Use it.
8465         (add_conv_dndidate): Likewise.
8466         (build_builtin_candidate): Likewise.
8467         (add_template_candidate_real): Add conversion_path argument.
8468         (add_template_conv_candidate): Likewise.
8469         (add_template_candidate): Likewise.
8470         (build_user_type_conversion_1): Use it.
8471         (build_new_function_call): Remove name lookup code.  Adjust use of
8472         add_template_candidate and add_function_candidate.
8473         (build_new_op): Likewise.
8474         (convert_like_real): Use build_special_member_call.
8475         (build_over_call): Use cand->conversion_path.
8476         (build_special_member_call): New method.
8477         (build_new_method_call): Remove name lookup code.
8478         * cp-tree.def (OFFSET_REF): Update documentation.
8479         (TEMPLATE_ID_EXPR): Likewise.
8480         * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
8481         (BASELINK_OPTYPE): Likewise.
8482         (build_new_method_call): Adjust prototype.
8483         (build_special_member_call): New method.
8484         (build_baselink): New method.
8485         (build_offset_ref_call_from_tree): Likewise.
8486         (build_call_from_tree): Likewise.
8487         (finish_qualified_call_expr): Remove.
8488         (finish_call_expr): Adjust prototype.
8489         (build_x_function_call): Remove.
8490         * cvt.c (ocp_convert): Use build_special_member_call.
8491         * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
8492         (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
8493         CALL_EXPR.
8494         (build_offset_ref_call_from_tree): New function.
8495         (build_call_from_tree): Likewise.
8496         * init.c (expand_cleanup): Use build_special_member_call.
8497         (expand_default_init): Likewise.
8498         (build_member_call): Use finish_call_expr.
8499         (build_new_1): Use build_special_member_call.
8500         (push_base_cleanups): Likewise.
8501         * method.c (do_build_assign_ref): Likewise.
8502         * parse.y (template_id): Do not pass a COMPONENT_REF to
8503         lookup_template_function.
8504         (primary): Use parse_finish_call_epxr, not finish_call_expr.
8505         (parse_finish_call_expr): New function.
8506         * pt.c (lookup_template_function): Add assertions.
8507         * search.c (lookup_base): Allow T to be a binfo.
8508         (build_baselink): New function.
8509         (lookup_member): Use it.
8510         * semantics.c (finish_call_expr): Do not do name lookup.
8511         (finish_object_call_expr): Remove #if 0'd code.
8512         (finish_qualified_call_expr): Remove.
8513         * typeck.c (build_x_function_call): Remove.
8514         (build_static_case): Use build_special_member_call.
8515         * typeck2.c (build_functional_cast): Likewise.
8516
8517 2002-07-30  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
8518
8519         * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
8520
8521 2002-07-30  Gabriel Dos Reis  <gdr@nerim.net>
8522
8523         * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
8524
8525 2002-07-30  Nathan Sidwell  <nathan@codesourcery.com>
8526
8527         * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
8528         documentation.
8529
8530 2002-07-29  Alan Modra  <amodra@bigpond.net.au>
8531
8532         * cp-tree.h: Comment typo fix.
8533
8534 2002-07-29  Richard Earnshaw  <rearnsha@arm.com>
8535
8536         * spew.c (space_for_token): Allocate zeroed memory for a new token
8537         chunk.
8538
8539 2002-07-27  Roger Sayle  <roger@eyesopen.com>
8540
8541         * decl.c (builtin_function_1): No need to explicitly mark
8542         BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
8543
8544 2002-07-27  Roger Sayle  <roger@eyesopen.com>
8545
8546         * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
8547
8548 2002-07-26  Jason Merrill  <jason@redhat.com>
8549
8550         * call.c (build_over_call): Likewise.
8551         (cp_convert_parm_for_inlining): New fn.
8552         (convert_for_arg_passing): New fn.
8553         (convert_default_arg, build_over_call): Use it.
8554         (type_passed_as): New fn.
8555         * pt.c (tsubst_decl): Use it.
8556         * decl2.c (cp_build_parm_decl): New fn.
8557         (build_artificial_parm): Use it.
8558         (start_static_storage_duration_function): Likewise.
8559         * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
8560         (grokparms): Don't mess with DECL_ARG_TYPE.
8561         * typeck.c (convert_arguments): Use convert_for_arg_passing.
8562         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
8563         Define.
8564         * cp-tree.h: Declare new fns.
8565
8566 2002-07-26  Neil Booth  <neil@daikokuya.co.uk>
8567
8568         * cp-tree.h (flag_operator_names): Remove.
8569         * decl2.c (flag_operator_names): Remove.
8570         (lang_f_options): Remove operator-names.
8571         * lex.c (D_OPNAME): Remove.
8572         (reswords): Remove operator names.
8573         (rid_to_yy): Remove operator names.
8574         (init_reswords): No need to handle D_OPNAME.
8575         * spew.c (read_process_identifier): There are no operator
8576         names.
8577
8578 2002-07-26  Jason Merrill  <jason@redhat.com>
8579
8580         * dump.c (cp_dump_tree): Call c_dump_tree.
8581         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
8582
8583 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
8584
8585         * error.c (print_whitespace): Remove.
8586         * g++spec.c (LIBUNWIND): Move.
8587         * mangle.c (mangled_position, write_signed_number): Remove.
8588
8589 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
8590
8591         * decl2.c (cxx_decode_option): Similarly.
8592
8593 2002-07-25  Gabriel Dos Reis  <gdr@nerim.net>
8594
8595         * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
8596         (cxx_sizeof_or_alignof_type): Take a third argument.
8597         (cxx_sizeof): Adjust definition.
8598         (cxx_alignof): Likewise.
8599         * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
8600         * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
8601         complaining.
8602         (c_sizeof_nowarn): Remove definition.
8603         (build_unary_op): Use cxx_sizeof_nowarn.
8604
8605 2002-07-24  Geoffrey Keating  <geoffk@redhat.com>
8606
8607         * tree.c (cp_build_qualified_type_real): When copying
8608         pointer-to-method types, unshare the record that holds
8609         the cached pointer-to-member-function type.
8610
8611 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
8612
8613         * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
8614
8615 2002-07-23  Gabriel Dos Reis  <gdr@nerim.net>
8616
8617         Fix PR/7363:
8618         * typeck.c (cxx_sizeof_or_alignof_type): New function.
8619         (c_sizeof): Remove definition.
8620         (expr_sizeof): Use cxx_sizeof.
8621         * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
8622         * decl.c (finish_destructor_body): Use cxx_sizeof.
8623         * semantics.c (finish_alignof): Likewise.
8624         (finish_alignof): Use cxx_alignof.
8625         * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
8626         (cxx_sizeof_or_alignof_type): Declare.
8627         (my_friendly_assert): Move to ../c-common.h.
8628
8629 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
8630
8631         * class.c, method.c, pt.c, search.c: Don't define obstack macros.
8632
8633 2002-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8634
8635         PR c++/7347, c++/7348
8636         * cp-tree.h (tsubst_flags_t): Add tf_parsing.
8637         * decl.c (make_typename_type): Use it.
8638         (make_unbound_class_template): Likewise.
8639         (lookup_name_real): Don't call type_access_control if scope is
8640         template parameter dependent.
8641         * parse.y (template_arg): Call make_unbound_class_template with
8642         tf_parsing set.
8643         (nest_name_specifier): Call make_typename_type with tf_parsing set.
8644         (typename_sub0): Likewise.
8645         (typename_sub1): Likewise.
8646         (instantiate_decl): Push class scope.
8647         * pt.c (regenerate_decl_from_template): Call pushclass and popclass
8648         for both static variable and member function template.
8649         (instantiate_decl) Call pushclass and popclass when tsubst'ing type
8650         and arguments.
8651         * search.c (type_access_control): Do type access for TEMPLATE_DECL
8652         too.
8653
8654 2002-07-20  Roger Sayle  <roger@eyesopen.com>
8655
8656         * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
8657         test by using positive_option.  Make whitespace consistent.
8658
8659 2002-07-20  Gabriel Dos Reis  <gdr@nerim.net>
8660
8661         * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
8662         members with 'locus'.  Adjust use throughout.
8663         (struct feed):  Likewise.
8664         (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
8665         Adjust use.
8666         (snarf_defarg): Use error(), not error_with_file_and_line().
8667
8668 2002-07-19  Chris Demetriou  <cgd@broadcom.com>
8669
8670         * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
8671         cpp_options is included.
8672
8673 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8674
8675         PR c++/2862, c++/2863
8676         * pt.c (determine_specialization): Compare the length of
8677         TYPE_ARG_TYPES.  Tidy.
8678
8679 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8680
8681         PR c++/3797
8682         * decl.c (duplicate_decls): Don't propagate inlining parameters from
8683         olddecl to newdecl when newdecl is a specialization of the
8684         instantiation olddecl.
8685
8686 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8687
8688         PR c++/4802, c++/5387
8689         * decl.c (make_typename_type): Use enforce_access.
8690
8691 2002-07-17  Scott Snyder <snyder@fnal.gov>
8692
8693         PR c++/7320
8694         * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
8695
8696 2002-07-12  Mark Mitchell  <mark@codesourcery.com>
8697
8698         * class.c (add_method): Correct handling of conversion operators.
8699
8700 2002-07-11  Mark Mitchell  <mark@codesourcery.com>
8701
8702         PR c++/7224
8703         * class.c (add_method): Simplify.
8704
8705 2002-07-11  Jason Merrill  <jason@redhat.com>
8706
8707         PR c++/7279
8708         * tree.c (cp_copy_res_decl_for_inlining): Also copy
8709         TREE_ADDRESSABLE.
8710
8711 2002-07-10  Graham Stott  <graham.stott@btinternet.com>
8712
8713         * pt.c (template_parm_this_level_p, push_template_decl_real):
8714         Pass depth as int pointer.
8715
8716 2002-07-11  Tim Josling  <tej@melbpc.org.au>
8717
8718         Remove front end hard coding from gengtype.c.
8719
8720         * config-lang.in (gtfiles): Add files needed for this front end.
8721
8722 2002-07-10  Mark Mitchell  <mark@codesourcery.com>
8723
8724         * cp-tree.h (unqualified_name_lookup_error): Declare it.
8725         (begin_function_definition): Adjust prototype.
8726         * lex.c (unqualified_name_lookup_error): New function, split out
8727         from ...
8728         (do_identifier): ... here.
8729         * parse.y (parse_begin_function_definition): New function.
8730         (fn.def1): Use it.
8731         * semantics.c (begin_function_definition): Accept decl-specifiers
8732         and attributes as separate parameters.
8733
8734 2002-07-10  Jason Merrill  <jason@redhat.com>
8735
8736         PR c++/6255
8737         * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
8738         modifying the old one.
8739
8740 2002-07-09  Mark Mitchell  <mark@codesourcery.com>
8741
8742         * cp-tree.h (constructor_name_p): Declare it.
8743         (check_template_template_default_arg): Likewise.
8744         * class.c (handle_using_decl): Use constructor_name_p.
8745         * decl.c (grokdeclarator): Likewise.
8746         * decl2.c (constructor_name_p): Define it.
8747         * init.c (build_member_call): Use constructor_name_p.
8748         * parse.y (template_parm): Use check_template_template_default_arg.
8749         * pt.c (check_explicit_specialization): Use constructor_name_p.
8750         * semantics.c (check_template_template_default_arg): New function.
8751
8752 2002-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8753
8754         * pt.c (can_complete_type_without_circularity): Add static to
8755         function definition.
8756
8757 2002-07-08  Mark Mitchell  <mark@codesourcery.com>
8758
8759         * cp-tree.h (have_extern_spec): Declare it
8760         * decl.c (have_extern_spec): Define it.
8761         (start_decl): Eliminate use of used_extern_spec.
8762         (start_function): Likewise.
8763         * parse.y (have_extern_spec): Remove declaration.
8764         (used_extern_spec): Likewise.
8765         (frob_specs): Eliminate use of used_extern_spec.
8766         (.hush_warning): Likewise.
8767
8768 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
8769
8770         * Make-lang.in (cp/parse.o): Depend on decl.h.
8771         * cp-tree.h (do_decl_instantiation): Change prototype.
8772         * parse.y: Include decl.h.
8773         (parse_decl_instantiation): New function.
8774         (explicit_instantiation): Use it.
8775         * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
8776         and DECLSPECS.
8777
8778 2002-07-07  Roger Sayle  <roger@eyesopen.com>
8779
8780         * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
8781         constructor and destructor tests when passed a TEMPLATE_DECL.
8782
8783 2002-07-05  Jason Merrill  <jason@redhat.com>
8784
8785         * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
8786         pointers.
8787
8788         PR optimization/7145
8789         * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
8790
8791 2002-07-05  Nathan Sidwell  <nathan@codesourcery.com>
8792
8793         Repair damage on weak-impared targets caused by my previous patch.
8794         * cp-tree.h (import_export_tinfo): Add parameter.
8795         * decl2.c (import_export_tinfo): Add parameter, post adjust
8796         DECL_COMDAT.
8797         * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
8798         import_export_tinfo.
8799
8800 2002-07-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8801
8802         PR c++/6944
8803         * init.c (build_aggr_init): Remove qualifiers of init before calling
8804         build_vec_init.
8805         (build_vec_init): Flatten multi-dimensional array during cleanup.
8806         (build_vec_delete_1): Abort if the type of each element is array.
8807
8808 2002-07-03  Graham Stott  <graham.stott@btinternet.com>
8809
8810         * pt.c (instantiate_class_template): Fix typo.
8811
8812 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8813
8814         * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
8815         by CVS conflict in my last patch.
8816
8817 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8818
8819         PR c++/6716
8820         * pt.c (can_complete_type_without_circularity): New function.
8821         (instantiate_class_template): Use it.
8822         * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
8823         message due to incomplete fields.
8824
8825 2002-07-01  Mark Mitchell  <mark@codesourcery.com>
8826
8827         PR c++/7112
8828         * mangle.c (write_expression): Add mangling for sizeof when
8829         applied to a type.
8830         * operators.def: Remove stale comment.
8831
8832 2002-06-30  Nathan Sidwell  <nathan@codesourcery.com>
8833
8834         * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
8835         (CPTI_TYPE_INFO_PTR_TYPE): ... this.
8836         (tinfo_decl_type): Replace with ...
8837         (type_info_ptr_type): ... this.
8838         (import_export_tinfo): Declare.
8839         (tinfo_decl_p): Rename to ...
8840         (unemitted_tinfo_decl_p): ... this.
8841         * decl2.c (import_export_decl): Break out tinfo handling into ...
8842         (import_export_tinfo): ... here. New function.
8843         (finish_file): Adjust.
8844         * rtti.c (TINFO_REAL_NAME): New macro.
8845         (init_rtti_processing): Create the tinfo types.
8846         (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
8847         (get_tinfo_decl): Adjust.
8848         (get_tinfo_ptr): New function.
8849         (get_type_id): Use it.
8850         (tinfo_base_init): Create vtable decl here, if it doesn't exist.
8851         (ptr_initializer): Use get_tinfo_ptr.
8852         (ptm_initializer): Likewise.
8853         (synthesize_tinfo_var): Break into ...
8854         (get_pseudo_ti_init): ... this. Just create the initializer.
8855         (get_pseudo_ti_desc): .. and this.
8856         (create_real_tinfo_var): Remove.
8857         (create_pseudo_type_info): Don't create the vtable decl here.
8858         (get_vmi_pseudo_type_info): Remove.
8859         (create_tinfo_types): Adjust.
8860         (tinfo_decl_p): Rename to ...
8861         (unemitted_tinfo_decl_p): ... here. Adjust.
8862         (emit_tinfo_decl): Adjust. Create the initializer.
8863
8864 2002-06-27  Mark Mitchell  <mark@codesourcery.com>
8865
8866         PR c++/6695
8867         * pt.c (tsubst_friend_class): Substitute into the context of the
8868         friend before using it.
8869
8870 2002-06-26  Mark Mitchell  <mark@codesourcery.com>
8871
8872         * cp-tree.h (xref_tag): Change prototype.
8873         (handle_class_head): Likewise.
8874         (build_x_component_ref): Likewise.
8875         * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
8876         (xref_tag): Take attributes as a separate parameter.
8877         (xref_tag_from_type): Adjust call to xref_tag.
8878         * decl2.c (build_expr_from_tree): Adjust call to
8879         build_x_component_ref.
8880         (handle_class_head): Take attributes as a separate parameter.
8881         * parse.y (parse_xref_tag): New function.
8882         (parse_handle_class_head): Likewise.
8883         (primary): Use parse_xref_tag.
8884         (class_head_decl): Use parse_handle_class_head.
8885         (class_head_defn): Likewise.
8886         * rtti.c (init_rtti_processing): Adjust call to xref_tag.
8887         (build_dynamic_cast_1): Likewise.
8888         (create_pseudo_type_info): Likewise.
8889         (emit_support_tinfos): Likewise.
8890         * typeck.c (build_object_ref): Adjust call to
8891         build_x_component_ref.
8892         (build_x_component_ref): Remove protect parameter.
8893
8894 2002-06-25  Mark Mitchell  <mark@codesourcery.com>
8895
8896         * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
8897         * class.c (handle_using_decl): Likewise.
8898         (instantiate_type): Likewise.
8899         * cp-tree.h (BASELINK_FUNCTIONS): New macro.
8900         (xref_basetypes): Change prototype.
8901         (begin_mem_initializers): New function.
8902         (get_overloaded_fn): Likewise.
8903         * decl.c (xref_basetypes): Simplify.
8904         * error.c (dump_expr): Use BASELINK_FUNCTIONS.
8905         * init.c (build_offset_ref): Likewise.
8906         * parse.y (base_init): Use begin_mem_initializers().
8907         (structsp): Adjust call to xref_basetypes.
8908         * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
8909         (instantiate_class_template): Adjust call to xref_basetypes.
8910         * semantics.c (begin_mem_initializers): New function.
8911         * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
8912         (really_overloaded_fn): Likewise.
8913         (get_overloaded_fn): New function.'
8914         (get_first_fn): USe BASELINK_FUNCTIONS.
8915
8916 2002-06-24  Mark Mitchell  <mark@codesourcery.com>
8917
8918         * cp-tree.h (SCALAR_TYPE_P): New macro.
8919         (check_for_out_of_scope_variable): New function.
8920         (at_class_scope_p): Likewise.
8921         (finish_fname): Likewise.
8922         * class.c (finish_struct): Use at_function_scope_p.
8923         * decl.c (check_for_out_of_scope_variable): New function, split
8924         out from do_identifier.
8925         (finish_enum): Use at_function_scope_p.
8926         * lex.c (do_identifier): Use check_for_out_of_scope_variable.
8927         * parse.y (VAR_FUNC_NAME): Give it <ttype>.  Use finish_fname.
8928         (primary): Use at_function_scope_p.
8929         * search.c (at_class_scope_p): New function.
8930         * semantics.c (finish_fname): Likewise.
8931         (check_multiple_declarators): Use at_function_scope_p.
8932
8933 2002-06-23  Mark Mitchell  <mark@codesourcery.com>
8934
8935         * parse.y (parse_scoped_id): New function.
8936         (primary): Use it.
8937         * cp-tree.h (do_scoped_id): Adjust declaration.
8938         * lex.c (do_scoped_id): Remove call to yylex.
8939         * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
8940         * typeck2.c (add_exception_specifier): Use tree_cons, rather than
8941         expanding it inline.
8942
8943 2002-06-23  Matt Thomas  <matt@3am-software.com>
8944
8945         * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
8946         "#if VMS_TARGET".
8947
8948 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8949
8950         * mangle.c (integer_type_codes): Const-ify.
8951
8952 2002-06-20  Richard Henderson  <rth@redhat.com>
8953
8954         PR c++/6747
8955         * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
8956         Call put_var_into_stack.
8957
8958 2002-06-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8959
8960         * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
8961         array size calculation.
8962
8963 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8964
8965         PR c++/6892
8966         * pt.c (tsubst_expr): Handle FILE_STMT.
8967
8968 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8969
8970         PR c++/6723
8971         * pt.c (lookup_template_class): Don't build complete argument of
8972         BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
8973         argument.
8974
8975 2002-06-19  Akim Demaille  <akim@epita.fr>
8976
8977         * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
8978         decl.h's TYPENAME.
8979         * spew.c, lex.c: Adjust.
8980         * parse.y (explicit_instantiation): Add empty action to override
8981         the default $$ = $1 where it introduces a type clash.
8982
8983 2002-06-14  Jason Merrill  <jason@redhat.com>
8984
8985         * semantics.c (begin_for_stmt): Push the 'for' scope before
8986         adding the FOR_STMT.
8987
8988         C++ ABI changes.
8989         * class.c (build_base_field): Set DECL_PACKED.
8990         (layout_class_type): Don't use tail padding of PODs.
8991         * mangle.c (write_unqualified_name): Fix template conversion op
8992         mangling.
8993
8994 2002-06-16  Richard Henderson  <rth@redhat.com>
8995
8996         PR opt/6793
8997         * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
8998         after template instantiation.
8999
9000 2002-06-16  Richard Henderson  <rth@redhat.com>
9001
9002         * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
9003
9004 2002-06-15  Gabriel Dos Reis  <gdr@codesourcery.com>
9005
9006         * cp-tree.h (compiler_error): Remove declaration.
9007         * lex.c (compiler_error): Remove definition.
9008
9009 2002-06-14  Steve Ellcey  <sje@cup.hp.com>
9010
9011         * g++spec.c (LIBUNWIND): New.
9012         (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
9013
9014 2002-06-13  Jessica Han  <jessica@cup.hp.com>
9015
9016         * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
9017         (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
9018         (build_vbase_offset_vtbl_entries): Likewise.
9019         * rtti.c (build_headof): Likewise.
9020         (get_tinfo_decl_dynamic): Likewise.
9021         (create_pseudo_type_info): Likewise.
9022
9023 2002-06-12  Stan Shebs  <shebs@apple.com>
9024
9025         * mpw-config.in: Remove file, no longer used.
9026         * mpw-make.sed: Ditto.
9027
9028 2002-06-07  Zack Weinberg  <zack@codesourcery.com>
9029
9030         * decl2.c: Update call to cpp_handle_option.
9031
9032 2002-06-07  H.J. Lu  (hjl@gnu.org)
9033
9034         * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
9035
9036 2002-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
9037
9038         * error.c (cp_error_at): Fix typo.
9039
9040 2002-06-04  Gabriel Dos Reis  <gdr@codesourcery.com>
9041
9042         * error.c (cp_diagnostic_starter): Adjust call.
9043         (maybe_print_instantiation_context): Change prototype to take a
9044         'diagnostic_info *'.
9045         (print_instantiation_full_context): Likewise.
9046         (print_instantiation_partial_context): Likewise.
9047         (cp_diagnostic_starter): Likewise.
9048         (cp_diagnostic_finalizer): Likewise.
9049         (cp_print_error_function): Likewise.
9050         (cp_printer): Take a secondary parameter as a 'text_info *'.
9051         Remove output_state savings.  Adjust calls.
9052
9053 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
9054
9055         * pt.c (inline_parm_levels): Mark for GC.
9056
9057         * mangle.c (start_mangling): Allocate G.substitutions here...
9058         (init_mangle): ... rather than here.
9059         (finish_mangling): Clear the varray pointer when done with it.
9060         * spew.c (yylexstring): Don't use VARRAY_FREE.
9061         * search.c (bfs_walk): Don't use VARRAY_FREE.
9062         * decl2.c (pending_statics): Use gengtype to mark.
9063         (deferred_fns): Likewise.
9064         (ssdf_decls): Likewise.
9065         (init_decl2): Delete.
9066         * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
9067         (cxx_init_decl_processing): Don't call init_decl2.
9068         (cxx_pop_function_context): Don't use VARRAY_FREE.
9069         * cp-tree.h (struct saved_scope): No need for special marking
9070         of varrays.
9071         (struct language_function): Likewise.
9072         (local_classes): Use gengtype to mark.
9073         (init_decl2): Delete prototype.
9074         * class.c (init_class_processing): Don't use
9075         ggc_add_tree_varray_root.
9076         (build_vtbl_initializer): Don't use VARRAY_FREE.
9077
9078         * decl.c (typename_compare): Don't use same_type_p.
9079
9080         * decl.c: Include hashtab.h instead of hash.h.
9081         (typename_hash): Update to use htab_h.
9082         (typename_compare): Likewise.
9083         (typename_htab): Use gengtype to mark.
9084         (build_typename_type): Update to use htab_h.
9085         * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
9086
9087         * Make-lang.in (gt-cp-tree.h): New rule.
9088         (cp/tree.o): Depend on gt-cp-tree.h.
9089         * config-lang.in (gtfiles): Add cp/tree.c.
9090         * tree.c: Include gt-cp-tree.h.
9091         (list_hash_table): Use gengtype to mark.
9092         (init_tree): Use gengtype to mark trees.
9093
9094         * Make-lang.in (cp/decl.o): Add debug.h dependency.
9095         * call.c (struct z_candidate): Use gengtype.
9096         (USER_CONV_CAND): Use WRAPPER_ZC.
9097         (convert_class_to_reference): Use build_zc_wrapper.
9098         (build_type_conversion_1): Likewise.
9099         (build_over_call): Use WRAPPER_ZC.
9100         (add_warning): Use build_zc_wrapper.
9101         * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
9102         * cp-tree.h (struct lang_identifier): Use gengtype.
9103         (struct template_parm_index_s): Likewise.
9104         (struct ptrmem_cst): Likewise.
9105         (struct tree_binding): Likewise.
9106         (struct tree_overload): Likewise.
9107         (struct tree_srcloc): Likewise.
9108         (struct tree_wrapper): Likewise.  Also modify to have a pointer
9109         to struct z_candidate rather than void.
9110         (enum cp_tree_node_structure_enum): New.
9111         (union lang_tree_node): New.
9112         (cxx_mark_tree): Delete prototype.
9113         (cp_tree_node_structure): New prototype.
9114         (build_ptr_wrapper): Delete prototype.
9115         (build_int_wrapper): Delete prototype.
9116         (build_zc_wrapper): New prototype.
9117         * decl.c: Include debug.h
9118         (cxx_mark_tree): Delete.
9119         (cp_tree_node_structure): New.
9120         * tree.c (build_ptr_wrapper): Delete.
9121         (build_int_wrapper): Delete.
9122         (build_zc_wrapper): New.
9123
9124         * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
9125         Correct typo.  Patch from k_fukui@highway.ne.jp.
9126
9127         * semantics.c (current_stmt_tree): Update for change to
9128         struct language_function.
9129         (finish_mem_initializers): Likewise.
9130         * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
9131         * cp-tree.h (struct language_function): Rename from
9132         cp_language_function.  Change all uses.
9133         (cp_function_chain): Don't need to cast.
9134
9135         * class.c (duplicate_tag_error): Reset discriminator.
9136         (check_bases_and_members): Update for data structure changes.
9137         * cp-tree.h (struct lang_id2): Use gengtype.
9138         (flagged_type_tree): Likewise.
9139         (SET_LANG_ID): Use GGC on struct lang_id2.
9140         (struct cp_language_function): Use gengtype.  Remove field
9141         'x_vcalls_possible_p'.
9142         (current_vcalls_possible_p): Delete.
9143         (struct lang_type_header): New.
9144         (struct lang_type_class): Rename from struct lang_type.  Include
9145         struct lang_type_header.
9146         (struct lang_type_ptrmem): New.
9147         (struct lang_type): New.
9148         (LANG_TYPE_CLASS_CHECK): New.  Use it in all the appropriate macros.
9149         (LANG_TYPE_PTRMEM_CHECK): New.  Use it in all the appropriate macros.
9150         (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
9151         (struct lang_decl_flags): Use gengtype.  Add discriminators.
9152         (struct lang_decl): Use gengtype.  Add and use discriminators.
9153         Update the macros that reference moved fields.
9154         (LANG_DECL_U2_CHECK): New function.  Use it when appropriate.
9155         (SET_DECL_THUNK_P): Set discriminator too.
9156         (clear_inline_text_obstack): Delete prototype.
9157         (finish_inline_definitions): Delete prototype.
9158         (mark_pending_inlines): Delete prototype.
9159         (lang_check_failed): New prototype.
9160         * decl.c (struct named_label_use_list): Use gengtype.
9161         (struct named_label_list): Likewise.
9162         (mark_binding_level): Delete.
9163         (mark_named_label_lists): Delete.
9164         (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
9165         (cxx_init_decl_processing): Use generated marker routine.
9166         (begin_destructor_body): Delete dead set to
9167         current_vcalls_possible_p.
9168         (mark_lang_function): Delete.
9169         (mark_cp_function_context): Delete.
9170         (lang_mark_tree): Use generated marker routines.
9171         * decl2.c (start_objects): Set discriminator when setting
9172         GLOBAL_INIT_PRIORITY.
9173         * lex.c (retrofit_lang_decl): Set discriminators.
9174         (copy_lang_type): Update for changes to lang_type structure.
9175         (cp_make_lang_type): Set discriminator.
9176         * parse.y: Use gengtype on YYLVAL.  Don't use dots in identifiers.
9177         * search.c: Include ggc.h.
9178         * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
9179         (finish_inline_definitions): Delete.
9180         * spew.c (struct token): Use gengtype.
9181         (struct token_chunk): New.
9182         (struct unparsed_text): Use gengtype.  Store tokens in chunks.
9183         (struct feed): Use gengtype.
9184         (feed_obstack): Delete.
9185         (feed): Mark as GC root.
9186         (pending_inlines): Mark as GC root.
9187         (pending_inlines_tail): Likewise.
9188         (processing_these_inlines): Likewise.
9189         (token_obstack): Make static.
9190         (first_token): Likewise.
9191         (init_spew): Don't initialize deleted things; use gengtype for roots.
9192         (clear_inline_text_obstack): Delete.
9193         (feed_input): Use GC for struct feed.  Update for changes to
9194         struct unparsed_text.
9195         (mark_pending_inlines): Delete.
9196         (next_token): Rename from add_token.  Change all callers.  Update
9197         for changes to struct unparsed_text.
9198         (space_for_token): New.
9199         (remove_last_token): New.
9200         (alloc_unparsed_text): New.
9201         (snarf_block): Take an unparsed_text.  Update for changes to struct
9202         unparsed_text.
9203         (snarf_method): Update for changes to struct unparsed_text.
9204         (snarf_defarg): Update for changes to struct unparsed_text.
9205         * tree.c (lang_check_failed): New.
9206
9207         * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
9208         gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
9209         (cp/spew.o): Add dependency on gt-<filename>.h.
9210         (cp/decl2.o): Add dependency on gt-<filename>.h.
9211         (cp/call.o): Add dependency on gt-<filename>.h.
9212         (cp/pt.o): Add dependency on gt-<filename>.h.
9213         (cp/repo.o): Add dependency on gt-<filename>.h.
9214         (cp/parse.o): Add dependency on gt-<filename>.h.
9215         * call.c: Use gengtype for roots.
9216         * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
9217         decl2.c parse.y pt.c repo.c spew.c.
9218         * cp-tree.h: Use gengtype for roots.
9219         (struct saved_scope): Use GGC, gengtype.
9220         (cp_parse_init): Delete prototype.
9221         (init_pt): Delete prototype.
9222         * decl.c: Use gengtype for roots.
9223         (mark_saved_scope): Delete.
9224         (cxx_init_decl_processing): Don't call deleted initilisation
9225         routines.
9226         (signed_size_zero_node): Delete, unused.
9227         * decl.h: Use gengtype for roots.
9228         * decl2.c: Use gengtype for roots.
9229         * lex.h: Use gengtype for roots.
9230         * parse.y: Use gengtype for roots.
9231         (cp_parse_init): Delete.
9232         * pt.c: Use gengtype for roots.
9233         (init_pt): Delete.
9234         * repo.c: Use gengtype for roots.
9235         * spew.c: Use gengtype for roots.
9236
9237         * Make-lang.in: Allow for filename changes.  Add gtype-cp.h.
9238         (cp/decl.o): Add dependency on gtype-cp.h.
9239         * decl.c: Remove use of add_deletable_root, use GTY marker instead.
9240         Include gtype-cp.h.  Allow for filename changes.
9241
9242         * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
9243         (cp/decl.o): Add cp/gt-decl.h dependency.
9244         * config-lang.in (gtfiles): New.
9245         * tree.h: Rename struct binding_level to struct cp_binding_level.
9246         * decl.c: Rename struct binding_level to struct cp_binding_level.
9247         Include cp/gt-decl.h.
9248         (struct cp_binding_level): Use gengtype.
9249         (make_binding_level): Use GGC on struct cp_binding_level.
9250         (mark_binding_level): Use gt_ggc_m_cp_binding_level.
9251         (cxx_init_decl_processing): Mark free_binding_level as
9252         deletable.
9253
9254         * decl.c (mark_cp_function_context): Update calling sequence.
9255
9256         * decl.c (start_function): Don't free 'struct
9257         cp_language_function'.
9258         (pop_cp_function_context): Likewise.
9259         (save_function_data): Allocate it using GC.
9260         * semantics.c (genrtl_start_function): Don't free 'struct
9261         cp_language_function'.
9262
9263 2002-05-31  Matthew Woodcraft  <mattheww@chiark.greenend.org.uk>
9264
9265         * lang-specs.h: Use cpp_debug_options.
9266
9267 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
9268
9269         * mangle.c, tree.c: Include real.h.
9270         * Make-lang.in: Update dependency lists.
9271
9272 2002-05-25  Neil Booth  <neil@daikokuya.demon.co.uk>
9273
9274         * lex.c: Don't include c-lex.h.
9275         * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
9276
9277 2002-05-23  Neil Booth  <neil@daikokuya.demon.co.uk>
9278
9279         * spew.c (yyungetc, snarf_block): Remove indent_level handling.
9280
9281 2002-05-22  Richard Henderson  <rth@redhat.com>
9282
9283         * decl.c (obscure_complex_init): Check for VAR_DECL
9284         before using DECL_THREAD_LOCAL.
9285
9286 2002-05-22  Richard Henderson  <rth@redhat.com>
9287
9288         * decl.c (check_tag_decl): Handle RID_THREAD.
9289         (obscure_complex_init): Reject run-time init of tls.
9290         (grokvardecl, grokdeclarator): Handle RID_THREAD.
9291         * lex.c (reswords): Add __thread.
9292         (rid_to_yy): Map RID_THREAD to SCSPEC.
9293
9294 2002-05-22  Neil Booth  <neil@daikokuya.demon.co.uk>
9295
9296         * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
9297         * cp-tree.h (cxx_post_options): Kill.
9298         * cp-lex.c (cxx_post_options): Kill.
9299
9300 2002-05-21  Richard Henderson  <rth@redhat.com>
9301
9302         * lex.c (rid_to_yy): Add RID_THREAD.
9303
9304 2002-05-21  Alexandre Oliva  <aoliva@redhat.com>
9305
9306         * init.c (build_vec_init): Test for trivial copy-assignment when
9307         copy-assigning arrays.
9308
9309 2002-05-20  Andreas Jaeger  <aj@suse.de>
9310
9311         * init.c (build_default_init): Remove unused variable.
9312
9313 2002-05-20  Alexandre Oliva  <aoliva@redhat.com>
9314
9315         * call.c (any_strictly_viable): New.
9316         (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
9317
9318 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9319
9320         * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
9321
9322 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9323
9324         PR c++/186, DR 259
9325         * pt.c (do_decl_instantiation): Don't complain explicit
9326         instantiation after explicit specialization.
9327         (do_type_instantiation): Likewise.
9328
9329 2002-05-19  Alexandre Oliva  <aoliva@redhat.com>
9330
9331         * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
9332         renamed from...
9333         (complete_type_or_else): ... this.  Redefined as macro.
9334         (cxx_incomplete_type_diagnostic): Declare.
9335         (cxx_incomplete_type_error): Define as macro.
9336         * init.c (build_delete): Warn about incomplete types other than
9337         void, and use the built-in operator delete for them.
9338         * typeck.c (complete_type_or_diagnostic): Renamed from
9339         complete_type_or_else.  Added warn_only argument, passed to...
9340         * typeck2.c (cxx_incomplete_type_diagnostic): ... this.  Print
9341         warnings or errors depending on new warn_only argument.  Renamed
9342         from...
9343         (cxx_incomplete_type_error): ... this.  New implementation in
9344         terms of cxx_incomplete_type_diagnostic.
9345
9346 2002-05-18  Jason Merrill  <jason@redhat.com>
9347
9348         PR c++/6611
9349         * decl2.c (import_export_decl): If we clear
9350         DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
9351
9352 2002-05-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9353
9354         PR c++/6620
9355         * pt.c (verify_class_unification): Don't check if PARM is template
9356         parameter dependent.  Simplify.
9357         (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
9358         parameter dependent expression.
9359
9360 2002-05-14  Jason Merrill  <jason@redhat.com>
9361
9362         * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
9363         Do set DECL_COMDAT.
9364         (synthesize_tinfo_var): Take the public decl.
9365         (create_real_tinfo_var): Likewise.  Check DECL_COMDAT.
9366         (emit_tinfo_decl): Adjust.  Call import_export_decl.
9367         * decl2.c (import_export_decl): Simplify tinfo decl handling.
9368
9369 2002-05-14  Alexandre Oliva  <aoliva@redhat.com>
9370
9371         * cp-tree.h (struct lang_type): Added non_zero_init.
9372         (CLASSTYPE_NON_ZERO_INIT_P): New macro.
9373         (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
9374         * class.c (check_field_decls): Test non_zero_init.
9375         * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
9376         zero-to-NULL conversions.
9377         * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
9378         type that needs zero-initialization without zeros.
9379         (check_initializer_decl): Compute zero-initializer for types
9380         that require a non-trivial one.
9381         * init.c (build_forced_zero_init): New function.
9382         (build_default_init): Use it.
9383         * tree.c (zero_init_p): New function.
9384         * typeck2.c (force_store_init_value): New function.
9385         (process_init_constructor): Create non-trivial zero-initializers
9386         for array members and class fields.
9387
9388 2002-05-14  Neil Booth  <neil@daikokuya.demon.co.uk>
9389
9390         * lang-specs.h: Remove redundant -lang-c++.
9391
9392 2002-05-13  Jason Merrill  <jason@redhat.com>
9393
9394         * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
9395         (fixed_type_or_null): See through reference vars.
9396         (build_base_path): Vtable contents are constant.
9397         * typeck.c (get_member_function_from_ptrfunc): Likewise.
9398
9399 2002-05-12  Jason Merrill  <jason@redhat.com>
9400
9401         * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
9402         structs are safe.
9403
9404 2002-05-09  Neil Booth  <neil@daikokuya.demon.co.uk>
9405
9406         * cp-tree.h (flag_ansi): Remove.
9407         * decl2.c (flag_ansi): Remove.
9408         (cxx_decode_option): Set flag_iso and flag_undef.
9409
9410 2002-05-09  Jason Merrill  <jason@redhat.com>
9411
9412         * typeck.c (get_member_function_from_ptrfunc): Reorganize.
9413         Use subtraction rather than a bitmask to get the index.
9414         * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
9415
9416         * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
9417
9418 2002-05-07  Neil Booth  <neil@daikokuya.demon.co.uk>
9419
9420         * Make-lang.in (decl2.o): Update.
9421         * cp-tree.h (warn_multichar): Remove.
9422         * decl2.c: Include c-common.h.
9423         (warn_multichar): Remove.
9424
9425 2002-05-03  Jason Merrill  <jason@redhat.com>
9426
9427         * tree.c (build_cplus_array_type): Only const and volatile get
9428         special handling.
9429
9430         * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
9431
9432 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
9433
9434         ABI change, returning simple classes from functions.
9435         * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
9436         TYPE_HAS_TRIVIAL_INIT_REF is false or
9437         TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
9438
9439 2002-04-30  Jason Merrill  <jason@redhat.com>
9440
9441         PR debug/6436
9442         * decl.c (grokdeclarator): Don't override TYPE_NAME of an
9443         anonymous class with a typedef if there are attributes.
9444
9445 2002-04-29  Paul Eggert  <eggert@twinsun.com>
9446
9447         * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
9448
9449 2002-04-29  Jakub Jelinek  <jakub@redhat.com>
9450
9451         PR c++/6477
9452         * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
9453         non-NULL first.
9454
9455 2002-04-29  Mark Mitchell  <mark@codesourcery.com>
9456
9457         PR c++/6492
9458         * pt.c (tsubst_friend_class): If the friend has an explicit scope,
9459         enter that scope before name lookup.
9460
9461         PR c++/6486
9462         * method.c (do_build_copy_constructor): Avoid building
9463         cv-qualified reference types.
9464
9465 2002-04-29  Nathan Sidwell  <nathan@codesourcery.com>
9466
9467         PR c++/5719
9468         * decl.c (grok_op_properties): Assignment ops don't have to return
9469         by value. operator% should.
9470
9471 2002-04-28  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
9472
9473         PR c/6343
9474         * decl.c (duplicate_decls): Call merge_weak.
9475
9476 2002-04-26  Richard Henderson  <rth@redhat.com>
9477
9478         * parse.y (malloced_yyss, malloced_yyvs): New.
9479         (yyoverflow): Re-add.  Set them.
9480         (free_parser_stacks): New.
9481
9482 2002-04-26  Mark Mitchell  <mark@codesourcery.com>
9483
9484         PR c++/6497
9485         * method.c (do_build_assign_ref): Pass a derivation to
9486         build_method_call when calling base class assignment operators.
9487
9488 2002-04-26  Richard Henderson  <rth@redhat.com>
9489
9490         * parse.y (yyoverflow): Revert.
9491
9492 2002-04-26  Richard Henderson  <rth@redhat.com>
9493
9494         PR c/3581
9495         * parse.y (string): Remove.  Update all uses to use STRING
9496         instead, and not call combine_strings.
9497         * rtti.c (tinfo_name): Use fix_string_type.
9498         * semantics.c (finish_asm_stmt): Don't call combine_strings.
9499         * spew.c (yylexstring): New.
9500         (read_token): Use it.
9501
9502 2002-04-25  Richard Henderson  <rth@redhat.com>
9503
9504         PR c/2161
9505         * parse.y (yyoverflow): New.
9506
9507 2002-04-25  Jason Merrill  <jason@redhat.com>
9508
9509         PR c++/5607
9510         * search.c (check_final_overrider): No longer static.
9511         * class.c (update_vtable_entry_for_fn): Call it.
9512         * cp-tree.h: Adjust.
9513
9514 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
9515
9516         * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
9517         * cp-tree.h (cxx_set_yydebug): Die.
9518         * lex.c (YYDEBUG): Get from c-lex.h.
9519         (cxx_set_yydebug): Remove.
9520         * parse.y: Include c-lex.h.
9521         (YYDEBUG): Get from c-lex.h.
9522
9523 2002-04-24  Mark Mitchell  <mark@codesourcery.com>
9524
9525         PR c++/6438.
9526         * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
9527         void.
9528
9529 2002-04-24  Neil Booth  <neil@daikokuya.demon.co.uk>
9530
9531         * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
9532         LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
9533         Redefine.
9534         * cp-tree.h (cp_attribute_table): Rename.
9535         * decl.c (lang_attribute_table): Remove declaration.
9536         (cxx_init_decl_processing): Don't set it.
9537         * tree.c (cp_attribute_table): Rename.
9538
9539 2002-04-24  Jason Merrill  <jason@redhat.com>
9540
9541         PR c++/6331
9542         * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
9543         * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
9544         The pedwarn for array assignment is now unconditional.
9545         * tree.c (build_cplus_array_type_1): Still process simple array types
9546         normally in templates.
9547
9548         PR c++/6395
9549         * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
9550         stuff for comdats.
9551
9552 2002-04-23  Jakub Jelinek  <jakub@redhat.com>
9553
9554         * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
9555         node with attributes.
9556
9557 2002-2-23  David O'Brien  <obrien@FreeBSD.org>
9558
9559         * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
9560         Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
9561
9562 2002-04-23  Mark Mitchell  <mark@codesourcery.com>
9563
9564         PR c++/6256:
9565         * pt.c (tsubst_friend_class): Handle templates with explicit
9566         nested names.
9567
9568         PR c++/6331:
9569         * typeck.c (merge_types): Remember the cv-qualification of pointer
9570         types when merging them.
9571
9572 2002-04-20  Neil Booth  <neil@daikokuya.demon.co.uk>
9573
9574         * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
9575         LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
9576         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
9577         cxx_mark_function_context): New.
9578         * decl.c (push_cp_function_context, pop_cp_function_context,
9579         mark_cp_function_context): Rename for consistency.
9580         (cxx_init_decl_processing): Don't set old hooks.
9581
9582 2002-04-19  Neil Booth  <neil@daikokuya.demon.co.uk>
9583
9584         * call.c (convert_type_from_ellipsis): Rename, update.
9585         * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
9586         * cp-tree.h (convert_type_from_ellipsis): Rename.
9587         * decl.c (cxx_init_decl_processing): Don't set hook.
9588
9589 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
9590
9591         * call.c (build_new_method_call): Update.
9592         * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
9593         * cp-tree.h (cxx_incomplete_type_error): New.
9594         * decl.c (grokdeclarator, grokparms): Update.
9595         * decl2.c (check_classfn): Update.
9596         * pt.c (tsubst): Update.
9597         * typeck.c (complete_type_or_else, expr_sizeof,
9598         decay_conversion): Update.
9599         * typeck2.c (incomplete_type_error): Rename.
9600         (add_exception_specifier): Update.
9601
9602 2002-04-18  Jason Merrill  <jason@redhat.com>
9603
9604         PR c++/5658
9605         * search.c (setup_class_bindings): A class template qualifies as a
9606         type binding.
9607
9608 2002-04-17  Jakub Jelinek  <jakub@redhat.com>
9609
9610         PR c++/6316
9611         * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
9612         before expanding.
9613
9614 2002-04-16  Mark Mitchell  <mark@codesourcery.com>
9615
9616         * init.c (begin_init_stmts): Remove commented out code.
9617         (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
9618         * semantics.c (begin_gobal_stmt_expr): Adjust call to
9619         expand_start_stmt_expr.
9620
9621 2002-04-15  Mark Mitchell  <mark@codesourcery.com>
9622
9623         * decl.c (register_dtor_fn): Pass the address of dso_handle, not
9624         dso_handle itself, to __cxa_atexit.
9625
9626 2002-04-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
9627
9628         * error.c (cxx_print_error_function): Adjust call to macros.
9629
9630 2002-04-14  Jakub Jelinek  <jakub@redhat.com>
9631
9632         * class.c (layout_virtual_bases): Do all dsize computation on trees.
9633
9634 2002-04-14  Jason Merrill  <jason@redhat.com>
9635
9636         * typeck.c (get_member_function_from_ptrfunc): Don't do
9637         gratuitious division and multiplication on
9638         ptrmemfunc_vbit_in_delta targets.
9639
9640 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
9641
9642         PR c++/5373.
9643         * semantics.c (finish_expr_stmt): Remember the type of the
9644         expression before any conversions are performed.
9645
9646 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
9647
9648         PR c++/5189.
9649         * call.c (add_template_candidate_real): Do not treat member
9650         templates as copy constructors.
9651
9652 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
9653
9654         * decl.c (duplicate_decls): Do not copy the RTL for a variable
9655         declaration if the old variable had an incomplete type and the new
9656         variable does not.
9657         (complete_vars): Do not call layout_decl for completed variables.
9658
9659 2002-04-12  Richard Sandiford  <rsandifo@redhat.com>
9660
9661         * decl.c (duplicate_decls): Don't try to unify an implicit typedef
9662         with an explicit one.
9663         (follow_tag_typedef): New.
9664         (lookup_tag): Use it to extract the tag of an explicit typedef.
9665         (xref_tag): Likewise.
9666
9667 2002-04-11  Andrew Haley  <aph@redhat.com>
9668
9669         * typeck.c (type_after_usual_arithmetic_conversions):
9670         If two types have the same variant, return immediately.
9671         When two floating-point operands are the same precision:
9672           convert to float if one of the operands is float;
9673           if neither operand is one of the standard types, return the type
9674           of the first operand.
9675
9676 2002-04-10  Nathan Sidwell  <nathan@codesourcery.com>
9677
9678         PR c++/5507
9679         * decl.c (make_typename_type): Remove implicit typenameness.
9680
9681 2002-04-09  Jason Merrill  <jason@redhat.com>
9682
9683         PR optimization/6189
9684         * semantics.c (genrtl_start_function): Don't free
9685         DECL_SAVED_FUNCTION_DATA for inline functions.
9686
9687         * init.c (build_member_call): For now, don't convert to
9688         intermediate base if it would cause an error.
9689
9690 2002-04-08  Paolo Carlini  <pcarlini@unitus.it>
9691
9692         * parse.y (namespace_qualifier, maybe_identifier,
9693         begin_explicit_instantiation, end_explicit_instantiation,
9694         apparent_template_type, .finish_template_type,
9695         do_id, maybe_init, defarg_again, component_decl_1):
9696         Add ending ';', in accordance with POSIX.
9697
9698 2002-04-06  Mark Mitchell  <mark@codesourcery.com>
9699
9700         PR c++/5571
9701         * class.c (layout_class_type): Remember incomplete static
9702         variables.
9703         (finish_struct_1): Call complete_vars, not
9704         hack_incomplete_structures.
9705         * cp-tree.h (hack_incomplete_structures): Rename to ...
9706         (complete_vars): ... this.
9707         (struct saved_scope): Remove incomplete.
9708         (namespace_scope_incomplete): Remove.
9709         * decl.c (struct binding_level): Remove incomplete.
9710         (incomplete_vars): New variable.
9711         (mark_binding_level): Don't mark incomplete.
9712         (print_binding_level): Don't print it.
9713         (mark_saved_scope): Don't mark incomplete.
9714         (pushdecl): Use maybe_register_incopmlete_var.
9715         (cxx_init_decl_processing): Register incomplete_vars for GC.
9716         (start_decl_1): Clarify error message.
9717         (hack_incomplete_vars): Remove.
9718         (maybe_register_incomplete_var): New function.
9719         (complete_vars): Likewise.
9720
9721 2002-04-06  Jason Merrill  <jason@redhat.com>
9722
9723         PR c++/4934
9724         * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
9725         set before checking it.
9726
9727         PR c++/525
9728         * init.c (build_member_call): Use build_scoped_ref.
9729         (resolve_offset_ref): Likewise.
9730         * call.c (build_scoped_method_call): Likewise.
9731         * tree.c (maybe_dummy_object): Kludge around current_class_type being
9732         wrong.
9733         * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
9734         * cp-tree.h: Adjust.
9735
9736         * init.c (push_base_cleanups): Just use build_scoped_method_call.
9737
9738         PR c++/6179
9739         * method.c (implicitly_declare_fn): Pass unqualified type to
9740         synthesize_exception_spec.
9741
9742 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
9743
9744         * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
9745         * cvt.c: Update comment.
9746         * init.c (expand_cleanup_for_base): Update.
9747         * semantics.c (finish_parenthesized_expr): Update.
9748         * typeck.c (cp_truthvalue_conversion): Update.
9749
9750 2002-04-04  Jason Merrill  <jason@redhat.com>
9751
9752         * semantics.c (finish_eh_cleanup): New fn.
9753         * cp-tree.h: Add prototype.
9754         * init.c (perform_member_init, expand_cleanup_for_base): Use
9755         finish_eh_cleanup.
9756         * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
9757         * cp-tree.h: Remove references.
9758         * decl.c (begin_constructor_body, end_constructor_body): Likewise.
9759         * dump.c (cp_dump_tree): Likewise.
9760         * pt.c (tsubst_expr): Likewise.
9761         * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
9762         (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
9763         * tree.c (cp_statement_code_p): Likewise.
9764
9765         * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
9766
9767         PR c++/5636
9768         * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
9769         cleanup for nrv.
9770
9771         PR c++/5104
9772         * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
9773         specifiers.
9774         [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
9775
9776 2002-04-03  Richard Henderson  <rth@redhat.com>
9777
9778         * cp-lang.c (cxx_warn_unused_global_decl): New.
9779         (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
9780
9781 2002-04-03  Neil Booth  <neil@daikokuya.demon.co.uk>
9782
9783         * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
9784         * tree.c (init_tree): Don't set hook.
9785
9786 2002-04-03  Roger Sayle  <roger@eyesopen.com>
9787
9788         PR c++/5998:
9789         * decl.c (duplicate_decls): Don't mess with assembler names when
9790         redeclaring builtin functions as static.
9791
9792 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
9793
9794         * call.c (build_addr_func): Update.
9795         * class.c (resolve_address_of_overloaded_function): Update.
9796         * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
9797         * cp-tree.h (cxx_mark_addressable): New.
9798         * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
9799         * decl2.c (build_cleanup): Update.
9800         * except.c (build_throw): Update.
9801         * init.c (resolve_offset_ref): Update.
9802         * pt.c (convert_nontype_argument): Update.
9803         * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
9804         * typeck.c (decay_conversion, build_array_ref, build_unary_op,
9805         unary_complex_lvalue): Update.
9806         (mark_addressable): Rename.
9807
9808 2002-04-01  Roger Sayle  <roger@eyesopen.com>
9809
9810         PR c++/5998:
9811         * decl.c (duplicate_decls):  Overwrite the RTL when (and only
9812         when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
9813         but follow the SET_DECL_RTL idiom used elsewhere in the function.
9814
9815 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
9816
9817         * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
9818         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
9819         * decl.c (grokdeclarator): Update.
9820         * mangle.c (write_integer_cst): Update.
9821         * typeck.c (build_binary_op): Update.
9822
9823 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
9824
9825         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
9826         * lex.c (cxx_init): Don't set hook.
9827
9828 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
9829
9830         * Make-lang.in (error.o): Update.
9831         * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
9832         * cp-tree.h (struct diagnostic_context): Predeclare.
9833         (cxx_print_error_function): New.
9834         * error.c: Include langhooks-def.h.
9835         (lang_print_error_function): Rename.  Update.
9836         (init_error): Don't set hook.
9837
9838 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
9839
9840         * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
9841         Redefine.
9842         * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
9843         * decl.c (finish_enum): Similarly.
9844         * error.c (dump_type): Similarly.
9845         * lex.c (cxx_init): Similarly.
9846         * mangle.c (write_builtin_type): Similarly.
9847         * typeck.c (comptypes): Similarly.
9848
9849 2002-03-28  Roger Sayle  <roger@eyesopen.com>
9850
9851         PR c++/5998:
9852         * decl.c (cxx_init_decl_processing): Re-enable built-in functions
9853         in the g++ front-end.
9854         (duplicate_decl): Allow redefinition of anticipated built-ins.
9855         Fix inlining problem by over-writing the old DECL_RTL.
9856         (lookup_namespace_name): Fail to find an identifier in the
9857         specified namespace if its still anticipated.
9858         (builtin_function_1): New function split out from builtin_function
9859         to create a builtin in the current namespace with given context.
9860         (builtin_function): Call builtin_function_1 to define the
9861         appropriate builtins in both the std and global namespaces.
9862         (select_decl): Don't test for anticipated decls here.
9863         (unqualified_namespace_lookup): Instead ignore them whilst
9864         searching through scopes and namespaces.
9865         * decl2.c (do_nonmember_using_decl): If a using declaration
9866         specifies an anticipated built-in function, mark it as no longer
9867         anticipated in that scope.
9868         (ambiguous_decl):  Avoid resolving to an anticipated decl.
9869         * lex.c (do_scoped_id): Fail to find an identifier in the global
9870         namespace if its still anticipated.
9871
9872 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
9873
9874         * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
9875         * cp-tree.h (cp_make_lang_type): Rename.
9876         * lex.c (cp_make_lang_type): Rename.
9877         (make_aggr_type): Update.
9878         * tree.c (init_tree): Don't set make_lang_type_fn.
9879
9880 2002-03-29  Jakub Jelinek  <jakub@redhat.com>
9881
9882         PR c++/6073
9883         * class.c (finish_struct_1): Update static field's DECL_MODE even
9884         if its type is a variant of t.
9885
9886 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
9887
9888         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
9889         * cp-tree.h (cxx_insert_default_attributes): New.
9890         * decl.c (insert_default_attributes): Rename.
9891
9892 2002-03-27  Mark Mitchell  <mark@codesourcery.com>
9893
9894         PR c++/4884
9895         * call.c (build_op_delete_call): Allow for the fact the placement
9896         may be a COMPOUND_EXPR.
9897
9898 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
9899
9900         * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
9901         * cp-tree.h (init_cplus_expand): Remove.
9902         (cxx_expand_expr): New.
9903         * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
9904         fix prototype.
9905         (init_cplus_expand): Remove.
9906         * lex.c (cxx_init): Don't call init_cplus_expand.
9907
9908 2002-03-26  Mark Mitchell  <mark@codesourcery.com>
9909
9910         PR c++/4884.
9911         * init.c (build_new_1): Allow for the fact the result of
9912         build_function_call may be a COMPOUND_EXPR.
9913
9914 2002-03-26  Nathan Sidwell  <nathan@codesourcery.com>
9915
9916         PR c++/5682
9917         * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
9918         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
9919         (dfs_skip_nonprimary_vbases_markedp): Remove.
9920         * search.c (get_shared_vbase_if_not_primary): Remove.
9921         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
9922         (dfs_skip_nonprimary_vbases_markedp): Remove.
9923         (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
9924         (dfs_marked_real_bases_queue_p): Likewise.
9925
9926 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
9927
9928         * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
9929         * cp-tree.h (cxx_mark_tree): New.
9930         * decl.c (lang_mark_tree): Rename cxx_mark_tree.
9931
9932 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
9933
9934         * cp-tree.h (cxx_maybe_build_cleanup): New.
9935         * decl.c (destroy_local_var, hack_incomplete_structures): Update.
9936         (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
9937         * tree.c (build_target_expr): Update.
9938         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
9939
9940 2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
9941
9942         * decl2.c (cxx_decode_option): Handle -E.
9943         * lang-specs.h (default_compilers): Preprocess with cc1plus.
9944         * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
9945
9946 2002-03-23  Jakub Jelinek  <jakub@redhat.com>
9947
9948         PR c++/6037
9949         * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
9950
9951 2002-03-23  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
9952
9953         * error.c (dump_type): Be careful about implicit typenames.
9954
9955 2002-03-21  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
9956
9957         PR C++/3656
9958         * semantics.c (finish_base_specifier): Handle erronous base
9959         classes.
9960
9961 2002-03-22  Zack Weinberg  <zack@codesourcery.com>
9962
9963         * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
9964         REAL_IS_NOT_DOUBLE.
9965
9966 2002-03-22  Jeff Knaggs  <jknaggs@redhat.com>
9967
9968         * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
9969         an index into the vtable_entry array regardless of
9970         TARGET_PTRMEMFUNC_VBIT_LOCATION.
9971
9972 2002-03-21  Aldy Hernandez  <aldyh@redhat.com>
9973
9974         * tree.c (cp_cannot_inline_tree_fn): Same.
9975
9976 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
9977
9978         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
9979         insert_block, getdecls, global_bindings_p): New.
9980
9981 2002-03-20  Nathan Sidwell  <nathan@codesourcery.com>
9982
9983         PR c++/4361
9984         * mangle.c (struct globals) Add internal_mangling_p member.
9985         (write_template_param): Do internal mangling, if needed.
9986         (mangle_conv_op_name_for_type): Request internal mangling.
9987
9988 2002-03-20  Jason Merrill  <jason@redhat.com>
9989
9990         PR c++/2136
9991         * init.c (build_delete): Check access for a member op delete here.
9992         * decl2.c (delete_sanity): Not here.
9993
9994 2002-03-19  Jason Merrill  <jason@redhat.com>
9995
9996         PR c++/5118
9997         * class.c (get_vfield_name): Use the constructor_name.
9998
9999 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
10000
10001         * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
10002         * cp-tree.h (lang_printable_name): Rename.
10003         * error.c (lang_decl_name): Use new hook.
10004         * lex.c (cxx_init): Remove old hook.
10005         * pt.c (tsubst_decl): Use new hook.
10006         * tree.c (lang_printable_name): Rename.
10007
10008 2002-03-18  Eric Botcazou  <ebotcazou@multimania.com>
10009
10010         PR c++/3882
10011         * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
10012         (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
10013         only after recording the declaration.
10014
10015 2002-03-18  Jason Merrill  <jason@redhat.com>
10016
10017         PR c++/2039
10018         * init.c (resolve_offset_ref): Hand off to build_component_ref.
10019
10020         PR c++/4222, c++/5995
10021         * call.c (build_over_call): Fix empty class logic.
10022
10023         PR c++/3870
10024         * cp-tree.h (struct saved_scope): Add last_parms field.
10025         * decl.c (maybe_push_to_top_level): Save last_function_parms.
10026         (pop_from_top_level): Restore it.
10027
10028         PR c++/4377
10029         * mangle.c (write_expression): Strip NOP_EXPRs sooner.  Also strip
10030         NON_LVALUE_EXPRs.
10031
10032         PR c++/4003
10033         * pt.c (tsubst_friend_function): Use decl_namespace_context.
10034
10035         PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
10036         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
10037         type with a nontrivial destructor.
10038
10039 2002-03-17  Jason Merrill  <jason@redhat.com>
10040
10041         PR c++/4460
10042         * class.c (build_base_path): Virtual base layout is fixed in
10043         in-charge [cd]tors.
10044
10045 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
10046
10047         * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
10048         * parse.y (yyparse): Remove macro.
10049
10050 2002-03-17  Jason Merrill  <jason@redhat.com>
10051
10052         PR c++/5757
10053         * init.c (build_new_1): Pass the right pointer to op delete.
10054
10055 2002-03-16  Nathan Sidwell  <nathan@codesourcery.com>
10056
10057         PR c++/4361
10058         * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
10059         conversion operators go.
10060         (struct lang_decl_flags): Add template_conv_p and unused
10061         bitfields.
10062         (DECL_TEMPLATE_CONV_FN_P): New macro.
10063         * call.c (build_user_type_conversion_1): Don't check second type
10064         conversion of overload set first.
10065         * class.c (add_method): Make sure templated conversion operators
10066         all end up on slot 2.
10067         * lex.c (do_identifier): A conversion operator token might be
10068         satisfied by a templated conversion operator.
10069         * pt.c (check_explicit_specialization): Use
10070         CLASSTYPE_FIRST_CONVERSION_SLOT.
10071         (template_parm_this_level_p): New function.
10072         (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
10073         * search.c (lookup_fnfields_1): Template conversions will be on
10074         the first slot.
10075         * typeck.c (build_component_ref): Preserve the type of an
10076         conversion operator name on the overload type.
10077         (build_x_function_call): Retrieve the conversion operator name.
10078
10079 2002-03-15  Richard Henderson  <rth@redhat.com>
10080
10081         * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
10082
10083 2002-03-15  Mark Mitchell  <mark@codesourcery.com>
10084
10085         * cp-tree.h (CLEANUP_DECL): Remove.
10086         (CLEANUP_EXPR): Likewise.
10087         * decl.c (destroy_local_var): Simplify.
10088         (maybe_build_cleanup): Tidy.
10089         * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
10090         * semantics.c (cp_expand_stmt): Likewise.
10091         * cp/tree.c (cp_statement_code_p): Likewise.
10092
10093 2002-03-15  Jason Merrill  <jason@redhat.com>
10094
10095         PR c++/5857
10096         * decl.c (duplicate_decls): Use merge_types instead of common_type.
10097         * typeck.c (common_type): Just hand off to
10098         type_after_usual_arithmetic_conversions and
10099         composite_pointer_type.
10100         (merge_types): New fn.
10101         (commonparms): Use it instead of common_type.
10102         (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
10103         (composite_pointer_type): Also handle attributes.
10104         * cp-tree.h: Declare merge_types.
10105
10106         * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
10107         variables.
10108         * decl2.c (maybe_make_one_only): Also mark the decl as needed.
10109
10110 2002-03-14  Richard Henderson  <rth@redhat.com>
10111
10112         * decl.c: Include c-pragma.h.
10113         (start_decl, start_function): Invoke maybe_apply_pragma_weak.
10114         * Make-lang.in: Update dependencies.
10115
10116 2002-03-14  Jakub Jelinek  <jakub@redhat.com>
10117
10118         PR c++/5908
10119         * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
10120         * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
10121
10122 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
10123
10124         * mangle.c (write_builtin_type): Handle 128-bit integers even if
10125         they are not a standard integer type.
10126
10127 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
10128
10129         * cp-tree.h (init_init_processing): Remove declaration.
10130         * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
10131         * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
10132
10133 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10134
10135         * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
10136         Define.
10137         * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
10138         tree_code_length.
10139         * lex.c (cplus_tree_code_type, cplus_tree_code_length,
10140         cplus_tree_code_name): Delete.
10141         (cxx_init): Don't call add_c_tree_codes, instead set
10142         lang_unsafe_for_reeval.  Don't try to copy into the various
10143         tree_code arrays.
10144
10145 2002-03-12  Nathan Sidwell  <nathan@codesourcery.com>
10146
10147         PR c++/5659
10148         * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
10149         * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
10150         definitions.
10151
10152 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
10153
10154         Revert 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>,
10155         DR209 is now not a defect.
10156         * cp-tree.h (skip_type_access_control): Remove.
10157         * decl.c (grokdeclarator): Do type access control for friend
10158         declarations.
10159         * semantics.c (decl_type_access_control): Don't reset
10160         current_type_lookups.
10161         (save_type_access_control): Always save the lookups.
10162         (skip_type_access_control): Remove.
10163         (finish_class_definition): Don't change type_lookups.
10164
10165 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
10166
10167         Revert 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>,
10168         It is incorrect.
10169         * typeck.c (build_static_cast): Compare non-qualified types
10170         with pointer to member conversions.
10171
10172 2002-03-11  Dan Nicolaescu  <dann@ics.uci.edu>
10173             Daniel Berlin  <dan@dberlin.org>
10174
10175         * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
10176         (cxx_get_alias_set): Use it.
10177
10178 2002-03-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10179
10180         * cp-tree.h (stabilize_expr): Prototype.
10181
10182 2002-03-08  Craig Rodrigues  <rodrigc@gcc.gnu.org>
10183
10184         * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
10185         conditional return void.
10186
10187 2002-03-08  Neil Booth  <neil@daikokuya.demon.co.uk>
10188
10189         * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
10190         * cp-tree.h (cxx_unsave): New.
10191         * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
10192         (init_tree): Update.
10193
10194 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10195
10196         * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
10197         explicit sizeof/sizeof.
10198         * decl2.c (cxx_decode_option): Likewise.
10199         * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
10200
10201 2002-03-02  Nathan Sidwell  <nathan@codesourcery.com>
10202
10203         PR c++/775
10204         * decl.c (lookup_tag): Only reject enum/class mismatch, not
10205         class/union mismatch.
10206         * parse.y (check_class_key): New function.
10207         (structsp): Call it.
10208
10209 2002-03-01  Michael Matz  <matz@suse.de>
10210
10211         * typeck.c (cp_pointer_int_sum): Complete inner type which is
10212         used later by size_in_bytes().
10213
10214 2002-03-01  Phil Edwards  <pme@gcc.gnu.org>
10215
10216         * cp-tree.h:  Require __GNUC__ to be #defined.
10217         (build_init):  Add missing prototype.
10218
10219 2002-03-01  Jason Merrill  <jason@redhat.com>
10220
10221         * except.c: Don't include decl.h or obstack.h.  Do include
10222         tree-inline.h.
10223         (build_throw): Destroy temporaries from the thrown
10224         expression before calling __cxa_throw.  Construct a thrown
10225         temporary directly into the exception object.
10226         (stabilize_throw_expr): New function.
10227         (wrap_cleanups_r): New function.
10228         * tree.c (stabilize_expr): New function.
10229         * init.c (build_init): New function.
10230         * Make-lang.in (cp/except.o): Adjust .h deps.
10231
10232 2002-02-28  Jason Merrill  <jason@redhat.com>
10233
10234         * search.c (lookup_base_r): Don't clear is_non_public just because
10235         we found a friendly scope.
10236
10237         * decl.c (finish_function): Only warn about missing return
10238         statement with -Wreturn-type.
10239
10240 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
10241
10242         * class.c (build_clone): Update.
10243         * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
10244         * cp-tree.h (cxx_dup_lang_specific_decl): New.
10245         * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
10246         (copy_decl): Update.
10247         * method.c (make_thunk): Update.
10248
10249 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
10250
10251         * decl2.c: Delete traditional-mode-related code copied from
10252         the C front end but not used, or used only to permit the
10253         compiler to link.
10254
10255 2002-02-24 Craig Rodrigues  <rodrigc@gcc.gnu.org>
10256
10257         PR c++/4093
10258         * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
10259         to void.
10260
10261 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
10262
10263         PR other/5746
10264         * semantics.c (finish_switch_cond): Don't call get_unwidened
10265         if error_mark_node.
10266
10267 2002-02-22  Nathan Sidwell  <nathan@codesourcery.com>
10268
10269         PR c++/2645, DR 295
10270         * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
10271         tf_keep_type_decl.
10272         (make_typename_type): Use tsubst_flags_t.
10273         * decl.c (make_typename_type): Adjust. Return non-artificial
10274         TYPE_DECLs, if required.
10275         (grokdeclarator): Simplify CVR qualification handling. Allow bad
10276         qualifiers on typedef types.
10277         * decl2.c (handle_class_head): Adjust make_typename_type call.
10278         * parse.y (nested_name_specifier): Likewise.
10279         (typename_sub0): Likewise.
10280         (typename_sub1): Likewise.
10281         * pt.c (convert_template_argument): Adjust make_typename_type
10282         return value.
10283         (tsubst): Adjust cp_build_qualified_type_real calls.
10284         (check_cv_quals_for_unify): Cope with allowing bad qualifications
10285         on template type parms.
10286         (instantiate_decl): Recheck substitutions to give warnings on bad
10287         qualifications.
10288         * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
10289
10290 2002-02-21  Aldy Hernandez  <aldyh@redhat.com>
10291
10292         * cp/decl.c (duplicate_decls): Merge always_inline attribute.
10293
10294         * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
10295         unless DECL_ALWAYS_INLINE.
10296
10297 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
10298
10299         * typeck.c (cp_pointer_int_sum): Renamed from
10300         pointer_int_sum, call pointer_int_sum.
10301
10302 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
10303
10304         * decl.c (duplicate_decls): Return 0 if issued error about
10305         redeclaration.
10306
10307 2002-02-19  Jason Merrill  <jason@redhat.com>
10308
10309         ABI change: Mangle `void (A::*)() const' as
10310         M1AKFvvE, not MK1AFvvE.
10311         * mangle.c (write_function_type): Write cv-quals for member
10312         function type here.
10313         (write_pointer_to_member_type): Not here.
10314
10315 2002-02-18  Jason Merrill  <jason@redhat.com>
10316
10317         * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
10318         (do_decl_instantiation): Likewise.
10319
10320 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
10321
10322         PR c++/5685
10323         * decl.c (duplicate_decls): Make warning unconditional
10324         if duplicate default argument declarations are present.
10325
10326 2002-02-17  Jakub Jelinek  <jakub@redhat.com>
10327
10328         * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
10329         shortening.
10330
10331 2002-02-15  Nathan Sidwell  <nathan@codesourcery.com>
10332
10333         * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
10334         remove incorrect comment. Move #if 0'd code to common path. Use
10335         IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
10336
10337 2002-02-13  Jason Merrill  <jason@redhat.com>
10338
10339         * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
10340         (finish_function): Don't warn if current_function_returns_null.
10341
10342         * typeck2.c (digest_init): Do handle values of vector type.
10343
10344         * typeck2.c (digest_init, process_init_constructor): Treat vectors
10345         like arrays.
10346
10347 2002-02-11  Jason Merrill  <jason@redhat.com>
10348
10349         * parse.y (reserved_declspecs): Don't handle attributes.
10350         (reserved_typespecquals): Handle them here.
10351         * Make-lang.in (parse.c): Adjust expected conflicts.
10352
10353 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
10354
10355         * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
10356         instead of compstmt.
10357         (compstmt_or_stmtexpr): Renamed from compstmt.
10358         (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
10359
10360 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
10361
10362         Rename instantiate_type_flags to tsubst_flags_t & expand use.
10363         * cp-tree.h (instantiate_type_flags): Rename to ...
10364         (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
10365         add tf_warning flag.
10366         (instantiate_type): Adjust prototype.
10367         (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
10368         do_type_instantiation, cp_build_qualified_type_real): Likewise.
10369         cp_build_qualified_type: Adjust.
10370         * class.c (instantiate_type): Adjust parameter. Rename itf_* to
10371         tf_*.
10372         * call.c (standard_conversion): Rename itf_* to tf_*.
10373         (reference_binding): Likewise.
10374         (convert_like_real): Likewise.
10375         * cvt.c (cp_convert_to_pointer): Likewise.
10376         (convert_to_reference): Likewise.
10377         * decl.c (lookup_namespace_name): Use tf_* flags.
10378         (make_typename_type): Likewise.
10379         (grokdeclarator): Likewise.
10380         * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
10381         (coerce_template_template_parms, convert_template_argument,
10382         coerce_template_parms, maybe_get_template_decl_from_type_decl,
10383         lookup_template_class, tsubst_friend_function, tsubst_friend_class,
10384         instantiate_class_template, tsubst_template_arg_vector,
10385         tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
10386         tsubst_decl, tsubst_arg_types, tsubst_function_type,
10387         tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
10388         instantiate_template, fn_type_unification,
10389         resolve_overloaded_unification, verify_class_unification,
10390         unify, get_bindings_real, do_type_instantiation,
10391         regenerate_decl_from_template, instantiate_decl,
10392         tsubst_initializer_list, tsubst_enum,
10393         get_mostly_instantiated_function_type,
10394         invalid_nontype_parm_type_p): Likewise.
10395         * tree.c (cp_build_qualified_type_real): Likewise.
10396         * typeck.c (build_binary_op): Rename itf_* to tf_*.
10397         (build_ptrmemfunc): Likewise.
10398         (convert_for_assignment): Likewise.
10399
10400 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
10401
10402         PR c++/109
10403         * decl.c (grokdeclarator): Allow friend declarations from
10404         dependent types.
10405         * decl2.c (handle_class_head): Don't push into template parm contexts.
10406         * pt.c (push_template_decl_real): Template parm contexts are never
10407         being defined.
10408
10409 2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
10410
10411         * class.c: Include target.h.
10412         (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
10413         BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
10414         bit-field layout.
10415         * Make-lang.in: Adjust deps.
10416
10417 2002-02-05  Jason Merrill  <jason@redhat.com>
10418
10419         * error.c (dump_type): Be more helpful about VECTOR_TYPE.
10420
10421 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
10422
10423         * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
10424         (finish_switch_cond): Set SWITCH_TYPE.
10425
10426 2002-02-04  Richard Henderson  <rth@redhat.com>
10427
10428         * method.c (use_thunk): Always initialize the block tree.  Reindent.
10429         * semantics.c (expand_body): Emit thunks after function, not before.
10430
10431 2002-02-04  Jason Merrill  <jason@redhat.com>
10432
10433         * decl.c (start_function): Call cplus_decl_attributes immediately
10434         after grokdeclarator.
10435
10436         * decl.c (start_function): Combine DECL_RESULT handling code.
10437
10438 2002-02-03  Jason Merrill  <jason@redhat.com>
10439
10440         * xref.c: Remove.
10441         * Make-lang.in (CXX_OBJS): Remove cp/xref.o
10442         (cp/xref.o): Remove dependencies.
10443         * class.c (finish_struct_1, check_methods): Don't call xref fns.
10444         (finish_struct_1): Likewise.
10445         * friend.c (make_friend_class): Likewise.
10446         * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
10447         * spew.c (read_process_identifier): Likewise.
10448
10449 2002-02-01  Jason Merrill  <jason@redhat.com>
10450
10451         PR c++/4872
10452         * decl.c (finish_function): Warn about a non-void function with
10453         no return statement and no abnormal exit.
10454         * cp-tree.h (struct cp_language_function): Add returns_abnormally.
10455         (current_function_returns_abnormally): New macro.
10456         * call.c (build_call): Set it.
10457
10458         * typeck.c (build_component_ref): Always complain about offsetof
10459         constructs on non-PODs.  Only make it an error for members of
10460         virtual bases.
10461
10462         * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
10463         (dump_function_decl): Always dump parms.
10464
10465         * decl2.c (finish_static_data_member_decl): Complain about a local
10466         class with a static data member.
10467
10468         PR c++/4286
10469         * search.c (lookup_field_1): Don't xref a static data member
10470         just because we looked it up.
10471
10472 2002-01-31  Jason Merrill  <jason@redhat.com>
10473
10474         * Make-lang.in (parse.c): Handle .output file.
10475
10476         PR c++/3395
10477         * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
10478         not TREE_TYPE.
10479         * semantics.c (finish_class_definition): Adjust.
10480
10481         Allow attributes in parms and casts.
10482         * parse.y (named_parm): Don't strip attrs.
10483         (declmods): Remove 'attributes' production.
10484         (nonempty_cv_qualifiers): Accept attributes.
10485         (ATTRIBUTE): Give precedence.
10486         * decl.c (groktypename): Handle attributes.
10487         (grokparms): Likewise.
10488
10489 2002-01-29  Jakub Jelinek  <jakub@redhat.com>
10490
10491         * decl2.c (cxx_decode_option): Pass 0 as last argument to
10492         cpp_handle_option.
10493         * lang-specs.h: Use cpp_unique_options instead of cpp_options
10494         when used together with cc1_options.
10495
10496 2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
10497
10498         PR c++/5132
10499         * typeck2.c (digest_init): Make sure non-array core type is
10500         instantiated.
10501         * decl2.c (reparse_absdcl_as_casts): Just store the type in the
10502         constructor, rather than build a new one.
10503         (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
10504         PURPOSE of constructor elts.
10505
10506 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
10507
10508         * Make-lang.in (parse.c): Adjust expected number of
10509         shift-reduce conflicts.
10510         (decl.o): Depend on diagnostic.h.
10511         * decl.c: Include diagnostic.h.
10512         (grokdeclarator): Check for null pointer.
10513         (finish_function): Don't abort when
10514         current_binding_level->parm_flag != 1, if errors have
10515         occurred; throw away the statement tree and extra binding
10516         levels, and continue.
10517         * lex.c (note_list_got_semicolon): Check for null pointer.
10518         * method.c (hack_identifier): Just return error_mark_node if
10519         value is error_mark_node.
10520         * parse.y (primary: TYPEID(type_id)): No need to use
10521         TYPE_MAIN_VARIANT here.
10522         (handler_seq): Accept an empty list of catch clauses and
10523         generate a fake handler block to avoid later crashes.
10524         (ansi_raise_identifier): Accept the error token too.
10525         * semantics.c (begin_class_definition,
10526         finish_class_definition): Check for error_mark_node.
10527
10528 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
10529
10530         * typeck2.c (friendly_abort): Delete definition.
10531         * cp-tree.h (friendly_abort): Don't prototype.
10532         (my_friendly_assert): Use fancy_abort.
10533
10534 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
10535
10536         * cp-tree.h (my_friendly_abort): Remove.
10537
10538 2002-01-23  Jakub Jelinek  <jakub@redhat.com>
10539
10540         * spew.c (pending_inlines, pending_inlines_tail,
10541         processing_these_inlines): Make static.
10542         (mark_pending_inlines): Remove static.
10543         (begin_parsing_inclass_inline): If in function, save pi
10544         for GC to cp_function_chain->unparsed_inlines instead.
10545         (process_next_inline): Likewise.
10546         * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
10547         (mark_pending_inlines): Add prototype.
10548         * decl.c (spew_debug): Remove unused extern.
10549         (mark_lang_function): Call mark_pending_inlines.
10550
10551 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
10552
10553         * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
10554         init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
10555         semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
10556         Change my_fancy_abort() to abort().
10557
10558 2002-01-23  Jason Merrill  <jason@redhat.com>
10559
10560         PR c++/5453
10561         * class.c (fixed_type_or_null): Fix thinko.
10562
10563         PR c++/3331
10564         * init.c (resolve_offset_ref): Use build_indirect_ref.
10565
10566         * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
10567
10568 2002-01-22  Jason Merrill  <jason@redhat.com>
10569
10570         * parse.y (function_body): Suppress the block for the outermost
10571         curly braces.
10572         * decl.c (pushdecl): Don't try to skip it.
10573         (begin_function_body): Keep the block we create, not the next one.
10574         * init.c (emit_base_init): Don't mess with keep_next_level.
10575
10576         * class.c (build_base_path): Tweak formatting.
10577
10578 2002-01-19  Nathan Sidwell  <nathan@codesourcery.com>
10579
10580         Fix regression introduced with patch for c++/775
10581         * parse.y (class_head_defn): Check for template specializations
10582         with a different class-key.
10583
10584 2002-01-17  Jason Merrill  <jason@redhat.com>
10585
10586         * decl.c (begin_constructor_body, begin_destructor_body): New fns.
10587         (begin_function_body): Call them and keep_next_level.
10588         * init.c (emit_base_init): Call keep_next_level.
10589         * semantics.c (setup_vtbl_ptr): Lose.
10590         * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
10591         (vtbls_set_up_p): Lose.
10592         * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
10593         * method.c (do_build_copy_constructor): Likewise.
10594         (synthesize_method): Call finish_mem_initializers.
10595         * parse.y (nodecls): Likewise.
10596
10597         * error.c (dump_type_suffix): Print the exception specs before
10598         recursing.
10599         (dump_function_decl): Here, too.
10600
10601         * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
10602
10603 2002-01-10  Ira Ruben   <ira@apple.com>
10604
10605         PR c++/907
10606         * decl.c (start_method): Handle attrlist.
10607
10608 2002-01-10  Jakub Jelinek  <jakub@redhat.com>
10609
10610         * decl2.c (max_tinst_depth): Increase default limit to 500.
10611
10612 2002-01-10  Graham Stott  <grahams@redhat.com>
10613
10614         * spew.c (YYCHAR): Uppercase macro parameter and add
10615         parenthesis.
10616         (YYCODE): Likewise.
10617         (NAME): Uppercase macro parameter.
10618
10619 2002-01-09  Graham Stott  <grahams@redhat.com>
10620
10621         * decl.h (grokdeclarator): Wrap long line.
10622
10623         * semantics.c (FINISH_COND): Uppercase macro paramaters and
10624         add parenthesis.
10625
10626 2002-01-08  Graham Stott  <grahams@redhat.com>
10627
10628         * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
10629         (PALLOC): Uppercase macro parameter and whitespace.
10630         (SALLOC): Uppercase macro parameter.
10631         (SFREE): Uppercase macros parameter, add parenthese and
10632         whitespace.
10633         (STREQL): Uppercase macro parameter and whitespace.
10634         (STRNEQ): Likewise.
10635         (STRLSS): Likewise.
10636         (STRLEQ): Likewise.
10637         (STRGTR): Likewise.
10638         (STRGEQ): Likewise.
10639
10640         * call.c (convert_like): Add parenthesis and wrap.
10641         (convert_like_with_context): Likewise.
10642         (ICS_RANK): Whitespace.
10643         (NEED_TEMPORARY_P): Remove parenthesis.
10644
10645         * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
10646         whitespace.
10647         (VTT_MARKED_BINFO_P): Likewise.
10648
10649         * decl.c (BINDING_LEVEL): Add parenthesis.
10650         (DEF_OPERATOR): Likewise.
10651
10652         * mangle.c (MANGLE_TRACE): Add parenthesis.
10653         (MANGLE_TRACE_TREE): Likewise.
10654         (write_signed_number): Likewise.
10655         (write_unsigned_number): Likewise.
10656
10657         * pt.c (ccat): Uppercase macro parameter.
10658         (cat): Likewise
10659
10660         * search.c (SET_BINFO_ACCESS): Add parenthesis.
10661
10662 2002-01-07  Jason Merrill  <jason@redhat.com>
10663
10664         * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
10665         to pedwarn.
10666
10667         PR c++/3536
10668         * method.c (make_thunk): If !flag_weak, give the thunk the
10669         function's linkage.
10670         (use_thunk): Here, too.
10671
10672 2002-01-07  Graham Stott  <grahams@redhat.com>
10673
10674         * error.c: Update copyright date.
10675         (print_scope_operator): Add parenthesis.
10676         (print_left_paren): Likewise.
10677         (print_right_paren): Likewise.
10678         (print_left_bracket): Likewise.
10679         (print_right_bracket): Likewise.
10680         (print_template_argument_list_start): Likewise.
10681         (print_template_argument_list_end): Likewise.
10682         (print_non_consecutive_character): Likewise.
10683         (print_tree_identifier): Likewise.
10684         (print_identifier): Likewise.
10685         (NEXT_CODE): Uppercase macro parameter.
10686         (ident_fndecl): Delete unused.
10687         (GLOBAL_THING): Likewise.
10688
10689 2002-01-06  Graham Stott  <grahams@redhat.com>
10690
10691         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
10692         (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
10693         (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
10694         (RECORD_OR_UNION_TYPE_CHECK): Likewise.
10695         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
10696         (C_IS_RESERVED_WORD): Uppercase macro parameter.
10697         (C_RID_YYCODE) Likewise.
10698         (ptrmem_cst): Use rtx.
10699         (LOCAL_BINDING_P): Add whitespace.
10700         (INHERITED_VALUE_BINDING_P): Likewise.
10701         (BINDING_SCOPE): Wrap long line.
10702         (BINDING_HAS_LEVEL_P): Remove parenthesis.
10703         (BINDING_VALUE): Wrap long line.
10704         (BINDING_TYPE): Whitespace.
10705         (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
10706         (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
10707         (IDENTIFIER_NAMESPACE_VALUE): Likewise.
10708         (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
10709         (same_type_p): Uppercase macro parameters.
10710         (same_type_ignoring_top_level_qualifiers_p): Likewise.
10711         (OVL_FUNCTION): Wrap long line.
10712         (OVL_CHAIN): Whitespace.
10713         (OVL_CURRENT): Add parenthesis and whitespace.
10714         (OVL_NEXT): Whitespace.
10715         (OVL_USED): Likewise.
10716         (IDENTIFIER_TYPE_VALUE): Likewise.
10717         (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
10718         (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
10719         (LANG_ID_FIELD): Whitespace.
10720         (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
10721         (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
10722         (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
10723         (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
10724         (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
10725         (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
10726         (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
10727         (IDENTIFIER_VIRTUAL_P): Likewise.
10728         (IDENTIFIER_OPNAME_P): Likewise.
10729         (IDENTIFIER_TYPENAME_P): Remove parenthesis.
10730         (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
10731         (C_SET_EXP_ORIGINAL_CODE): Likewise.
10732         (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
10733         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
10734         (IS_AGGR_TYPE): Uppercase macro parameter.
10735         (CLASS_TYPE_P): Likewise.
10736         (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
10737         (IS_AGGR_TYPE_2): Whitespace.
10738         (TAGGED_TYPE_P): Uppercase macro parameter.
10739         (TYPE_BUILT_IN): Whitespace.
10740         (TYPE_FOR_JAVA): Likewise.
10741         (FUNCTION_ARG_CHAIN): Remove parenthesis.
10742         (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
10743         (FUNCTION_FIRST_USER_PARAM): Likewise.
10744         (PROMOTES_TO_AGGR_TYPE): Whitespace.
10745         (DERIVED_FROM_P): Add parenthesis and wrap.
10746         (UNIQUELY_DERIVED_FROM_P): Likewise.
10747         (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
10748         (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
10749         (CLASSTYPE_USE_TEMPLATE): Whitespace.
10750         (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
10751         (TYPE_GETS_DELETE): Add parenthesis.
10752         (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
10753         (TYPE_HAS_ASSIGN_REF): Likewise,
10754         (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
10755         (TYPE_HAS_INIT_REF): Likewise.
10756         (TYPE_HAS_CONST_INIT_REF): Likewise.
10757         (TYPE_BEING_DEFINED): Likewise.
10758         (TYPE_LANG_SPECIFIC): Likewise.
10759         (CLASSTYPE_RTTI): Likewise.
10760         (TYPE_OVERLOADS_CALL_EXPR): Likewise.
10761         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
10762         (TYPE_OVERLOADS_ARROW): Likewise.
10763         (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
10764         (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
10765         (CLASSTYPE_METHOD_VEC): Likewise.
10766         (CLASSTYPE_MARKED_N): Likewise.
10767         (CLASSTYPE_MARKED): Likewise.
10768         (CLASSTYPE_MARKED2): Likewise.
10769         (CLASSTYPE_MARKED3): Likewise.
10770         (CLASSTYPE_MARKED4): Likewise.
10771         (CLASSTYPE_MARKED5): Likewise.
10772         (CLASSTYPE_MARKED6): Likewise.
10773         (SET_CLASSTYPE_MARKED): Whitespace.
10774         (CLEAR_CLASSTYPE_MARKED): Likewise.
10775         (SET_CLASSTYPE_MARKED2): Likewise.
10776         (CLEAR_CLASSTYPE_MARKED2): Likewise.
10777         (SET_CLASSTYPE_MARKED3): Likewise.
10778         (CLEAR_CLASSTYPE_MARKED3): Likewise.
10779         (SET_CLASSTYPE_MARKED4): Likewise.
10780         (CLEAR_CLASSTYPE_MARKED4): Likewise.
10781         (SET_CLASSTYPE_MARKED5): Likewise.
10782         (CLEAR_CLASSTYPE_MARKED5): Likewise.
10783         (SET_CLASSTYPE_MARKED6): Likewise.
10784         (CLEAR_CLASSTYPE_MARKED6): Likewise.
10785         (CLASSTYPE_TAGS): Likewise.
10786         (CLASSTYPE_VSIZE): Likewise.
10787         (CLASSTYPE_VBASECLASSES): Likewise.
10788         (CANONICAL_BINFO): Add parenthesis.
10789         (CLASSTYPE_SIZE(NODE): Likewise.
10790         (CLASSTYPE_SIZE_UNIT): Likewise.
10791         (CLASSTYPE_ALIGN(NODE): Likewise.
10792         (CLASSTYPE_USER_ALIGN): Likewise.
10793         (TYPE_JAVA_INTERFACE): Likewise.
10794         (CLASSTYPE_PURE_VIRTUALS): Likewise.
10795         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
10796         (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
10797         (CLASSTYPE_HAS_MUTABLE): Likewise.
10798         (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
10799         (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
10800         (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
10801         (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
10802         (CLASSTYPE_INTERFACE_ONLY): Likewise.
10803         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
10804         (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10805         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
10806         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10807         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
10808         (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
10809         (BINFO_UNSHARED_MARKED): Whitespace.
10810         (BINFO_MARKED): Whitespace and wrap.
10811         (SET_BINFO_MARKED): Likewise.
10812         (CLEAR_BINFO_MARKED): Likewise.
10813         (BINFO_VTABLE_PATH_MARKED): Likewise.
10814         (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
10815         (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
10816         (BINFO_SUBVTT_INDEX): Remove parenthesis.
10817         (BINFO_VPTR_INDEX): Likewise.
10818         (BINFO_PRIMARY_BASE_OF): Likewise,
10819         (CLASSTYPE_VFIELDS): Whitespace.
10820         (VF_DERIVED_VALUE): Wrap long line.
10821         (NAMESPACE_LEVEL): Whitespace.
10822         (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
10823         (DEFARG_POINTER): Whitespace.
10824         (DECL_NEEDED_P): Remove parenthesis.
10825         (DECL_LANGUAGE): Whitespace.
10826         (SET_DECL_LANGUAGE): Add parenthesis.
10827         (DECL_CONSTRUCTOR_P): Whitespace and wrap.
10828         (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
10829         (DECL_IN_AGGR_P): Whitespace.
10830         (DECL_FRIEND_P): Likewise.
10831         (DECL_BEFRIENDING_CLASSES): Likewise.
10832         (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
10833         (DECL_NONCONVERTING_P): Whitespace.
10834         (DECL_PURE_VIRTUAL_P): Likewise.
10835         (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
10836         (DECL_PENDING_INLINE_INFO): Whitespace.
10837         (DECL_SORTED_FIELDS): Likewise.
10838         (DECL_DEFERRED_FN): Likewise.
10839         (DECL_TEMPLATE_INFO): Likewise.
10840         (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
10841         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
10842         (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
10843         (TMPL_ARGS_LEVEL): Likewise.
10844         (SET_TMPL_ARGS_LEVEL): Likewise.
10845         (INNERMOST_TEMPLATE_PARMS): Whitespace.
10846         (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
10847         (INTEGRAL_CODE_P(CODE): Add parenthesis.
10848         (CP_INTEGRAL_TYPE_P): Remove parenthesis.
10849         (TYPE_HAS_CONSTRUCTOR): Whitespace.
10850         (TREE_HAS_CONSTRUCTOR): Likewise.
10851         (TYPE_HAS_DESTRUCTOR): Likewise.
10852         (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
10853         (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
10854         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
10855         (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
10856         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
10857         (TYPE_PTRMEMFUNC_P): Likewise.
10858         (TYPE_PTRMEMFUNC_FLAG): Likewise.
10859         (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
10860         (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
10861         (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
10862         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
10863         (DECL_ACCESS): Whitespace.
10864         (DECL_GLOBAL_CTOR_P): Remove parenthesis.
10865         (DECL_GLOBAL_DTOR_P): Likewise.
10866         (GLOBAL_INIT_PRIORITY): Likewise.
10867         (DECL_TEMPLATE_PARMS): Likewise.
10868         (DECL_TEMPLATE_RESULT): Likewise.
10869         (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
10870         (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
10871         (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
10872         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
10873         (PRIMARY_TEMPLATE_P): Add parenthesis.
10874         (DECL_USE_TEMPLATE): Whitespace.
10875         (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
10876         (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
10877         (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
10878         (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
10879         (CALL_DECLARATOR_PARMS): Remove parenthesis.
10880         (CALL_DECLARATOR_QUALS): Likewise.
10881         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
10882         (TEMP_NAME_P): Wrap.
10883         (VFIELD_NAME_P): Likewise.
10884         (B_SET): Uppercase macro parameters and add parenthesis.
10885         (B_CLR): Likewise.
10886         (B_TST): Likewise.
10887         (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
10888         (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
10889         (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
10890         (same_or_base_type_p): Likewise.
10891         (cp_deprecated): Likewise.
10892
10893 2002-01-05  Richard Henderson  <rth@redhat.com>
10894
10895         * semantics.c (expand_body): Revert last change.
10896
10897 2002-01-04  Jason Merrill  <jason@redhat.com>
10898
10899         PR c++/4122
10900         * class.c (update_vtable_entry_for_fn): Set delta to zero for a
10901         lost primary.
10902
10903         * class.c (build_vtbl_initializer): Check for a lost primary
10904         before calculating the vtable entry to throw away.
10905
10906 2002-01-02  Jason Merrill  <jason@redhat.com>
10907
10908         * semantics.c (expand_body): Call outlining_inline_function when
10909         emitting an inline function out of line.
10910
10911 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10912
10913         PR c++/5116, c++/764 reversion
10914         * call.c (build_new_op): Revert the instantiations. They are
10915         incorrect.
10916
10917 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10918
10919         PR c++/5089
10920         * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
10921
10922 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10923
10924         PR c++/3716
10925         * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
10926         (tsubst, case POINTER_TYPE): Handle pmfs here.
10927         (tsubst, case OFFSET_TYPE): Check it is not an offset to
10928         reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
10929
10930 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10931
10932         PR c++/35
10933         * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
10934         (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
10935         * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
10936         PARM_DECL.
10937         (tsubst_template_parms): Break up loop statements.
10938         (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
10939         parm PARM_DECLs don't get promoted.
10940
10941 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10942
10943         PR c++/5123
10944         * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
10945         (build_x_function_call): Cope with a COMPONENT_REF containing a
10946         TEMPLATE_ID_EXPR.
10947
10948 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10949
10950         PR c++/5213
10951         * pt.c (convert_template_argument): Be more careful determining
10952         when RECORD_TYPE templates are or are not templates.
10953
10954 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10955
10956         PR c++/775
10957         * cp-tree.h (handle_class_head): Adjust prototype.
10958         * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
10959         parameters. Use for all class heads.
10960         * parse.y (named_class_head_sans_basetype, named_class_head,
10961         named_complex_class_head_sans_basetype,
10962         named_class_head_sans_basetype_defn,
10963         unnamed_class_head): Remove.
10964         (class_head, class_head_apparent_template): Recognize class heads
10965         (class_head_decl, class_head_defn): New reductions. Process class
10966         heads.
10967         (structsp): Adjust class definition and class declaration
10968         reductions.
10969         (maybe_base_class_list): Give diagnostic on empty list.
10970
10971 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10972
10973         PR c++/4379
10974         * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
10975         single non-static member.
10976         (unary_complex_lvalue): If it cannot be a pointer to member, don't
10977         make it so. Check it is not pointer to reference.
10978
10979 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10980
10981         PR c++/5132
10982         * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
10983         are processing a template decl.
10984
10985 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10986
10987         PR c++/5116, c++/764
10988         * call.c (build_new_op): Make sure template class operands are
10989         instantiated. Simplify arglist construction.
10990
10991 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
10992
10993         * call.c (build_user_type_conversion_1): Use my_friendly_assert
10994         rather than if ... abort.
10995         * cvt.c (convert_to_reference): Likewise.
10996         * semantics.c (setup_vtbl_ptr): Likewise.
10997         * pt.c (lookup_template_class): Comment typo.
10998
10999 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
11000
11001         PR c++/5125
11002         * pt.c (push_template_decl_real): Make sure DECL has
11003         DECL_LANG_SPECIFIC.
11004
11005 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
11006
11007         PR c++/335
11008         * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
11009         for non-reference fields.
11010         * typeck.c (require_complete_type): Use resolve_offset_ref).
11011
11012 2001-12-26  Nathan Sidwell  <nathan@codesourcery.com>
11013
11014         PR c++/196
11015         * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
11016
11017 2001-12-24  Nathan Sidwell  <nathan@codesourcery.com>
11018
11019         PR c++/160
11020         * typeck.c (build_modify_expr): Remove old unreachable code & tidy
11021         up. Don't stabilize_references when initializing a reference.
11022
11023 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11024
11025         * decl2.c (lang_f_options): Const-ify.
11026
11027 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
11028
11029         * config-lang.in (diff_excludes): Remove.
11030
11031 2001-12-19  Nathan Sidwell  <nathan@codesourcery.com>
11032
11033         PR c++/90
11034         * typeck.c (build_function_call_real): Use original function
11035         expression for errors.
11036
11037 2001-12-18  Jason Merrill  <jason@redhat.com>
11038
11039         PR c++/3242
11040         * class.c (add_method): Do compare 'this' quals when trying to match a
11041         used function.  Don't defer to another used function.
11042
11043 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
11044
11045         * pt.c (instantiate_clone): Remove, fold into ...
11046         (instantiate_template): ... here. Simplify by removing mutual
11047         recursion.
11048         * typeck2.c (build_m_component_ref): Don't cv qualify the function
11049         pointed to by a pointer to function.
11050         * class.c (delete_duplicate_fields_1): Typo.
11051
11052 2001-12-18  Jason Merrill  <jason@redhat.com>
11053
11054         C++ ABI change: destroy value arguments in caller.
11055         * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
11056         create an extra binding level for the parameters.
11057         * decl.c (store_parm_decls): Don't do parameter cleanups.
11058
11059 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
11060
11061         * call.c (build_new_method_call): Use '%#V'.
11062         * error.c (cv_to_string): Use V parameter to determine padding.
11063
11064 2001-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
11065
11066         * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
11067         spellings in messages.
11068
11069 2001-12-17  Zack Weinberg  <zack@codesourcery.com>
11070
11071         * cp-tree.h: Delete #defines for cp_error, cp_warning,
11072         cp_pedwarn, and cp_compiler_error.
11073         * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
11074         except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
11075         rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
11076         typeck2.c: Change calls to the above macros to use their
11077         language-independent equivalents: error, warning, pedwarn, and
11078         internal_error respectively.
11079
11080 2001-12-16  Neil Booth  <neil@daikokuya.demon.co.uk>
11081
11082         * decl2.c (finish_file): Remove back_end_hook.
11083
11084 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
11085
11086         * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
11087         cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
11088         pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
11089
11090 2001-12-15  Joseph S. Myers  <jsm28@cam.ac.uk>
11091
11092         * lang-options.h: Use American spelling in messages.
11093
11094 2001-12-13  Jason Merrill  <jason@redhat.com>
11095
11096         * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
11097
11098         Use cleanups to run base and member destructors.
11099         * init.c (push_base_cleanups): New function, split out from...
11100         (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
11101         * decl.c (finish_destructor_body): Move vbase destruction code to
11102         push_base_cleanups.
11103         (begin_function_body, finish_function_body): New fns.
11104         (finish_function): Move [cd]tor handling and call_poplevel to
11105         finish_function_body.
11106         (pushdecl): Skip the new level.
11107         * semantics.c (genrtl_try_block): Don't call end_protect_partials.
11108         (setup_vtbl_ptr): Call push_base_cleanups.
11109         * method.c (synthesize_method): Call {begin,end}_function_body.
11110         * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
11111         * cp-tree.h: Declare new fns.
11112         * parse.y (function_body, .begin_function_body): New nonterminals.
11113         (fndef, pending_inline, function_try_block): Use function_body.
11114         (ctor_initializer_opt, function_try_block): No longer has a value.
11115         (base_init): Remove .set_base_init token.
11116         (.set_base_init, compstmt_or_error): Remove.
11117         * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
11118
11119         * optimize.c (maybe_clone_body): Fix parameter updating.
11120
11121 2001-12-12  Jason Merrill  <jason@redhat.com>
11122
11123         * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
11124         * semantics.c (genrtl_start_function): Don't pass
11125         parms_have_cleanups or push an extra binding level.
11126         (genrtl_finish_function): Lose cleanup_label cruft.
11127
11128         * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
11129         (ctor_label): Remove.
11130         * semantics.c (finish_return_stmt): Lose ctor_label support.
11131         * decl.c (finish_constructor_body, mark_lang_function): Likewise.
11132         * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
11133         dtor_label.
11134
11135         * call.c (build_new_method_call): Let resolves_to_fixed_type_p
11136         check for [cd]tors.
11137         * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
11138
11139         * decl.c (finish_function): Check VMS_TARGET, not VMS.
11140
11141         * decl.c (start_cleanup_fn): Remove redundant pushlevel.
11142         (end_cleanup_fn): And poplevel.
11143
11144         * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
11145         if we're in a template.
11146
11147 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
11148
11149         * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
11150         ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
11151         THIS_NAME_P): Delete.
11152         * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
11153         THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
11154         with internal naming scheme.
11155         * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
11156
11157 2001-12-12  Nathan Sidwell  <nathan@codesourcery.com>
11158
11159         * decl.c (grokdeclarator): Deprecated implicit typename use.
11160
11161 2001-12-11  Nathan Sidwell  <nathan@codesourcery.com>
11162
11163         PR g++/51
11164         * parse.y (frob_specs): Indicate it is a language linkage which
11165         contained the extern.
11166         * decl.c (grokdeclarator): Allow extern language linkage with
11167         other specifiers.
11168
11169 2001-12-10  Nathan Sidwell  <nathan@codesourcery.com>
11170
11171         PR g++/72
11172         * decl.c (add_binding): Don't reject duplicate typedefs involving
11173         template parameters.
11174
11175 2001-12-10  Neil Booth  <neil@daikokuya.demon.co.uk>
11176
11177         * parse.y, semantics.c: Similarly.
11178
11179 2001-12-09  Nathan Sidwell  <nathan@codesourcery.com>
11180
11181         PR g++/87
11182         * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
11183         (copy_args_p): Rename to ...
11184         (copy_fn_p): ... here.
11185         (grok_special_member_properties): New function.
11186         (grok_op_properties): Lose VIRTUALP parameter.
11187         (copy_assignment_arg_p): Remove.
11188         * call.c (build_over_call): Use copy_fn_p.
11189         * decl.c (grokfndecl): Reformat. Adjust call to
11190         grok_op_properties.
11191         (copy_args_p): Rename to ...
11192         (copy_fn_p): ... here. Reject template functions. Check for pass
11193         by value.
11194         (grok_special_member_properties): Remember special functions.
11195         (grok_ctor_properties): Don't remember them here, just check.
11196         (grok_op_properties): Likewise.
11197         (start_method): Call grok_special_member_properties.
11198         * decl2.c (grokfield): Likewise.
11199         (copy_assignment_arg_p): Remove.
11200         (grok_function_init): Don't remember abstract assignment here.
11201         * pt.c (instantiate_class_template): Call
11202         grok_special_member_properties.
11203         (tsubst_decl): Adjust grok_op_properties call.
11204
11205 2001-12-08  Aldy Hernandez  <aldyh@redhat.com>
11206
11207         * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
11208         RID_TYPES_COMPATIBLE_P.
11209
11210 2001-12-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
11211
11212         * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
11213         call to build_aggr_init.
11214         * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
11215
11216 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
11217
11218         * parse.y: Replace uses of the string non-terminal with STRING.
11219         Don't perform string concatentaion here.
11220         (string): Remove non-terminal.
11221         * semantics.c (finish_asm_stmt): Don't concatenate strings here.
11222
11223 2001-12-05  Jason Merrill  <jason@redhat.com>
11224
11225         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
11226         (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
11227         * tree.c (cp_start_inlining, cp_end_inlining): New fns.
11228         * pt.c (push_tinst_level): No longer static.
11229         * cp-tree.h: Declare them.
11230
11231         * init.c (resolve_offset_ref): Don't check access for the base
11232         conversion to access a FIELD_DECL.
11233
11234         * cp-tree.h (TYPE_REFFN_P): New macro.
11235         * decl.c (bad_specifiers): Check it, too.
11236
11237         * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
11238         on the __*_type_info type if we haven't seen a definition.
11239
11240 2001-12-05  Neil Booth  <neil@daikokuya.demon.co.uk>
11241
11242         * decl.c: Include c-common.h.
11243         (shadow_warning): Move to c-common.c.
11244
11245 2001-12-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11246
11247         * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
11248
11249 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
11250
11251         * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
11252
11253 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
11254
11255         PR g++/164
11256         * init.c (sort_base_init): Allow binfos to be directly specified.
11257         * method.c (do_build_copy_constructor): Explicitly convert to the
11258         base instance.
11259         (do_build_assign_ref): Likewise.
11260
11261 2001-12-03  Hans-Peter Nilsson  <hp@bitrange.com>
11262
11263         * decl.c (xref_basetypes): Don't use C99 construct in tag_code
11264         declaration and initialization.
11265
11266 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
11267
11268         * typeck2.c: Remove leading capital from diagnostic messages, as
11269         per GNU coding standards.
11270
11271 2001-12-03  Mumit Khan  <khan@nanotech.wisc.edu>
11272
11273         PR c++/3394
11274         * decl.c (xref_basetypes): Handle attributes between
11275         'class' and name.
11276
11277 2001-12-03  Nathan Sidwell  <nathan@codesourcery.com>
11278
11279         PR g++/3381
11280         * parse.y (named_complex_class_head_sans_basetype): Add new
11281         reduction.
11282         * Make-lang.in (parse.c): Adjust expected conflict count.
11283
11284 2001-12-03  Jason Merrill  <jason@redhat.com>
11285
11286         * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
11287         immediate binfos for our virtual bases.
11288
11289 2001-12-02  Neil Booth  <neil@daikokuya.demon.co.uk>
11290
11291         * call.c (build_java_interface_fn_ref): Similarly.
11292         * except.c (is_admissible_throw_operand): Similarly.
11293         * init.c (build_java_class_ref): Similarly.
11294         * xref.c (open_xref_file): Similarly.
11295
11296 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
11297
11298         * class.c (finish_struct): Remove trailing periods from messages.
11299         * decl.c (check_tag_decl): Similarly.
11300         * lex.c (cxx_set_yydebug): Similarly.
11301         * typeck2.c (friendly_abort): Similarly.
11302
11303 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
11304
11305         PR c++/3048
11306         * cp-tree.h (ovl_member): Remove.
11307         * decl2.c (merge_functions): Handle extern "C" functions
11308         specially.
11309         * tree.c (ovl_member): Remove.
11310
11311 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
11312
11313         PR c++/4842
11314         * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
11315         FUNCTION_DECL, as input.
11316         (mark_overriders): Remove.
11317         (warn_hidden): Rework for the new ABI.
11318
11319 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
11320
11321         PR c++/3471
11322         * call.c (convert_like_real): Do not build additional temporaries
11323         for rvalues of class type.
11324
11325 2001-11-28  Nathan Sidwell  <nathan@codesourcery.com>
11326
11327         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
11328         (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
11329         (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
11330         (DERIVED_FROM_P): Likewise.
11331         (enum base_access): Renumber, add ba_quiet bit mask.
11332         (get_binfo): Remove.
11333         (get_base_distance): Remove.
11334         (binfo_value): Remove.
11335         (ACCESSIBLY_DERIVED_FROM_P): Remove.
11336         * call.c (standard_conversion): Use lookup_base.
11337         * class.c (strictly_overrides): Likewise.
11338         (layout_virtual_bases): Likewise.
11339         (warn_about_ambiguous_direct_bases): Likewise.
11340         (is_base_of_enclosing_class): Likewise.
11341         (add_vcall_offset_vtbl_entries_1): Likewise.
11342         * cvt.c (build_up_reference): Adjust comment.
11343         * init.c (build_member_call): Reformat.
11344         * search.c (get_binfo): Remove.
11345         (get_base_distance_recursive): Remove.
11346         (get_base_distance): Remove.
11347         (lookup_base_r): Tweak.
11348         (lookup_base): Add ba_quiet control. Complete the types here.
11349         (covariant_return_p): Use lookup_base.
11350         * tree.c (binfo_value): Remove.
11351         (maybe_dummy_object): Use lookup_base.
11352         * typeck.c (build_static_cast): Use lookup_base.
11353         (get_delta_difference): Likewise.
11354         * typeck2.c (binfo_or_else): Use lookup_base.
11355         (build_scoped_ref): Add back error_mark_check.
11356         (build_m_component_ref): Use lookup_base.
11357
11358 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
11359
11360         * Make-lang.in (c++.generated-manpages): New dummy target.
11361
11362 2001-11-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11363
11364         * Make-lang.in (cp-lang.o): Depends on c-common.h.
11365         * cp-lang.c (c-common.h): Include.
11366         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
11367         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
11368         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
11369
11370 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
11371
11372         * decl2.c (c_language): Move to c-common.c.
11373         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
11374         functions.
11375         (cxx_init): Update.
11376
11377 2001-11-26  Jason Merrill  <jason@redhat.com>
11378
11379         * call.c (joust): Remove COND_EXPR hack.
11380
11381 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
11382
11383         * search.c (lookup_base_r): Declare bk in variable declaration
11384         space.
11385
11386 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
11387
11388         PR g++/3145
11389         * class.c (build_vbase_pointer): Remove.
11390         (build_vbase_path): Remove.
11391         (build_base_path): New function.
11392         * cp-tree.h (base_access, base_kind): New enumerations.
11393         (build_base_path): Declare.
11394         (convert_pointer_to_real): Remove.
11395         (convert_pointer_to): Remove.
11396         (lookup_base): Declare.
11397         (convert_pointer_to_vbase): Remove.
11398         * call.c (build_scoped_method_call): Use lookup_base &
11399         build_base_path instead of convert_pointer_to_real,
11400         get_base_distance & get_binfo.
11401         (build_over_call): Likewise.
11402         * cvt.c (cp_convert_to_pointer): Likewise.
11403         (convert_to_pointer_force): Likewise.
11404         (build_up_reference): Likewise.
11405         (convert_pointer_to_real): Remove.
11406         (convert_pointer_to): Remove.
11407         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
11408         instead of convert_pointer_to_vbase & build_vbase_path.
11409         (emit_base_init): Use build_base_path instead of
11410         convert_pointer_to_real.
11411         (expand_virtual_init): Lose unrequired conversions.
11412         (resolve_offset_ref): Use lookup_base and build_base_path
11413         instead of convert_pointer_to.
11414         * rtti.c (build_dynamic_cast_1): Use lookup_base &
11415         build_base_path instead of get_base_distance & build_vbase_path.
11416         * search.c (get_vbase_1): Remove.
11417         (get_vbase): Remove.
11418         (convert_pointer_to_vbase): Remove.
11419         (lookup_base_r): New function.
11420         (lookup_base): New function.
11421         * typeck.c (require_complete_type): Use lookup_base &
11422         build_base_path instead of convert_pointer_to.
11423         (build_component_ref): Likewise.
11424         (build_x_function_call): Likewise.
11425         (get_member_function_from_ptrfunc): Likewise.
11426         (build_component_addr): Likewise.
11427         * typeck2.c (build_scoped_ref): Likewise.
11428
11429 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
11430
11431         * cp-tree.h (CP_TYPE_QUALS): Removed.
11432         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
11433         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
11434         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
11435         * dump.c (cp_dump_tree): Use void* dump_info argument to match
11436         lang-hooks prototype.
11437         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
11438         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
11439         CP_TYPE_QUALS changed to cp_type_quals.
11440         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
11441         (CXX_C_OBJS): Remove c-dump.o.
11442
11443 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
11444
11445         PR c++/3637
11446         * pt.c (lookup_template_class): Ensure that all specializations
11447         are registered on the list corresponding to the most general
11448         template.
11449
11450 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
11451
11452         * call.c (non_reference): Add documentation.
11453         (convert_class_to_reference): Do not strip reference types
11454         from conversion operators.
11455         (maybe_handle_ref_bind): Simplify.
11456         (compare_ics): Correct handling of references.
11457
11458 2001-11-19  John Wilkinson <johnw@research.att.com>
11459
11460         * dump.c (dump_op): New function.
11461         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
11462         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
11463         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
11464
11465 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
11466
11467         PR4629
11468         * semantics.c (finish_sizeof): Make sure that expression created
11469         while processing a template do not have a type.
11470         (finish_alignof): Likewise.
11471         * typeck.c (c_sizeof): Likewise.
11472         (expr_sizeof): Likewise.
11473
11474 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
11475
11476         * lex.c (cxx_finish): Call c_common_finish.
11477         (finish_parse): Remove.
11478
11479 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11480
11481         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
11482         when displaying error message about missing array bounds.
11483
11484 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11485
11486         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
11487         CONST_CAST_EXPR.
11488         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
11489
11490 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
11491
11492         * cp-tree.h (print_class_statistics): Restore.
11493
11494 2001-11-15  Jason Merrill  <jason@redhat.com>
11495
11496         * method.c (use_thunk): Don't emit debugging information for thunks.
11497
11498         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
11499         * decl.c (make_typename_type): Handle getting a class template.
11500         * search.c (lookup_field_r): A class template is good enough for
11501         want_type.
11502
11503         * call.c (convert_like_real): Only use cp_convert for the bad part.
11504         (standard_conversion): Also allow bad int->enum.
11505         * typeck.c (ptr_reasonably_similar): Also allow functions to
11506         interconvert.  Pointers to same-size integers are reasonably
11507         similar.
11508
11509         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
11510         give it void type.
11511
11512 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
11513
11514         PR g++/3154
11515         * init.c (sort_base_init): Remove unreachable code.
11516         (expand_member_init): Adjust comment to reflect reality. Simplify
11517         and remove unreachable code.
11518
11519 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
11520
11521         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
11522         (cxx_init): Update prototype.
11523         * decl.c (init_decl_processing): Rename.  Move null node init
11524         to its creation time.
11525         * lex.c (cxx_init_options): Update.
11526         (cxx_init): Combine with old init_parse; also call
11527         cxx_init_decl_processing.
11528
11529 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
11530
11531         * decl.c (check_initializer): Try to complete the type of an
11532         array element before checking whether it's complete.  Don't
11533         complain about arrays with complete element types but an
11534         unknown size.
11535         (cp_finish_decl): Build the hierarchical constructor before
11536         calling maybe_deduce_size_from_array_init.
11537
11538 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
11539
11540         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
11541
11542 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
11543
11544         PR g++/4206
11545         * parse.y (already_scoped_stmt): Remove.
11546         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
11547
11548 2001-11-12  H.J. Lu <hjl@gnu.org>
11549
11550         * cvt.c (ocp_convert): Don't warn the address of a weak
11551         function is always `true'.
11552
11553 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
11554
11555         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
11556         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
11557         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
11558         * cp-tree.h (print_class_statistics): Remove.
11559         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
11560         cxx_print_identifier, cxx_set_yydebug): New.
11561         * lex.c (set_yydebug): Rename c_set_yydebug.
11562         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
11563         lang_print_xnode): Rename.
11564         * tree.c (print_lang_statistics): Rename.
11565
11566 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11567
11568         * class.c (dump_array): Fix format specifier warning.
11569
11570 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
11571
11572         * cp-lang.c (LANG_HOOKS_NAME): Override.
11573         (struct lang_hooks): Constify.
11574         * lex.c (cxx_init_options): Update.
11575         (lang_identify): Remove.
11576         * parse.y (language_string): Remove.
11577
11578 2001-11-08  Andreas Franck  <afranck@gmx.de>
11579
11580         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
11581         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
11582         suggested by autoconf.
11583         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
11584         (c++.install-common): Use the transformed target alias names.
11585
11586 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
11587
11588         * Make-lang.in: Update.
11589         * cp-lang.c: Include langhooks-def.h.
11590
11591 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11592
11593         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
11594
11595 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11596
11597         * lex.c (copy_lang_type): Add static prototype.
11598
11599 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11600
11601         * pt.c (unify): Handle SCOPE_REF.
11602
11603 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
11604
11605         * tree.c (cp_copy_res_decl_for_inlining): Adjust
11606         DECL_ABSTRACT_ORIGIN for the return variable.
11607
11608 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
11609
11610         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
11611
11612 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
11613
11614         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
11615         semantics.c, spew.c: Fix spelling errors.
11616
11617 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11618
11619         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
11620
11621 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
11622
11623         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
11624         pop_everything.
11625
11626 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11627
11628         * cp-lang.c (cxx_get_alias_set): New function.
11629         Point LANG_HOOKS_GET_ALIAS_SET to it.
11630
11631 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11632
11633         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
11634         * cp-tree.h (make_unbound_class_template): Prototype new function.
11635         * decl.c (make_unbound_class_template): New function.
11636         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
11637         * error.c (dump_type): Likewise.
11638         * mangle.c (write_type): Likewise.
11639         * parse.y (template_parm): Likewise.
11640         (template_argument): Use make_unbound_class_template.
11641         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
11642         (tsubst): Likewise.
11643         (tsubst_copy): Likewise.
11644         (unify): Likewise.
11645         * tree.c (walk_tree): Likewise.
11646         * typeck.c (comptypes): Likewise.
11647
11648 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11649
11650         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
11651         extra calls into fewer ones.
11652
11653 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
11654
11655         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
11656         Warn when merging inline with attribute noinline.
11657         (start_decl, start_function): Warn if inline and attribute
11658         noinline appear in the same declaration.
11659
11660 2001-10-16  H.J. Lu <hjl@gnu.org>
11661
11662         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
11663         for tree checking disabled.
11664
11665 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
11666
11667         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
11668         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
11669
11670 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
11671
11672         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
11673         (unify): Only handle MINUS_EXPR specially if the above flag is set
11674         and the subtracted constant is 1.  Clear the flag on recursive calls.
11675         Set it when unifying the maximum value in an INTEGER_TYPE's range.
11676
11677 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
11678
11679         * decl.c (bad_specifiers): Don't allow exception specifications
11680         on any typedefs.
11681
11682 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
11683
11684         * cp/lex.c (init_cp_pragma): Similarly.
11685
11686 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11687
11688         * pt.c (lookup_template_class): Build complete template arguments
11689         for BOUND_TEMPLATE_TEMPLATE_PARM.
11690
11691 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11692
11693         * cp-tree.h (TYPE_BINFO): Update comment.
11694         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
11695         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
11696         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
11697         (copy_type): Prototype new function.
11698         * lex.c (copy_lang_decl): Gather tree node statistics.
11699         (copy_lang_type): New function.
11700         (copy_type): Likewise.
11701         (cp_make_lang_type): Create lang_type for
11702         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
11703         and BOUND_TEMPLATE_TEMPLATE_PARM.
11704         * pt.c (tsubst): Use copy_type instead of copy_node.
11705         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
11706
11707 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11708
11709         * pt.c (determine_specialization): Ignore functions without
11710         DECL_TEMPLATE_INFO.
11711
11712 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
11713
11714         PR g++/4476
11715         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
11716
11717 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
11718
11719         * typeck2.c (store_init_value): Don't re-digest a bracketed
11720         initializer.
11721
11722         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
11723         ANON_AGGR_TYPE_P.
11724
11725 2001-10-11  Richard Henderson  <rth@redhat.com>
11726
11727         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
11728         of an asm statement.
11729         (build_vtbl_ref_1): Split out from build_vtbl_ref.
11730         (build_vfn_ref): Use it to handle vtable descriptors before
11731         calling build_vtable_entry_ref.
11732         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
11733
11734 2001-10-10  Richard Henderson  <rth@redhat.com>
11735
11736         * parse.y (asm_operand): Allow named operands.
11737         * semantics.c (finish_asm_stmt): Tweek for changed location
11738         of the operand constraint.
11739
11740 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
11741
11742         * call.c (standard_conversion): Add bad conversion between
11743         integers and pointers.
11744         (convert_like_real): Don't use convert_for_initialization for bad
11745         conversions; complain here and use cp_convert.
11746         (build_over_call): Don't handle bad conversions specially.
11747         (perform_implicit_conversion): Allow bad conversions.
11748         (can_convert_arg_bad): New fn.
11749         * cp-tree.h: Declare it.
11750         * typeck.c (convert_for_assignment): Use it.
11751         (ptr_reasonably_similar): Any target type is similar to void.
11752
11753 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
11754
11755         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
11756         (cp/cp-lang.o): New rule.
11757         * cp-tree.h: Declare hooks.
11758         * tree.c: Make hooks non-static.
11759         (init_tree): Don't initialize hooks here.
11760         * lex.c: Likewise.  Move definition of lang_hooks to...
11761         * cp-lang.c: ... new file.
11762
11763 2001-10-08  Richard Henderson  <rth@redhat.com>
11764
11765         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
11766         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
11767
11768 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11769
11770         * class.c (build_vtable_entry_ref): Const-ify.
11771         * decl.c (predefined_identifier,
11772         initialize_predefined_identifiers): Likewise.
11773         * init.c (build_new_1): Likewise.
11774         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
11775         Likewise.
11776
11777 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
11778
11779         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
11780         (INSNS_PER_STMT): Likewise.
11781         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
11782         (copy_body, initialize_inlined_parameters): Likewise.
11783         (declare_return_variable, inlinable_function_p): Likewise.
11784         (expand_call_inline, expand_calls_inline): Likewise.
11785         (optimize_inline_calls, clone_body): Likewise.
11786         * tree.c (walk_tree): Moved to ../tree-inline.c.
11787         (walk_tree_without_duplicates): Likewise.
11788         (copy_tree_r, remap_save_expr): Likewise.
11789
11790 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
11791
11792         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
11793         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
11794         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
11795         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
11796         (flag_inline_trees): Moved declaration to ../tree-inline.h.
11797         (walk_tree): Moved declaration to ../tree-inline.h.
11798         (walk_tree_without_duplicates, copy_tree_r): Likewise.
11799         (remap_save_expr): Likewise.
11800         * decl.c: Include tree-inline.h.
11801         (lang_mark_tree): Don't mark inlined_fns.
11802         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
11803         * optimize.c: Include tree-inline.h.
11804         (optimize_inline_calls): Move declaration to ../tree.h, as
11805         non-static.
11806         (remap_decl): Use language-independent constructs and hooks.
11807         (remap_block, copy_body_r, declare_return_variable): Likewise.
11808         (inlinable_function_p): Likewise.  Don't test for
11809         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
11810         no longer language-specific.
11811         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
11812         call of dump_function to...
11813         (optimize_function): Here...
11814         (clone_body): New function, extracted from...
11815         (maybe_clone_body): ... here.  Build decl_map locally and pass
11816         it on to clone_body.
11817         * pt.c, semantics.c: Include tree-inline.h.
11818         * tree.c: Likewise.
11819         (cp_walk_subtrees): New language-specific hook for tree inlining.
11820         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
11821         cp_is_overload_p, cp_auto_var_in_fn_p,
11822         cp_copy_res_decl_for_inlining): Likewise.
11823         (walk_tree): Move language-specific constructs into...
11824         (cp_walk_subtrees): this new function.
11825         (copy_tree_r): Use language-independent constructs and hooks.
11826         (init_tree): Initialize tree inlining hooks.
11827         (remap_save_expr): Adjust prototype so that the declaration
11828         does not require the definition of splay_tree.
11829
11830 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
11831
11832         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
11833         to build the declaration instead of the declaration itself.
11834
11835 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
11836
11837         * decl2.c (cxx_decode_option): Add 'else'.
11838
11839         * spew.c (end_input): No longer static.
11840         * cp-tree.h: Declare it.
11841         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
11842
11843 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
11844
11845         * call.c (build_over_call), typeck.c (build_function_call_real):
11846         Pass type attributes to check_function_format rather than name or
11847         assembler name.  Don't require there to be a name or assembler
11848         name to check formats.
11849
11850 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
11851
11852         * decl.c (init_decl_processing): Don't call
11853         init_function_format_info.  Initialize lang_attribute_table
11854         earlier.
11855         (builtin_function): Call decl_attributes.
11856         (insert_default_attributes): New.
11857
11858 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
11859
11860         * decl.c (grokdeclarator): Copy array typedef handling from C
11861         frontend.
11862
11863         * decl.c (grokdeclarator): Copy too-large array handling from C
11864         frontend.
11865
11866 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
11867
11868         * config-lang.in (target_libs): Added target-gperf, so that we
11869         don't try to build it if C++ is disabled.
11870
11871 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
11872
11873         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
11874         (cp/errfn.o): Delete rule.
11875         (cp/error.o): Depend on flags.h.
11876         * errfn.c: Delete file.
11877         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
11878         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
11879         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
11880         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
11881         internal_error respectively.  Make cp_deprecated into a macro.
11882         Don't define cp_printer typedef or declare cp_printers.
11883         * error.c: Include flags.h.
11884         Delete: struct tree_formatting_info, print_function_argument_list,
11885         print_declaration, print_expression, print_function_declaration,
11886         print_function_parameter, print_type_id, print_cv_qualifier_seq,
11887         print_type_specifier_seq, print_simple_type_specifier,
11888         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
11889         print_parameter_declaration_clause, print_exception_specification,
11890         print_nested_name_specifier, and definition of cp_printers.
11891         (locate_error): New function.
11892         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
11893         rewritten in terms of locate_error and diagnostic.c.
11894         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
11895         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
11896         (init_error): Adjust to match.
11897
11898 2001-09-22  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11899
11900         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
11901
11902 2001-09-21  Richard Henderson  <rth@redhat.com>
11903
11904         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
11905         (build_vtbl_initializer): Likewise.
11906         (build_vfn_ref): New.
11907         * cp-tree.h: Declare it.
11908         * call.c (build_over_call): Use it.
11909         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
11910         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
11911
11912 2001-09-21  J"orn Rennecke <amylaar@redhat.com>
11913
11914         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
11915
11916 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
11917
11918         Table-driven attributes.
11919         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
11920         * decl2.c (cplus_decl_attributes): Only take one attributes
11921         parameter.
11922         * cp-tree.c (cplus_decl_attributes): Update prototype.
11923         * class.c (finish_struct), decl.c (start_decl, start_function),
11924         decl2.c (grokfield), friend.c (do_friend), parse.y
11925         (parse_bitfield): Update calls to cplus_decl_attributes.
11926         * decl.c (grokdeclarator): Take a pointer to a single ordinary
11927         attribute list.
11928         * decl.h (grokdeclarator): Update prototype.
11929         * decl2.c (grokfield): Take a single ordinary attribute list.
11930         * friend.c (do_friend): Likewise.
11931         * decl.c (shadow_tag, groktypename, start_decl,
11932         start_handler_parms, grokdeclarator, grokparms, start_function,
11933         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
11934         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
11935         (process_template_parm, do_decl_instantiation): Pass single
11936         ordinary attribute lists around.
11937         * decl.c (grokdeclarator): Correct handling of nested attributes.
11938         Revert the patch
11939         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
11940                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
11941                 not the left.
11942         .
11943         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
11944         (cp_attribute_table): Declare.
11945         * decl.c (valid_lang_attribute): Don't define.
11946         (lang_attribute_table): Define.
11947         (init_decl_processing): Initialize lang_attribute_table instead of
11948         valid_lang_attribute.
11949         * tree.c (cp_valid_lang_attribute): Remove.
11950         (handle_java_interface_attribute, handle_com_interface_attribute,
11951         handle_init_priority_attribute): New functions.
11952         (cp_attribute_table): New array.
11953         * decl2.c (import_export_class): Don't use
11954         targetm.valid_type_attribute.
11955
11956 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
11957
11958         * Make-lang.in (cp/error.o): Depend on real.h
11959         * error.c: #include "real.h"
11960
11961 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11962
11963         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
11964         xmalloc/strcpy/strcat.
11965
11966 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11967
11968         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
11969         Const-ification.
11970         * pt.c (tsubst_decl): Likewise.
11971
11972 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11973
11974         * decl2.c (lang_f_options): Const-ification.
11975         * lex.c (cplus_tree_code_name): Likewise.
11976         * spew.c (yyerror): Likewise.
11977
11978 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
11979
11980         PR c++/3986
11981         * class.c (force_canonical_binfo_r): Check & move an indirect
11982         primary base first.
11983         (force_canonical_binfo): Check that it's not already
11984         canonical.
11985         (mark_primary_virtual_base): Remove BINFO parameter.
11986         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
11987
11988 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
11989
11990         Remove TYPE_NONCOPIED_PARTS.
11991         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
11992         CLASSTYPE_PURE_VIRTUALS.
11993         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
11994         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
11995         (layout_class_type): Don't call fixup_inline_methods here ...
11996         (finish_struct_1): ... call it here.
11997
11998 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
11999
12000         * decl.c (duplicate_decls): Remove code deadling with
12001         DECL_SAVED_INSNS.
12002         * decl2.c (finish_file): Likewise.
12003         * pt.c (instantiate_decl): Likewise.
12004         * semantics.c (expand_body): Don't defer local functions if
12005         they wouldn't be deferred for some other reason.  Don't
12006         generate RTL for functions that will not be emitted.
12007         (genrtl_start_function): Remove code deadling with
12008         DECL_SAVED_INSNS.
12009         (genrtl_finish_function): Likewise.
12010
12011 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
12012
12013         PR c++/4203
12014         * call.c (build_over_call): Do not optimize any empty base
12015         construction.
12016
12017 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12018
12019         * error.c (dump_template_decl): Output template parameters
12020         together with their specifiers.
12021         Output `class' prefix for template template parameter.
12022         (dump_decl): Fix formatting.
12023
12024 2001-08-30  Kurt Garloff  <garloff@suse.de>
12025
12026         * optimize.c (inlinable_function_p): Allow only smaller single
12027         functions. Halve inline limit after reaching recursive limit.
12028
12029 2001-08-30  Joern Rennecke <amylaar@redhat.com>
12030             Jason Merrill  <jason_merrill@redhat.com>
12031
12032         * class.c (build_vtable_entry_ref): Subtract in char*, not
12033         ptrdiff_t.
12034
12035 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
12036
12037         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
12038         (build_cplus_array_type): Use cp_build_qualified_type, not
12039         TYPE_MAIN_VARIANT, to get an unqualified version.
12040
12041         * decl2.c (grok_alignof): Lose.
12042         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
12043         * typeck.c (c_alignof): Lose.
12044         * semantics.c (finish_sizeof, finish_alignof): New.
12045         * parse.y: Use them.
12046         * cp-tree.h: Declare them.
12047
12048 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
12049
12050         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
12051         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
12052         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
12053
12054 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
12055
12056         * typeck2.c (add_exception_specifier): Only require complete type if
12057         not in processing template declaration.
12058
12059 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12060
12061         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
12062         GNU_xref_start_scope and GNU_xref_end_scope.
12063
12064         * tree.c (TYPE_HASH): Moved to ../tree.h.
12065
12066 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
12067
12068         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
12069         on COMPOUND_EXPRs.
12070
12071 2001-08-14  Richard Henderson  <rth@redhat.com>
12072
12073         * class.c, cp-tree.h (build_vfn_ref): Remove.
12074         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
12075
12076 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
12077
12078         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
12079         empty class assignment as having side-effects to avoid
12080         spurious warnings.
12081
12082 2001-08-13  Zack Weinberg  <zackw@panix.com>
12083
12084         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
12085         * except.c: Include libfuncs.h.
12086
12087 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
12088
12089         * decl.c (grokdeclarator): Clarify diagnostic message.
12090
12091 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12092
12093         * decl2.c (do_nonmember_using_decl): Replace using directive
12094         with using declaration in the error message.
12095
12096 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12097
12098         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
12099         criterion to avoid rebuilding expression tree instead of
12100         processing_template_decl.
12101
12102 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
12103
12104         Support named return value optimization for inlines, too.
12105         * decl.c (finish_function): Nullify returns here.
12106         * semantics.c (genrtl_start_function): Not here.
12107         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
12108         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
12109         Also nullify the CLEANUP_STMT for the nrv.
12110         * cp-tree.h: Declare it.
12111         * optimize.c (declare_return_variable): Replace the nrv with the
12112         return variable.
12113         * typeck.c (check_return_expr): Be more flexible on alignment check.
12114         Ignore cv-quals when checking for a matching type.
12115
12116 2001-08-09  Richard Henderson  <rth@redhat.com>
12117
12118         * decl2.c (finish_objects): Use target hooks instead of
12119         assemble_constructor and assemble_destructor.
12120
12121 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
12122
12123         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
12124
12125 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
12126
12127         PR c++/3820
12128         Stop using TYPE_NONCOPIED_PARTS.
12129         * call.c (build_over_call): Be careful when copy constructing
12130         or assigning to an empty class.
12131         * class.c (check_bases_and_members): It has a
12132         COMPLEX_ASSIGN_REF if it has a vptr.
12133         (layout_class_type): Don't add empty class padding to
12134         TYPE_NONCOPIED_PARTS.
12135         (finish_struct_1): Don't add the VFIELD either.
12136         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
12137         initialization.
12138
12139 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
12140
12141         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
12142
12143 2001-08-06  Richard Henderson  <rth@redhat.com>
12144
12145         * decl2.c (finish_objects): Pass a symbol_ref and priority to
12146         assemble_{constructor,destructor}.  Remove priority handling.
12147
12148 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
12149
12150         Don't allow template-id in using-declaration.
12151         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
12152         (do_class_using_decl): Likewise.
12153
12154 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
12155
12156         * cp/spew.c (read_token): No need to pop buffers.
12157
12158 2001-08-02  Stan Shebs  <shebs@apple.com>
12159
12160         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
12161         (fnaddr_from_vtable_entry): Remove decl.
12162         * method.c (use_thunk): Update comment.
12163
12164 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
12165
12166         * repo.c (get_base_filename): Change return value to const char
12167         pointer.
12168
12169 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
12170
12171         Kill -fhonor-std.
12172         * NEWS: Document.
12173         * cp-tree.h (flag_honor_std): Remove.
12174         (CPTI_FAKE_STD): Remove.
12175         (std_node): Remove comment about it being NULL.
12176         (fake_std_node): Remove.
12177         * decl.c (in_fake_std): Remove.
12178         (walk_namespaces_r): Remove fake_std_node check.
12179         (push_namespace): Remove in_fake_std code.
12180         (pop_namespace): Likewise.
12181         (lookup_name_real): Remove fake_std_node check.
12182         (init_decl_processing): Always create std_node. Always add
12183         std:: things there.
12184         (builtin_function): Always put non '_' fns in std.
12185         * decl2.c (flag_honor_std): Remove.
12186         (lang_f_options): Remove honor-std.
12187         (unsupported_options): Add honor-std.
12188         (set_decl_namespace): Remove fake_std_node check.
12189         (validate_nonmember_using_decl): Likewise.
12190         (do_using_directive): Likewise.
12191         (handle_class_head): Likewise.
12192         * dump.c (cp_dump_tree): Likewise.
12193         * except.c (init_exception_processing): Adjust.
12194         * init.c (build_member_call): Remove fake_std_node check.
12195         (build_offset_ref): Likewise.
12196         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
12197         * rtti.c (init_rtti_processing): Adjust.
12198
12199 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
12200
12201         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
12202         operand while calling cp_tree_equal.
12203
12204 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
12205
12206         The 3.0 ABI no longer has vbase pointer fields.
12207         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
12208         FORMAT_VBASE_NAME): Remove.
12209         * method.c (do_build_copy_constructor): Adjust.
12210         (do_build_assign_ref): Adjust.
12211         * search.c (lookup_field_r): Adjust.
12212         * typeck.c (build_component_ref): Adjust.
12213
12214         The 3.0 ABI always has a vtable pointer at the start of every
12215         polymorphic class.
12216         * rtti.c (build_headof_sub): Remove.
12217         (build_headof): Adjust.
12218         (get_tinfo_decl_dynamic): No need to check flag_rtti
12219         here. Adjust.
12220         (create_real_tinfo_var): Explain why we need a hidden name.
12221
12222 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
12223
12224         PR c++/3631
12225         * class.c (update_vtable_entry_for_fn): The fixed adjustment
12226         of a virtual thunk should be from declaring base.
12227
12228 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
12229
12230         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
12231         the shared virtual base, so preserving inheritance graph order.
12232
12233 2001-07-30  Andreas Jaeger  <aj@suse.de>
12234
12235         * decl2.c: Remove unused var global_temp_name_counter.
12236
12237 2001-07-28  Richard Henderson  <rth@redhat.com>
12238
12239         * method.c (pending_inlines): Remove.
12240
12241 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
12242
12243         * class.c (mark_primary_virtual_base): Don't adjust base
12244         offsets here.
12245         (dfs_unshared_virtual_bases): Adjust them here.
12246         (mark_primary_bases): Explain why we adjust at the end.
12247
12248 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
12249
12250         * class.c (finish_struct_1): When copying the primary base's
12251         VFIELD, make sure we find it is at offset zero.
12252
12253 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12254
12255         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
12256         tsubst_expr for default template arguments.
12257
12258 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
12259
12260         PR c++/3621
12261         * spew.c (yylex): Only copy the token's lineno, if it is
12262         nonzero.
12263
12264 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
12265
12266         PR c++/3624
12267         * call.c (resolve_args): Simplify, call
12268         convert_from_reference.
12269         (build_new_op): Resolve and convert from reference ARG1
12270         earlier. Adjust ARG2 & ARG3 resolve and conversion.
12271
12272 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
12273
12274         * decl.c (last_function_parm_tags): Remove.
12275         (current_function_parm_tags): Remove.
12276         (init_decl_processing): Adjust.
12277         (start_function): Adjust.
12278         (store_parm_decls): Adjust.
12279
12280         PR c++/3152
12281         * decl.c (grokdeclarator): Detect when a function typedef is
12282         declaring a function, and create last_function_parms correctly.
12283
12284 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
12285
12286         * call.c (joust): Only prefer a non-builtin candidate to a builtin
12287         one if they have the same signature.
12288
12289         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
12290         it rather than toplevel_bindings_p.  Give it a mangled name if static.
12291         (convert_to_reference): Adjust.
12292         * decl2.c (get_temp_name): Lose.
12293         * mangle.c (mangle_ref_init_variable): New fn.
12294         (mangle_guard_variable): Strip the ref-init header.
12295         * cp-tree.h: Adjust.
12296         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
12297         initializer.
12298         (grok_reference_init): Always use DECL_INITIAL.
12299
12300 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
12301
12302         PR c++/3416
12303         * call.c (build_conditional_expr): Recheck args after
12304         conversions.
12305         * cp-tree.h (build_conditional_expr): Move to correct file.
12306         * typeck.c (decay_conversion): Diagnose any unknown types
12307         reaching here.
12308         (build_binary_op): Don't do initial decay or default
12309         conversions on overloaded functions.
12310         (build_static_cast): Don't do a decay conversion here.
12311
12312 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
12313
12314         PR c++/3543
12315         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
12316         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
12317
12318 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
12319
12320         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
12321         (create_vtbl_ptr): ... here.
12322
12323 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
12324
12325         * class.c (build_vbase_offset_vbtl_entries): Look for
12326         non-primary base of which we are a sub vtable.
12327
12328 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
12329
12330         * semantics.c (finish_this_expr):  Remove unused code.
12331
12332 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
12333
12334         Simplify rtti, now we've only one ABI.
12335         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
12336         CPTI_TINFO_VAR_ID.
12337         (tinfo_decl_id, tinfo_var_id): Remove.
12338         (get_typeid_1): Remove.
12339         * rtti.c
12340         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
12341         (typeid_ok_p): New function.
12342         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
12343         (get_tinfo_decl): Remove old abi documentation.
12344         (tinfo_from_decl): Remove.
12345         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
12346         (get_typeid_1): Remove.
12347         (get_base_offset): Remove.
12348         (synthesize_tinfo_var): Absorb get_base_offset.
12349         (create_real_tinfo_var): Don't use tinfo_decl_id.
12350
12351 2001-07-23  Graham Stott  <grahams@redhat.com>
12352
12353         * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
12354         variable has_two_argument_delete_p.
12355
12356 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
12357
12358         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
12359         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
12360         (CPTI_INDEX_IDENTIFIER): Remove.
12361         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
12362         (delta2_identifier): Remove.
12363         (index_identifier): Remove.
12364         (pfn_or_delta2_identifier): Remove.
12365         (flag_vtable_thunks): Remove.
12366         (VTABLE_DELTA2_NAME): Remove.
12367         (VTABLE_INDEX_NAME): Remove.
12368         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
12369         (vfunc_ptr_type_node): Adjust.
12370         (VTABLE_NAME_PREFIX): Adjust.
12371         (build_vfn_ref): Lose first parameter.
12372         (fixup_all_virtual_upcast_offsets): Remove.
12373         * decl.c (initialize_predefined_identifiers): Remove
12374         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
12375         (init_decl_processing): Remove no-vtable-thunk code.
12376         * decl2.c (flag_vtable_thunks): Remove.
12377         (mark_vtable_entries): Remove no-vtable-thunk code.
12378         * error.c (dump_decl): Remove no-vtable-thunk code.
12379         (dump_expr): Adjust ptr to member function code.
12380         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
12381         code.
12382         * rtti.c (build_headof): Remove no-vtable-thunk code.
12383         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
12384         * search.c (get_base_distance): Remove expand_upcast_fixups case.
12385         (virtual_context) Remove.
12386         (expand_upcast_fixups): Remove.
12387         (fixup_virtual_upcast_offsets): Remove.
12388         (fixup_all_virtual_upcast_offsets): Remove.
12389         * typeck.c (get_member_function_from_ptrfunc): Remove
12390         no-vtable-thunk code.
12391         * call.c (build_over_call): Adjust call to build_vfn_ref.
12392         * class.c (build_vfn_ref): Lose first parameter. Remove
12393         no-vtable-thunk code.
12394         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
12395         (build_vtable_entry): Remove no-vtable-thunk code.
12396
12397 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
12398
12399         Remove old-abi remnants. Remove comments about old abi
12400         behavior. Remove references to 'new-abi' in comments.
12401         * cp-tree.h: Adjust comments.
12402         (vbase_offsets_in_vtable_p): Delete.
12403         (vcall_offsets_in_vtable_p): Delete.
12404         (vptrs_present_everywhere_p): Delete.
12405         (all_overridden_vfuns_in_vtables_p): Delete.
12406         (merge_primary_and_secondary_vtables_p): Delete.
12407         (TYPE_CONTAINS_VPTR_P): Adjust.
12408         (VTT_NAME_PREFIX): Remove.
12409         (CTOR_VTBL_NAME_PREFIX): Remove.
12410         (init_vbase_pointers): Remove.
12411         * class.c: Adjust coments.
12412         (build_vbase_pointer_fields): Delete.
12413         (build_vbase_pointer): Remove old-abi code.
12414         (build_secondary_vtable): Likewise.
12415         (modify_all_vtables): Likewise.
12416         (create_vtable_ptr): Likewise.
12417         (layout_class_type): Likewise.
12418         (finish_struct_1): Likewise.
12419         (finish_vtbls): Likewise.
12420         (dfs_finish_vtbls): Delete.
12421         (build_vbase_offset_vtbl_entries): Remove old-abi code.
12422         * cvt.c: Adjust comments.
12423         * decl.c: Adjust comments.
12424         * decl2.c: Adjust comments.
12425         * init.c: Adjust comments.
12426         (construct_virtual_bases): Remove old-abi code.
12427         * lang-specs.h: Remove -fno-new-abi.
12428         * mangle.c: Adjust comments.
12429         * rtti.c: Adjust comments.
12430         (get_base_offset): Remove old-abi-code.
12431         * search.c: Adjust comments.
12432         (dfs_init_vbase_pointers): Remove.
12433         (dfs_vtable_path_unmark): Remove.
12434         (init_vbase_pointers): Remove.
12435         * semantics.c: Adjust comments.
12436         (emit_associated_thunks): Remove old-abi code.
12437         * typeck.c: Adjust comments.
12438
12439 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
12440
12441         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
12442         params.h.
12443
12444 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
12445
12446         * class.c (finish_struct_anon): Forbid nested classes.
12447
12448 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
12449
12450         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
12451         * optimize.c: Include debug.h.
12452         (maybe_clone_body): Use debug hook.
12453         * semantics.c: Include debug.h.
12454         (expand_body): Use debug hook.
12455
12456 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
12457
12458         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
12459
12460 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
12461
12462         * class.c (type_requires_array_cookie): New function.
12463         (check_methods): Don't try to figure out whether the type needs a
12464         cookie here.
12465         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
12466         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
12467         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
12468         * pt.c (instantiate_class_template): Don't set
12469         TYPE_VEC_DELETE_TAKES_SIZE.
12470         * NEWS: Document ABI changes from GCC 3.0.
12471
12472 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
12473             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
12474
12475         * NEWS (Changes in GCC 3.0): Fix typo.
12476
12477 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
12478
12479         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
12480         which attributes are to be attached, and a flags argument.  Update
12481         call to decl_attributes.
12482         (grokfield): Update call to decl_attributes.
12483         * class.c (finish_struct): Update call to cplus_decl_attributes.
12484         * cp-tree.h (cplus_decl_attributes): Update prototype.
12485         * decl.c (start_decl, grokdeclarator, start_function): Update
12486         calls to decl_attributes and cplus_decl_attributes.
12487         * friend.c (do_friend): Update call to cplus_decl_attributes.
12488         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
12489
12490 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
12491
12492         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
12493         for `register' variables with an asm-specification.
12494
12495 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
12496
12497         * semantics.c (finish_asm_stmt): Mark the output operands
12498         to an asm addressable, if necessary.
12499
12500 2001-07-11  Ben Elliston  <bje@redhat.com>
12501
12502         * Revert this change -- there is a subtle bug.
12503
12504         PR c++/80
12505         * decl.c (finish_enum): New "attributes" argument; pass it to
12506         cplus_decl_attributes.  Use a narrower type if the enum is packed.
12507         * cp-tree.h (finish_enum): Adjust prototype.
12508         * parse.y (enum_head): New non-terminal.
12509         (structsp): Use it. Enums now may be preceded or followed by
12510         optional attributes -- pass their chained tree to finish_enum().
12511         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
12512
12513 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
12514
12515         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
12516         variables.
12517
12518 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
12519
12520         * semantics.c (cp_expand_stmt): Fix for null
12521         current_function_return_value.
12522
12523 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
12524
12525         * call.c (build_op_delete_call): Initialize fn.
12526         (convert_like_real): Delete conditional.
12527         (joust): Initialize *w and *l.
12528         * class.c: Add prototype for binfo_ctor_vtable.
12529         (get_primary_binfo): Initialize result.
12530         * init.c (build_java_class_ref): Initialize name.
12531
12532 2001-07-09  Erik Rozendaal  <dlr@acm.org>
12533
12534         * typeck.c (unary_complex_lvalue): Do not duplicate the
12535         argument to modify, pre-, or post-increment when used as an
12536         lvalue and when the argument has side-effects.
12537
12538 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
12539
12540         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
12541         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
12542         cplus_decl_attributes even if attrs is NULL.
12543         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
12544
12545 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
12546
12547         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
12548         calls to decl_attributes.
12549
12550 2001-07-06  Ira Ruben   <ira@apple.com>
12551
12552         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
12553         be DECL_TEMPLATE_RESULT.
12554
12555 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12556
12557         * cp-tree.h (copy_template_template_parm): Rename to ...
12558         (bind_template_template_parm): ... here.
12559         * tree.c (copy_template_template_parm): Rename to ...
12560         (bind_template_template_parm): ... here.  Remove the case when
12561         NEWARGS is NULL_TREE.
12562         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
12563         BOUND_TEMPLATE_TEMPLATE_PARM.
12564         * pt.c (lookup_template_class): Adjust.
12565
12566 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
12567
12568         * cvt.c (convert_lvalue): New fn.
12569         * cp-tree.h: Declare it.
12570         * method.c (do_build_assign_ref): Use it.
12571         (do_build_copy_constructor): Convert parm to base types
12572         before calling base constructors.
12573
12574         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
12575         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
12576         optimize.
12577         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
12578
12579 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
12580
12581         * optimize.c (optimize_inline_calls): New function, broken out
12582         of ...
12583         (optimize_function): ... here. Call it. Don't inline if it is
12584         a thunk.
12585         (dump_function): Print name of dump flag causing this dump.
12586         * semantics.c (expand_body): Move thunk inline check to
12587         optimize_function.
12588
12589 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
12590
12591         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
12592         (comptypes): Use target.comp_type_attributes.
12593
12594 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
12595
12596         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
12597
12598 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
12599
12600         * error.c (lang_print_error_function): Add a `diagnostic_context *'
12601         parameter. Tweak.
12602
12603 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
12604
12605         * decl2.c (import_export_class): Update.
12606
12607 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
12608
12609         * error.c (init_error): Adjust settings.
12610
12611 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
12612
12613         * error.c (init_error): Adjust settings.
12614
12615 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
12616
12617         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
12618         return pointers to data members by reference rather than by value.
12619
12620 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
12621
12622         Implement the Named Return Value optimization.
12623         * cp-tree.h (struct cp_language_function): Add x_return_value.
12624         (current_function_return_value): Now a macro.
12625         * decl.c: Don't define it.
12626         (define_label, finish_case_label): Don't clear it.
12627         (init_decl_processing): Don't register it with GC.
12628         * semantics.c (genrtl_finish_function): Don't check it for
12629         no_return_label.  Copy the RTL from the return value to
12630         current_function_return_value and walk, calling...
12631         (nullify_returns_r): ...this new fn.
12632         * typeck.c (check_return_expr): Set current_function_return_value.
12633
12634 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
12635
12636         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
12637         sharing a ctor vtable with.  Merge code for cases 1 and 2.
12638         (binfo_ctor_vtable): New fn.
12639         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
12640
12641 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
12642
12643         * class.c (dfs_find_final_overrider): Fix logic.
12644
12645         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
12646         virtual thunk instead of non-virtual.
12647         (get_matching_virtual): Uncomment.
12648
12649         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
12650         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
12651         PARM, not ARG.
12652
12653 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
12654
12655         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
12656         we've not emerged from the hierarchy of RTTI_BINFO on reaching
12657         a non-virtual base.
12658
12659 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
12660
12661         * NEWS: Update release number.
12662
12663 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
12664
12665         PR c++/3130, c++/3131, c++/3132
12666         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
12667         * class.c (force_canonical_binfo_r): Move
12668         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
12669         virtual bases unless they're primary and what they're primary
12670         too has been moved.
12671         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
12672         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
12673         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
12674         derived binfo.
12675         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
12676         (layout_nonempty_base_or_field): Add most derived type
12677         parameter. Adjust.
12678         (layout_empty_base): Likewise.
12679         (build_base_field): Likewise.
12680         (build_base_fields): Likewise.
12681         (propagate_binfo_offsets): Add most derived type
12682         parameter. Skip non canonical virtual bases too.
12683         (dfs_set_offset_for_unshared_vbases): Don't skip primary
12684         bases. Do skip canonical bases.
12685         (layout_virtual_bases): Adjust.
12686         (layout_class_type): Adjust.
12687         (dfs_get_primary_binfo): Build list of virtual primary base
12688         candidates.
12689         (get_primary_binfo): Check that the shared virtual primary
12690         base candidate was found first.
12691         (accumulate_vtbl_inits): Don't do anything for non-vptr
12692         containing binfos. For case 1 primary virtual bases, keep
12693         checking that we've not emerged from the hierarchy of RTTI_BINFO.
12694
12695 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
12696
12697         PR c++/3089
12698         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
12699         hierarchy looking for primary bases for a ctor
12700         vtable. Recursively call oneself, if we meet our primary via
12701         this route and haven't met it yet via inheritance graph order.
12702
12703 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
12704
12705         * lang-options.h: Emit documentation for -fno-honor-std, not
12706         -fhonor-std.
12707
12708 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
12709
12710         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
12711         Don't clobber delta.
12712         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
12713
12714 2001-06-10  Mark Mitchell <mark@codesourcery.com>
12715             Gabriel Dos Reis  <gdr@codesourcery.com>
12716
12717         * Make-lang.in (cp/call.o): Depend on diagnostic.h
12718         (cp/typeck.o): Depend on diagnostic.h
12719         (cp/typeck2.o): Depend on diagnostic.h
12720         (cp/repo.o): Depend on dignostic.h
12721         * typeck.c: #include diagnostic.h
12722         (convert_for_initialization): Remove extern declaration for
12723         warningcount and errorcount.
12724
12725         * call.c: #include diagnostic.h
12726         (convert_like_real): Remove extern declaration for warnincount and
12727         errorcount.
12728
12729         * repo.c: #include diagnostic.h
12730         * typeck2.c: #include diagnostic.h
12731
12732 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
12733
12734         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
12735         in previous change.
12736
12737 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
12738
12739         PR c++/2929
12740         * friend.c (do_friend): Use push_decl_namespace for classes at
12741         namespace scope.
12742
12743 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
12744             Jason Merrill <jason_merrill@redhat.com>
12745
12746         PR c++/3061
12747         * class.c (build_secondary_vtable): Use assert, rather than an error
12748         message.
12749         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
12750         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
12751         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
12752         Don't set BINFO_VTABLE for a primary virtual base.
12753
12754 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
12755
12756         * decl.c (duplicate_decls): Update source position information
12757         when a template function is defined.
12758
12759 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
12760
12761         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
12762
12763 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
12764
12765         PR c++/2914
12766         * decl.c (pushtag): Don't push into a complete type's scope.
12767
12768 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
12769
12770         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
12771         (struct lang_decl_flags): Lose generate_with_vtable_p.
12772         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
12773         * class.c (copy_virtuals): Adjust.
12774         * decl2.c (mark_vtable_entries): Adjust.
12775         * method.c (make_thunk, build_vtable_entry): Adjust.
12776         * class.c (update_vtable_entry_for_fn): Only look as far as the
12777         first defining class.
12778         (build_vtbl_initializer): Put nothing in the slot for a function only
12779         defined in a lost primary virtual base.
12780         (add_vcall_offset_vtbl_entries_1): Use the same code for
12781         the lost primary case and the normal case.
12782         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
12783         (get_vfield_offset, get_derived_offset): Lose.
12784         (dfs_find_final_overrider): Use look_for_overrides_here.
12785         (get_matching_virtual): New fn.
12786         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
12787         not BV_VCALL_INDEX.
12788         * search.c (look_for_overrides_here): Split out from...
12789         (look_for_overrides_r): Here.
12790
12791         * class.c (find_final_overrider): Return error_mark_node on error.
12792
12793         * decl2.c (key_method): #if 0 accidental change.
12794
12795 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
12796
12797         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
12798         (build_over_call): Likewise.
12799         * decl.c (grokparms): Likewise.
12800         * pt.c (tsubst_decl): Likewise.
12801         * typeck.c (convert_arguments): Likewise.
12802
12803 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
12804
12805         * semantics.c (begin_class_definition): Robustify.
12806
12807         * pt.c (instantiate_decl): Tell the repository code about the
12808         clones, not the cloned functions.
12809         * repo.c (repo_template_used): Explicitly instantiate the cloned
12810         function, not the clones.
12811
12812 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
12813
12814         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
12815         ICS_BAD_FLAG on created conversion.
12816         (compare_ics): Break out rank.
12817
12818 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
12819
12820         * decl.c (xref_tag): Remove extraneous %s on dependent name
12821         lookup warning.
12822
12823 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
12824
12825         * class.c (layout_vtable_decl): Fix off by one error on
12826         build_index_type.
12827         (build_vtt): Likewise.
12828         (build_ctor_vtbl_group): Likewise.
12829
12830 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
12831
12832         * class.c (maybe_indent_hierarchy): New function.
12833         (dump_class_hierarchy_r): Add flags. Dump extra binfo
12834         information, if enabled. Use maybe_indent_hierarchy. Adjust
12835         output format.
12836         (dump_class_hierarchy): Adjust prototype. Adjust output format.
12837         (dump_array, dump_vtable, dump_vtt): New functions.
12838         (finish_struct_1): Adjust hierarchy dumping.
12839         (initialize_vtable): Call dump_vtable.
12840         (build_vtt): Call dump_vtt.
12841         (build_ctor_vtbl_group): Call dump_vtable.
12842         * decl2.c (flag_dump_class_layout): Remove.
12843         (cxx_decode_option): Remove dump translation unit
12844         and dump class hierarchy check. Call dump_switch_p.
12845         (finish_file): Adjust dumping.
12846         (dump.c): Only dump base classes if not TDF_SLIM.
12847         Only dump namespace members if not TDF_SLIM.
12848         * optimize.c (dump_function): New function.
12849         (optimize_function): Call dump_function.
12850         * semantics.c (expand_body): Use dump_enabled_p.
12851
12852 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
12853
12854         PR g++/2936
12855         Part missed from first commit
12856         * decl2.c (finish_anon_union): Copy context.
12857
12858 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
12859
12860         PR g++/2936
12861         * optimize.c (remap_decl): Remap anonymous aggregate members too.
12862
12863 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
12864
12865         PR g++/2823
12866         * semantics.c (expand_body): Don't optimize thunks.
12867
12868 2001-05-25  Sam TH  <sam@uchicago.edu>
12869
12870         * cp-tree.h lex.h: Fix header include guards.
12871
12872 2001-05-25  Mark Mitchell <mark@codesourcery.com>
12873
12874         * decl.c (init_decl_processing): Tweak.
12875
12876 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
12877
12878         * decl.c (duplicate_decls): Tidy.
12879         (init_decl_processing): Always set flag_no_builtin.
12880
12881 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
12882
12883         PR c++/2184
12884         * decl2.c (do_local_using_decl): Push the decls, even in a
12885         template.
12886
12887 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
12888
12889         * optimize.c (initialize_inlined_parameters): Don't set
12890         TREE_READONLY for a VAR_DECL taking the place of an inlined
12891         PARM_DECL.
12892
12893 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
12894
12895         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
12896         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
12897         attribute.
12898
12899 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
12900
12901         * parse.y: Refer to compound literals as such, not as
12902         constructor-expressions.
12903
12904 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
12905
12906         * call.c (build_op_delete_call): Ignore exception-specifications
12907         when looking for matching delete operators.
12908         * init.c (build_new_1): Compute whether or not the allocation
12909         function used is a placement allocation function or not, and
12910         communicate this information to build_op_delete_call.
12911
12912 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
12913
12914         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
12915         (build_vtbl_ref): Adjust.
12916         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
12917         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
12918         Re-add vtable-gc.
12919         (unsupported_options): Correspondingly.
12920
12921         * decl2.c (maybe_make_one_only): Check flag_weak, not
12922         supports_one_only().
12923
12924         * cp-tree.def (START_CATCH_STMT): Lose.
12925         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
12926         * tree.c (cp_statement_code_p): Don't case it.
12927         * semantics.c (cp_expand_stmt): Likewise.
12928         * cp-tree.h (START_CATCH_TYPE): Lose.
12929         (HANDLER_TYPE): New.
12930         * except.c (expand_start_catch_block): Don't start any blocks.
12931         Return the type.
12932         (expand_end_catch_block): Don't end any blocks.
12933         * parse.y (handler): Don't pass anything from finish_handler_parms
12934         to finish_handler.
12935         * pt.c (tsubst_expr): Likewise.
12936         * semantics.c (begin_handler): Call note_level_for_catch here.
12937         (finish_handler_parms): Don't return anything.
12938         (genrtl_catch_block, begin_catch_block): Lose.
12939         (genrtl_handler): Call expand_start_catch here.
12940
12941 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
12942
12943         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
12944         (get_vtable_decl, build_vtt): Not here.
12945
12946 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
12947
12948         PR c++/2781
12949         * optimize.c (update_cloned_parm): Copy addressability and other
12950         flags.
12951
12952 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12953
12954         * pt.c (determine_specialization): Ignore artificial functions.
12955
12956 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
12957
12958         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
12959         (C_RID_CODE): Remove.
12960         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
12961         (init_parse): Don't do it here.
12962
12963 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
12964
12965         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
12966         function declaration to avoid stripping the symbol's attributes.
12967
12968 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
12969
12970         * decl.c (pushdecl): Adjust error string.
12971         (xref_tag): Adjust friend class injection warning. Remove the
12972         inherited name from the class shadowed scope.
12973
12974 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
12975
12976         * except.c (cp_protect_cleanup_actions): New function.
12977         (init_exception_processing): Don't set protect_cleanup_actions
12978         here.  Do set lang_protect_cleanup_actions.
12979
12980 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
12981
12982         * spew.c (read_token): Call yyerror on all unexpected tokens.
12983
12984 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
12985
12986         * init.c (member_init_ok_or_else): Take a tree rather than
12987         string for name.
12988         (expand_member_init): Adjust.
12989
12990 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
12991
12992         * decl.c (duplicate_decls): Suppress warning about duplicate
12993         decls if the first decl is a friend.
12994
12995 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
12996
12997         * except.c (choose_personality_routine): Export.  Add
12998         explanatory comment.  Take an enum languages, not a boolean.
12999         (initialize_handler_parm): Adjust to match.
13000         * cp-tree.h: Prototype choose_personality_routine.
13001         * lex.c (handle_pragma_java_exceptions): New function.
13002         (init_cp_pragma): Register #pragma GCC java_exceptions.
13003
13004 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
13005
13006         * method.c (build_mangled_C99_name): Remove unused prototype.
13007
13008 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
13009
13010         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
13011         * typeck.c (get_member_function_from_ptrfunc,
13012         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
13013         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
13014
13015         Reverted Geoff Keating's 2001-05-03's patch.
13016
13017 2001-05-11  Ira Ruben   <ira@apple.com>
13018
13019         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
13020
13021 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
13022
13023         * cp-tree.h (finish_label_expr, lookup_label): Delete.
13024         * parse.y: Update for '&&'; don't issue warning here.
13025         * semantics.c (finish_label_expr): Delete.
13026
13027 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
13028
13029         * splay-tree.h (splay_tree_max): New function.
13030         (splay_tree_min): Likewise.
13031
13032 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
13033
13034         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
13035         (pfn_vflag_identifier): Define.
13036         Update comment about layout of pointer functions.
13037         (build_ptrmemfunc1): Update prototype.
13038         (expand_ptrmemfunc_cst): Update prototype.
13039         * decl.c (initialize_predefined_identifiers): Initialize
13040         pfn_vflag_identifier.
13041         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
13042         an extra field to the type.
13043         * expr.c (cplus_expand_constant): Pass 'flag' between
13044         expand_ptrmemfunc_cst and build_ptrmemfunc1.
13045         * typeck.c (get_member_function_from_ptrfunc): When
13046         FUNCTION_BOUNDARY < 16, look at additional field to determine
13047         if a pointer-to-member is a real pointer or a vtable offset.
13048         (build_ptrmemfunc1): Add new parameter to contain extra field.
13049         (build_ptrmemfunc): Pass the extra field around.
13050         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
13051         (pfn_from_ptrmemfunc): Ignore the extra field.
13052
13053 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
13054
13055         * cp-tree.h (flag_inline_trees): Update documentation.
13056         * decl.c (init_decl_processing): Adjust handling of
13057         flag_inline_functions and flag_inline_trees to support -O3.
13058         (grokfndecl): Set DECL_INLINE on all functions if that's what
13059         the user requested.
13060         (save_function_data): Clear DECL_INLINE in
13061         current_function_cannot_inline is non-NULL.
13062         * decl2.c (flag_inline_trees): Update documentation.
13063
13064 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
13065
13066         * dump.c (cp_dump_tree, USING_STMT case): New case.
13067         * tree.c (cp_statement_code_p): Add USING_STMT.
13068         * decl2.c (do_using_directive): Add the using directive statement.
13069
13070         * tree.c (walk_tree): Reformat an if block.
13071
13072 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
13073
13074         * decl.c (compute_array_index_type): Don't try to do anything with
13075         the indices when processing a template.
13076
13077 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13078
13079         * call.c: NULL_PTR -> NULL.
13080         * class.c: Likewise.
13081         * cvt.c: Likewise.
13082         * decl.c: Likewise.
13083         * decl2.c: Likewise.
13084         * except.c: Likewise.
13085         * init.c: Likewise.
13086         * rtti.c: Likewise.
13087         * search.c: Likewise.
13088         * tree.c: Likewise.
13089         * typeck.c: Likewise.
13090         * typeck2.c: Likewise.
13091
13092 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
13093
13094         * decl2.c (do_using_directive): Revert previous patch.
13095
13096 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
13097
13098         * cp-tree.def (USING_STMT): New statement node.
13099         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
13100         * decl2.c (do_using_directive): Add USING_STMT to statement
13101         tree. Don't emit errors when processing template decl.
13102         * pt.c (tsubst_expr, USING_STMT case): New case.
13103         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
13104
13105 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
13106
13107         * call.c (build_new_op): Convert args from reference here.
13108         (build_conditional_expr): Don't convert here.
13109
13110 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
13111
13112         * spew.c (last_token_id): New static variable.
13113         (read_token): Set it here.
13114         (yyerror): Use it here.
13115
13116 2001-04-30  Richard Henderson  <rth@redhat.com>
13117
13118         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
13119         * decl.c: Likewise.
13120
13121 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
13122
13123         * gxxint.texi: Remove.
13124         * Make-lang.in: Remove all traces of gxxint.texi.
13125
13126 2001-04-30  Mark P Mitchell  <mark@codesourcery.com>
13127
13128         * decl2.c (start_static_initialization_or_destruction): Correct
13129         logic to handle the -fno-use-cxa-atexit case.
13130
13131 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
13132
13133         * optimize.c (update_cloned_parm): New function.
13134         (maybe_clone_body): Use it.  Update the `this' parameter too.
13135
13136 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
13137
13138         * decl2.c (unsupported_options): Add new-abi.
13139         * lang-options.h: Remove no longer supported options.
13140
13141 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
13142
13143         * except.c (can_convert_eh): Don't check template parms,
13144         typename types etc.
13145
13146 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
13147
13148         * optimize.c (maybe_clone_body): Copy parameter names and locations.
13149
13150 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
13151
13152         * cp-tree.h (adjust_clone_args): Prototype new function.
13153         * class.c (adjust_clone_args): New function.
13154         * decl.c (start_function): Call it for in charge ctors.
13155
13156 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
13157
13158         * method.c (use_thunk): Make sure that thunks really are emitted
13159         when requested.
13160
13161 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
13162
13163         * mangle.c (write_chars): New macro.
13164         (hwint_to_ascii): New function
13165         (write_number): Use it.
13166         (write_integer_cst): Deal with really big numbers.
13167
13168 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
13169
13170         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
13171         the clone.
13172
13173 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
13174
13175         * decl.c (grokdeclarator): Set context of namespace scope
13176         TYPE_DECLS.
13177
13178 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
13179
13180         * cp/optimize.c: Include hashtab.h.
13181         (struct inline_data): Add tree_pruner.
13182         (expand_call_inline, expand_calls_inline): Use it when calling
13183         walk_tree.
13184         (optimize_function): Initialize and free tree_pruner.
13185
13186 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
13187
13188         Lazy __FUNCTION__ generation.
13189         * cp-tree.def (FUNCTION_NAME): Remove.
13190         * cp-tree.h (function_name_declared_p): Remove.
13191         (cp_fname_init): Prototype.
13192         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
13193         don't call declare_function_name. Call start_fname_decls.
13194         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
13195         clobber the line number.
13196         (cp_fname_init): New function.
13197         (start_function): Call start_fname_decls.
13198         (finish_function): Call finish_fname_decls.
13199         * lex.c (reswords): Add slots for __FUNCTION__ et al.
13200         (rid_to_yy): Add mappings for __FUNCTION__ et al.
13201         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
13202         * parse.y (VAR_FUNC_NAME): New token.
13203         (primary): Add VAR_FUNC_NAME.
13204         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
13205         generation.
13206         (tsubst, FUNCTION_NAME case): Remove.
13207         (tsubst_copy, FUNCTION_NAME case): Remove.
13208         (tsubst_expr, DECL_STMT case): Be careful with a
13209         DECL_PRETTY_FUNCTION_P.
13210         (instantiate_decl): Remove function_name_declared_p.
13211         * semantics.c (begin_compound_statement): Don't call
13212         declare_function_name here.
13213         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
13214         (finish_translation_unit): Call finish_fname_decls.
13215         (expand_body): Remove function_name_declared_p.
13216         * typeck2.c (digest_init): Allow any ERROR_MARK.
13217
13218 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
13219
13220         * pt.c (tsubst_decl): Use VOID_TYPE_P.
13221         * semantics.c: Fix some typos.
13222
13223 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
13224
13225         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
13226
13227 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13228
13229         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
13230
13231 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
13232
13233         * except.c (build_throw): Wrap the initialization of the exception
13234         object in a MUST_NOT_THROW_EXPR.
13235         (do_free_exception): #if 0.
13236
13237 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
13238
13239         * cp-tree.h (finish_enum): Change prototype.
13240         * decl.c (finish_enum): Reorganize.
13241         * parse.y (structsp): Adjust calls to finish_enum.
13242
13243 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
13244
13245         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
13246         't' case.
13247
13248 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
13249
13250         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
13251         (layout_empty_base): Return at end flag.
13252         (build_base_field): Likewise.
13253         (build_base_fields): Likewise.
13254         (layout_virtual_bases): Don't add 1 to eoc value.
13255         (end_of_class): Use full size for empty bases.
13256         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
13257         empty bases. Don't add 1 to eoc value. Only add trailing padding
13258         if we're an empty class with no empty bases.
13259         (dump_class_hierarchy): Dump size and alignment.
13260
13261 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
13262
13263         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
13264         ICS_BAD_FLAG.
13265
13266 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
13267
13268         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
13269         is found, look first if name does not match the structure name.
13270
13271 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
13272
13273         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
13274         set.
13275         (SET_DECL_LANGUAGE): New macro.
13276         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
13277         (pushdecl): Likewise.
13278         (build_library_fn_1): Likewise.
13279         (build_cp_library_fn): Likewise.
13280         (grokfndecl): Likewise.
13281         (grokvardecl): Mark `extern "C"' variables as having C linkage.
13282         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
13283         * lex.c (retrofit_lang_decl): Likewise.
13284         * mangle.c (mangle_decl_string): Don't mangle the names of
13285         variables declared with C language linkage.
13286         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
13287
13288 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
13289
13290         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
13291         flag_access_control from uninitialized storage.
13292
13293 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
13294
13295         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
13296         * mangle.c (write_pointer_to_member_type): Fix mangling of
13297         pointers to cv-qualified member function types.
13298
13299         * init.c (build_delete): Create a SAVE_EXPR for the address if
13300         we're going to use it more than once.
13301
13302 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
13303
13304         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
13305         (expand_ptremfunc_cst): Change prototype.
13306         (delta2_from_ptrmemfunc): Remove.
13307         * expr.c (cplus_expand_constant): Adjust call to
13308         expand_ptrmemfunc_cst.
13309         * typeck.c (build_ptrmemfunc1): Simplify.
13310         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
13311         results in a constant.
13312         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
13313         (delta2_from_ptrmemfunc): Remove.
13314         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
13315
13316 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
13317
13318         * cp-tree.h (decl_namespace_list): New macro.
13319         (struct saved_scope): Add decl_ns_list.
13320         * decl.c (mark_saved_scope): Mark it.
13321         * decl2.c: Lose static decl_namespace_list.
13322         (init_decl2): Don't save it.
13323
13324 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13325
13326         * cp-tree.h (warn_return_type, yylex): Delete redundant
13327         declarations.
13328
13329         * decl.c (current_class_depth, global_namespace): Likewise.
13330
13331         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
13332
13333         * repo.c (flag_use_repository): Likewise.
13334
13335 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13336
13337         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
13338         set_block, pushdecl, getdecls, gettags, init_decl_processing,
13339         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
13340         lvalue_or_else, print_lang_statistics, comp_target_types,
13341         unsigned_type, signed_type, signed_or_unsigned_type,
13342         build_function_call, mark_addressable, incomplete_type_error):
13343         Delete redundant declarations.
13344
13345 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
13346
13347         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
13348         (TYPE_ANONYMOUS_P): New macro.
13349         (TAGGED_TYPE_P): New macro.
13350         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
13351         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
13352         * tree.c (no_linkage_helper): Likewise.
13353         * semantics.c (begin_class_definition): Likewise.
13354         * pt.c (convert_template_argument): Likewise.
13355         * lex.c (check_for_missing_semicolon): Likewise.
13356
13357 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
13358
13359         * class.c (dfs_unshared_virtual_bases): New function.
13360         (mark_primary_bases): Call it.
13361         (check_bases): Ignore virtual bases when determining
13362         nearly-emptiness.
13363
13364 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
13365
13366         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
13367
13368 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
13369
13370         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
13371         cloned function to the clone.
13372
13373 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13374
13375         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
13376
13377         * semantics.c: Include expr.h.
13378
13379 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
13380
13381         * method.c (implicitly_declare_fn): Commonize code for copy ctor
13382         and assignment op. Set TREE_USED for parameter.
13383
13384 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
13385
13386         * class.c (find_final_overrider_data): Add `candidates'.
13387         (dfs_find_final_overrider): Don't issue error messages
13388         prematurely.
13389         (find_final_overrider): Issue error messages here.
13390         (build_base_field): Don't warn about amgibuous direct bases here.
13391         (warn_about_ambiguous_direct_bases): New function.
13392         (layout_class_type): Use it.
13393
13394 2001-04-10  Richard Henderson  <rth@redhat.com>
13395
13396         * typeck.c (build_array_ref): Push the array reference inside
13397         COMPOUND_EXPR and COND_EXPR.
13398
13399 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
13400
13401         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
13402         * decl.c (duplicate_decls): Adjust accordingly.
13403         (maybe_commonize_var): Likewise.
13404         (grokfndecl): Likewise.
13405         (start_function): Likewise.
13406         (start_method): Likewise.
13407         * decl2.c (key_method): Likewise.
13408         (import_export_decl): Likewise.
13409         * method.c (implicitly_declare_fn): Likewise.
13410         * optimize.c (maybe_clone_body): Likewise.
13411
13412 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
13413
13414         * lang-specs.h: Add __DEPRECATED.
13415
13416 2001-04-05  J"orn Rennecke <amylaar@redhat.com>
13417
13418         * search.c (get_dynamic_cast_base_type): When building a new
13419         constant, set its type to ssizetype.
13420
13421 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
13422
13423         * optimize.c (expand_call_inline): Only add newly inlined statements
13424         into inlined_stmts.
13425
13426 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
13427
13428         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
13429         (OPERATOR_FORMAT): Likewise.
13430         (OPERATOR_TYPENAME_FORMAT): Likewise.
13431         * operators.def: Remove old name-mangling information.
13432         * decl.c (grok_op_properties): Adjust accordingly.
13433         * lex.c (init_operators): Likewise.
13434         * rtti.c (get_tinfo_decl): Issue error messages about types that
13435         have variable size.
13436
13437 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
13438
13439         * decl2.c (import_export_decl): Don't call import_export_class
13440         when processing an inline member function.
13441         * semantics.c (expand_body): Call import_export_decl before
13442         emitting inline functions.
13443
13444 2001-03-28  Richard Henderson  <rth@redhat.com>
13445
13446         IA-64 ABI Exception Handling:
13447         * cp-tree.def (EH_SPEC_BLOCK): New.
13448         (MUST_NOT_THROW_EXPR): New.
13449         * cp-tree.h: Update changed function declarations.
13450         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
13451         (CPTI_CALL_UNEXPECTED): New.
13452         (struct cp_language_function): Rename x_eh_spec_try_block
13453         to x_eh_spec_block.
13454         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
13455         * decl.c (current_binding_level): If no current function
13456         bindings, revert to scope_chain.
13457         (initialize_predefined_identifiers): Remove __cp_push_exception.
13458         (store_parm_decls): Use begin_eh_spec_block.
13459         (finish_function): Use finish_eh_spec_block.
13460         (mark_lang_function): Update for name changes.
13461         * decl2.c (finish_file): No mark_all_runtime_matches.
13462         * dump.c (cp_dump_tree): Handle new tree codes.
13463         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
13464         * except.c (catch_language_init, catch_language): Remove.
13465         (init_exception_processing): Don't set language code.
13466         Initialize call_unexpected_node, protect_cleanup_actions,
13467         eh_personality_libfunc, lang_eh_runtime_type.
13468         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
13469         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
13470         (prepare_eh_type): Split out type canonicalizations ...
13471         (build_eh_type_type): ... from here.
13472         (build_eh_type_type_ref): Remove.
13473         (mark_all_runtime_matches): Remove.
13474         (build_exc_ptr): New.
13475         (do_begin_catch, do_end_catch): New.
13476         (do_pop_exception): Remove.
13477         (build_terminate_handler): Remove.
13478         (choose_personality_routine): Split out language choice from ...
13479         (initialize_handler_parm): ... here.
13480         Use MUST_NOT_THROW_EXPR.
13481         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
13482         exception object handling.
13483         (expand_start_eh_spec, expand_end_eh_spec): Remove.
13484         (expand_exception_blocks, alloc_eh_object): Remove.
13485         (begin_eh_spec_block, finish_eh_spec_block): New.
13486         (do_allocate_exception, do_free_exception): New.
13487         (expand_throw): Merge into ...
13488         (build_throw): ... here.  Update for abi.
13489         * expr.c (cplus_expand_expr): No expand_internal_throw.
13490         Handle MUST_NOT_THROW_EXPR.
13491         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
13492         * semantics.c (*) Update for except.h name changes.
13493         (genrtl_try_block): No protect_with_terminate.
13494         (genrtl_eh_spec_block): New.
13495         (genrtl_handler): Don't emit the goto here.
13496         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
13497         (genrtl_finish_function): Don't expand_exception_blocks.
13498         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
13499
13500 2001-03-28  Richard Henderson  <rth@redhat.com>
13501
13502         * decl.c (struct named_label_list): Rename eh_region to
13503         in_try_scope, add in_catch_scope.
13504         (struct binding_level): Rename eh_region to is_try_scope,
13505         add is_catch_scope.
13506         (note_level_for_try): Rename from note_level_for_eh.
13507         (note_level_for_catch): New.
13508         (poplevel): Copy both is_try_scope and is_catch_scope to
13509         the named_label_list struct.
13510         (check_previous_goto_1): Don't check for catch block via
13511         DECL_ARTIFICIAL; use in_try_scope instead.
13512         (check_goto): Likewise.
13513         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
13514         * except.c (expand_start_catch_block): Call note_level_for_catch.
13515         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
13516
13517 2001-03-27  Richard Henderson  <rth@redhat.com>
13518
13519         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
13520         exceptions_via_longjmp.
13521
13522 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
13523
13524         * pt.c (check_default_tmpl_args):  Make error messages clearer.
13525
13526 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
13527
13528         * error.c:  Also undefine 'A' macro used for cp_printers definition.
13529
13530 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13531
13532         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
13533
13534 2001-03-26  Mike Yang <yang@research.att.com>
13535             Mark Mitchell  <mark@codesourcery.com>
13536
13537         * dump.c (dump_access): New function.
13538         (cp_dump_tree): Use it.  Dump basetype information for class
13539         types.
13540
13541 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
13542
13543         * Makefile.in (optimize.o): Depend on params.h.
13544         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
13545         (init_decl_processing): Set flag_no_inline when doing
13546         inlining-on-trees.
13547         * optimize.c: Include params.h.
13548         (struct inline_data): Improve documentation of FNS.  Add
13549         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
13550         (INSNS_PER_STMT): New macro.
13551         (remap_block): Use CLONING_P.
13552         (inlinable_function_p): Don't inline big functions.
13553         (expand_call_inline): Keep track of how much inlining we've done.
13554         (optimize_function): Set FIRST_INLINED_FN.
13555         (maybe_clone_body): Set CLONING_P.
13556         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
13557         tree nodes.
13558         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
13559         rest_of_compilation.  Clear DECL_RTL for local variables
13560         afterwards.
13561         (clear_decl_rtl): New function.
13562
13563 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
13564
13565         Implement DR 209
13566         * cp-tree.h (skip_type_access_control,
13567         reset_type_access_control): Prototype.
13568         * decl.c (grokdeclarator): Access of friends is not checked.
13569         * parse.y (component_decl_list): Reset type access control.
13570         * semantics.c (decl_type_access_control): Clear
13571         current_type_lookups.
13572         (save_type_access_control): Don't save if not deferring.
13573         (skip_type_access_control, reset_type_access_control): New
13574         functions.
13575         (begin_class_definition): Do type access control for basetypes.
13576         Start deferred access control.
13577         (finish_class_definition): Resume immediate access control if
13578         this is a local class.
13579
13580 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13581
13582         * class.c (add_method): Use memcpy/memmove, not bcopy.
13583
13584         * decl.c (duplicate_decls): Likewise.
13585
13586 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
13587
13588         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
13589         not `_'.
13590
13591 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
13592
13593         * decl.c (local_names): Define.
13594         (push_local_name): New.
13595         (grok_reference_init): Return init if initializing static reference
13596         variable with non-constant instead of emitting it.
13597         Move expand_static_init call to cp_finish_decl.
13598         (layout_var_decl): Call push_local_name.
13599         (maybe_commonize_var): Allow inlining functions even if they have
13600         static local variables, use comdat_linkage for them if flag_weak.
13601         (check_initializer): Call obscure_complex_init if
13602         grok_reference_init returned nonzero.
13603         (save_function_data): Clear x_local_names.
13604         (pop_cp_function_context): Free x_local_names.
13605         (mark_inlined_fns): Remove.
13606         (mark_lang_function): Mark x_local_names.
13607         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
13608         Mark inlined_fns as tree, remove call to mark_inlined_fns.
13609         * class.c (alter_access): Ensure DECL_ACCESS is never set if
13610         DECL_DISCRIMINATOR_P.
13611         * cp-tree.h (cp_language_function): Add x_local_names.
13612         (lang_decl_flags): Add discriminator into u2.
13613         (lang_decl_inlined_fns): Remove.
13614         (lang_decl): inlined_fns is now a TREE_VEC.
13615         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
13616         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
13617         TREE_VEC, not a custom structure.
13618         (optimize_function): Likewise.
13619         * mangle.c (discriminator_for_local_entity): Discriminate among
13620         VAR_DECL local entities.
13621         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
13622         is not valid.
13623
13624 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
13625
13626         Add support for Java interface method calls.
13627         * cp-tree.h (struct lang_type): Add java_interface flag.
13628         (TYPE_JAVA_INTERFACE): New macro.
13629         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
13630         by setting TYPE_JAVA_INTERFACE.
13631         * call.c (java_iface_lookup_fn): New static.
13632         (build_over_call): If calling a method declared in a
13633         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
13634         expression which resolves the function address.
13635         (build_java_interface_fn_ref): New function.
13636
13637 2001-03-22  Richard Henderson  <rth@redhat.com>
13638
13639         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
13640         * except.c: Don't include it.
13641
13642 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
13643             based on an idea from Joe Buck <jbuck@synopsys.com>
13644
13645         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
13646         New nonterminals.
13647         (data_def, component_decl): Add reductions to bad_decl.
13648
13649 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
13650
13651         * method.c (do_build_assign_ref): Don't use build_modify_expr for
13652         anonymous aggregates, since they don't have assignment operator
13653         method.
13654         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
13655         assignment operators for anonymous structure fields.
13656
13657 2001-03-21  Jason Merrill  <jason@redhat.com>
13658
13659         * pt.c (instantiate_decl): Abort if we see a member constant
13660         instantiation that doesn't already have its initializer.
13661         Downgrade explicit instantiation without definition to pedwarn.
13662
13663         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
13664         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
13665         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
13666
13667         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
13668         (pending_vtables): Remove.
13669         * decl2.c (pending_vtables): Remove.
13670         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
13671         CLASSTYPE_VTABLE_NEEDS_WRITING.
13672         (import_export_class): Likewise.
13673         (init_decl2): Don't mark pending_vtables.
13674         * lex.c (handle_pragma_vtable): Just sorry.
13675         * pt.c (instantiate_class_template): Don't mess with
13676         CLASSTYPE_VTABLE_NEEDS_WRITING.
13677         (mark_class_instantiated): Likewise.
13678         * ptree.c (print_lang_type): Don't print it.
13679         * semantics.c (begin_class_definition): Don't set it.
13680
13681         * pt.c (template_tail): Replace with last_pending_template.
13682         (maybe_templates, maybe_template_tail): Remove.
13683         (add_pending_template): Adjust.
13684         (instantiate_pending_templates): Adjust.
13685
13686         * cp-tree.h (struct saved_scope): Remove lang_stack field.
13687         (current_lang_stack): Remove.
13688         * decl.c (maybe_push_to_top_level): Don't initialize it.
13689         (duplicate_decls): Use current_lang_depth.
13690         (xref_basetypes): Likewise.
13691         * class.c (current_lang_depth): New fn.
13692         (push_lang_context): Use more varray functionality.
13693         (pop_lang_context): Likewise.
13694
13695         * error.c (GLOBAL_THING): Always use '__'.
13696
13697 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
13698
13699         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
13700
13701         * mangle.c (mangle_decl_string): Mangle the names of overloaded
13702         operators, even when they have `extern "C"' linkage.
13703
13704 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
13705
13706         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
13707         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
13708         where it's not necessary.
13709         (add_method): Remove optimization involving comparison of
13710         DECL_ASSEMBLER_NAME.
13711         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
13712         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
13713         where it's not necessary.
13714         (check_methods): Likewise.
13715         (build_clone): Likewise.
13716         (built_vtt): Likewise.
13717         * cp-tree.h (DECL_NEEDED_P): Likewise.
13718         * decl.c (pushtag): Likewise.
13719         (duplicate_decls): Likewise.
13720         (pushdecl): Likewise.
13721         (builtin_function): Likewise.
13722         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
13723         (build_cp_library_fn): Likewise.
13724         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
13725         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
13726         where it's not necessary.
13727         (make_rtl_for_nonlocal_decl): Likewise.
13728         (cp_finish_decl): Likewise.
13729         (grokfndecl): Likewise.
13730         (grokvardecl): Likewise.
13731         (grokdeclarator): Likewise.
13732         (start_function): Likewise.
13733         (cp_missing_return_ok_p): Likewise.
13734         * decl2.c (grokclassfn): Likewise.
13735         (check_classfn): Likewise.
13736         (finish_static_data_member_decl): Likewise.
13737         (grokfield): Likewise.
13738         * error.c (GLOBAL_IORD_P): Remove.
13739         (dump_global_iord): Improve output.
13740         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
13741         * except.c (nothrow_libfn_p): Summarily reject any function not in
13742         namespace-scope.
13743         * init.c (build_java_class_ref): Don't explicitly set
13744         DECL_ASSEMBLER_NAME after calling mangle_decl.
13745         * mangle.c (mangle_decl_string): Handle extern "C" functions.
13746         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
13747         * method.c (set_mangled_name_for_decl): Don't explicitly set
13748         DECL_ASSEMBLER_NAME after calling mangle_decl.
13749         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
13750         IDENTIFIER_GLOBAL_VALUE for the thunk.
13751         * pt.c (set_mangled_name_for_template_decl): Remove.
13752         (check_explicit_specialization): Don't use it.
13753         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
13754         (tsubst_friend_function): Likewise.
13755         (tsubst_decl): Likewise.
13756         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
13757         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
13758         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
13759         where it's not necessary.
13760         (tinfo_base_init): Likewise.
13761         (create_real_tinfo_var): Likewise.
13762         * search.c (looup_field_1): Likewise.
13763         * semantics.c (finish_named_return_value): Likewise.
13764         * tree.c (init_tree): Set lang_set_decl_assembler_name.
13765
13766 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
13767
13768         Correct semantics restrictions checking in throw-expression.
13769         * except.c (is_admissible_throw_operand): New function.
13770         (build_throw): Use it.
13771
13772 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
13773
13774         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
13775         and its ilk.
13776
13777 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
13778
13779         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
13780         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
13781         * decl.c (duplicate_decls): Likewise.
13782         (builtin_function): Likewise.
13783         (build_library_fn): Likewise.
13784         (build_cp_library_fn): Likewise.
13785         (check_initializer): Likewise.
13786         (cp_finish_decl): Likewise.
13787         * decl2.c (grokfield): Likewise.
13788         (grok_function_init): Remove #if 0'd code.
13789         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
13790         * friend.c (do_friend): Likewise.
13791         * init.c (get_temp_regvar): Likewise.
13792         * method.c (make_thunk): Likewise.
13793         * pt.c (tsubst_friend_function): Likewise.
13794         (tsubst_decl): Likewise.
13795         (regenerate_decl_from_template): Likewise.
13796         * semantics.c (genrtl_named_return_value): Likewise.
13797         (expand_body): Likewise.
13798         (genrtl_finish_function): Likewise.
13799         * tree.c (cp_tree_equal): Likewise.
13800
13801 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
13802
13803         * call.c (convert_like_real): Add extra semantics to INNER
13804         parameter. Don't convert to temporary if a user conversion
13805         gives us an lvalue that we're about to bind to a reference.
13806         Set INNER to indicate pending reference binding on recursive
13807         calls.
13808
13809 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
13810
13811         * cp/lex.c: Delete duplicate pending_lang_change.
13812
13813 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
13814
13815         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
13816         Similarly.
13817         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
13818         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
13819
13820 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
13821
13822         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
13823
13824 2001-03-08  Stan Shebs  <shebs@apple.com>
13825
13826         * cp-tree.h (set_identifier_local_value): Remove unused decl.
13827
13828 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
13829
13830         * spew.c: Remove references to CPP_OSTRING.
13831
13832 2001-03-06  Andrew Haley  <aph@redhat.com>
13833
13834         * typeck.c (convert_arguments): Check that we have an fndecl.
13835
13836 2001-03-05  Andrew Haley  <aph@redhat.com>
13837
13838         * typeck.c (convert_arguments): Don't do ellipsis conversion for
13839         __built_in_constant_p.
13840
13841 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
13842
13843         * typeck.c (build_static_cast): Allow enum to enum conversions
13844         as per DR 128.
13845
13846 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
13847
13848         * class.c (check_field_decls): Pointers to member do not a
13849         non-pod struct make, as per DR 148.
13850
13851 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
13852
13853         * call.c (joust): cp_pedwarn when using gnu extension concerning
13854         worst conversion sequences.
13855
13856 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
13857
13858         * decl.c: Replace all uses of 'boolean' with 'bool'.
13859
13860 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
13861
13862         * lang-specs.h: Add zero initializer for cpp_spec field to
13863         all array elements that need one.  Don't put an #ifdef inside
13864         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
13865         use it.
13866
13867 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
13868
13869         Implement using decls inside template functions.
13870         * decl2.c (validate_nonmember_using_decl): Don't special case
13871         fake_std_node in the global namespace. Don't reject early when
13872         processing a template.
13873         (do_local_using_decl): Add to statement tree. Don't do further
13874         processing when building a template.
13875         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
13876
13877 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
13878
13879         * decl2.c (do_nonmember_using_decl): Don't complain if we find
13880         same function. Do complain about ambiguating extern "C"
13881         declarations.
13882
13883 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
13884
13885         Remove floating point and complex type template constant parms.
13886         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
13887         COMPLEX_TYPE extensions.
13888         (invalid_nontype_parm_type_p): Likewise.
13889
13890 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
13891
13892         * except.c (call_eh_info): Revert "match_function"'s type.
13893
13894 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
13895
13896         Fix ctor vtable vcall offsets.
13897         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
13898         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
13899         (get_matching_base): Remove.
13900         (get_original_base): New function.
13901         (build_vtbl_initializer): Initialize vid.rtti_binfo.
13902         Use a virtual thunk for a ctor vtable with an index
13903         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
13904         primary base within a constructor vtable. Only set
13905         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
13906         when primary base has been lost.
13907         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
13908
13909 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
13910
13911         * call.c (joust): Ensure more_specialized()'s argument length
13912         parameter has correct value for constructors.
13913
13914 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
13915
13916         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
13917
13918         * decl.c (mark_inlined_fns): Prototype.
13919
13920 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
13921
13922         * spew.c (yylex): Correct handling of friends.
13923
13924 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
13925
13926         * mangle.c (write_encoding): Pass write_function_type the
13927         FUNCTION_DECL for the function being encoded.
13928         (write_function_type): Pass it along to write_bare_function_type.
13929         (write_bare_function_type): Pass it along to write_method_parms.
13930         (write_method_parms): Don't mangle the compiler-generated
13931         parameters to a constructor or destructor.
13932
13933 2001-02-22  Andreas Jaeger  <aj@suse.de>
13934
13935         * optimize.c: Include toplev.h for
13936         note_deferral_of_defined_inline_function prototype.
13937
13938 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
13939
13940         * cp-tree.h (struct lang_decl_inlined_fns): New.
13941         (struct lang_decls): Add inlined_fns.
13942         (DECL_INLINED_FNS): New macro.
13943         * optimize.c (struct inline_data): Add inlined_fns.
13944         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
13945         (inlinable_function_p): Likewise, fix typo in comment,
13946         function is not inlinable if it already inlined function currently
13947         being optimized.
13948         (expand_call_inline): Add fn to inlined_fns if necessary.
13949         (optimize_function): Initialize inlined_fns.
13950         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
13951         * decl.c (mark_inlined_fns): New function.
13952         (lang_mark_tree): Call it.
13953
13954 2001-02-21  Jason Merrill  <jason@redhat.com>
13955
13956         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
13957         (DECL_UNINLINABLE): Move to middle-end.
13958
13959         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
13960         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
13961         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
13962         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
13963         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
13964
13965         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
13966         second parm of op=.
13967
13968 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
13969
13970         * decl2.c (set_decl_namespace): Allow explicit instantiations in
13971         any namespace.
13972
13973 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
13974
13975         * optimize.c (expand_call_inline): Don't walk subtrees of type
13976         nodes.
13977
13978 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
13979
13980         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
13981         for a destructor.
13982
13983 2001-02-18  Jason Merrill  <jason@redhat.com>
13984
13985         Do put the VTT parameter in DECL_ARGUMENTS.
13986         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
13987         (current_vtt_parm): New macro.
13988         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
13989         (DECL_HAS_VTT_PARM_P): New macro.
13990         (DECL_VTT_PARM): Remove.
13991         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
13992         * decl.c (duplicate_decls): Only copy the operator code if
13993         appropriate.
13994         (start_function): Set current_vtt_parm.
13995         (lang_mark_tree): Don't mark vtt_parm.
13996         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
13997         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
13998         * class.c (build_clone): Maybe remove the VTT parm.
13999         * optimize.c (maybe_clone_body): Set up the VTT parm.
14000         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
14001         * call.c (build_over_call): Just allow the VTT arg.
14002         * method.c (make_thunk): Don't set DECL_VTT_PARM.
14003         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
14004         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
14005         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
14006         * error.c (dump_function_decl): Likewise.
14007         * call.c (build_user_type_conversion_1, convert_like_real): Abort
14008         if we try to call a constructor with in-charge or VTT parms.
14009         * method.c (skip_artificial_parms_for): New fn.
14010         * call.c (add_function_candidate, build_over_call): Call it.
14011         * call.c (build_new_method_call): Use current_vtt_parm.
14012         * init.c (expand_virtual_init): Likewise.
14013         * class.c (same_signature_p): No longer static.
14014         * cp-tree.h: Declare it.
14015         * search.c (look_for_overrides_r): Use it.
14016
14017 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
14018
14019         * cp-tree.h (new_abi_rtti_p): Remove.
14020         (name_mangling_version): Likewise.
14021         (flag_do_squangling): Likewise.
14022         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
14023         * decl.c (grokfndecl): Likewise.
14024         * decl2.c (name_mangling_version): Remove.
14025         (flag_do_squangling): Likewise.
14026         (lang_f_options): Remove `squangle'.
14027         (unsupported_options): Add `squangle'.
14028         (cxx_decode_option): Issue a warning about uses of
14029         -fname-mangling-version.
14030         (finish_file): Remove old ABI support.
14031         * pt.c (check_explicit_specialization): Likewise.
14032         (tsubst_decl): Likewise.
14033         * rtti.c (init_rtti_processing): Likewise.
14034         (build_headof): Likewise.
14035         (get_tinfo_decl_dynamic): Likewise.
14036         (tinfo_from_decl): Likewise.
14037         (build_dynamic_cast_1): Likewise.
14038         (synthesize_tinfo_var): Likewise.
14039         * init.c (build_new): Allow enumeration types for the array-bounds
14040         in a direct-new-declarator.
14041
14042         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
14043
14044         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
14045         TREE_PROTECTED from the template being specialized.
14046
14047 2001-02-17  Jason Merrill  <jason@redhat.com>
14048
14049         * decl2.c (build_artificial_parm): Set TREE_READONLY.
14050
14051         * decl.c (bad_specifiers): Allow throw specs on things with
14052         pointer-to-function or -member-function type.
14053         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
14054         a pmf.
14055
14056 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
14057
14058         * call.c (check_dtor_name): Handle template names correctly.
14059
14060 2001-02-16  Jason Merrill  <jason@redhat.com>
14061
14062         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
14063         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
14064         * optimize.c (maybe_clone_body): Don't substitute it.
14065         * call.c (build_new_method_call): Check in_chrg instead.
14066         * init.c (expand_virtual_init): Likewise.
14067
14068 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
14069
14070         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
14071         class-type introduces at least a type-name.
14072
14073 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
14074
14075         * call.c (convert_like_real): Create a temporary for non-lvalue.
14076
14077 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
14078
14079         * cp-tree.h: Fix typos in comments.
14080
14081 2001-02-16  Jason Merrill  <jason@redhat.com>
14082
14083         * optimize.c (remap_block): If we're compiling a clone, pass the
14084         new block to insert_block.
14085
14086 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
14087
14088         * semantics.c (finish_asm_stmt): Robustify.
14089
14090 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
14091
14092         * pt.c (push_template_decl_real): Don't remangle the name of a
14093         class template.
14094
14095 2001-02-15  Jim Meyering  <meyering@lucent.com>
14096
14097         * Make-lang.in (c++.install-common): Depend on installdirs.
14098         (c++.install-info): Likewise.
14099         (c++.install-man): Likewise.
14100
14101 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
14102
14103         * typeck2.c (build_m_component_ref): Robustify.
14104
14105 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
14106
14107         * friend.c (do_friend): Don't take the nested [template] class
14108         into account when deciding whether to warn about the friend
14109         function not referring to a template function.
14110
14111 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
14112
14113         * typeck.c (build_unary_op): Clarify error message.
14114
14115 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
14116
14117         * parse.y (component_constructor_declarator): allow optional
14118         parentheses around constructor class name.
14119
14120 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
14121
14122         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
14123         section.
14124         * init.c (emit_base_init): Remove incorrect comment about
14125         virtual bases.
14126         * method.c (make_thunk): Fix comment alignment.
14127
14128 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
14129
14130         Kill remnants of this is variable.
14131         * cp-tree.h (flag_this_is_variable): Remove.
14132         * decl2.c (flag_this_is_variable): Remove.
14133         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
14134         (build_vbase_path): The path is non-static, even in a cdtor.
14135         (resolves_to_fixed_type_p): Add additional return value.
14136         * search.c (init_vbase_pointers): Adjust.
14137         * tree.c (lvalue_p_1): Adjust.
14138         * typeck.c (mark_addressable): Adjust.
14139
14140 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
14141
14142         * pt.c (unify): Don't check cv quals of array types.
14143
14144 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
14145
14146         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
14147         check whether we already have the type.
14148
14149 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
14150
14151         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
14152         * call.c (build_op_delete_call): Simplify to remove duplicate
14153         code.
14154         * class.c (clone_function_decl): Don't build the deleting variant
14155         of a non-virtual destructor.
14156         * decl.c (finish_destructor_body): Don't call delete if this is a
14157         non-virtual destructor.
14158         * init.c (build_delete): Explicitly call `operator delete' when
14159         deleting an object with a non-virtual destructor.
14160
14161 2001-02-13  Jason Merrill  <jason@redhat.com>
14162
14163         * lang-specs.h: Add more __EXCEPTIONS.
14164
14165 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
14166
14167         * typeck2.c (process_init_constructor): Check
14168         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
14169
14170 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
14171
14172         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
14173         Remove spurious information in comment. Allow further
14174         adjustments of REFERENCE_TYPE args.
14175
14176 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
14177
14178         * errfn.c (cp_deprecated): Tweak diagnostic text.
14179         * parse.y (new_initializer): Deprecate initializer lists
14180         extension.
14181
14182 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
14183
14184         Remove old ABI support.
14185
14186 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
14187
14188         * decl2.c (flag_vtable_thunks): Always set it to 1.
14189         (flag_new_abi): Likewise.
14190         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
14191
14192         * Makefile.in (g++spec.o): Fix typo.
14193
14194 2001-02-09  Jason Merrill  <jason@redhat.com>
14195
14196         * lang-specs.h: Restore definition of __EXCEPTIONS.
14197
14198 2001-02-08  Jason Merrill  <jason@redhat.com>
14199
14200         * search.c (shared_member_p): New function.
14201         (lookup_field_r): Use it.
14202         * cp-tree.h (SHARED_MEMBER_P): Remove.
14203
14204         * method.c (process_overload_item): Handle template-dependent array
14205         bounds.
14206         * pt.c (type_unification_real): If we end up with undeduced nontype
14207         parms, try again.
14208
14209         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
14210         types.
14211
14212         * typeck2.c (friendly_abort): Don't say anything if we have
14213         earlier errors or sorries.
14214
14215         * decl.c (check_tag_decl): Notice attempts to redefine bool and
14216         wchar_t.  Ignore if in_system_header.
14217
14218         * decl.c (maybe_push_cleanup_level): New fn...
14219         (start_decl_1): ...split out from here.
14220         * cvt.c (build_up_reference): Use it.
14221         * cp-tree.h: Declare it.
14222
14223 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
14224
14225         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
14226         spec.
14227
14228 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
14229
14230         * pt.c (lookup_template_class): Make sure it's a primary
14231         template or template_template_parm when called from the parser.
14232         (instantiate_template_class): Add assertion.
14233
14234 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
14235
14236         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
14237         from error_mark_node.
14238
14239 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
14240
14241         Fix specification and implementation bugs in V3 ABI
14242         construction vtables.
14243         * cp-tree.h (flag_dump_class_layout): New flag.
14244         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
14245         (BINFO_LOST_PRIMARY_P): New flag.
14246         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
14247         (BINFO_PRIMARY_MARKED_P): Rename to ...
14248         (BINFO_PRIMARY_P): ... here.
14249         (binfo_via_virtual): New prototype.
14250         * decl2.c (flag_dump_class_layout): New flag.
14251         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
14252         use `=' as a file name separator.
14253         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
14254         bases.
14255         (build_vtbl_address): If this is a virtual primary base, then
14256         get the vtbl of what it is ultimately primary for.
14257         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
14258         for BINFO_PRIMARY_P.
14259         (dfs_skip_nonprimary_vbases_markedp): Likewise.
14260         (get_shared_vbase_if_not_primary): Likewise.
14261         (dfs_get_pure_virtuals): Likewise.
14262         (expand_upcast_fixups): Likewise.
14263         (fixup_virtual_upcast_offsets): Likewise.
14264         (dfs_find_vbase_instance): Likewise.
14265         (find_vbase_instance): Likewise.
14266         (binfo_from_vbase): Adjust comment to reflect reality.
14267         (binfo_via_virtual): New function.
14268         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
14269         for binfo walking during VTT construction.
14270         (dfs_mark_primary_bases): Remove.
14271         (force_canonical_binfo_r): New function.
14272         (force_canonical_binfo): New function.
14273         (mark_primary_virtual_base): New function.
14274         (mark_primary_bases): Walk in inheritance graph order, use
14275         mark_primary_virtual_base.
14276         (determine_primary_base): Use some more intermediate variables.
14277         (dfs_find_final_overrider): Don't check for overriding along a
14278         virtual path.
14279         (dfs_modify_vtables): Walk into primary virtual bases too.
14280         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
14281         (build_base_fields): Likewise.
14282         (dfs_set_offset_for_unshared_vbases): Likewise.
14283         (layout_virtual_bases): Likewise.
14284         (end_of_class): Likewise.
14285         (finish_struct_1): Call dump_class_hierarchy, if requested.
14286         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
14287         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
14288         (dump_class_hierarchy): Add file parameter. Append to file, if
14289         required.
14290         (finish_vtbls): Adjust accumulate_vtbl_inits call.
14291         Use canonical base for virtual bases.
14292         (build_vtt): Add more comments. Adjust build_vtt_inits call.
14293         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
14294         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
14295         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
14296         virtual VTTs.
14297         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
14298         from DATA.  We want virtual primary bases and all bases via virtual.
14299         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
14300         virtual base when not a construction vtable.
14301         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
14302         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
14303         Use canonical bases when processing virtual bases.
14304         (accumulate_vtbl_inits): We're interested in any base via a
14305         virtual path.
14306         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
14307         within a construction vtable, determine what is being overridden.
14308         (build_vtbl_initializer): Add more comments
14309         (add_vcall_offset_vtbl_entries_1): Adjust comment.
14310         (build_rtti_vtbl_entries): Check if the base has lost its
14311         primary.
14312
14313 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
14314
14315         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
14316
14317 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14318
14319         * decl.c (pushdecl): Call abort instead of fatal.
14320         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
14321         * init.c (build_new_1): Likewise.
14322         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
14323         * decl.c (build_typename_type): hash_table_init now returns void.
14324         decl.c (init_decl_processing): Make an error non-fatal.
14325
14326 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
14327
14328         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
14329         Document.
14330         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
14331         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
14332         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
14333         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
14334         * decl.c (maybe_commonize_var): Use the new name-mangling where
14335         appropriate.
14336         * decl2.c (comdat_linkage): Enhance comments.  Make all
14337         compiler-generated things static, if COMDAT is not available.
14338         (get_tinfo_decl): Do not make typeinfo objects that belong in the
14339         library COMDAT.
14340         (tinfo_base_init): Use the correct mangled name for typeinfo
14341         strings, and push them into the global scope.
14342         (typeinfo_in_lib_p): New function.
14343         (synthesize_tinfo_var): Use it.
14344         (create_real_tinfo_var): Likewise.
14345
14346 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
14347
14348         * decl.c (push_class_binding): Use context_for_name_lookup instead
14349         of CP_DECL_CONTEXT.
14350         * search.c (context_for_name_lookup): Remove static.  Check for NULL
14351         context in the loop.
14352         * cp-tree.h (context_for_name_lookup): Add prototype.
14353
14354 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
14355
14356         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
14357         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
14358         Remove.
14359         * call.c (convert_class_to_reference, build_user_type_conversion_1,
14360         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
14361
14362 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
14363
14364         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
14365         of macros used when compiling g++spec.c.
14366         * g++spec.c (lang_specific_driver): Link with the shared
14367         libgcc by default.
14368
14369 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
14370
14371         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
14372         make_reference_declarator, make_call_declarator), method.c
14373         (implicitly_declare_fn), parse.y (namespace_using_decl,
14374         notype_unqualified_id, expr_or_declarator, new_type_id,
14375         after_type_declarator, direct_after_type_declarator,
14376         notype_declarator, complex_notype_declarator,
14377         complex_direct_notype_declarator, qualified_id,
14378         notype_qualified_id, overqualified_id, direct_new_declarator,
14379         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
14380         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
14381         instead of build_parse_node.
14382
14383 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14384
14385         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
14386         (minus_one_node): Moved to top level gcc directory.  Renamed
14387         to integer_minus_one_node.
14388
14389         * init.c (init_init_processing): Don't set minus_one_node.
14390         (build_vec_init): Use integer_minus_one_node.
14391
14392         * rtti.c (get_tinfo_decl_dynamic): Likewise.
14393
14394 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
14395
14396         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
14397         identical and they would be replaced with constant, remove
14398         MODIFY_EXPR from the tree.
14399
14400 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14401
14402         * Make-lang.in: Remove all dependencies on defaults.h.
14403         * call.c: Don't include defaults.h.
14404         * decl.c: Likewise.
14405         * decl2.c: Likewise.
14406         * except.c: Likewise.
14407         * pt.c: Likewise.
14408         * rtti.c: Likewise.
14409         * tree.c: Likewise.
14410         * typeck.c: Likewise.
14411
14412 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
14413
14414         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
14415         operators even in "C" linkage.
14416         * method.c (set_mangled_name_for_decl): Likewise.
14417         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
14418         overloaded operators in "C" linkage.
14419
14420 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
14421
14422         * pt.c (tsubst_decl): Remove IN_DECL parameter.
14423         (tsubst_arg_types): Check parameter is not void.
14424         (tsubst): Adjust tsubst_decl call.
14425
14426 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
14427
14428         * call.c (add_builtin_candidate): Quote std properly, from
14429         previous change.
14430
14431 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14432
14433         * pt.c (check_explicit_specialization): Clone constructors and
14434         destructors.
14435
14436 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
14437
14438         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
14439         indicates anything special about template depth. Make sure we
14440         only count the user visible template classes.
14441
14442 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
14443
14444         * call.c (build_conv): Typo in comment.
14445         (add_builtin_candidate): Add more explanation.
14446         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
14447         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
14448         when we have enumeral types.
14449         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
14450         candidates for relops and eqops.
14451         (joust): Simplify control flow. Allow a non-template user
14452         function to hide a builtin.
14453
14454 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
14455
14456         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
14457         (more_specialized): Add deduction parameter.
14458         * call.c (joust): Adjust more_specialized call.
14459         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
14460         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
14461         (get_bindings_order): Remove.
14462         (get_bindings_real): Add DEDUCE parameter.
14463         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
14464         REFERENCE_TYPE jig for DEDUCE_ORDER.
14465         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
14466         maybe_adjust_types_for_deduction.
14467         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
14468         directly.
14469         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
14470         (check_cv_quals_for_unify): Use new unify qualifier flags.
14471         (unify): Clear new unify qualifier flags.
14472         (get_bindings_real): Add DEDUCE parameter.
14473         (get_bindings): Adjust call to get_bindings_real.
14474         (get_bindings_overload): Likewise.
14475         (most_specialized_instantiation): Adjust call to
14476         more_specialized.
14477
14478 2001-01-19  Jason Merrill  <jason@redhat.com>
14479
14480         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
14481
14482         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
14483         -fnew-abi.
14484
14485 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
14486
14487         * decl2.c (arg_assoc_class): Fix double iteration logic.
14488
14489 2001-01-19  Jason Merrill  <jason@redhat.com>
14490
14491         * init.c (build_delete): Always call convert_force to strip cv-quals.
14492
14493         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
14494         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
14495         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
14496
14497 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
14498
14499         * search.c (get_vbase_1): Count only virtual bases.
14500
14501 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
14502
14503         * class.c (duplicate_tag_error): Robustify flag clearing.
14504
14505 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
14506
14507         * cp-tree.h (lookup_template_class): Add complain parm.
14508         * decl.c (lookup_namespace_name): Adjust call to
14509         lookup_template_class.
14510         (make_typename_type): Likewise.
14511         * semantics.c (finish_template_type): Likewise.
14512         * pt.c (lookup_template_class): Add complain parm. Adjust.
14513         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
14514         (tsubst): Likewise.
14515
14516 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
14517
14518         * pt.c (copy_default_args_to_explicit_spec): Preserve
14519         object's CV quals. Reorganize.
14520
14521 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
14522
14523         * typeck.c (build_modify_expr): Say `initialization' for
14524         INIT_EXPRs.
14525         * init.c (build_default_init): Convert to enumeral type, if
14526         needed.
14527
14528 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
14529
14530         * parse.y (nomods_initdcl0): Properly set things up for
14531         initdcl0_innards.
14532
14533 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
14534
14535         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
14536         (type_unification_real): Set it.
14537         (unify): Use it.
14538
14539 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
14540
14541         * decl.c (finish_destructor_body): Convert to vbase pointer here.
14542
14543 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
14544
14545         * semantics.c (begin_class_definition): Check we're not inside a
14546         template parm list.
14547
14548 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
14549
14550         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
14551         BASELINK_P.
14552
14553 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14554
14555         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
14556         * call.c (build_over_call): Add comment.
14557
14558 2001-01-16 Daniel Berlin <dberlin@redhat.com>
14559
14560         * cvt.c (ocp_convert): Handle vector type conversion
14561         * typeck2.c (digest_init): Handle vector type initializations
14562
14563 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
14564
14565         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
14566           was given.
14567
14568 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
14569
14570         * pt.c (check_nontype_parm): Rename to ...
14571         (invalid_nontype_parm_type_p): ... here.
14572         (process_template_parm): Adjust.
14573         (convert_template_argument): Adjust.
14574
14575 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
14576
14577         * pt.c (check_nontype_parm): New function.
14578         (process_template_parm): Use it.
14579         (convert_template_argument): Use it.
14580         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
14581         member.
14582
14583 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
14584
14585         * tree.c: Add defaults.h
14586         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
14587         * Make-lang.in (cp/tree.o): Add defaults.h.
14588
14589 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
14590
14591         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
14592
14593 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
14594
14595         * g++.1: Change to be ".so man1/gcc.1".
14596
14597 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
14598
14599         * Make-lang.in (c++.info, c++.install-info): Build and install g++
14600         internals info.
14601         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
14602         ($(srcdir)/cp/g++int.info): New target.
14603         * gxxint.texi: Add info directory entry.  Use @@ in email address.
14604         * .cvsignore: Update.
14605
14606 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
14607
14608         * typeck.c (build_c_cast): Do template processing earlier.
14609         Always pedwarn on array casts.
14610
14611 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
14612
14613         * friend.c (make_friend_class): Make sure a templated class is
14614         actually a template.
14615
14616 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
14617
14618         * decl2.c (get_guard): Set linkage from guarded decl.
14619
14620 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
14621
14622         * call.c (convert_default_arg): Check for unprocessed
14623         DEFAULT_ARG.
14624         * cp-tree.h (replace_defarg): Move to spew.c.
14625         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
14626         spew.c, which is where they really are.
14627         (done_pending_defargs): Declare.
14628         (unprocessed_defarg_fn): Declare.
14629         * decl.c (replace_defarg): Move to spew.c
14630         * parse.y (structsp): Call done_pending_defargs.
14631         * spew.c (defarg_fns): Rearrange list structure.
14632         (defarg_fnsdone): New static variable.
14633         (defarg_depfns): New static variable.
14634         (init_spew): Adjust.
14635         (add_defarg_fn): Store the type in TREE_TYPE.
14636         (do_pending_defargs): Detect and deal with ordering constraints
14637         and circularity.
14638         (done_pending_defargs): New function.
14639         (unprocessed_defarg_fn): New function.
14640         (replace_defarg): Moved from decl.c. Robustify. Don't save
14641         if circularity detected.
14642
14643 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
14644
14645         * pt.c (unify): Check array has a domain, before checking
14646         whether it is variable sized.
14647
14648 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
14649
14650         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
14651         parameters with pointers to arrays of unknown bound.
14652
14653 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
14654
14655         * parse.y (template_parm_header, template_spec_header): New
14656         reductions. Split out from ...
14657         (template_header): ... here. Use them.
14658         (template_template_parm): Use template_parm_header.
14659         * semantics.c (finish_template_template_parm): Add assert.
14660
14661 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
14662
14663         * mangle.c (write_builtin_type): Fix thinko.
14664
14665         * pt.c (copy_default_args_to_explicit_spec_1): New function.
14666         (copy_default_args_to_explicit_spec): Likewise.
14667         (check_explicit_specialization): Use it.
14668
14669         * class.c (finish_struct_1):  Remove last argument in call to
14670         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
14671         * decl.c (builtin_function): Likewise.
14672         (build_cp_library_fn): Likewise.
14673         (check_initializer): Likewise.
14674         (make_rtl_for_nonlocal_decl): Likewise.
14675         (cp_finish_decl): Likewise.
14676         (start_function): Likewise.
14677         * decl2.c (finish_anon_union): Likewise.
14678         * friend.c (do_friend): Likewise.
14679         * init.c (build_java_class_ref): Likewise.
14680         * method.c (make_thunk): Likewise.
14681         * pt.c (tsubst_friend_function): Likewise.
14682         * semantics.c (expand_body): Likewise.
14683
14684 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
14685
14686         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
14687         looking at DECL_CLONED_FUNCTION for non-functions.
14688
14689 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
14690
14691         * error.c (dump_template_parameter): Use parm to determine how
14692         to print default value.
14693
14694 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
14695
14696         * class.c (duplicate_tag_error): Clear more flags.
14697
14698 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
14699
14700         * call.c (build_new_method_call): Use binfo_for_vbase.
14701
14702 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
14703
14704         * cp-tree.h (flag_cond_mismatch): Don't declare.
14705         * decl2.c (flag_cond_mismatch): Don't define.
14706         (lang_f_options): Remove cond-mismatch.
14707         (unsupported_options): Add cond-mismatch.
14708
14709 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
14710
14711         * class.c (handle_using_decl): Reject using of constructor name
14712         of sourcing class. Allow injecting of a method with same name as
14713         nested class. Fixup error messages.
14714
14715 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
14716
14717         * decl2.c (lang_decode_option): Handle -Wformat=2.
14718
14719 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
14720
14721         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
14722         initialized_in_class.
14723         (DECL_DEFINED_IN_CLASS_P): Rename to ...
14724         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
14725         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
14726         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
14727         * pt.c (check_default_tmpl_args): Adjust for
14728         DECL_INITIALIZED_IN_CLASS_P.
14729         (instantiate_class_template): Likewise.
14730         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
14731
14732         * class.c (finish_struct): Constify saved_filename.
14733
14734 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
14735
14736         * class.c (duplicate_tag_error): Adjust diagnostic.
14737         (finish_struct): Locally set location to start of struct.
14738         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
14739
14740 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
14741
14742         * decl.c (struct binding_level): Adjust class_shadowed comments
14743         to reflect reality.
14744         (push_class_level_binding): Adjust comments to reflect reality.
14745         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
14746         Don't set TREE_VALUE on the class_shadowed list.
14747
14748 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14749
14750         * decl2.c (acceptable_java_type): Allow references too.
14751         * init.c (build_java_class_ref): When using the new ABI, search
14752         `class$' and have it mangled with `mangle_decl.'
14753         * mangle.c (write_java_integer_type_codes): New function.
14754         (write_builtin_type): Detect and mangle Java integer and real
14755         types.
14756
14757 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
14758
14759         * decl2.c (grokfield): Don't accept `asm' specifiers for
14760         non-static data members.
14761
14762 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14763
14764         * expr.c (cplus_expand_expr): Don't reset `target'.
14765
14766 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
14767
14768         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
14769
14770 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
14771
14772         * parse.y (template_datadef): Check for error_mark_node.
14773
14774 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
14775
14776         * cp-tree.def (DEFAULT_ARG): Make `x' class.
14777
14778 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
14779
14780         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
14781         (record_builtin_type): Make non-static.
14782         (flag_short_double): Don't declare.
14783         (init_decl_processing): Remove the creation of many tree nodes now
14784         in c_common_nodes_and_builtins.
14785         (build_void_list_node): New function.
14786         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
14787         * cp-tree.h (flag_short_wchar): Don't declare.
14788
14789 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
14790
14791         * call.c (build_conv): Don't use build1 for USER_CONV.
14792         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
14793
14794 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
14795
14796         * lex.c (lang_init): Call c_common_lang_init.
14797
14798 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
14799
14800         * search.c (lookup_fnfields_here): Remove.
14801         (look_for_overrides_r): Use lookup_fnfields_1.
14802         Ignore functions from using declarations.
14803
14804 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
14805
14806         Implement exceptions specifiers for implicit member functions.
14807         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
14808         * method.c (synthesize_exception_spec): New function.
14809         (locate_dtor, locate_ctor, locate_copy): New functions.
14810         (implicitly_declare_fn): Generate the exception spec too.
14811         * search.c (check_final_overrider): Check artificial functions
14812         too.
14813         * typeck2.c (merge_exception_specifiers): New function.
14814
14815 2001-01-03  Jason Merrill  <jason@redhat.com>
14816
14817         * init.c (build_default_init): New fn.
14818         (perform_member_init): Split out from here.
14819         (build_new_1): Use it.  Simplify initialization logic.
14820         (build_vec_init): Take an array, rather than a pointer and maxindex.
14821         Speed up simple initializations.  Don't clean up if we're assigning.
14822         * cp-tree.h: Adjust.
14823         * decl2.c (do_static_initialization): Remove TREE_VEC case.
14824         * parse.y (new_initializer): Return void_zero_node for ().
14825         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
14826         * typeck2.c (digest_init): Only complain about user-written
14827         CONSTRUCTORs.
14828
14829 2000-12-22  Mike Stump  <mrs@wrs.com>
14830
14831         * decl2.c: (max_tinst_depth): Increase to 50.
14832
14833 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
14834
14835         * class.c (invalidate_class_lookup_cache): Zero the
14836         previous_class_values.
14837         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
14838         TREE_INT_CST_HIGH.
14839         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
14840         * decl.c (free_bindings): New variable.
14841         (push_binding): Don't create a new binding if we have one on the
14842         free list.
14843         (pop_binding): Put old bindings on the free list.
14844         (init_decl_processing): Use size_int, not build_int_2.
14845         Register free_bindings as a GC root.
14846         (cp_make_fname_decl): Use size_int, not build_int_2.
14847         (push_inline_template_parms_recursive): Likewise.
14848         (end_template_parm_list): Likewise.
14849         (for_each_template_parm): Do not use walk_tree_without_duplicates.
14850         (tsubst_template_parms): Use size_int, not build_int_2.
14851         (tsubst): Likewise.
14852         * rtti.c (get_vmi_pseudo_type_info): Likewise.
14853
14854 2001-01-02  Richard Henderson  <rth@redhat.com>
14855
14856         * parse.y (asm): Set ASM_INPUT_P.
14857
14858 2001-01-02  Jason Merrill  <jason@redhat.com>
14859
14860         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
14861         for v3 ABI.
14862
14863         * typeck.c (cp_truthvalue_conversion): New fn.
14864         * cvt.c (ocp_convert): Use it.
14865
14866         * cp-tree.h: Lose c-common.c decls.
14867
14868         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
14869         * cvt.c (convert_to_void): Use type_unknown_p.
14870
14871         * typeck.c (strip_all_pointer_quals): Also strip quals from
14872         pointer-to-member types.
14873
14874         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
14875         parse.y as C.
14876
14877         * call.c (build_new_method_call): Do evaluate the object parameter
14878         when accessing a static member.
14879         * typeck.c (build_component_ref): Likewise.
14880
14881 2001-01-02  Andreas Jaeger  <aj@suse.de>
14882
14883         * decl.c (cp_missing_noreturn_ok_p): New.
14884         (init_decl_processing): Set lang_missing_noreturn_ok_p.
14885
14886 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
14887
14888         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
14889
14890 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
14891
14892         * class.c (pushclass): Remove #if 0'd code.
14893         * cp-tree.h (overload_template_name): Remove.
14894         * decl.c (store_bindings): Simplify.
14895         (pop_from_top_level): Likewise.
14896         * pt.c (overload_template_name): Remove.
14897         (instantiate_decl): Don't call push_to_top_level if it's not
14898         needed.
14899
14900 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
14901
14902         * pt.c (register_local_specialization): Don't return a value.
14903         (lookup_template_class): Use move-to-front heuristic when looking
14904         up template instantiations.
14905         (instantiate_decl): Only push_to_top_level when we're actually
14906         going to instantiate the template.
14907
14908 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
14909
14910         * search.c (binfo_for_vtable): Return least derived class, not
14911         most.  Handle secondary vtables.
14912
14913 2000-12-22  Jason Merrill  <jason@redhat.com>
14914
14915         * pt.c (more_specialized): Don't optimize len==0.
14916         (fn_type_unification): If we're adding the return type, increase len.
14917
14918         * typeck.c (build_binary_op): Fix pmf comparison logic.
14919
14920         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
14921         DECL_STATIC_FUNCTION_P.
14922
14923         * semantics.c (genrtl_finish_function): Don't try to jump to
14924         return_label unless it exists.
14925
14926         In partial ordering for a call, ignore parms for which we don't have
14927         a real argument.
14928         * call.c (joust): Pass len to more_specialized.
14929         (add_template_candidate_real): Strip 'this', pass len.
14930         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
14931         (get_bindings_order): New fn.  Pass len down.
14932         (get_bindings_real): Strip 'this', pass len.
14933         (fn_type_unification): Likewise.
14934         (type_unification_real): Succeed after checking 'len' args.
14935         (most_specialized_instantiation): Lose explicit_args parm.
14936         * class.c (resolve_address_of_overloaded_function): Strip 'this',
14937         pass len.
14938
14939 2000-12-21  Jason Merrill  <jason@redhat.com>
14940
14941         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
14942         DECL_TEMPLATE_RESULT.
14943
14944         * search.c (lookup_field_r): Call lookup_fnfields_1, not
14945         lookup_fnfields_here.
14946
14947         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
14948
14949         * call.c (build_object_call): Also allow conversions that return
14950         reference to pointer to function.
14951         (add_conv_candidate): Handle totype being ref to ptr to fn.
14952         (build_field_call): Also allow members of type reference to function.
14953         Lose support for calling pointer to METHOD_TYPE fields.
14954
14955         * error.c (dump_expr): Handle *_CAST_EXPR.
14956
14957         * typeck2.c (build_scoped_ref): Always convert to the naming class.
14958
14959         * tree.c (break_out_cleanups): Lose.
14960         * cp-tree.h: Remove prototype.
14961         * typeck.c (build_component_ref): Don't break_out_cleanups.
14962         (build_compound_expr): Likewise.
14963         * semantics.c (finish_expr_stmt): Likewise.
14964
14965 2000-12-20  Richard Henderson  <rth@redhat.com>
14966
14967         * cp-tree.h: Update declarations.
14968         * decl.c (finish_case_label): Return the new stmt node.
14969         * semantics.c (finish_goto_stmt): Likewise.
14970         (finish_expr_stmt, finish_return_stmt): Likewise.
14971         (finish_break_stmt, finish_continue_stmt): Likewise.
14972         (finish_asm_stmt): Likewise.
14973         * parse.y (already_scoped_stmt): Set STMT_LINENO.
14974         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
14975         (simple_if, simple_stmt): Return the new stmt node.
14976         (save_lineno): New.
14977
14978 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
14979
14980         * cp-tree.h: Don't declare warn_long_long.
14981
14982 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14983
14984         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
14985         IS_AGGR_TYPE.
14986
14987 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14988
14989         * pt.c (unify): Handle when both ARG and PARM are
14990         BOUND_TEMPLATE_TEMPLATE_PARM.
14991
14992 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14993
14994         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
14995         DECL_TEMPLATE_PARM_P.
14996
14997 2000-12-15  Jason Merrill  <jason@redhat.com>
14998
14999         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
15000
15001         * init.c (build_new_1): Don't strip quals from type.
15002
15003         * decl.c (pushdecl): Don't check for linkage on a non-decl.
15004
15005         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
15006
15007         * call.c (build_new_function_call): Lose space before paren in
15008         error message.
15009         (build_new_method_call): Likewise.
15010
15011         * typeck2.c (build_m_component_ref): Propagate quals from datum.
15012
15013 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
15014
15015         * pt.c (check_explicit_specialization): Propagate default
15016         function arguments to explicit specializations.
15017
15018 2000-12-13  DJ Delorie  <dj@redhat.com>
15019
15020         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
15021         and <? operators.
15022
15023 2000-12-08  Jason Merrill  <jason@redhat.com>
15024
15025         * error.c (dump_function_name): Don't let the user see __comp_ctor.
15026
15027         Clean up copy-initialization in overloading code.
15028         * call.c (build_user_type_conversion_1): Die if we are asked to
15029         convert to the same or a base type.
15030         (implicit_conversion): Avoid doing so.  Lose reference binding code.
15031         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
15032         direct-initialization.  Also do direct-init part of copy-init.
15033         (build_user_type_conversion): Don't provide context to convert_like.
15034         * cvt.c (ocp_convert): build_user_type_conversion will now provide
15035         the constructor call for copy-init.
15036
15037         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
15038         instantiation of a member template.
15039         (do_decl_instantiation): Not here.
15040
15041 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
15042
15043         * class.c (check_field_decls): Don't special case anonymous
15044         fields in error messages.
15045         (note_name_declared_in_class): Use %D on diagnostic.
15046
15047         * tree.c (pod_type_p): Use strip_array_types.
15048         (cp_valid_lang_attribute): Likewise.
15049         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
15050         multiple evaluations.
15051         (cp_has_mutable_p): Use strip_array_types.
15052
15053 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
15054
15055         * cp-tree.h (sufficient_parms_p): Declare new function.
15056         * call.c (sufficient_parms_p): New function, broken out of ...
15057         (add_function_candidate): ... here. Use it.
15058         (add_conv_candidate): Use it.
15059         * decl.c (grok_ctor_properties): Use it.
15060
15061 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
15062
15063         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
15064
15065 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
15066
15067         * decl2.c (lang_decode_option): Handle -Wformat-security.
15068
15069 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
15070
15071         * pt.c (verify_class_unification): New function.
15072         (get_class_bindings): Use it.
15073         (try_class_unification): Tidy.
15074         (unify): Handle when argument of a template-id is not
15075         template parameter dependent.
15076         (template_args_equal): Handle when TREE_CODE's do not match.
15077
15078 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
15079
15080         * lang-specs.h (c++): When invoking the stand-alone preprocessor
15081         for -save-temps, pass all relevant -Defines to it, and then don't
15082         pass them to cc1plus.
15083
15084 2000-12-05  Will Cohen  <wcohen@redhat.com>
15085
15086         * decl.c (finish_case_label): Cleared
15087         more_cleanups_ok in surrounding function scopes.
15088         (define_label): Likewise.
15089
15090 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
15091
15092         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
15093         (get_matching_virtual): Remove.
15094         (look_for_overrides): Declare new function.
15095         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
15096         DECL_VINDEX here.
15097         * class.c (check_for_override): Move base class iteration code
15098         to look_for_overrides.
15099         * search.c (next_baselink): Remove.
15100         (get_virtuals_named_this): Remove.
15101         (get_virtual_destructor): Remove.
15102         (tree_has_any_destructors_p): Remove.
15103         (struct gvnt_info): Remove.
15104         (check_final_overrider): Remove `virtual' from error messages.
15105         (get_matching_virtuals): Remove. Move functionality to ...
15106         (look_for_overrides): ... here, and ...
15107         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
15108         to be overriding.
15109
15110 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
15111
15112         * typeck.c (get_delta_difference): If via a virtual base,
15113         return zero.
15114         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
15115         adjustment.
15116
15117 2000-12-04  Richard Henderson  <rth@redhat.com>
15118
15119         * error.c (dump_tree): Use output_add_string not OB_PUTS.
15120
15121 2000-12-04  Jason Merrill  <jason@redhat.com>
15122
15123         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
15124         (write_builtin_type): Pass intSI_type_node and the like through
15125         type_for_mode.
15126         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
15127         Pass intSI_type_node and the like through type_for_mode.
15128         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
15129         * pt.c (tsubst, unify): Likewise.
15130         * tree.c (walk_tree): Likewise.
15131         * error.c (dump_type): Likewise.
15132         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
15133
15134         * Make-lang.in: Tweak top comment for emacs.
15135         (cp/TAGS): Restore.
15136
15137         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
15138
15139         * class.c (clone_function_decl): Robustify.
15140
15141 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
15142
15143         * decl.c (store_bindings): Only search in the non modified
15144         old_bindings for duplicates.
15145
15146 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
15147
15148         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
15149         TYPE_POLYMORPHIC_P.
15150
15151         * typeck.c (build_static_cast): Remove unused variable.
15152
15153 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
15154
15155         * pt.c: Fix typo in comment.
15156
15157 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
15158
15159         * decl2.c (warn_format): Remove definition.
15160         (lang_decode_option): Handle -Wformat-nonliteral,
15161         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
15162
15163 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
15164
15165         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
15166         (init_decl_processing): Don't create string_type_node,
15167         const_string_type_node, wint_type_node, intmax_type_node,
15168         uintmax_type_node, default_function_type, ptrdiff_type_node and
15169         unsigned_ptrdiff_type_node.  Adjust position of call to
15170         c_common_nodes_and_builtins.
15171         (identifier_global_value): New function.
15172
15173 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
15174
15175         * call.c (standard_conversion): Reject pointer to member
15176         conversions from ambiguous, inaccessible or virtual bases.
15177         * typeck.c (build_static_cast): Don't check pointers to members
15178         specially.
15179
15180 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
15181
15182         * method.c (do_build_copy_constructor): Preserve cv
15183         qualifications when accessing source object members.
15184         (do_build_assign_ref): Likewise. Remove separate diagnostics for
15185         unnamed fields.
15186
15187 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
15188
15189         * method.c (do_build_assign_ref): Construct appropriately
15190         CV-qualified base reference. Don't allow const casts in base
15191         conversion.
15192
15193 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
15194
15195         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
15196         incomplete return type.
15197
15198 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
15199
15200         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
15201         * semantics.c (finish_base_specifier): Accept a _TYPE not a
15202         _DECL.
15203
15204 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
15205
15206         * spew.c (yyerror): Cope if yylval.ttype is NULL.
15207
15208 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
15209
15210         * decl.c (grokdeclarator): Diagnose undefined template contexts.
15211
15212 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
15213
15214         * decl.c (grokdeclarator): Do type access control on friend
15215         class.
15216
15217 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
15218
15219         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
15220         bison parser ickiness.
15221         * pt.c (tsubst_friend_function): Enter namespace scope when
15222         tsubsting the function name.
15223         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
15224
15225 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
15226
15227         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
15228         * cvt.c (cp_convert_to_pointer): Add force parameter.
15229         Allow conversions via virtual base if forced.
15230         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
15231         (ocp_convert): Likewise.
15232         * search.c (binfo_from_vbase): Return the virtual base's binfo.
15233         * typeck.c (get_delta_difference): Adjust handling of virtual
15234         bases.
15235
15236 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
15237
15238         * tree.c (struct list_hash): Remove.
15239         (list_hash_table): Make it be an htab.
15240         (struct list_proxy): New type.
15241         (list_hash_eq): New function.
15242         (list_hash_pieces): Renamed from ...
15243         (list_hash): ... this.
15244         (list_hash_lookup): Remove.
15245         (list_hash_add): Remove.
15246         (hash_tree_cons): Use the generic hashtable.
15247         (mark_list_hash): Remove.
15248         (init_tree): Create the hashtable.
15249
15250 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
15251
15252         * method.c (build_mangled_C9x_name): Rename to
15253         build_mangled_C99_name.  Change C9X references in comments to
15254         refer to C99.
15255
15256 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
15257
15258         * parse.y (unary_expr): Move VA_ARG from here ...
15259         (primary): ... to here.
15260
15261 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
15262
15263         * semantics.c (finish_id_expr): If type is error_mark, return
15264         error_mark.
15265
15266 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
15267
15268         * pt.c (lookup_template_class): Simplify loop exit constructs.
15269         Cope when there is no partial instantiation of a template
15270         template member.
15271
15272 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
15273
15274         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
15275
15276 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
15277
15278         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
15279         prefix.
15280
15281         * pt.c (do_decl_instantiate): Explicitly clone constructors and
15282         destructors that haven't already been cloned.
15283
15284 2000-11-20  Richard Henderson  <rth@redhat.com>
15285
15286         * parse.y (yyparse_1): Rename the parser entry point.
15287
15288 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
15289
15290         * mangle.c (write_name): Use <unscoped-name> for names directly in
15291         function scope.
15292         (write_unscoped_name): Accept names directly in function scope.
15293
15294 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
15295
15296         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
15297         * parse.y (extdef): Add EXPORT reduction.
15298         * spew.c (yylex): Don't skip export here.
15299
15300 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
15301
15302         * decl.c (init_decl_processing): Correct name of pure virtual
15303         function under the new ABI.
15304         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
15305         (throw_bad_typeid): Likewise for bad typeid function.
15306
15307 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
15308
15309         * decl.c (grokparms): Don't even function types of `void' type,
15310         either.
15311         * mangle.c (write_type): Don't crash when confronted with the
15312         error_mark_node.
15313
15314         * decl.c (grokparms): Don't create parameters of `void' type.
15315
15316 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
15317
15318         * lex.c (mark_impl_file_chain): Delete.
15319         (init_parse): Remove call to ggc_add_string_root.  No need to
15320         ggc_strdup a string constant.  Do not add impl_file_chain to GC
15321         roots.
15322         (handle_pragma_implementation): No need to ggc_strdup main_filename.
15323
15324 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
15325
15326         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
15327
15328 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
15329
15330         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
15331         * decl.c (grokdeclarator): Don't reject void parms here.
15332         (require_complete_types_for_parms): Simplify, use
15333         complete_type_or_else.
15334         (grokparms): Remove bitrot. Remove funcdef parm.
15335         Deal with ellipsis parm lists here.
15336         * semantics.c (finish_parmlist): Don't append void_list_node
15337         here. Set PARMLIST_ELLIPSIS_P.
15338
15339 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
15340
15341         * typeck2.c (incomplete_type_error): Reorganize to avoid
15342         excessive diagnostics.
15343
15344 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
15345
15346         * lex.c (struct impl_files, internal_filename): Constify a char *.
15347
15348 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
15349
15350         * mangle.c (write_special_name_constructor): Don't generate
15351         assembler junk when confronted with an old-style constructor.
15352         (write_special_name_destructor): Likewise.
15353         (mangle_decl_string): Do it here instead.
15354
15355 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
15356
15357         * call.c (op_error): Make error messages clearer.
15358
15359 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
15360
15361         * decl.c (wrapup_globals_for_namespace): Don't mark things
15362         TREE_ASM_WRITTEN when they're not.
15363
15364 2000-11-15  Jason Merrill  <jason@redhat.com>
15365
15366         * typeck2.c (friendly_abort): Uncount the error before handing
15367         off to fancy_abort.
15368
15369 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
15370
15371         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
15372
15373 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
15374
15375         * class.c (build_vtbl_initializer): Fix typo in comment.
15376         * typeck.c (expr_sizeof): Don't crash on errors.
15377
15378 2000-11-14  Jim Wilson  <wilson@redhat.com>
15379
15380         * lang-specs.h: Add %2 after %(cc1_options).
15381
15382 2000-11-14  Richard Henderson  <rth@redhat.com>
15383
15384         * typeck.c (c_sizeof): Be strict about casting result value
15385         back to c_size_type_node.
15386         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
15387
15388 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
15389
15390         * typeck.c (build_unary_op): Use boolean_increment from
15391         c-common.c, moving the relevant code there.
15392
15393 2000-11-11  Jason Merrill  <jason@redhat.com>
15394
15395         * typeck.c (mark_addressable): Don't call put_var_into_stack.
15396
15397         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
15398         in inlines.
15399
15400 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15401
15402         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
15403         * lex.c (copy_lang_decl): Likewise.
15404
15405 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
15406
15407         * dump.c (cp_dump_tree): Don't dump function bodies here.
15408
15409         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
15410         (dump.o): Update dependency list.
15411         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
15412         (flag_dump_translation_unit): Likewise.
15413         (CP_TYPE_QUALS): Adjust definition.
15414         (DECL_C_BIT_FIELD): Remove.
15415         (SET_DECL_C_BIT_FIELD): Likewise.
15416         (CLEAR_DECL_C_BIT_FIELD): Likewise.
15417         (add_maybe_template): Likewise.
15418         (strip_array_types): Likewise.
15419         (dump_node_to_file): Likewise.
15420         (cp_dump_tree): New function.
15421         * decl.c (init_decl_processing): Set lang_dump_tree.
15422         * decl2.c (flag_dump_translation_unit): Remove.
15423         * dump.c: Move most of it to ../c-dump.c.
15424         (cp_dump_tree): New function.
15425         * pt.c (add_maybe_template): Remove.
15426         * typeck.c (strip_array_types): Likewise.
15427
15428 2000-11-07  Eric Christopher  <echristo@redhat.com>
15429
15430         * decl.c (init_decl_processing): Change definition of
15431         __wchar_t to wchar_t.  Remove artificial declaration of
15432         wchar_t.
15433         * lex.c: Change instances of __wchar_t to wchar_t.
15434
15435 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
15436
15437         * lex.c (do_identifier): Don't lookup_name for operators.
15438         * parse.y (operator): Save looking_for_typename.
15439         (unoperator): Restore it.
15440         * spew.c (frob_opname): Use nth_token for lookahead.
15441
15442 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
15443
15444         * decl.c (grok_op_properties): Always use coerce_new_type and
15445         coerce_delete_type.
15446         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
15447         exception specification. Tidy up.
15448         (coerce_delete_type): Preserve exception specification. Tidy up.
15449
15450 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
15451
15452         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
15453         (push_binding_level), error.c (cp_tree_printer), pt.c
15454         (process_partial_specialization, tsubst_template_arg_vector),
15455         search.c (lookup_member): Use memset () instead of bzero ().
15456
15457 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
15458
15459         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
15460
15461 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
15462
15463         * Make-lang.in (c++.distdir): Remove.
15464
15465 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
15466
15467         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
15468         declarations from different namespaces to be combined.
15469
15470 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
15471
15472         * decl.c: Include tm_p.h.
15473
15474 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
15475
15476         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
15477
15478 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
15479
15480         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
15481         (build_overload_value), repo.c (open_repo_file), xref.c
15482         (open_xref_file): Use strchr () and strrchr () instead of index ()
15483         and rindex ().
15484
15485 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
15486
15487         * call.c (build_over_call): Call fold on the CALL_EXPR.
15488
15489 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
15490
15491         * error.c (dump_template_decl): Separate template hearders with
15492         space not comma.
15493
15494 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
15495
15496         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
15497         TS_* flags with corresponding TFF_*.  Adjust prototypes of
15498         functions (which used to take a tree_string_flags) to take an int.
15499
15500         * cp-tree.h (enum tree_string_flags): Remove
15501         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
15502         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
15503         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
15504         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
15505         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
15506         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
15507         (type_as_string, decl_as_string, expr_as_string,
15508         context_as_string): Adjust prototype.
15509
15510         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
15511         instead of TS_PLAIN.
15512
15513         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
15514         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
15515         plain `0'.
15516
15517 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
15518
15519         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
15520         (linkage_kind): New enumeration.
15521         (decl_linkage): New function.
15522         * decl2.c (comdat_linkage): Extend comment.
15523         * error.c (dump_function_decl): Print the arguments used to
15524         instantiate a template, even when not printing the type of the
15525         function.
15526         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
15527         not TREE_PUBLIC, to test for external linkage.
15528         * tree.c (decl_linkage): New function.
15529
15530 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
15531
15532         * pt.c (instantiate_decl): Always instantiate static data members
15533         initialized in-class.
15534
15535 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
15536
15537         * Make-lang.in: Move all build rules here from Makefile.in,
15538         adapt to new context.  Wrap all rules that change the current
15539         directory in parentheses.  Expunge all references to $(P).
15540         When one command depends on another and they're run all at
15541         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
15542         all object-file generation rules.  Delete obsolete variables.
15543
15544         * Makefile.in: Delete.
15545         * config-lang.in: Delete outputs= line.
15546
15547 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
15548
15549         * error.c (dump_function_decl): Print no space between
15550         `ptr-operator' the `type-specifier' of the return type.
15551         (dump_type_prefix): Make sure we put space at the appropriate
15552         place.
15553
15554 2000-10-23  Jason Merrill  <jason@redhat.com>
15555
15556         * call.c (equal_functions): Also call decls_match for extern "C" fns.
15557
15558 2000-10-22  Jason Merrill  <jason@redhat.com>
15559
15560         * call.c (build_conditional_expr): Use ocp_convert to force
15561         rvalue conversion.
15562
15563 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
15564
15565         * call.c (standard_conversion): Use RVALUE_CONVs for all
15566         expressions that satisfy lvalue_p, not just those that satisfy
15567         real_lvalue_p.
15568
15569         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
15570
15571         * typeck.c (c_sizeof): Return an expression of `size_t' type,
15572         not one with TYPE_IS_SIZETYPE set.
15573         (dubious_conversion_warnings): Remove special-case code.
15574
15575 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
15576
15577         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
15578         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
15579         (dump_type_prefix): Print vector-of-int as 'int vector'.
15580         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
15581         * tree.c (walk_tree): Handle VECTOR_TYPE.
15582
15583         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
15584
15585 2000-10-21  Jason Merrill  <jason@redhat.com>
15586
15587         * parse.y (operator): Set got_object from got_scope.
15588         Set looking_for_typename.
15589         * decl.c (lookup_name_real): Clear val after setting from_obj.
15590         Reorganize diagnostic.
15591
15592 2000-10-20  Jason Merrill  <jason@redhat.com>
15593
15594         * tree.c (walk_tree): Don't walk into default args.
15595
15596         * error.c (dump_expr): Use host_integerp.
15597
15598 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
15599
15600         * typeck2.c (abstract_virtuals_error): Use "because" instead of
15601         "since" in error message.
15602
15603 2000-10-20  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15604
15605         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
15606
15607 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
15608
15609         * decl.c (revert_static_member_fn): Fixed typo.
15610
15611 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
15612
15613         * class.c (subobject_offset_fn): New type.
15614         (dfs_record_base_offsets): Remove.
15615         (record_base_offsets): Likewise.
15616         (dfs_search_base_offsets): Likewise.
15617         (record_subobject_offset): New function.
15618         (check_subobject_offset): Likewise.
15619         (walk_subobject_offsets): Likewise.
15620         (record_subobject_offsets): Likewise.
15621         (layout_conflict_p): Reimplement.
15622         (layout_nonempty_base_or_field): Correct handling of type
15623         conflicts during layout.
15624         (layout_empty_base): Likewise.
15625         (build_base_field): Adjust to handle new representation of empty
15626         base offset table.
15627         (build_base_fields): Likewise.
15628         (layout_virtual_bases): Likewise.
15629         (splay_tree_compare_integer_csts): New function.
15630         (layout_class_type): Use a splay_tree, rather than a varray, to
15631         represent the offsets of empty bases.
15632
15633         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
15634         * decl.c (select_decl): Don't return declarations that are
15635         DECL_ANTICIPATED.
15636
15637 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
15638
15639         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
15640         (fake_std_node): New macro.
15641         * decl.c (in_std): Rename to ...
15642         (in_fake_std): ... this.
15643         (flag_no_builtin): Remove.
15644         (flag_no_nonansi_builtin): Likewise.
15645         (walk_namespaces_r): Use fake_std_node.
15646         (push_namespace): Use std_identifier.
15647         (pop_namespace): Use in_fake_std.
15648         (lookup_name_real): Use fake_std_node.
15649         (init_decl_processing): When -fhonor-std, create the `std'
15650         namespace.  Don't create a dummy fake_std_node in that case.
15651         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
15652         (builtin_function): Put builtins whose names don't begin
15653         with `_' in the std namespace.
15654         * decl2.c (flag_no_builtin): Remove.
15655         (flag_no_nonansi_builtin): Likewise.
15656         (set_decl_namespace): Use fake_std_node.
15657         (validate_nonmember_using_decl): Likewise.
15658         (do_using_directive): Likewise.
15659         (handle_class_head): Likewise.
15660         * dump.c (dequeue_and_dump): Likewise.
15661         * except.c (init_exception_processing): Use std_identifier.
15662         * init.c (build_member_call): Use fake_std_node.
15663         * rtti.c (init_rtti_processing): Use std_identifier.
15664
15665 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
15666
15667         * cp-tree.h (back_end_hook): Remove declaration.
15668         * decl2.c (back_end_hook): Remove definition.
15669
15670         * dump.c (dequeue_and_dump): Dump TREE_USED.
15671
15672 2000-10-17  Brad Lucier <lucier@math.purdue.edu>
15673
15674         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
15675
15676 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
15677
15678         * decl.c (WINT_TYPE): Define.
15679         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
15680         c_size_type_node, signed_size_type_node and wint_type_node.
15681
15682 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
15683
15684         * decl2.c (warn_missing_format_attribute): New variable.
15685         (lang_decode_option): Decode -Wmissing-format-attribute.
15686
15687 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
15688
15689         * typeck.c (qualify_type): Remove.
15690         (composite_pointer_type): Fix handling of conversions to `cv void*'.
15691
15692 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15693
15694         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
15695
15696 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15697
15698         * Makefile.in (parse.c, parse.h): Create atomically.
15699
15700 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
15701
15702         * class.c (current_obstack): Remove.
15703         * decl.c (ggc_p): Remove.
15704         (start_decl): Don't use decl_tree_cons.
15705         (grokdeclarator): Don't use build_decl_list.
15706         (start_function): Don't use decl_tree_cons.
15707         (finish_function): Don't mess with obstacks.
15708         * decl2.c (grok_x_components): Don't use build_decl_list.
15709         * lex.c (make_call_declarator): Don't call decl_tree_cons.
15710         (implicitly_declare_fn): Don't call build_decl_list.
15711         * parse.y (frob_specs): Don't call build_decl_list or
15712         decl_tree_cons.
15713         (expr_or_declarator_intern): Don't call decl_tree_cons.
15714         (primary): Don't call build_decl_list.
15715         (fcast_or_absdcl): Likewise.
15716         (typed_declspecs): Don't call decl_tree_cons.
15717         (reserved_declspecs): Don't call build_decl_list.
15718         (declmods): Likewise.
15719         (reserved_typespecquals): Likewise.
15720         (aggr): Likewise.
15721         (new_type_id): Likewise.
15722         (cv_qualifiers): Likewise.
15723         (after_type_declarator_intern): Likewise.
15724         (notype_declarator_intern): Likewise.
15725         (absdcl_intern): Likewise.
15726         (named_parm): Likewise.
15727         * pt.c (most_specialized_class): Likewise.
15728         * repo.c (temporary_obstack): Make it a structure, not a pointer.
15729         (init_repo): Initialize it.
15730         * search.c (current_obstack): Remove.
15731         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
15732
15733 2000-10-09  Richard Henderson  <rth@cygnus.com>
15734
15735         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
15736         (c++ language support bits for libgcc): Remove.
15737         (c++.clean): Remove cplib2.txt cleanup.
15738         * config-lang.in (headers, lib2funcs): Remove.
15739
15740         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
15741         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
15742         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
15743         * inc/new.h, inc/typeinfo: Remove files.
15744
15745 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
15746
15747         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
15748         defined.
15749         (init_decl_processing): Initialize intmax_type_node and
15750         uintmax_type_node.
15751
15752 2000-10-06  Richard Henderson  <rth@cygnus.com>
15753
15754         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
15755         (original_result_rtx): Remove.
15756         * decl.c (save_function_data): Don't clear x_result_rtx.
15757         (mark_lang_function): Don't mark it either.
15758         * expr.c (fixup_result_decl): Remove.
15759         * semantics.c (genrtl_named_return_value): Frob the return decl
15760         before calling emit_local_var.
15761         (genrtl_finish_function): Don't call fixup_result_decl.
15762         Always emit the jump to return_label.
15763
15764 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
15765
15766         * pt.c (lookup_template_class): Set current access for enum.
15767         (tsubst_enum): Set file & line for enum decl.
15768
15769         * spew.c (yylex): Remove unused variable.
15770
15771 2000-10-05  Richard Henderson  <rth@cygnus.com>
15772
15773         * semantics.c (genrtl_finish_function): Don't init or check
15774         can_reach_end; remove noreturn and return value checks.
15775
15776 2000-10-05  Tom Tromey  <tromey@cygnus.com>
15777
15778         * init.c (build_java_class_ref): Use `build_static_name' with a
15779         suffix, not a prefix, to build the class object's name.
15780
15781 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
15782
15783         * cp-tree.h (access_kind): Fix comment typo.
15784         * decl2.c (grokfield): Fix diagnostic typo.
15785         * semantics.c (finish_template_type): Fix comment typo.
15786         (finish_qualified_object_call_expr): Likewise.
15787
15788 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
15789
15790         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
15791         tsubsting fails.
15792
15793 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
15794
15795         * spew.c (frob_id): New static function.
15796         (frob_opname): Use it.
15797         (yylex): Use it.
15798
15799 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
15800
15801         * decl.c (lang_mark_false_label_stack): Remove.
15802         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
15803
15804 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
15805
15806         * gxxint.texi: Use @email for formatting email addresses.
15807
15808 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
15809
15810         * error.c: Remove direct obstack manipulation.  Replace with
15811         output_buffer-based formatting.  Adjust calls to removed macros.
15812         (obstack_chunk_alloc, obstack_chunk_free): Remove.
15813         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
15814         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
15815
15816 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
15817
15818         * ir.texi: Move to ../c-tree.texi.
15819
15820 2000-09-20  Jason Merrill  <jason@redhat.com>
15821
15822         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
15823
15824 2000-09-21  Andreas Jaeger  <aj@suse.de>
15825
15826         * errfn.c: Move declaration of cp_printer and cp_printers to ...
15827         * cp-tree.h: ... here.
15828
15829         * error.c: Remove declaration of cp_printer.
15830
15831 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
15832
15833         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
15834
15835 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
15836
15837         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
15838         users.
15839
15840 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
15841
15842         * decl.c (start_function): Robustify.
15843
15844 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15845
15846         * cp-tree.h (check_function_format): Accept a `status' parameter.
15847
15848         * call.c, typeck.c: Updates calls to `check_function_format'.
15849
15850 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
15851
15852         * decl2.c (handle_class_head): Always push some scope even
15853         in the error case.
15854
15855 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
15856
15857         * cp-tree.h (struct cp_language_function): Remove
15858         x_scope_stmt_stack and name_declared.
15859         (current_scope_stmt_stack): Remove.
15860         (function_name_declared_p): New macro.
15861         (struct lang_decl_flags): Use c_lang_decl as a base class.
15862         (context): Remove.
15863         (struct lang_decl): Replace saved_tree with context.
15864         (DECL_FRIEND_CONTEXT): Adjust accordingly.
15865         (SET_DECL_FRIEND_CONTEXT): Likewise.
15866         (DECL_VIRTUAL_CONTEXT): Likewise.
15867         (DECL_SAVED_TREE): Remove.
15868         (C_DECLARED_LABEL_FLAG): Likewise.
15869         (cplus_expand_expr_stmt): Don't declare.
15870         (add_decl_stmt): Likewise.
15871         (add_scope_stmt): Likewise.
15872         * decl.c (mark_stmt_tree): Remove.
15873         (case_compare): Likewise.
15874         (finish_case_label): Use c_add_case_label.
15875         (init_decl_processing): Set more language-specific hooks.
15876         (build_enumerator): Fix typo in comment.
15877         (cplus_expand_expr_stmt): Remove.
15878         (mark_lang_function): Use mark_c_language_function.
15879         (lang_mark_tree): Use c_mark_lang_decl.
15880         * decl2.c: Change order of inclusion.
15881         * except.c: Likewise.
15882         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
15883         back on c_expand_expr.
15884         * friend.c: Include expr.h.
15885         * init.c: Change order of inclusion.
15886         * Makefile.in: Update dependencies.
15887         * lex.h (free_lang_decl_chain): Remove.
15888         * optimize.c (maybe_clone_body): Use function_name_declared_p.
15889         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
15890         it doesn't exist.
15891         (instantiate_decl): Use function_name_declared_p.
15892         * semantics.c (lang_expand_expr_stmt): Remove.
15893         (set_current_function_name_declared): Likewise.
15894         (current_function_name_declared): Likewise.
15895         (begin_compound_stmt): Use function_name_declared_p.
15896         (add_decl_stmt): Remove.
15897         (setup_vtbl_ptr): Use function_name_declared_p.
15898         (add_scope_stmt): Remove.
15899         (current_scope_stmt_stack): New function.
15900         (cp_expand_stmt): Don't handle SCOPE_STMTs.
15901         (expand_body): Use function_name_declared_p.
15902         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
15903         * typeck.c: Change order of includes.
15904         (convert_sequence): Remove.
15905
15906 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
15907
15908         * lex.c (reswords): Add _Complex.
15909
15910 2000-09-14  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15911
15912         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
15913
15914 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
15915
15916         * init.c (begin_init_stmts): Don't use // comments.
15917
15918 2000-09-12  Jason Merrill  <jason@redhat.com>
15919
15920         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
15921         all non-extern arrays.
15922
15923         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
15924         typenames, too.  Downgrade complaint to pedwarn.
15925         (xref_tag): Warn about surprising behavior of 'friend struct T'.
15926         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
15927         'class This::Inherited'.
15928
15929 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
15930
15931         * decl.c (finish_case_label): Given the LABEL_DECL a
15932         DECL_CONTEXT.
15933
15934 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
15935
15936         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
15937         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
15938         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
15939         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
15940         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
15941         New macros.
15942         (sorry_for_unsupported_tree, print_scope_operator,
15943         print_left_paren, print_right_paren, print_left_bracket,
15944         print_right_bracket, print_whitespace): Likewise.
15945         (aggr_variety): Rename to class_key_or_enum.
15946         (print_type): Rename to print_type_id.
15947         (print_type_specifier_seq, print_simple_type_specifier,
15948         print_elaborated_type_specifier,
15949         print_rest_of_abstract_declarator,
15950         print_parameter_declaration_clause, print_exception_specification,
15951         print_nested_name_specifier, print_template_id,
15952         typedef_original_name,  print_template_argument_list_start,
15953         print_template_argument_list_end): New functions.
15954
15955 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
15956
15957         * ir.texi: Add more documentation.
15958
15959 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
15960
15961         * cp-tree.h (struct saved_scope): Remove x_function_parms.
15962         (current_function_parms): Don't define.
15963         (struct cp_language_function): Remove parms_stored.
15964         (current_function_just_assigned_this): Don't define.
15965         (current_function_parms_stored): Likewise.
15966         (static_ctors): Declare.
15967         (static_dtors): Likewise.
15968         (SF_EXPAND): Don't define.
15969         (expand_start_early_try_stmts): Remove declaration.
15970         (store_parm_decls): Likewise.
15971         * decl.c (static_ctors): Don't declare.
15972         (static_dtors): Likewise.
15973         (struct binding_level): Remove this_block.
15974         (poplevel): Remove dead code.
15975         (set_block): Likewise.
15976         (mark_binding_level): Don't mark this_block.
15977         (mark_saved_scope): Don't mark x_function_parms.
15978         (init_decl_processing): Don't add current_function_parms as a GC
15979         root.
15980         (check_function_type): Change prototype.
15981         (start_function): Remove RTL-generation code.
15982         (expand_start_early_try_stmts): Remove.
15983         (store_parm_decls): Give it internal linkage.  Remove
15984         RTL-generation code.
15985         (finish_function): Remove RTL-generation code.
15986         * decl2.c (static_ctors): Fix formatting.
15987         (static_dtors): Likewise.
15988         * method.c (use_thunk): Don't call store_parm_decls.
15989         (synthesize_method): Likewise.
15990         * optimize.c (maybe_clone_body): Likewise.
15991         * parse.y (fn.def2): Likewise.
15992         (.set_base_init): Likewise.
15993         (nodecls): Likewise.
15994         * pt.c (instantiate_decl): Likewise.
15995         * rtti.c (synthesize_tinfo_fn): Likewise.
15996         * semantics.c (genrtl_try_block): Simplify.
15997         (expand_body): Use genrtl_start_function and
15998         genrtl_finish_function.
15999         (genrtl_start_function): New function.
16000         (genrtl_finish_function): Likewise.
16001
16002 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
16003
16004         * error.c (cp_tree_printer, case 'P'): Append break.
16005
16006 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
16007
16008         * cp-tree.h (frob_opname): Declare.
16009         * parse.y (saved_scopes): New static variable.
16010         (cp_parse_init): Adjust.
16011         (do_id): If lastiddecl is NULL, do do_identifier.
16012         (operator): Save scope information.
16013         (unoperator): New reduction. Restore scope information.
16014         (operator_name): Append unoperator. Call frob_opname.
16015         * spew.c (frob_opname): Define.
16016
16017 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
16018
16019         * decl.c, rtti.c: Include defaults.h if not already included.
16020         Don't define the *_TYPE_SIZE macros.
16021
16022 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
16023
16024         * cp-tree.h (push_switch): Change prototype.
16025         (check_cp_case_value): Remove declaration.
16026         (decl_constant_value): Likewise.
16027         * decl.c (struct cp_switch): Add switch_stmt and cases.
16028         (case_compare): New function.
16029         (push_switch): Set switch_stmt.  Initialize cases.
16030         (pop_switch): Clean up cases.
16031         (define_case_label): Rename to ...
16032         (finish_case_label): ... this.  Do semantic analysis for case
16033         labels here.
16034         (start_function): Correct comment.
16035         * decl2.c (check_cp_case_value): Remove.
16036         * expr.c (do_case): Remove.
16037         * pt.c (tsubst_expr): Adjust call to finish_case_label.
16038         * semantics.c (genrtl_do_poplevel): Remove declaration.
16039         (RECHAIN_STMTS): Remove.
16040         (finish_break_stmt): Use build_break_stmt.
16041         (finish_continue_stmt): Use build_continue_stmt.
16042         (finish_switch_cond): Adjust condition here, rater than in
16043         c_expand_start_case.
16044         (finish_case_label): Remove.
16045         * typeck.c (c_expand_return): Remove.
16046         (c_expand_start_case): Likewise.
16047
16048 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
16049
16050         * ir.texi: Document type nodes.
16051
16052 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
16053
16054         * cp-tree.h (init_cp_semantics): Declare.
16055         (genrtl_try_block): Don't declare.
16056         (genrtl_handler): Likewise.
16057         (genrtl_catch_block): Likewise.
16058         (genrtl_ctor_stmt): Likewise.
16059         (genrtl_subobject): Likewise.
16060         (genrtl_do_poplevel): Likewise.
16061         (genrtl_named_return_value): Likewise.
16062         * lex.c (init_parse): Call init_cp_semantics.
16063         * semantics.c (genrtl_try_block): Give it internal linkage.
16064         (genrtl_handler): Likewise.
16065         (genrtl_catch_block): Likewise.
16066         (genrtl_ctor_stmt): Likewise.
16067         (genrtl_subobject): Likewise.
16068         (genrtl_do_poplevel): Likewise.
16069         (genrtl_named_return_value): Likewise.
16070         (lang_expand_stmt): Rename to ...
16071         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
16072         (init_cp_semantics): Define.
16073
16074         * decl.c (initialize_local_var): Remove RTL-generating code.
16075         * semantics.c (genrtl_try_block): Fix formatting.
16076
16077         Move statement-tree facilities from C++ to C front-end.
16078         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
16079         (void_zero_node): Remove.
16080         (stmt_tree): Likewise.
16081         (scope_chain): Adjust.
16082         (language_function): Rename to cp_language_function.
16083         (cp_function_chain): Adjust.
16084         (current_stmt_tree): Remove.
16085         (last_tree): Likewise.
16086         (last_expr_type): Likewise.
16087         (struct lang_decl): Adjust.
16088         (STMT_IS_FULL_EXPR_P): Remove.
16089         (add_tree): Remove.
16090         (begin_stmt_tree): Likewise.
16091         (finish_stmt_tree): Likewise.
16092         (walk_tree_fn): Likewise.
16093         (walk_stmt_tree): Likewise.
16094         * class.c (finish_struct): Replace use of add_tree with add_stmt.
16095         * decl.c (mark_stmt_tree): Adjust type.
16096         (init_decl_processing): Don't build void_zero_node.
16097         (initialize_local_var): Adjust usage of current_stmt_tree.
16098         (finish_enum): Use add_stmt, not add_tree.
16099         (save_function_data): Adjust use of language_function.
16100         (finish_constructor_body): Use add_stmt, not add_tree.
16101         (finish_destructor_body): Likewise.
16102         (push_cp_function_context): Adjust use of language_function.
16103         (pop_cp_function_context): Likewise.
16104         (mark_lang_function): Likewise.
16105         (mark_cp_function_context): Likewise.
16106         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
16107         (build_vec_init): Likewise.
16108         * semantics.c (SET_LAST_STMT): Remove.
16109         (RECHAIN_STMTS): Don't use it.
16110         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
16111         (current_stmt_tree): Define.
16112         (add_tree): Remove.
16113         (finish_goto_stmt): Use add_stmt, not add_tree.
16114         (finish_expr_stmt): Likewise.
16115         (begin_if_stmt): Likewise.
16116         (finish_then_clause): Likewise.
16117         (begin_while_stmt): Likewise.
16118         (begin_do_stmt): Likewise.
16119         (finish_return_stmt): Likewise.
16120         (begin_for_stmt): Likewise.
16121         (finish_break_stmt): Likewise.
16122         (finish_continue_stmt): Likewise.
16123         (begin_switch_stmt): Likewise.
16124         (finish_case_label): Likewise.
16125         (begin_try_block): Likewise.
16126         (begin_function_try_block): Likewise.
16127         (begin_handler): Likewise.
16128         (begin_catch_block): Likewise.
16129         (begin_compound_stmt): Likewise.
16130         (begin_asm_stmt): Likewise.
16131         (finish_asm_stmt): Likewise.
16132         (finish_label_stmt): Likewise.
16133         (add_decl_stmt): Likewise.
16134         (finish_subobject): Likewise.
16135         (finish_decl_cleanup): Likewise.
16136         (finish_named_return_value): Likewise.
16137         (setup_vtbl_ptr): Likewise.
16138         (add_scope_stmt): Likewise.
16139         (finish_stmt_expr): Likewise.
16140         (prune_unused_decls): Remove.
16141         (begin_stmt_tree): Likewise.
16142         (finish_stmt_tree): Likewise.
16143         (prep_stmt): Adjust use of current_stmt_tree.
16144         (lang_expand_stmt): Likewise.
16145         * tree.c (statement_code_p): Remove.
16146         (cp_statement_code_p): New function.
16147         (walk_stmt_tree): Remove.
16148         (init_tree): Set lang_statement_code_p.
16149
16150 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
16151
16152         Integrated preprocessor.
16153
16154         * Make-lang.in, Makefile.in: Remove all references to input.c,
16155         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
16156         * gxx.gperf, hash.h, input.c: Delete.
16157         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
16158         initialized properly.
16159
16160         * class.c (fixup_pending_inline): Take a tree, not a
16161         struct pending_inline *.  All callers changed.
16162         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
16163         RID_PROTECTED entries in ridpointers[] array here.
16164         * decl.c (duplicate_decls): Do not refer to struct
16165         pending_inline.
16166         (record_builtin_type, init_decl_processing): Use RID_MAX not
16167         CP_RID_MAX.
16168         (grokdeclarator): Use C_IS_RESERVED_WORD.
16169         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
16170         cpplib.
16171         (grok_x_components): Do not inspect pending_inlines chain.
16172
16173         * cp-tree.h (struct lang_identifier): Add rid_code entry.
16174         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
16175         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
16176         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
16177         TIME_IDENTIFIER_FILEINFO): Kill.
16178         Update prototypes.
16179         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
16180         single 32-bit word.
16181         * parse.y: Call do_pending_inlines unconditionally.
16182         reinit_parse_for_method is now snarf_method.  fn.defpen is no
16183         longer necessary.  Remove unnecessary <itype> annotation on
16184         SCOPE.  Do not refer to end_of_file or struct pending_inline.
16185         * semantics.c (begin_inline_definitions): Call
16186         do_pending_inlines unconditionally.
16187
16188         * lex.c: Remove all code now shared with C front end.
16189         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
16190         into the get_identifier table.  Rewrite pragma handling to
16191         work with the registry.  Move code to save tokens for later
16192         processing to spew.c.
16193
16194         * spew.c: Rewrite everything in terms of token streams instead
16195         of text.  Move routines here from lex.c / input.c as
16196         appropriate.  GC-mark trees hanging off the pending inlines
16197         chain.
16198
16199 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
16200
16201         * NEWS: Mention that the named return value extension has been
16202         deprecated.
16203         * cp-tree.h (original_result_rtx): Define.
16204         (TREE_REFERENCE_EXPR): Remove.
16205         (DECL_VPARENT): Likewise.
16206         (pushdecl_nonclass_level): Likewise.
16207         (store_return_init): Likewise.
16208         (reinit_lang_specific): Likewise.
16209         (genrtl_named_return_value): Change prototype.
16210         * decl.c (original_result_rtx): Remove.
16211         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
16212         Do not generate RTL for local variables here.
16213         (store_return_init): Remove.
16214         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
16215         store_return_init.
16216         (finish_named_return_value): Adjust accordingly.  Warn that this
16217         extension is deprecated.
16218         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
16219
16220 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
16221
16222         * pt.c (type_unification_real): Replace switch with if.
16223         (unify): Tsubst non-type parms before comparing.
16224
16225 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
16226
16227         * error.c (dump_typename): New function, broken out of ...
16228         (dump_type): ... here. Use it.
16229         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
16230
16231 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
16232
16233         * init.c (build_offset_ref): Deal with namespace scoped
16234         TEMPLATE_ID_EXPRs.
16235
16236 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
16237
16238         * class.c (resolve_address_of_overloaded_function): Add
16239         explanation message.
16240         * decl.c (define_case_label): Reformat explanation.
16241         * decl2.c (finish_static_data_member_decl): Likewise.
16242         (grokfield): Likewise.
16243         * friend.c (do_friend): Likewise.
16244
16245 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
16246
16247         * tree.c (walk_tree): Expose tail recursion.
16248         (walk_stmt_tree): New function.
16249         * cp-tree.h: Prototype walk_stmt_tree.
16250         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
16251         the BLOCKs directly.  If a BLOCK has no variables after
16252         pruning, discard it.
16253         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
16254         restore the line number.
16255
16256 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
16257
16258         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
16259         (pt.o): Remove dependency on HTAB_H.
16260         * cp-tree.h: Include hashtab.h.
16261         (walk_tree): Change prototype.
16262         (walk_tree_without_duplicates): New function.
16263         * decl.c (check_default_argument): Use it.
16264         * optimize.c (remap_decl): Adjust calls to walk_tree.
16265         (copy_body): Likewise.
16266         (expand_calls_inline): Likewise.
16267         (calls_setjmp_p): Use walk_tree_without_duplicates.
16268         * pt.c: Don't include hashtab.h.
16269         (for_each_template_parm): Use walk_tree_without_duplicates.
16270         * semantics.c (finish-stmt_tree): Likewise.
16271         (expand_body): Likewise.
16272         * tree.c (walk_tree): Add additional parameter.
16273         (walk_tree_without_duplicates): New function.
16274         (count_trees): Use it.
16275         (verify_stmt_tree): Adjust call to walk_tree.
16276         (find_tree): Use walk_tree_without_duplicates.
16277         (no_linkage_check): Likewise.
16278         (break_out_target_exprs): Adjust call to walk_tree.
16279         (cp_unsave): Likewise.
16280
16281 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
16282
16283         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
16284         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
16285         * cp-tree.h (TYPE_BINFO): Adjust comment.
16286         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
16287         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
16288         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
16289         (TYPE_TEMPLATE_INFO): Likewise.
16290         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
16291         * class.c (push_nested_class): Likewise.
16292         * decl.c (lookup_name_real): Likewise.
16293         (grokdeclarator): Likewise.
16294         (grok_op_properties): Likewise.
16295         (xref_tag): Likewise.
16296         (xref_basetypes): Likewise.
16297         * decl2.c (constructor_name_full): Likewise.
16298         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
16299         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
16300         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
16301         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16302         (dump_type_suffix): Likewise.
16303         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
16304         instead.
16305         (get_aggr_from_typedef): Likewise.
16306         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
16307         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16308         (write_template_parm): Likewise.
16309         (write_template_template_parm): Check tree code instead of
16310         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
16311         * method.c (build_overload_nested_name): Add
16312         BOUND_TEMPLATE_TEMPLATE_PARM.
16313         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
16314         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16315         * pt.c (convert_template_argument): Check tree code instead of
16316         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
16317         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
16318         (for_each_template_parm): Adjust comment.
16319         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
16320         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16321         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
16322         template_args_equal to compare template template parameter cases.
16323         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16324         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
16325         instead.
16326         * tree.c (copy_template_template_parm): Decide whether to create
16327         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
16328         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16329         (copy_tree_r): Likewise.
16330         * typeck.c (comptypes): Likewise.  Check tree code instead of
16331         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
16332
16333 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
16334
16335         * decl.c (finish_function): Move the code for handling functions
16336         marked with the constructor and destructor attributes inside the
16337         expand_p block.
16338
16339 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
16340
16341         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
16342
16343 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
16344
16345         * pt.c (lookup_template_class): Remove abort.
16346         * tree.c (get_type_decl): Allow error_mark_node.
16347
16348 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
16349
16350         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
16351         TEMPLATE_ID_EXPRs.
16352
16353 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
16354
16355         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
16356         new ABI mangling.
16357
16358 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
16359
16360         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
16361         union tag mismatch error reporting.
16362
16363 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
16364
16365         * call.c (build_scoped_method_call): Check it is not a namespace.
16366
16367 2000-08-30  Jason Merrill  <jason@redhat.com>
16368
16369         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
16370
16371         * tree.c (bot_manip): Check TREE_CONSTANT rather than
16372         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
16373         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
16374
16375         * decl.c (start_function): Always call make_function_rtl.
16376
16377 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
16378
16379         * semantics.c (prune_unused_decls): New function.
16380         (finish_stmt_tree): Call it via walk_tree.
16381
16382 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
16383
16384         * class.c (build_secondary_vtable): Constify a char *.
16385         * decl.c (init_decl_processing): Initialize function_id_node,
16386         pretty_function_id_node, and func_id_node.
16387         * input.c (struct input_source): Constify 'str'.
16388         (feed_input): Constify first argument.
16389         * mangle.c (write_identifier): Constify argument.
16390         * pt.c (mangle_class_name_for_template): Constify argument.
16391
16392 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
16393
16394         * typeck.c (mark_addressable): Remove code that pokes around in
16395         RTL.
16396
16397 2000-08-28  Jason Merrill  <jason@redhat.com>
16398
16399         * lex.c (file_name_nondirectory): Move to toplev.c.
16400
16401         * cp-tree.h (LOCAL_CLASS_P): New macro.
16402         * class.c (finish_struct_1): Use it.
16403
16404 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
16405
16406         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
16407         (write_encoding): Pass another argument to write_name.
16408         (write_name): Add ignore_local_scope parameter.  Fix handling of
16409         local names.
16410         (write_nested_name): Use write_unqualified_name.
16411         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
16412         (write_template_prefix): Use write_unqualified_name.
16413         (write_component): Remove.
16414         (write_local_name): Add parameter.  Use direct local entity to
16415         discriminator calculation.
16416         (write_class_enum_type): Pass another argument to write_name.
16417         (write_template_template_arg): Likewise.
16418         (make_guard_variable): Likewise.
16419
16420 2000-08-27  Jason Merrill  <jason@redhat.com>
16421
16422         * decl.c (pushdecl): Matching decls for local externs are found in
16423         the current level.  Propagate linkage information from previous
16424         declarations.
16425
16426 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
16427
16428         * ir.texi (Expressions): Fix typo.
16429
16430 2000-08-25  Greg McGary  <greg@mcgary.org>
16431
16432         * tree.c (init_tree): Use ARRAY_SIZE.
16433
16434 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
16435
16436         * error.c (cp_tree_printer): Rework.
16437
16438 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
16439
16440         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
16441         dyn-string.o.
16442         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
16443         (cp-demangle.o): Remove target.
16444         (dyn-string.o): Likewise.
16445
16446         * decl.c (grokfndecl): Require that `main' return an `int'.
16447         * mangle.c (write_encoding): Don't mangle return types for
16448         conversion functions.
16449
16450 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
16451
16452         * error.c (tree_formatting_info): New data type.
16453         (tree_being_formatted): New macro.
16454         (tree_formatting_flags): Likewise.
16455         (put_whitespace): Likewise.
16456         (print_tree_identifier): Likewise.
16457         (print_identifier): Likewise.
16458         (cp_tree_printer, print_function_argument_list, print_declaration,
16459         print_expression, print_function_declaration,
16460         print_function_parameter, print_type, print_cv_qualifier): New
16461         functions.
16462         (init_error): Initialize lang_printer.
16463
16464 2000-08-24  Jason Merrill  <jason@redhat.com>
16465
16466         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
16467         adjustment necessary.
16468
16469 2000-08-24  Greg McGary  <greg@mcgary.org>
16470
16471         * cp-tree.h (MAIN_NAME_P): Remove macro.
16472
16473 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
16474
16475         * error.c (print_instantiation_context): Don't forget to flush the
16476         buffer.
16477
16478 2000-08-23  Jason Merrill  <jason@redhat.com>
16479
16480         * typeck.c (build_ptrmemfunc): Save the input pmf.
16481
16482         * method.c (process_modifiers): Use same_type_p.
16483
16484 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
16485
16486         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
16487         * mangle.c (write_function_type): Change prototype.
16488         (write_encoding): Don't mangle return types for
16489         constructors or destructors.
16490         (write_type): Adjust call to write_function_type.
16491         * pt.c (instantiate_template): Instantiate alternate entry points
16492         when instantiating the main function.
16493
16494 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
16495
16496         * error.c (cp_print_error_function): Don't use embedded '\n' in
16497         output_printf.
16498
16499 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
16500
16501         * decl.c (init_decl_processing): Remove bogus initialization.
16502         * error.c (lang_print_error_function): Restore here.
16503         (init_error): Initialize print_error_function.
16504
16505 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
16506
16507         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
16508
16509 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
16510
16511         * Makefile.in (error.o): Depends on diagnostic.h
16512
16513         * cp-tree.h (problematic_instantiation_changed,
16514         record_last_problematic_instantiation, current_instantiation,
16515         print_instantiation_context): Declare.
16516         (maybe_print_template_context): Remove.
16517
16518         * decl.c (init_decl_processing): Set print_error_function to NULL.
16519         (lang_print_error_function): Remove, since we're using a new
16520         machinery.
16521
16522         * error.c: #include diagnostic.h
16523         (function_category): New function.
16524         (cp_diagnostic_starter): Likewise.
16525         (cp_diagnostic_finalizer): Likewise.
16526         (cp_print_error_function): Likewise.
16527         (maybe_print_instantiation_context): Likewise.
16528         (print_instantiation_full_context): Likewise.
16529         (print_instantiation_partial_context): Likewise.
16530         (print_instantiation_context): Define.
16531         (init_error): Initialize diagnostic pager and finalizer.
16532
16533         * pt.c (problematic_instantiation_changed): Define.
16534         (record_last_problematic_instantiation): Likewise.
16535         (current_instantiation): Likewise.
16536         (maybe_print_template_context): Remove.
16537         (print_template_context): Likewise.
16538         (current_tinst_level): Make static to reflect Brendan Kehoe's
16539         change of 1995-04-13.
16540         (push_tinst_level): Call print_instantiation_context.
16541
16542 2000-08-21  Nix  <nix@esperi.demon.co.uk>
16543
16544         * lang-specs.h: Do not process -o or run the assembler if
16545         -fsyntax-only.
16546
16547 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
16548
16549         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
16550         variables.
16551         * decl2.c (lang_decode_option): Disable gettext attributes for
16552         -ansi.
16553
16554 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
16555
16556         * lex.c (lang_init_options): Default diagnostic message maximum
16557         length to 80, when line-wrapping.
16558
16559 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
16560
16561         * class.c (build_vtbl_initializer): Clear the entire
16562         vtbl_init_data.  Start keeping track of the functions for which we
16563         have created vcall offsets here.
16564         (dfs_build_vcall_offset_vtbl_entries): Remove.
16565         (build_vcall_offset_vtbl_entries): Reimplement.
16566         (add_vcall_offset_vtbl_entries_r): New function.
16567         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
16568         computing when vcall offsets are necessary.
16569
16570 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
16571
16572         * decl.c (member_function_or_else): Use cp_error ... %T.
16573         (grokdeclarator): Likewise.
16574         (start_method): Likewise.
16575         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
16576
16577 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
16578
16579         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
16580         TYPE_DECLs.
16581
16582 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
16583
16584         * cp-tree.h (PTRMEM_OK_P): New macro.
16585         (itf_ptrmem_ok): New enumeration value.
16586         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
16587         argument. Diagnose implicit pointer to member.
16588         (instantiate_type): Don't diagnose implicit pointer to member
16589         here. Pass itf_ptrmem_ok if ok. Adjust calls to
16590         resolve_address_of_overloaded_function.
16591         * init.c (build_offset_ref): Set PTRMEM_OK_P.
16592         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
16593         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
16594         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
16595         (build_unary_op): Deal with single non-static member in
16596         microsoft-land.
16597
16598 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
16599
16600         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
16601
16602 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
16603
16604         * cp-tree.h (enum_name_string): Remove prototype.
16605         (report_case_error): Remove prototype.
16606         * cp/typeck2.c (enum_name_string): Remove.
16607         (report_case_error): Remove.
16608         * error.c (dump_expr): Deal with enum values directly.
16609         Correctly negate integer constant.
16610
16611 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
16612
16613         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
16614         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
16615         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
16616         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
16617         (__cxa_vec_new): Use __cxa_vec_new2.
16618         (__cxa_vec_delete): Use __cxa_vec_delete2.
16619
16620 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
16621
16622         * vec.cc (__cxa_vec_new): Set "C" linkage.
16623         (__cxa_vec_ctor): Likewise.
16624         (__cxa_vec_cctor): Likewise.
16625         (__cxa_vec_dtor): Likewise.
16626         (__cxa_vec_delete): Likewise.
16627         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
16628         (__cxa_vec_ctor): Likewise.
16629         (__cxa_vec_cctor): Likewise.
16630         (__cxa_vec_dtor): Likewise.
16631         (__cxa_vec_delete): Likewise.
16632
16633 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
16634
16635         * class.c (instantiate_type): Reinstate local variable
16636         deleted in previous change.
16637
16638         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
16639         itf_no_attributes.
16640
16641 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
16642
16643         * cp-tree.h (instantiate_type_flags): New enumeration.
16644         (instantiate_type): Change parameter.
16645         * class.c (instantiate_type): Adjust prototype. Adjust.
16646         * call.c (standard_conversion): Adjust instantiate_type call.
16647         (reference_binding): Likewise.
16648         (build_op_delete_call): Likewise.
16649         (convert_like_real): Likewise.
16650         * cvt.c (cp_convert_to_pointer): Likewise.
16651         (convert_to_reference): Likewise.
16652         * pt.c (convert_nontype_argument): Likewise.
16653         * typeck.c (build_binary_op): Likewise.
16654         (build_ptrmemfunc): Likewise.
16655         (convert_for_assignment): Likewise.
16656
16657 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
16658
16659         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
16660         (current_aggr): Define.
16661         * decl.c (grokdeclarator): Make sure a friend class is an
16662         elaborated type specifier.
16663         * parse.y (current_aggr): Remove static definition.
16664         (cp_parse_init): Adjust.
16665         (structsp): Clear and restore current_aggr.
16666         (component_decl_list): Clear current_aggr.
16667
16668         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
16669         aggregate tag on the typename's context.
16670
16671         * pt.c (tsubst_friend_class): Return error_mark_node, if
16672         parms becomes NULL.
16673         (instantiate_class_template): Ignore error_mark_node friend types.
16674
16675 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
16676
16677         * cvt.c (warn_ref_binding): New static function, broken out of ...
16678         (convert_to_reference): ... here. Use it.
16679
16680 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
16681
16682         * parse.y (template_arg): Add rule for template qualified with
16683         global scope.
16684
16685 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16686
16687         * decl2.c (add_function): Reorganize.
16688         (arg_assoc): Do not consider function template decls.
16689
16690 2000-08-11  Jason Merrill  <jason@redhat.com>
16691
16692         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
16693         looking inside.
16694
16695 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
16696
16697         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
16698         (lookup_nested_tag): Likewise.
16699
16700         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
16701         can be produced.
16702
16703 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
16704
16705         * parse.y (named_complex_class_head_sans_basetype): Remove
16706         always true if.
16707
16708 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
16709
16710         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
16711         explicit TEMPLATE_ID_EXPR args.
16712         (build_expr_from_tree, case CALL_EXPR): Likewise.
16713
16714 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
16715
16716         * decl.c (check_tag_decl): Diagnose typename's which don't
16717         declare anything.
16718
16719 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
16720
16721         * init.c (build_aggr_init): Reject bogus array initializers
16722         early.
16723
16724 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
16725
16726         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
16727         runtime.
16728         * cp/tinfo.cc (__dynamic_cast): Likewise.
16729         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
16730
16731 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
16732
16733         * cvt.c (convert_to_pointer_force): Fix error message when
16734         attempting to cast from ambiguous base.
16735
16736 2000-08-08  Jason Merrill  <jason@redhat.com>
16737
16738         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
16739         (tsubst_template_arg_vector): Likewise.
16740
16741         * decl2.c (build_anon_union_vars): Choose the largest field; don't
16742         assume that one will be as large as the union.
16743
16744 2000-08-07  Kazu Hirata  <kazu@hxi.com>
16745
16746         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
16747         * decl.c (pop_labels): Likewise.
16748
16749 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
16750
16751         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
16752         specifications.
16753         (__pointer_to_member_type_info): Likewise.
16754         (__base_class_info): Likewise.
16755         (__class_type_info): Likewise.
16756         (__si_class_type_info): Likewise.
16757         (__vmi_class_type_info): Likewise.
16758         * tinfo.cc (__si_class_type_info::__do_find_public_src):
16759         Changed member names to match specifications.
16760         (__vmi_class_type_info::__do_find_public_src): Likewise.
16761         (__si_class_type_info::__do_dyncast): Likewise.
16762         (__vmi_class_type_info::__do_dyncast): Likewise.
16763         (__si_class_type_info::__do_upcast): Likewise.
16764         (__vmi_class_type_info::__do_upcast): Likewise.
16765         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
16766         (__pbase_type_info::__pointer_catch): Likewise.
16767         (__pointer_type_info::__pointer_catch): Likewise.
16768         (__pointer_to_member_type_info::__pointer_catch): Likewise.
16769
16770 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
16771
16772         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
16773         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
16774         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
16775
16776 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
16777
16778         * cp-tree.h (add_method): Change prototype.
16779         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
16780         Don't double the size of the method vector in the error case.
16781         (handle_using_decl): Adjust call to add_method.
16782         (add_implicitly_declared_members): Likewise.
16783         (clone_function_decl): Likewise.
16784         * decl2.c (check_classfn): Likewise.
16785         * semantics.c (finish_member_declaration): Likewise.
16786
16787 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
16788
16789         * decl.c (flag_isoc94): New variable.
16790
16791 2000-08-02  Jason Merrill  <jason@redhat.com>
16792
16793         * pt.c (do_type_instantiation): Add complain parm; don't complain
16794         if called recursively.
16795         * cp-tree.h, parse.y: Adjust.
16796
16797 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
16798
16799         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
16800         -Wno-strict-prototypes.
16801
16802         * g++spec.c: Adjust type of second argument to
16803         lang_specific_driver, and update code as necessary.
16804
16805         * cp-tree.h: Don't prototype min_precision here.
16806         (my_friendly_assert): Cast expression to void.
16807         * semantics.c (do_poplevel): Initialize scope_stmts.
16808
16809 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
16810
16811         * cp-tree.h (DECL_NEEDED_P): Tweak.
16812
16813 2000-07-28  Jason Merrill  <jason@redhat.com>
16814
16815         * lang-specs.h: Use %i in rule for .ii files.
16816
16817 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
16818
16819         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
16820
16821 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
16822
16823         Allow indirect primary bases.
16824         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
16825         primary_base.
16826         (CLASSTYPE_VFIELD_PARENT): Remove.
16827         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
16828         (BINFO_PRIMARY_BINFO): Remove.
16829         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
16830         (BINFO_VBASE_PRIMARY_P): Likewise.
16831         (BINFO_PRIMARY_BASE_OF): New macro.
16832         (BINFO_INDIRECT_PRIMARY_P): Likewise.
16833         (get_primary_binfo): New function.
16834         * decl.c (lang_mark_tree): Make lang_type::primary_base.
16835         * class.c (vcall_offset_data_s): Rename to ...
16836         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
16837         and add ctor_vtbl_p.
16838         (get_derived_offset): Use get_primary_binfo.
16839         (dfs_mark_primary_bases): Adjust handling of virtual primary
16840         bases.
16841         (mark_primary_bases): Likewise.
16842         (set_primary_base): Take a binfo, not an integer, as a
16843         representation of the primary base.
16844         (indirect_primary_base_p): Remove.
16845         (determine_primary_base): Adjust for indirect primary bases.
16846         (dfs_find_final_overrider): Fix typo in coment.
16847         (update_vtable_entry_for_fn): Use get_primary_binfo.
16848         (layout_nonempty_base_or_field): Tweak.
16849         (build_base_fields): Adjust for new primary base semantics.
16850         (dfs_propagate_binfo_offsets): Remove.
16851         (propagate_binfo_offsets): Rewrite.
16852         (dfs_set_offset_for_shared_vbases): Remove.
16853         (layout_virtual_bases): Don't use it.
16854         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
16855         ABI.
16856         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
16857         CLASSTYPE_VFIELD_PARENT.
16858         (dfs_get_primary_binfo): New function.
16859         (get_primary_binfo): Likewise.
16860         (dump_class_hierarchy_r): Tweak printing of primary bases.
16861         (build_vtbl_initializer): Fix typo in comments.  Use
16862         vtbl_init_data.
16863         (build_vcall_and_vbase_vtbl_entries): Likewise.
16864         (build_vbaes_offset_vtbl_entries): Likewise.
16865         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
16866         BV_VCALL_INDEX to handle indirect primary bases.
16867         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
16868         (build_rtti_vtbl_entries): Likewise.
16869         * search.c (get_shared_vbase_if_not_primary): Tweak.
16870         (find_vbase_instance): Likewise.
16871         (binfo_for_vtable): Simplify.
16872         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
16873         (make_binfo): Make it have 11 entries.
16874
16875 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
16876
16877         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
16878         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
16879         ascertaining primaryness.
16880         (G): Remove template_args.
16881         (decl_is_template_id): New function.
16882         (write_encoding): Use decl_is_template_id.
16883         (write_name): Likewise.  Handle type_decls.  Get main variant of
16884         type decls.
16885         (write_nested_name): Likewise.
16886         (write_prefix): Likewise.
16887         (write_template_prefix): Likewise.
16888         (write_special_name_constructor): Remove defunct production from
16889         comment.
16890         (write_bare_function_type): Remove comment about absent parameter.
16891         (write_template_template_arg): Add missing grammar production to
16892         comment.
16893
16894 2000-07-27  Jason Merrill  <jason@redhat.com>
16895
16896         * decl.c (duplicate_decls): If common_type produces a non-typedef
16897         type for a typedef, just use the old type.
16898
16899 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
16900
16901         * cp-tree.h (function_depth): Declare.
16902         (verify_stmt_tree): Likewise.
16903         (find_tree): Likewise.
16904         * decl.c (function_depth): Give it external linkage.
16905         * optimize.c (optimize_function): Increment and decrement it.
16906         * tree.c (verify_stmt_tree_r): New function.
16907         (verify_stmt_tree): Likewise.
16908         (find_tree_r): Likewise.
16909         (find_tree): Likewise.
16910
16911 2000-07-27  Jason Merrill  <jason@redhat.com>
16912
16913         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
16914         TYPE_PTRMEMFUNC_P.
16915         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
16916
16917 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
16918
16919         * decl.c (start_cleanup_fn): Mark the function as `inline'.
16920         * decl2.c (get_guard): Call cp_finish_decl, not
16921         rest_of_decl_compilation, for local guards.
16922         * lex.c (do_identifier): Remove unused variable.
16923
16924 2000-07-26      Marc Espie <espie@cvs.openbsd.org>
16925
16926         * parse.y:  Add missing ';'.
16927
16928 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
16929
16930         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
16931         of `extern "C++"'.
16932
16933 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
16934
16935         Kill strict_prototype. Backwards compatibility only for
16936         non NO_IMPLICIT_EXTERN_C systems.
16937         * cp-tree.h (flag_strict_prototype): Remove.
16938         (strict_prototype): Remove.
16939         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
16940         * decl.c (maybe_push_to_top_level): Adjust.
16941         (pop_from_top_level): Adjust.
16942         (decls_match): Only allow sloppy parm matching for ancient
16943         system headers.
16944         (init_decl_processing): Adjust.
16945         (grokdeclarator): Adjust.
16946         * decl2.c (flag_strict_prototype): Remove.
16947         (strict_prototype): Remove.
16948         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
16949         (lang_f_options): Remove "strict-prototype".
16950         (unsupported-options): Add "strict-prototype".
16951         * lex.c (do_identifier): Adjust.
16952         (do_scoped_id): Adjust.
16953         * parse.y (empty_parms): Adjust.
16954         * class.c (push_lang_context): Adjust.
16955         (pop_lang_context): Adjust.
16956         * typeck.c (comp_target_parms): Adjust.
16957
16958 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
16959
16960         * decl.c (poplevel): Deal with anonymous variables at for scope.
16961         (maybe_inject_for_scope_var): Likewise.
16962
16963 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
16964
16965         * decl.c: Remove all signal handling code, now done in toplev.c.
16966
16967 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
16968
16969         * decl.c (make_rtl_for_nonlocal_decl): Rework.
16970
16971         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
16972         correctly.
16973
16974 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
16975
16976         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
16977         Define my_friendly_assert and my_friendly_abort as macros
16978         which may call friendly_abort.  Prototype friendly abort, not
16979         my_friendly_abort or my_friendly_assert.
16980         * decl.c (signal_catch): Report the signal caught in the error
16981         message.  Call fatal directly.
16982         * typeck2.c (ack, my_friendly_assert): Delete.
16983         (my_friendly_abort): Rename to friendly_abort.  Expect file,
16984         line, and function parameters.  Report the abort code, then
16985         call fancy_abort.  Do not mask an abort if errors have
16986         already occurred.
16987
16988 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
16989
16990         * typeck.c (comp_target_parms): Remove obsolete parameter.
16991         (comp_target_types): Adjust.
16992
16993 2000-07-17  Jason Merrill  <jason@redhat.com>
16994
16995         * typeck.c (mark_addressable): Never set TREE_USED.
16996         * call.c (build_call): Don't abort on calls to library functions
16997         that have been declared normally.
16998
16999         * typeck.c (build_binary_op): Fix grammar in warning.
17000
17001         * exception.cc (__eh_free): Fix prototype.
17002
17003         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
17004
17005         * decl.c (pushdecl): Handle seeing an OVERLOAD in
17006         IDENTIFIER_NAMESPACE_VALUE.
17007
17008 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
17009
17010         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
17011         * method.c (use_thunk): Correct handling of vcall offsets.
17012
17013 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
17014
17015         * .cvsignore: parse.h and parse.c have no cp- prefix.
17016
17017 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
17018
17019         * .cvsignore: New file.
17020
17021 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
17022
17023         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
17024
17025 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
17026
17027         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
17028         * parse.c: Remove.
17029         * parse.h: Likewise.
17030
17031 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
17032
17033         * class.c (layout_class_type): Add pointers to virtual bases after
17034         base classes under the old ABI.
17035
17036 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
17037
17038         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
17039         (finish_continue_stmt): Likewise.
17040         (begin_for_stmt): Remove call to note_level_for_for.
17041         (finish_goto_stmt): Change call from build_min_nt
17042         to build_stmt.
17043         (finish_expr_stmt): Likewise.
17044         (begin_if_stmt): Likewise.
17045         (begin_while_stmt): Likewise.
17046         (finish_while_stmt): Likewise.
17047         (finish_return_stmt): Likewise.
17048         (begin_for_stmt): Likewise.
17049         (finish_for_stmt): Likewise.
17050         (finish_break_stmt): Likewise.
17051         (begin_switch_stmt): Likewise.
17052         (finish_case_label): Likewise.
17053         (genrtl_try_block): Likewise.
17054         (begin_try_block): Likewise.
17055         (begin_handler): Likewise.
17056         (begin_compound_stmt): Likewise.
17057         (finish_asm_stmt): Likewise.
17058         (finish_label_stmt): Likewise.
17059         (add_decl_stmt): Likewise.
17060         (finish_subobject): Likewise.
17061         (finish_decl_cleanup): Likewise.
17062         (finish_named_return_value): Likewise.
17063         (setup_vtbl_ptr): Likewise.
17064         (add_scope_stmt): Likewise.
17065         * decl.c (finish_constructor_body): Likewise.
17066         (finish_destructor_body): Likewise.
17067         * optimize.c (copy_body_r): Likewise.
17068         (initialize_inlined_parameters): Likewise.
17069         (declare_return_variable): Likewise.
17070         (expand_call_inline): Likewise.
17071
17072 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
17073
17074         * semantics.c (expand_body): Sync interface information
17075         at the end of function body expansion.
17076
17077 2000-07-09  Jason Merrill  <jason@redhat.com>
17078
17079         * init.c (build_new_1): Bail early if the call to new fails.
17080
17081         * decl.c (compute_array_index_type): Check specifically for
17082         an INTEGER_CST, not just TREE_CONSTANT.
17083
17084         * decl.c (duplicate_decls): Don't call duplicate_decls on
17085         the DECL_TEMPLATE_RESULT.
17086         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
17087         codes.
17088
17089         * error.c (dump_template_bindings): Don't crash if we had an
17090         invalid argument list.
17091
17092         * typeck.c (c_expand_start_case): Do narrowing here.
17093         * semantics.c (finish_switch_cond): Not here.
17094
17095 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
17096
17097         * parse.y (asm_clobbers): Do string concatenation.
17098
17099 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
17100
17101         * decl.c (pushtag): Don't put local classes in template functions
17102         on the local_classes list.
17103
17104 2000-07-04  Scott Snyder  <snyder@fnal.gov>
17105
17106         * decl2.c (get_guard): Add missing return for old ABI local
17107         variable case.
17108
17109 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
17110
17111         * cp-tree.h (char_type_p): New function.
17112         * decl.c (init_decl_processing): Don't initialize
17113         signed_wchar_type_node or unsigned_wchar_type_node.
17114         (complete_array_type): Handle brace-enclosed string-constants.
17115         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
17116         * tree.c (char_type_p): New function.
17117         * typeck2.c (digest_init): Use char_type_p.
17118
17119 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
17120
17121         * pt.c (tsubst): Don't layout type, if it's error_mark.
17122
17123 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
17124
17125         * pt.c (instantiate_pending_templates): Reset template level.
17126
17127 2000-07-05  Jason Merrill  <jason@redhat.com>
17128
17129         * call.c (joust): Don't complain about `operator char *()' beating
17130         `operator const char *() const'.
17131
17132 2000-07-04  scott snyder  <snyder@fnal.gov>
17133             Jason Merrill  <jason@redhat.com>
17134
17135         * repo.c (repo_get_id): Handle the case where a class with virtual
17136         bases has a null TYPE_BINFO_VTABLE.
17137
17138 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
17139             Jason Merrill  <jason@redhat.com>
17140
17141         * parse.y (member_init): Just pass in the type.
17142         * init.c (expand_member_init): Handle getting a type.
17143
17144 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17145             Jason Merrill  <jason@redhat.com>
17146
17147         * decl.c (finish_function): Warn if a function has no return
17148         statement.
17149         Suggested by Andrew Koenig.
17150         * typeck.c (check_return_expr): Do set current_function_returns_value
17151         if we got an error_mark_node.
17152
17153 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
17154
17155         * decl2.c (push_decl_namespace): Push the original namespace.
17156
17157 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
17158
17159         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
17160         * semantics.c (begin_class_definition): Clear it.
17161
17162 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
17163
17164         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
17165         (genrtl_expr_stmt): Likewise.
17166         (genrtl_decl_stmt): Likewise.
17167         (genrtl_if_stmt): Likewise.
17168         (genrtl_while_stmt): Likewise.
17169         (genrtl_do_stmt): Likewise.
17170         (genrtl_return_stmt): Likewise.
17171         (genrtl_for_stmt): Likewise.
17172         (genrtl_break_stmt): Likewise.
17173         (genrtl_continue_stmt): Likewise.
17174         (genrtl_scope_stmt): Likewise.
17175         (genrtl_switch_stmt): Likewise.
17176         (genrtl_case_label): Likewise.
17177         (genrtl_begin_compound_stmt): Likewise.
17178         (genrtl_finish_compound_stmt): Likewise.
17179         (genrtl_compound_stmt): Likewise.
17180         (genrtl_asm_stmt): Likewise.
17181
17182         * init.c (begin_init_stmts): Remove call to
17183         genrtl_begin_compound_stmt.
17184         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
17185
17186         * semantics.c (lang_expand_stmt): Changed call to
17187         genrtl_compound_stmt to ignore return value.
17188
17189 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
17190
17191         * mangle.c (canonicalize_for_substitution): Return the canonical
17192         variant of a type.
17193
17194         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
17195         TYPE_DECL.
17196         * typeck.c (commonparms): Remove obstack manipulations.
17197
17198 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
17199
17200         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
17201
17202         * Makefile.in (OBJS): Added ../c-semantics.o.
17203         (OBJDEPS): Likewise.
17204
17205         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
17206         ../c-common.h.
17207         (struct stmt_tree): Added comment.
17208         (current_function_name_declared): Removed.
17209         (stmts_are_full_exprs_p): Likewise.
17210         (genrtl_do_pushlevel): Likewise.
17211         (genrtl_clear_out_block): Likewise.
17212         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
17213         (DECL_ANON_UNION_ELEMS): Likewise.
17214         (emit_local_var): Likewise.
17215         (make_rtl_for_local_static): Likewise.
17216         (do_case): Likewise.
17217         (expand_stmt): Likewise.
17218         (genrtl_decl_cleanup): Likewise.
17219         (c_expand_asm_operands): Likewise.
17220         (c_expand_return): Likewise.
17221         (c_expand_start_case): Likewise.
17222
17223         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
17224         (emit_local_var): Likewise.
17225         (initialize_local_var): Change reference to
17226         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
17227         Change reference to stmts_are_full_exprs_p to
17228         current_stmt_tree->stmts_are_full_exprs_p.
17229         (push_cp_function_context): Likewise.
17230
17231         * expect.c (expand_throw): Change reference to
17232         stmts_are_full_exprs_p.
17233
17234         * init.c (build_aggr_init): Change reference to
17235         stmts_are_full_exprs_p.
17236         (build_vec_init): Likewise.
17237
17238         * optimize.c (maybe_clone_body): Change reference to
17239         current_function_name_declared to
17240         cp_function_chain->name_declared.
17241
17242         * pt.c (instantiate_decl): Change reference to
17243         current_function_name_declared to
17244         cp_function_chain->name_declared.
17245
17246         * semantics.c (expand_cond): Moved declaration to c-common.h.
17247         (genrtl_do_pushlevel): Moved to c-semantics.c.
17248         (genrtl_clear_out_block): Likewise.
17249         (genrtl_goto_stmt): Likewise.
17250         (genrtl_expr_stmt): Likewise.
17251         (genrtl_decl_stmt): Likewise.
17252         (gerntl_if_stmt): Likewise.
17253         (genrtl_while_stmt): Likewise.
17254         (genrtl_do_stmt): Likewise.
17255         (genrtl_return_stmt): Likewise.
17256         (genrtl_for_stmt): Likewise.
17257         (genrtl_break_stmt): Likewise.
17258         (genrtl_continue_stmt): Likewise.
17259         (genrtl_scope_stmt): Likewise.
17260         (genrtl_switch_stmt): Likewise.
17261         (genrtl_case_label): Likewise.
17262         (genrtl_begin_compound_stmt): Likewise.
17263         (genrtl_finish_compound_stmt): Likewise.
17264         (genrtl_compound_stmt): Likewise.
17265         (genrtl_asm_stmt): Likewise.
17266         (genrtl_decl_cleanup): Likewise.
17267         (expand_cond): Likewise.
17268         (expand_stmt): Renamed to ...
17269         (lang_expand_stmt): ... this.
17270         (lang_expand_expr_stmt): Initialize.
17271         (set_current_function_name_declared): Likewise.
17272         (stmts_are_full_exprs_p): Likewise.
17273         (current_function_name_declared): Likewise.
17274         (anon_aggr_type_p): Likewise.
17275         (do_poplevel): Change reference to
17276         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
17277         Change reference to stmts_are_full_exprs_p to
17278         current_stmt_tree->stmts_are_full_exprs_p.
17279         (add_tree): Likewise.
17280         (finish_expr_stmt): Likewise.
17281         (prep_stmt): Likewise.
17282         (lang_expand_stmt): Likewise.
17283         (begin_compound_stmt): Change reference to
17284         current_function_name_declared to
17285         cp_function_chain->name_declared and call to
17286         current_function_name_declared().
17287         (setup_vtbl_ptr): Likewise.
17288         (genrtl_do_poplevel): Removed.
17289
17290 2000-06-30  Jason Merrill  <jason@redhat.com>
17291
17292         * init.c (init_init_processing): Go back to aligning like
17293         double_type_node for old ABI.
17294         (get_cookie_size): Make cookie larger if we get a type that needs
17295         more alignment.
17296         (build_vec_delete): Call it.
17297
17298         * typeck.c (qualify_type_recursive): New fn.
17299         (composite_pointer_type): Use it.
17300         (build_binary_op): Use composite_pointer_type.
17301
17302 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
17303             Jason Merrill  <jason@redhat.com>
17304
17305         * typeck.c (check_return_expr): Don't complain about returning
17306         NULL from operator new if -fcheck-new.
17307         * cp-tree.h: Declare flag_check_new here.
17308         * init.c: Not here.
17309
17310 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
17311
17312         * mangle.c (find_substitution): Use same_type_p.
17313         (write_encoding): Don't check for substitutions.
17314
17315 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
17316
17317         * parse.y (expr_no_comma_rangle): New non-terminal.
17318         (template_parm): Use it for default parameter case.
17319         (template_arg): Use it.
17320         (expr_no_commas): Remove commented out undefined extensions.
17321         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
17322         * parse.h, parse.c: Rebuilt.
17323
17324 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
17325
17326         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
17327         (finish_asm_stmt): Do it here, instead.
17328
17329         * cp-tree.h (ridpointers): Don't declare.
17330         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
17331         (record_builtin_java_type): Likewise.
17332         (init_decl_processing): Likewise.
17333         * lex.c: Move inclusion of lex.h.
17334         (ridpointers): Don't define.
17335         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
17336         RID_MAX.
17337         * lex.h (enum rid): Rename to ...
17338         (enum cp_rid): ... this.
17339         (ridpointers): Don't declare.
17340         * parse.y: Move inclusion of lex.h.
17341         * parse.c: Regenerated.
17342         * spew.c: Move inclusion of lex.h.
17343
17344         * cp-tree.h (struct language_function): Remove temp_name_counter.
17345         (temp_name_counter): Remove.
17346         (get_temp_name): Change prototype.
17347         (get_guard): New function.
17348         (get_guard_cond): Likewise.
17349         (set_guard): Likewise.
17350         * cvt.c (build_up_reference): Adjust call to get_temp_name.
17351         * decl.c (expand_static_init): Use get_guard and friends to
17352         implement guard variables.
17353         * decl2.c (get_temp_name): Assume that the variables created are
17354         always static.
17355         (get_sentry): Rename to ...
17356         (get_guard): ... this.  Implement new ABI guard variables.
17357         (get_guard_bits): New function.
17358         (get_guard_cond): Likewise.
17359         (set_guard): Likewise.
17360         (start_static_initialization_or_destruction): Use them.
17361         (do_static_initialization): Replace sentry with guard throughout.
17362         (do_static_destruction): Likewise.
17363         * init.c (create_temporary_var): Add comment.
17364
17365 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
17366
17367         * mangle.c (find_substitution): Use same_type_p.
17368         (write_encoding): Don't check for substitutions.
17369
17370 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
17371
17372         * parse.y (expr_no_comma_rangle): New non-terminal.
17373         (template_parm): Use it for default parameter case.
17374         (template_arg): Use it.
17375         (expr_no_commas): Remove commented out undefined extensions.
17376         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
17377         * parse.h, parse.c: Rebuilt.
17378
17379 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
17380
17381         * cp-tree.h (flag_const_strings): Remove.
17382         (warn_parentheses): Likewise.
17383         (warn_format): Likewise.
17384         (common_type): Likewise.
17385         (default_conversion): Likewise.
17386         (build_binary_op): Likewise.
17387         (cp_build_binary_op): New macro.
17388         * call.c (build_new_op): Use cp_build_binary_op instead of
17389         build_binary_op.
17390         * class.c (build_vtable_entry_ref): Likewise.
17391         * decl.c (expand_static_init): Likewise.
17392         (compute_array_index_type): Likewise.
17393         (build_enumerator): Likewise.
17394         * decl2.c (delete_sanity): Likewise.
17395         (start_static_initialization_or_destruction): Likewise.
17396         * error.c (dump_type_suffix): Likewise.
17397         * init.c (resolve_offset_ref): Likewise.
17398         (build_new): Likewise.
17399         (build_new_1): Likewise.
17400         (build_vec_delete_1): Likewise.
17401         (build_vec_init): Likewise.
17402         (build_delete): Likewise.
17403         * rtti.c (synthesize_tinfo_fn): Likewise.
17404         (synthesize_tinfo_var): Likewise.
17405         * search.c (expand_upcast_fixups): Likewise.
17406         (fixup_all_virtual_upcast_offsets): Likewise.
17407         * typeck.c (build_array_ref): Likewise.
17408         (get_member_function_from_ptrfunc): Likewise.
17409         (build_binary_op): Add parameter.
17410         (pointer_int_sum): Use cp_build_binary_op.
17411         (pointer_diff): Likewise.
17412         (build_modify_expr): Likewise.
17413         (get_delta_difference): Likewise.
17414         (build_ptrmemfunc): Likewise.
17415
17416 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
17417
17418         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
17419         * decl.c (create_implicit_typedef): Adjust.
17420         * decl2.c (build_artificial_parm): Adjust.
17421         * method.c (implicitly_declare_fn): Adjust.
17422         * pt.c (push_inline_template_parms_recursive): Adjust.
17423         (process_template_parm): Adjust.
17424         (overloaded_template_name): Adjust.
17425         * semantics.c (finish_template_template_parm): Adjust.
17426
17427 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
17428
17429         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
17430         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
17431         where to emit thunks.
17432         (build_vtt): Adjust call to build_vtt_inits.
17433         (build_vtt_inits): Add parameter to indicate whether or not
17434         sub-VTTs for virtual bases should be included.  Adjust handling of
17435         construction vtables.
17436         (get_matching_base): New function.
17437         (dfs_build_vtt_inits): Rename to ...
17438         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
17439         construction vtables.
17440         (dfs_fixup_binfo_vtbls): Likewise.
17441         (build_ctor_vtbl_groups): Build construction vtables for virtual
17442         bases, too.
17443         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
17444         to build construction vtbls.
17445         (dfs_accumulate_vtbl_inits): Adjust handling of
17446         construction vtables.
17447
17448         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
17449         types correctly.
17450
17451 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
17452
17453         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
17454
17455 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
17456
17457         * search.c (hides): Remove.
17458         (is_subobject_of_p): Add most_derived parameter. Use
17459         CANONICAL_BINFO.
17460         (lookup_field_queue_p): Adjust.
17461         (lookup_field_r): Adjust.
17462
17463 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
17464
17465         * decl2.c (handle_class_head): Bash typedefs to the type's main
17466         decl.
17467
17468 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
17469
17470         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
17471         (begin_global_stmt_expr): ... this.
17472         (genrtl_finish_stmt_expr): Rename to ...
17473         (finish_global_stmt_expr): ... this.
17474         * init.c (begin_init_stmts): Adjust calls.
17475         (finish_init_stmts): Likewise.
17476         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
17477         (begin_global_stmt_expr): ... this.
17478         (genrtl_finish_stmt_expr): Rename to ...
17479         (finish_global_stmt_expr): ... this.
17480
17481 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
17482
17483         * search.c (lookup_member): Fix typo in comment.
17484
17485 2000-06-24  Jason Merrill  <jason@redhat.com>
17486
17487         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
17488         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
17489
17490 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17491
17492         * parse.y (complex_direct_notype_declarator): Support global_scope.
17493         * Makefile.in: Adjust conflict count.
17494
17495 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
17496
17497         * parse.y (template_arg): Convert TEMPLATE_DECL
17498         that is a template template parameter to
17499         TEMPLATE_TEMPLATE_PARM here.
17500
17501         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
17502         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
17503         (copy_template_template_parm): Adjust prototype.
17504         * decl.c (grokdeclarator): Remove dead code.
17505         * pt.c (process_template_parm): Tidy.
17506         (lookup_template_class): Construct nodes in
17507         copy_template_template_parm.
17508         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
17509         lookup_template_class.  Use TYPE_TI_TEMPLATE.
17510         * tree.c (copy_template_template_parm): Add NEWARGS
17511         parameter.
17512         (mapcar): Adjust call to copy_template_template_parm.
17513         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
17514         * method.c (build_template_template_parm_names): Change error
17515         code to avoid compilation warning.
17516
17517         * gxxint.texi: Document template template parameter
17518         name mangling.
17519
17520 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
17521
17522         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
17523         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
17524         (cp-demangle.o): New rule.
17525         (dyn-string.o): Likewise.
17526         * inc/cxxabi.h (__cxa_demangle): New declaration.
17527
17528 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
17529
17530         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
17531         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
17532         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
17533         a tree, not an int.
17534         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
17535         (make_thunk): Change prototype.
17536         (emit_thunk): Rename to use_thunk.
17537         (mangle_thunk): Change prototype.
17538         * class.c (get_derived_offset): Simplify.
17539         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
17540         BV_GENERATE_THUNK_WITH_VTABLE_P.
17541         (build_primary_vtable): Simplify.
17542         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
17543         (dfs_find_base): Remove.
17544         (update_vtable_entry_for_fn): Correct bug in finding the base
17545         where a virtual function was first declared.  Figure out whether
17546         or not to emit a vcall-thunk with the vtables in which it appears.
17547         Correct logic for deciding whether to use an ordinary thunk, or a
17548         vcall thunk.
17549         (finish_struct_1): Remove unnecssary code.
17550         (build_vtbl_initializer): Use ssize_int for the running counter of
17551         negative indices.
17552         (build_vtbl_initializer): Only use vcall thunks where necessary.
17553         Mark thunks as needing to be emitted with their vtables, or not.
17554         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
17555         indices.  Use size_binop.
17556         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
17557         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
17558         size_binop.
17559         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
17560         (build_vtable_entry): Mark thunks as needing to be emitted with
17561         their vtables, or not.
17562         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
17563         * decl2.c (mark_vtable_entries): Use use_thunk instead of
17564         emit_thunk.
17565         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
17566         information.
17567         * error.c (dump_expr): Use BV_FN.
17568         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
17569         not an int.
17570         * method.c (make_thunk): Likewise.
17571         (emit_thunk): Rename to use_thunk.  Allow callers to decide
17572         whether or not to actually emit the thunk.  Adjust for changes in
17573         representation of vcall offsets.
17574         * search.c (dfs_get_pure_virtuals): Use BV_FN.
17575         * semantics.c (emit_associated_thunks): New function.
17576         (expand_body): Use it.
17577         * ir.texi: Adjust decriptions of thunks.
17578
17579 2000-06-22  Jason Merrill  <jason@redhat.com>
17580
17581         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
17582         (tsubst_friend_function): Copy it here.
17583
17584         * decl.c (grok_op_properties): Fix typo.
17585
17586         * decl2.c (delete_sanity): Clarify warning, avoid failure on
17587         deleting void*.
17588
17589         * pt.c (check_explicit_specialization): Clarify error.
17590
17591         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
17592         an old OVERLOAD when we're declaring a non-function.
17593         (pushdecl, destroy_local_var): Check for error_mark_node.
17594         (warn_extern_redeclared_static): Also bail early if
17595         we're a CONST_DECL.
17596         (push_overloaded_decl): Ignore an old error_mark_node.
17597
17598 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
17599
17600         * call.c (build_x_va_arg): Check if in a template decl.
17601         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
17602
17603 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17604
17605         * class.c (push_lang_context): TYPE_NAME gets you to the Java
17606         types DECLs.
17607         * decl.c (check_goto): Computed gotos assumed OK.
17608
17609 2000-06-20  Jason Merrill  <jason@redhat.com>
17610
17611         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
17612         for which we don't need to look for instantiations.
17613
17614 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
17615
17616         * parse.y (program): Always call finish_translation_unit.
17617         * parse.c, parse.h: Rebuilt.
17618
17619 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
17620
17621         * method.c: Don't include hard-reg-set.h.
17622
17623 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
17624
17625         * rtti.c (get_base_offset): Cope when vbase field is in a base.
17626
17627 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
17628
17629         * call.c (build_conditional_expr): Use VOID_TYPE_P.
17630         * cvt.c (cp_convert_to_pointer): Likewise.
17631         (convert_to_void): Likewise.
17632         * error.c (dump_expr): Likewise.
17633         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
17634         * init.c (build_delete): Likewise.
17635         * method.c (emit_thunk): Likewise.
17636         * optmize.c (declare_return_variable): Likewise.
17637         * rtti.c (get_tinfo_decl_dynamic): Likewise.
17638         (get_typeid): Likewise.
17639         (build_dynamic_cast_1): Likewise.
17640         * typeck.c (composite_pointer_type): Likewise.
17641         (common_type): Likewise.
17642         (build_indirect_ref): Likewise.
17643         (build_binary_op): Likewise.
17644         (build_x_compound_expr): Likewise.
17645         (check_return_expr): Likewise.
17646         * typeck2.c (add_exception_specifier): Likewise.
17647
17648         * mangle.c (write_method_parms): Use direct comparison for end
17649         of parmlist.
17650
17651 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
17652
17653         * cp-tree.h (genrtl_try_block): Declare function.
17654         (genrtl_handler): Likewise.
17655         (genrtl_catch_block): Likewise.
17656         (genrtl_ctor_stmt): Likewise.
17657         (genrtl_subobject): Likewise.
17658         (genrtl_decl_cleanup): Likewise.
17659         (genrtl_do_poplevel): Likewise.
17660         (genrtl_do_pushlevel): Likewise.
17661         (genrtl_clear_out_block): Likewise.
17662         (genrtl_goto_stmt): Likewise.
17663         (genrtl_expr_stmt): Likewise.
17664         (genrtl_decl_stmt): Likewise.
17665         (genrtl_if_stmt): Likewise.
17666         (genrtl_while_stmt): Likewise.
17667         (genrtl_do_stmt): Likewise.
17668         (genrtl_return_stmt): Likewise.
17669         (genrtl_for_stmt): Likewise.
17670         (genrtl_break_stmt): Likewise.
17671         (genrtl_continue_stmt): Likewise.
17672         (genrtl_scope_stmt): Likewise.
17673         (genrtl_switch_stmt): Likewise.
17674         (genrtl_case_label): Likewise.
17675         (genrtl_begin_compound_stmt): Likewise.
17676         (genrtl_finish_compound_stmt): Likewise.
17677         (genrtl_compound_stmt): Likewise.
17678         (genrtl_asm_stmt): Likewise.
17679         (genrtl_named_return_value): Likewise.
17680         (genrtl_begin_stmt_expr): Likewise.
17681         (genrtl_finish_stmt_expr): Likewise.
17682         (finish_for_stmt): Removed first argument.
17683         (finish_switch_stmt): Likewise.
17684
17685         * semantics.c (genrtl_try_block): Define function.
17686         (genrtl_handler): Likewise.
17687         (genrtl_catch_block): Likewise.
17688         (genrtl_ctor_stmt): Likewise.
17689         (genrtl_subobject): Likewise.
17690         (genrtl_decl_cleanup): Likewise.
17691         (genrtl_do_poplevel): Likewise.
17692         (genrtl_do_pushlevel): Likewise.
17693         (genrtl_clear_out_block): Likewise.
17694         (genrtl_goto_stmt): Likewise.
17695         (genrtl_expr_stmt): Likewise.
17696         (genrtl_decl_stmt): Likewise.
17697         (genrtl_if_stmt): Likewise.
17698         (genrtl_while_stmt): Likewise.
17699         (genrtl_do_stmt): Likewise.
17700         (genrtl_return_stmt): Likewise.
17701         (genrtl_for_stmt): Likewise.
17702         (genrtl_break_stmt): Likewise.
17703         (genrtl_continue_stmt): Likewise.
17704         (genrtl_scope_stmt): Likewise.
17705         (genrtl_switch_stmt): Likewise.
17706         (genrtl_case_label): Likewise.
17707         (genrtl_begin_compound_stmt): Likewise.
17708         (genrtl_finish_compound_stmt): Likewise.
17709         (genrtl_compound_stmt): Likewise.
17710         (genrtl_asm_stmt): Likewise.
17711         (genrtl_named_return_value): Likewise.
17712         (genrtl_begin_stmt_expr): Likewise.
17713         (genrtl_finish_stmt_expr): Likewise.
17714         (finish_for_stmt): Removed first argument and generate rtl
17715         specific code.
17716         (finish_switch_stmt): Likewise.
17717         (do_poplevel): Removed generate rtl specific code.
17718         (do_pushlevel): Likewise.
17719         (add_tree): Likewise.
17720         (finish_goto_stmt): Likewise.
17721         (finish_expr_stmt): Likewise.
17722         (begin_if_stmt): Likewise.
17723         (finish_if_stmt_cond): Likewise.
17724         (finish_then_clause): Likewise.
17725         (begin_else_clause): Likewise.
17726         (finish_else_clause): Likewise.
17727         (finish_if_stmt): Likewise.
17728         (clear_out_block): Likewise.
17729         (begin_while_stmt): Likewise.
17730         (finish_while_stmt_cond): Likewise.
17731         (finish_while_stmt): Likewise.
17732         (begin_do_stmt): Likewise.
17733         (finish_do_body): Likewise.
17734         (finish_do_stmt): Likewise.
17735         (finish_return_stmt): Likewise.
17736         (begin_for_stmt): Likewise.
17737         (finish_for_init_stmt): Likewise.
17738         (finish_for_cond): Likewise.
17739         (finish_for_expr): Likewise.
17740         (finish_break_stmt): Likewise.
17741         (finish_continue_stmt): Likewise.
17742         (begin_switch_stmt): Likewise.
17743         (finish_switch_cond): Likewise.
17744         (finish_case_label): Likewise.
17745         (begin_try_block): Likewise.
17746         (begin_function_try_block): Likewise.
17747         (finish_try_block): Likewise.
17748         (finish_cleanup_try_block): Likewise.
17749         (finish_cleanup): Likewise.
17750         (finish_function_try_block): Likewise.
17751         (finish_handler_sequence): Likewise.
17752         (finish_function_handler_sequence): Likewise.
17753         (begin_handler): Likewise.
17754         (finish_handler_parms): Likewise.
17755         (begin_catch_block): Likewise.
17756         (finish_handler): Likewise.
17757         (begin_compound_stmt): Likewise.
17758         (finish_compound_stmt): Likewise.
17759         (finish_asm_stmt): Likewise.
17760         (finish_label_stmt): Likewise.
17761         (finish_label_decl): Likewise.
17762         (finish_subobject): Likewise.
17763         (finish_decl_cleanup): Likewise.
17764         (finish_named_return_value): Likewise.
17765         (begin_stmt_expr): Likewise.
17766         (finish_stmt_expr): Likewise.
17767
17768         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
17769         to call genrtl_expr_stmt when appropriate.
17770
17771         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
17772         begin_compound_expr to call genrtl_begin_stmt_expr and
17773         genrtl_begin_compound_expr when appropriate.
17774         (finish_init_stmts): Changed calls to finish_compound_expr and
17775         finish_stmt_expr to call genrtl_finish_compound_expr and
17776         genrtl_finish_stmt_expr when appropriate.
17777         (expand_default_init): Changed call to finish_expr_stmt to call
17778         genrtl_expr_stmt when appropriate.
17779         (build_vec_init): Likewise.
17780
17781         * parse.y (simple_stmt): Removed first argument from call to
17782         finish_for_stmt. Removed first argument from call to
17783         finish_switch_stmt.
17784
17785         * parse.c: Regenerated.
17786
17787         * pt.c (tsubst_expr): Removed first argument from call to
17788         finish_for_stmt. Removed first argument from call to
17789         finish_switch_stmt.
17790
17791 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
17792
17793         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
17794         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
17795
17796         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
17797         (cplus_tree_code_length[]): Likewise.
17798         (cplus_tree_code_name[]): Likewise.
17799         (init_parse): Added call to add_c_tree_codes. Changed
17800         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
17801
17802 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
17803
17804         * cp-tree.h (finish_mem_initializers): Declare.
17805         (count_trees): Likewise.
17806         * parse.y (base_init): Use finish_mem_initializers.
17807         * semantics.c (finish_mem_initializers): New function.
17808
17809         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
17810         the number of trees.
17811         (n_trees): Remove.
17812         (count_trees): Don't use it.
17813
17814 2000-06-15  Jason Merrill  <jason@redhat.com>
17815
17816         * tree.c (count_trees): New debugging function.
17817
17818         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
17819         * init.c (build_member_call): Pull out the name of a DECL.
17820
17821         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
17822         * semantics.c (expand_body): Push to TV_INTEGRATION here.
17823         * optimize.c (optimize_function): Not here.
17824         * pt.c (instantiate_decl): Push to TV_PARSE.
17825
17826 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
17827
17828         * cp-tree.h (struct language_function): Remove x_base_init_list
17829         and x_member_init_list.
17830         (current_base_init_list): Remove.
17831         (current_member_init_list): Likewise.
17832         (setup_vtbl_ptr): Change prototype.
17833         (emit_base_init): Likewise.
17834         (expand_member_init): Likewise.
17835         (reinit_parse_for_function): Remove.
17836         * decl.c (save_function_data): Don't clear x_base_init_list and
17837         x_member_init_list.
17838         (mark_language_function): Don't mark them.
17839         * init.c (perform_member_init): Tweak comment.
17840         (sort_member_init): Take the list of initializers as an argument.
17841         (sort_base_init): Likewise.
17842         (emit_base_init): Likewise.
17843         (expand_member_init): Return the initializer.  Don't use global
17844         variables.
17845         * lex.c (reinit_parse_for_function): Remove.
17846         * method.c (build_template_parm_names): Correct substitution.
17847         (do_build_copy_constructor): Don't use current_member_init_list
17848         and current_base_init_list.
17849         (synthesize_method): Likewise.
17850         * parse.y (base_init): Split mem-initializers into
17851         base-initializers and field-initializers.
17852         (member_init_list): Build up the list here.
17853         (member_init): Return the initializer.
17854         (fn.depfn): Don't use reinit_parse_for_function.
17855         * parse.c: Regenerated.
17856         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
17857         ERROR_MARK.
17858         (tsubst_expr): Don't use current_member_init_list
17859         and current_base_init_list.
17860         (tsubst_expr_values): Rename to ...
17861         (tsubst_initializer_list): ... this.  Use convert_from_reference.
17862         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
17863         and current_base_init_list.
17864         (begin_function_definition): Don't call reinit_parse_for_function.
17865
17866         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
17867
17868         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
17869         correctly.
17870
17871         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
17872
17873 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
17874
17875         * cp-tree.h (IF_COND): Move to c-common.h.
17876         (THEN_CLAUSE): Likewise.
17877         (ELSE_CLAUSE): Likewise.
17878         (WHILE_COND): Likewise.
17879         (WHILE_BODY): Likewise.
17880         (DO_COND): Likewise.
17881         (DO_BODY): Likewise.
17882         (RETURN_EXPR): Likewise.
17883         (EXPR_STMT_EXPR): Likewise.
17884         (FOR_INIT_STMT): Likewise.
17885         (FOR_COND): Likewise.
17886         (FOR_EXPR): Likewise.
17887         (FOR_BODY): Likewise.
17888         (SWITCH_COND): Likewise.
17889         (SWITCH_BODY): Likewise.
17890         (CASE_LOW): Likewise.
17891         (CASE_HIGH): Likewise.
17892         (GOTO_DESTINATION): Likewise.
17893         (COMPOUND_BODY): Likewise.
17894         (ASM_CV_QUAL): Likewise.
17895         (ASM_STRING): Likewise.
17896         (ASM_OUTPUTS): Likewise.
17897         (ASM_INPUTS): Likewise.
17898         (ASM_CLOBBERS): Likewise.
17899         (DECL_STMT_DECL): Likewise.
17900         (STMT_EXPR_STMT): Likewise.
17901         (LABEL_STMT_LABEL): Likewise.
17902         (SCOPE_BEGIN_P): Likewise.
17903         (SCOPE_END_P): Likewise.
17904         (SCOPE_STMT_BLOCK): Likewise.
17905         (SCOPE_NULLIFIED_P): Likewise.
17906         (SCOPE_NO_CLEANUPS_P): Likewise.
17907         (SCOPE_PARTIAL_P): Likewise.
17908         (ASM_VOLATILE_P): Likewise.
17909         (STMT_LINENO): Likewise.
17910         (STMT_LINENO_FOR_FN_P): Likewise.
17911
17912         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
17913         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
17914         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
17915         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
17916         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
17917
17918         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
17919
17920         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
17921         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
17922
17923         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
17924         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
17925         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
17926
17927 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
17928
17929         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
17930         * class.c (dfs_find_final_overrider): Set it appropriately.
17931         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
17932         avoid unneeded secondary vptrs.
17933
17934 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
17935
17936         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
17937         (check_bitfield_decl, check_field_decl): Likewise.
17938         (build_vtbl_or_vbase_field, build_base_field): Likewise.
17939         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
17940         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
17941         (xfer_tag, finish_enum): Likewise.
17942         * decl2.c (finish_builtin_type): Likewise.
17943         * init.c (init_init_processing): Likewise.
17944         * pt.c (instantiate_class_template): Likewise.
17945         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
17946         * cp-tree.h (struct lang_type): Add user_align member.
17947         (CLASSTYPE_USER_ALIGN): Define.
17948
17949 2000-06-13  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
17950
17951         * Make-lang.in (c++.install-common): Install g++-cross in
17952         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
17953         $(target_alias)-g++ and $(target_alias)-c++.
17954
17955 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
17956
17957         * class.c (vcall_offset_data_s): Add last_init and fns.
17958         (overrides): Rename to same_signature_p.
17959         (dfs_find_final_overrider): Adjust accordingly.
17960         (mark_overriders): Likewise.
17961         (warn_hidden): Likewise.
17962         (build_vtbl_initializer): Reorganize machinery for building things
17963         at negative offsets.
17964         (build_vcall_and_vbase_vtbl_entries): Likewise.
17965         (build_vbase_offset_vtbl_entries): Likewise.
17966         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
17967         offset entries.  Do not create two entries for functions with the
17968         same signature.
17969         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
17970         (build_rtti_vtbl_entries): Reorganize machinery for building things
17971         at negative offsets.
17972
17973         * optimize.c (expand_call_inline): Don't recurse into the code
17974         used to initialize the parameters more than once.
17975
17976 2000-06-11  Mark Mitchell <mark@codesourcery.com>
17977
17978         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
17979         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
17980         (find_substitution): Only use the `Sa' substitution for
17981         std::allocator, not instantiations of it.
17982         (write_template_prefix): Move comment.  Only use a TREE_LIST to
17983         represent substitutions for a member template.
17984         (write_array_type): Mangle array dimensions correctly.
17985         * optimize.c (maybe_clone_body): Copy more information from the
17986         cloned function.
17987         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
17988         on the regenerated declaration.
17989
17990 2000-06-11  Chip Salzenberg  <chip@valinux.com>
17991             Mark Mitchell <mark@codesourcery.com>
17992
17993         * class.c (build_vtable): Clarify comment.
17994         (build_ctor_vtbl_group): Pass the most derived type to
17995         build_vtable.
17996
17997 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17998
17999         * decl2.c (compare_options): Don't needlessly cast away const-ness.
18000
18001 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
18002
18003         * decl.c (add_binding): Handle duplicate declarations of external
18004         variables.
18005
18006 2000-06-09  Chip Salzenberg  <chip@valinux.com>
18007             Mark Mitchell <mark@codesourcery.com>
18008
18009         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
18010         argument.
18011         (write_signed_number): New macro.
18012         (write_unsigned_number): Likewise.
18013         (write_source_name): Use them.
18014         (write_number): Handle signed and unsigned values.
18015         (write_integer_cst): Use tree_int_cst_sgn, and use
18016         write_unsigned_number or write_signed_number as appropriate.
18017         (write_discriminator): Use write_unsigned_number or
18018         write_signed_number as appropriate.
18019         (write_template_arg_literal): Likewise.
18020         (write_array_type): Use tree_low_cst.
18021         (write_template_parm):  Use write_unsigned_number or
18022         write_signed_number as appropriate.
18023         (write_substitution): Adjust call to write_number.
18024         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
18025         (write_expression): Handle non-type template arguments of
18026         reference type correctly.
18027         (mangle_thunk): Use write_signed_number.
18028
18029 2000-06-09  Chip Salzenberg  <chip@valinux.com>
18030
18031         * mangle.c (find_substition): Don't mangle objects with typename
18032         substitutions (e.g. "cin" as "Si").
18033
18034 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
18035
18036         * call.c (add_candidate): Use ggc_alloc_cleared.
18037         * decl.c (lookup_label): Likewise.
18038         * lex.c (retrofit_lang_decl): Likewise.
18039
18040 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
18041
18042         * semantics.c (expand_body): Push to TV_EXPAND.
18043         * optimize.c (optimize_function): Push to TV_INTEGRATION.
18044         * decl.c (start_function): Always call announce_function.
18045
18046         * tinfo2.cc: Just declare abort.
18047
18048 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
18049
18050         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
18051         whenever @ is a symbolic name.
18052
18053 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
18054
18055         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
18056
18057 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
18058
18059         * decl.c (pushdecl): Look up functions by DECL_NAME, not
18060         DECL_ASSEMBLER_NAME.
18061
18062 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
18063
18064         * decl2.c (c_language): Define.
18065
18066 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
18067
18068         * lex.c (lang_init_options): Tweak.
18069
18070         * decl2.c: Remove #inclusion of diagnostic.h
18071         (lang_decode_option): Move diagnostic formatting options to
18072         toplevel.
18073
18074         * lang-options.h: Remove documentation for diagnostic options.
18075
18076         * Makefile.in (lex.o): Depends upon diagnostic.h
18077
18078 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
18079
18080         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
18081         the same DECL_RESULT, it's not a redefinition.
18082         * pt.c (tsubst_decl): Remove code to handle illegal
18083         specializations.
18084
18085 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
18086
18087         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
18088
18089 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
18090
18091         * search.c (maybe_suppress_debug_info): Don't check
18092         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
18093
18094         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
18095         here if extern_p.
18096
18097         Remember instantiation context in deferred instantiations.
18098         * cp-tree.h (struct tinst_level): Remove.
18099         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
18100         * pt.c (current_tinst_level): Now a tree.
18101         (print_template_context, push_tinst_level, pop_tinst_level,
18102         tinst_for_decl): Adjust.
18103         (reopen_tinst_level): New fn.
18104         (init_pt): Register current_tinst_level as a root.
18105         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
18106         of the pending templates list.
18107         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
18108         * lex.c (extract_interface_info): Adjust.
18109         * decl2.c (warn_if_unknown_interface): Adjust.
18110
18111 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
18112
18113         * class.c (indirect_primary_base_p): New function.
18114         (determine_primary_base): Use it.
18115
18116 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
18117
18118         Update new-abi dynamic cast algorithm.
18119         * tinfo.cc (__class_type_info::__dyncast_result): Add
18120         whole_details. Adjust constructor.
18121         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
18122         Avoid unnecessary searching.
18123         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
18124
18125 2000-06-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18126
18127         * decl.c (init_decl_processing): Don't call record_component_aliases.
18128         * tree.c (build_cplus_array_type_1): Likewise.
18129
18130 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
18131
18132         * ir.texi: Correct typo.
18133         * mangle.c (write_expression): Handle non-type template arguments
18134         with reference type.
18135         * method.c (build_overload_value): Likewise.
18136         * pt.c (convert_nontype_argument): Explicitly represent conversion
18137         to a reference with an ADDR_EXPR.
18138         (unify): Always unify arguments in left-to-right order.
18139
18140 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
18141             Mark Mitchell  <mark@codesourcery.com>
18142
18143         * Make-lang.in (CXX_SRCS): Add mangle.c.
18144         * Makefile.in (CXX_OBJS): Add mangle.o.
18145         (mangle.o): New rule.
18146
18147         * class.c (local_classes): New variable.
18148         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
18149         (get_vtt_name): Use mangle_vtt_name for new ABI.
18150         (init_class_processing): Initialize local_classes.
18151         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
18152         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
18153         (std_identifier): New macro.
18154         (DECL_VOLATILE_MEMFUNC_P): New macro.
18155         (DECL_NAMESPACE_STD_P): Likewise.
18156         (local_classes): Declare.
18157         (get_mostly_instantiated_function_type): Declare.
18158         (init_mangle): Declare.
18159         (mangle_decl): Likewise.
18160         (mangle_type_string): Likewise.
18161         (mangle_type): Likewise.
18162         (mangle_typeinfo_for_type): Likewise.
18163         (mangle_typeinfo_string_for_type): Likewise.
18164         (mangle_vtbl_for_type): Likewise.
18165         (mangle_vtt_for_type): Likewise.
18166         (mangle_ctor_vtbl_for_type): Likewise.
18167         (mangle_thunk): Likewise.
18168         (mangle_conv_op_name_for_type): Likewise.
18169         (mangle_guard_variable): Likewise.
18170         * decl.c (pushtag): Keep track of local classes.
18171         (initialize_predefined_identifiers): Initialize std_identifier.
18172         (init_decl_processing): Use std_identifier.
18173         (start_decl): Don't treat instantiations as specializations.
18174         (grokdeclarator): Likewise.
18175         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
18176         name for fully-instantiated templates.
18177         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
18178         destructors with the new ABI.
18179         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
18180         (grokfield): Use mangle_type for new ABI.
18181         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
18182         (get_sentry): Use mangle_guard_variable for new ABI.
18183         (start_static_initialization_or_destruction): Likewise.
18184         * expr.c (extract_aggr_init): Remove.
18185         (extract_scalar_init): Likewise.
18186         (extract_init): Remove #if 0'd code.
18187         * mangle.c: New function.
18188         * method.c (build_mangled_name): Assert not flag_new_abi.
18189         (build_static_name): Likewise.
18190         (build_decl_overload_real): Likewise.
18191         (build_typename_overload): Likewise.
18192         (build_overload_with_type): Likewise.
18193         (build_overload_name): Likewise.
18194         (get_ctor_vtbl_name): Likewise.
18195         (start_squangling): Likewise.
18196         (get_id_2): Likewise.
18197         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
18198         (init_method): Call init_mangle for new ABI.
18199         (make_thunk): Call mangle_thunk for new ABI.
18200         * operators.def: Correct new ABI manglings for the `%' operator.
18201         Add `::' operator.
18202         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
18203         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
18204         (lookup_template_class): Call mangle_decl for new ABI.
18205         (get_mostly_instantiated_function_type): New function.
18206         (set_mangled_name_for_template_decl): Use it.
18207         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
18208         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
18209         conversion op names.
18210         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
18211         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
18212         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
18213         mangle_typeinfo_string_for_type.
18214
18215 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
18216
18217         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
18218         (INNERMOST_TEMPLATE_ARGS): New macro.
18219         (innermost_args): Remove.
18220         (get_innermost_template_args): New function.
18221         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
18222         * error.c (dump_function_decl): Be caution when using
18223         most_general_template.
18224         * method.c (build_template_parm_names):  Use
18225         INNERMOST_TEMPLATE_ARGS.
18226         * pt.c (add_to_template_args): Tidy comment
18227         (get_innermost_template_args): New function.
18228         (check_explicit_specialization): Clear DECL_INITIAL for a new
18229         specialization.
18230         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
18231         Tidy.
18232         (push_template_decl): Always register specializations of the most
18233         general template.
18234         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
18235         (coerce_template_parms): Likewise.
18236         (lookup_template_class): Likewise.
18237         (innermost_args): Remove.
18238         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
18239         (tsubst_decl): Handle tricky specializations.  Use
18240         get_innermost_template_args.
18241         (instantiate_template): Simplify handling of partial
18242         instantiations.
18243         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
18244         (most_general_template): Reimplement, in a more straightforward
18245         manner.
18246         (regenerate_decl_from_template): Tweak formatting.  Use
18247         TMPL_ARGS_DEPTH for clarity.
18248         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
18249
18250         * dump.c (dequeue_and_dump): Dump information about thunks.
18251
18252 2000-06-01  Richard Henderson  <rth@cygnus.com>
18253
18254         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
18255
18256 2000-06-01  Richard Henderson  <rth@cygnus.com>
18257
18258         * decl2.c (unsupported_options): Fix typo, make const.
18259         (lang_decode_option): Fix bsearch argument order.
18260
18261 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
18262
18263         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
18264         on FIELD_DECLs.
18265
18266 2000-05-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18267
18268         * cp-tree.h (c_get_alias_set): Deleted.
18269         * Makefile.in (decl.o): Include ../expr.h.
18270         * decl.c (expr.h): Include.
18271         (init_decl_processing): Call record_component_aliases for arrays.
18272         (grokdeclarator): Likewise.
18273         Set TREE_ADDRESSABLE for fields that aren't bitfields.
18274         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
18275
18276 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
18277
18278         Remove guiding declaration support.
18279         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
18280         (flag_guiding_decls): Remove.
18281         * call.c (build_user_type_conversion_1): Remove support for
18282         guiding decls.
18283         (build_new_function_call): Likewise.
18284         (build_new_op): Likewise.
18285         (build_new_method_call): Likewise.
18286         * decl.c (start_function): Likewise.
18287         * friend.c (is_friend): Likewise.
18288         (do_friend): Likewise.
18289         * decl2.c ((flag_dump_translation_unit): Make it const.
18290         (flag_guiding_decls): Remove.
18291         (unsupported_options): New variable
18292         (compare_options): New function.
18293         (lang_decode_option): Use them.
18294
18295         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
18296
18297         * method.c (mangle_expression): Adjust test for legal expression
18298         operators.
18299
18300         * pt.c (instantiate_decl): Save and restore the local
18301         specializations list.
18302
18303 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
18304
18305         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
18306
18307 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
18308
18309         * call.c (add_template_candidate_real): Handle member template
18310         constructors for classes with virtual bases.
18311         (build_user_type_conversion_1): Use in_charge_arg_for_name.
18312         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
18313
18314         * ir.texi: Update thunk documentation.
18315
18316         * call.c (joust): Fix handling of overloaded builtin operators.
18317
18318 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
18319
18320         * cp-tree.h (DECL_ANTICIPATED): New macro.
18321         Document new use of DECL_LANG_FLAG_7.
18322         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
18323         in the user namespace.
18324         * lex.c (do_identifier): If the identifier's declaration has
18325         DECL_ANTICIPATED on, it has not yet been declared.  But do not
18326         replace it with an ordinary implicit declaration.
18327
18328         * tinfo2.cc: Include stdlib.h.
18329
18330 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
18331
18332         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
18333         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
18334         CLASSTYPE_ALIGN.
18335
18336 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
18337
18338         * decl2.c (lang_decode_option): Use skip_leading_substring instead
18339         of plain strncmp.
18340
18341 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
18342
18343         * operators.def (<?): Duplicated, should have been...
18344         (>?): this.  Fixed.
18345
18346 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
18347             Mark Mitchell  <mark@codesourcery.com>
18348
18349         * cp-tree.h (ansi_opname): Make it a macro.
18350         (ansi_assopname): Likewise.
18351         (struct lang_decl_flags): Add assignment_operator_p.
18352         (struct lang_decl): Add operator_code.
18353         (DECL_VTT_PARM): Adjust.
18354         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
18355         overloaded operator.
18356         (SET_OVERLOADED_OPERATOR_CODE): New macro.
18357         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
18358         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
18359         (opname_tab): Remove.
18360         (assignop_tab): Likewise.
18361         (operator_name_info_t): New type.
18362         (operator_name_info): New variable.
18363         (assignment_operator_name_info): Likewise.
18364         (build_cp_library_fn): Remove declaration.
18365         (push_cp_library_fn): Likewise.
18366         (operator_name_string): Likewise.
18367         (build_decl_overload): Likewise.
18368         * call.c (print_z_candidates): Simplify.
18369         (build_object_call): Adjust usage of ansi_opname.  Use
18370         DECL_OVERLOADED_OPERATOR_P.
18371         (op_error): Adjust operator name lookup.
18372         (build_conditional_expr): Adjust usage of ansi_opname.
18373         (build_new_op): Likewise.
18374         (build_op_delete_call): Likewise.
18375         (build_over_call): Likewise.
18376         (joust): Use DECL_OVERLOADED_OPERATOR_P.
18377         * decl.c (duplicate_decls): Copy operator_code.
18378         (init_decl_processing): Adjust parameters to push_cp_library_fn.
18379         (builtin_function): Adjust parameters to build_library_fn_1.
18380         (build_library_fn_1): Accept an overloaded operator code.
18381         (build_library_fn): Pass ERROR_MARK.
18382         (build_cp_library_fn): Accept an overloaded operator code.
18383         (push_cp_library_fn): Likewise.
18384         (grokfndecl): Tweak.
18385         (grokdeclarator): Simplify code to compute names of overloaded
18386         operators.  Adjust use of ansi_opname.
18387         (ambi_op_p): Work on tree_codes, not identifiers.
18388         (unary_op_p): Likewise.
18389         (grok_op_properties): Likewise.
18390         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
18391         (lang_mark_tree): Don't try to mark the operator_code.
18392         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
18393         * error.c (dump_decl): Remove special handling for operator
18394         names.
18395         (dump_function_name): Likewise.
18396         (dump_expr): Adjust name lookup of operators.
18397         (op_to_string): Simplify.
18398         (assop_to_string): Likewise.
18399         * init.c (build_new_1): Adjust use of ansi_opname.
18400         * lex.c (opname_tab): Remove.
18401         (assignop_tab): Likewise.
18402         (ansi_opname): Likewise.
18403         (ansi_assopname): Likewise.
18404         (operator_name_string): Likewise.
18405         (reinit_lang_specific): Likewise.
18406         (operator_name_info): New variable.
18407         (assignment_operator_name_info): Likewise.
18408         (init_operators): New function.
18409         (init_parse): Use it.
18410         (do_identifier): Adjust use of ansi_opname.
18411         * method.c (mangle_expression): Don't use ansi_opname for
18412         mangling.
18413         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
18414         (build_decl_overload): Remove.
18415         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
18416         (do_build_assign_ref): Adjust use of ansi_opname.
18417         (synthesize_method): Likewise.
18418         (implicitly_declare_fn): Likewise.
18419         * operators.def: New file.
18420         * parse.y (operator): Adjust use of ansi_opname.
18421         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
18422         (set_mangled_name_for_template_decl): Don't play games with
18423         current_namespace.
18424         (special_function_p): Adjust use of ansi_opname.
18425         * typeck.c (check_return_expr): Likewise.
18426         * Make-lang.in (cc1plus): Depend on operators.def.
18427         * Makefile.in (lex.o): Likewise.
18428         (decl.o): Likewise.
18429
18430 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
18431
18432         * Make-lang.in (cplib2.ready): Eradicate.
18433
18434 2000-05-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18435
18436         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
18437         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
18438         (built_min, cp_tree_equal): Likewise.
18439
18440 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
18441
18442         * class.c (layout_nonempty_base_or_field): Replace
18443         `record_layout_info' with `record_layout_info_s'.
18444
18445 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
18446
18447         Fix goto checking.
18448         * cp-tree.h (struct language_function): x_named_labels is now
18449         a struct named_label_list*.
18450         * decl.c (struct named_label_use_list): Renamed from...
18451         (struct named_label_list): ...this.  New struct.
18452         (push_binding_level): Don't set eh_region.
18453         (note_level_for_eh): New fn.
18454         (pop_label): Take label and old value directly.
18455         (pop_labels): Adjust for new named_labels format.
18456         (lookup_label): Likewise.
18457         (poplevel): Note characteristics of a binding level containing a
18458         named label.  Mess with named label lists earlier.
18459         (mark_named_label_lists): New fn.
18460         (mark_lang_function): Call it.
18461         (use_label): New fn, split out from...
18462         (make_label_decl): ...here.  Don't call it.
18463         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
18464         check_previous_gotos): New fns, split out from...
18465         (define_label): ...here.
18466         (check_switch_goto): New fn.
18467         (define_case_label): Call it.
18468         (check_goto): New fn.
18469         * semantics.c (finish_goto_stmt): Call it and use_label.
18470         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
18471         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
18472
18473 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
18474
18475         * class.c (build_vtable_entry_ref): Correct usage of
18476         get_vtbl_decl_for_binfo.
18477
18478         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
18479         * method.c (implicitly_declare_fn): Not here.
18480
18481 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
18482
18483         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
18484         (CPTI_PTMD_DESC_TYPE): ... here.
18485         (ptmd_desc_type_node): Rename to ...
18486         (ptm_desc_type_node): ... here.
18487         * decl.c: Likewise.
18488         * rtti.c (ptmd_initializer): Rename to ...
18489         (ptm_initializer): ... here.
18490         (sythesize_tinfo_var): Adjust. Deal with pointer to member
18491         function.
18492         (create_tinfo_types): Adjust.
18493
18494 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
18495
18496         Finish implementation of VTTs.
18497         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
18498         CPTI_VTT_PARM_IDENTIFIER.
18499         (vtt_parm_identifier): New macro.
18500         (vtt_parm_type): Likewise.
18501         (BINFO_SUBVTT_INDEX): Likewise.
18502         (BINFO_VPTR_INDEX): Likewise.
18503         (struct lang_decl): Add vtt_parm.
18504         (DECL_VTT_PARM): New macro.
18505         (DECL_USE_VTT_PARM): Likewise.
18506         (DECL_NEEDS_VTT_PARM_P): Likewise.
18507         (get_vtt_name): Declare.
18508         (build_artificial_parm): Likewise.
18509         (fixup_all_virtual_upcast_offsets): Likewise.
18510         (expand_indirect_vtbls_init): Remove.
18511         * call.c (build_new_method_call): Pass the vtt to subobject
18512         constructors and destructors.
18513         * class.c (get_vtt_name): Give it external linkage.
18514         (build_clone): Handle the magic VTT parameters for clones.
18515         (clone_function_decl): Fix typo in comment.
18516         (build_vtt): Keep track of the indices in the VTTs where various
18517         entities are stored.
18518         (build_vtt_inits): Likewise.
18519         (dfs_build_vtt_inits): Likewise.
18520         (build_ctor_vtbl_group): Tweak type of construction vtables.
18521         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
18522         primary bases, when building construction vtables.
18523         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
18524         (initialize_predefined_identifiers): Add vtt_parm_identifier.
18525         (init_decl_processing): Initialize vtt_parm_type.
18526         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
18527         (lang_mark_tree): Make vtt_parm.
18528         * decl2.c (build_artificial_parm): New function.
18529         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
18530         (grokclassfn): Use build_artificial_parm.
18531         * init.c (initialize_vtbl_ptrs): Call
18532         fixup_all_virtual_upcast_offsets directly.
18533         (perform_member_init): Use the complete subobject destructor for
18534         member cleanups.
18535         (build_vtbl_address): New function.
18536         (expand_virtual_init): Handle VTTs.
18537         * optimize (maybe_clone_body): Likewise.
18538         * search.c (fixup_all_virtual_upcast_offsets): Give it external
18539         linkage.
18540         (expand_indirect_vtbls_init): Remove.
18541         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
18542         * tree.c (make_binfo): Make them bigger.
18543
18544 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
18545
18546         * inc/cxxabi.h (__pbase_type_info): Define, based on
18547         __pointer_type_info.
18548         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
18549         (__pointer_to_member_type_info): Likewise.
18550         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
18551         (__pointer_to_member_type_info::__is_pointer_p): Remove.
18552         (__pointer_type_info::__do_catch): Rename to ...
18553         (__pbase_type_info::__do_catch): ... here. Adjust.
18554         (__pbase_type_info::__pointer_catch): Implement.
18555         (__pointer_type_info::__pointer_catch): Adjust.
18556         (__pointer_to_member_type_info::__pointer_catch): Adjust.
18557
18558 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
18559
18560         * tinfo.h (__user_type_info::contained_virtual_p): New
18561         predicate.
18562         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
18563         shaped hierarchy.
18564         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
18565         diamond shaped hierarchy. Add early out for mixed diamond and
18566         duplicate shaped hierarchy.
18567
18568 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
18569
18570         * cp-tree.h (build_delete): Change prototype.
18571         (build_vec_delete): Likewise.
18572         * call.c (build_scoped_method_call): Use special_function_kind
18573         values to indicate the kind of destruction to be done.
18574         (build_method_call): Likewise.
18575         * decl.c (finish_destructor_body): Likewise.
18576         (maybe_build_cleanup_1): Likewise.  Rename to ...
18577         (maybe_build_cleanup): ... this.
18578         * decl2.c (delete_sanity): Use special_function_kind
18579         values to indicate the kind of destruction to be done.
18580         (build_cleanup): Likewise.
18581         * init.c (perform_member_init): Likewise.
18582         (build_vec_delete_1): Likewise.
18583         (build_dtor_call): Simplify.
18584         (build_delete): Use special_function_kind
18585         values to indicate the kind of destruction to be done.
18586         (build_vbase_delete): Likewise.
18587         (build_vec_delete): Likewise.
18588
18589         * init.c (sort_member_init): Fix typo in error message generation
18590         code.
18591
18592 2000-05-15  Donald Lindsay  <dlindsay@cygnus.com>
18593
18594         * semantics.c (begin_class_definition): make the packed
18595         attribute be sensitive to the "-fpack-struct" command line flag
18596
18597 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
18598
18599         Update new-abi upcast algorithm.
18600         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
18601         prototype and meaning of return value.
18602         (__si_class_type_info::__do_upcast): Likewise.
18603         (__vmi_class_type_info::__do_upcast): Likewise.
18604         * tinfo.cc (__class_type_info::__upcast_result): Replace
18605         whole2dst with part2dst. Adjust ctor.
18606         (__class_type_info::__do_upcast): Adjust call of worker function.
18607         (__class_type_info::__do_upcast): Adjust.
18608         (__si_class_type_info::__do_upcast): Adjust. Use parent's
18609         __do_upcast.
18610         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
18611         virtual base in diamond hierarchy bug.
18612
18613 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
18614
18615         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
18616         and bitfield to tinfo_fn_p.
18617         (DECL_TINFO_FN_P): Adjust.
18618         (SET_DECL_TINFO_FN_P): Likewise.
18619         (DECL_MUTABLE_P): Likewise.
18620         (DECL_C_BIT_FIELD): Likewise.
18621         (SET_DECL_C_BIT_FIELD): Likewise.
18622         (CLEAR_DECL_C_BIT_FIELD): Likewise.
18623         (DECL_UNINLINABLE): Likewise.
18624         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
18625         (handle_using_decl): Remove assertion.
18626         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
18627         to build FIELD_DECLs.
18628         (build_base_field): Likewise.
18629         (layout_class_type): Likewise.
18630         * decl.c (init_decl_processing): Likewise.
18631         (build_ptrmemfunc_type): Likewise.
18632         (grokdeclarator): Likewise.
18633         * decl2.c (grok_x_components): Likewise.
18634         * except.c (call_eh_info): Likewise.
18635         * init.c (init_init_processing): Likewise.
18636         * rtti.c (expand_class_desc): Likewise.
18637         (create_pseudo_type_info): Likewise.
18638         (get_vmi_pseudo_type_info): Likewise.
18639         (create_tinfo_types): Likewise.
18640         * ptree.c (print_lang_decl): Adjust.
18641         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
18642         before checking DECL_MUTABLE_P.
18643
18644         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
18645         parameters for template functions.
18646         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
18647         destructors as well as constructors.
18648
18649 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
18650
18651         * class.c (build_ctor_vtbl_group): Set inits.
18652         * optimize.c (maybe_clone_body): Set DECL_INLINE and
18653         DECL_THIS_INLINE appropriately for clones.
18654
18655         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
18656         (DECL_CONV_FN_P): Simplify.
18657         (DECL_OPERATOR): Remove.
18658         (language_to_string): Declare.
18659         * decl.c (duplicate_decls): Fix typo in comment.
18660         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
18661         (grok_op_properties): Use DECL_CONV_FN_P instead of
18662         IDENTIFIER_TYPENAME_P.
18663         * dump.c (dequeue_and_dump): Dump the language linkage of
18664         declarations.
18665         * error.c (language_to_string): Give it external linkage.
18666         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
18667         (implicitly_declare_fn): Set DECL_LANGUAGE.
18668         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
18669         IDENTIFIER_TYPENAME_P.
18670         (tsubst_decl): Likewise.
18671         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
18672         * semantics.c (finish_member_declaration): Don't mark members of
18673         classes declared in an extern "C" region as extern "C".
18674
18675 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
18676
18677         * decl2.c (qualified_lookup_using_namespace): Look through
18678         namespace aliases.
18679
18680         * decl.c (push_using_decl): Return the old decl on namespace level.
18681
18682 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
18683
18684         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
18685         (VTT_NAME_PREFIX): New macro.
18686         (CTOR_VTBL_NAME_PREFIX): Likewise.
18687         (get_ctor_vtbl_name): New function.
18688         * class.c (get_vtable_name): Simplify.
18689         (get_vtt_name): New function.
18690         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
18691         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
18692         when a virtual base becomes primary.
18693         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
18694         VTTs.
18695         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
18696         additional parameters.
18697         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
18698         (initialize_array): New function.
18699         (build_vtt): Likewise.
18700         (build_vtt_inits): Likewise.
18701         (dfs_build_vtt_inits): Likewise.
18702         (dfs_fixup_binfo_vtbls): Likewise.
18703         (build_ctor_vtbl_group): Likewise.
18704         (initialize_vtable): Use initialize_array.
18705         (accumulate_vtbl_inits): Reimplement to handle construction
18706         vtables.
18707         (dfs_accumulate_vtbl_inits): Likewise.
18708         (bulid_vtbl_initializer): Adjust parameter name.
18709         * method.c (build_typename_overload): Remove #if 0'd code.
18710         (get_ctor_vtbl_name): New function.
18711         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
18712         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
18713
18714         * cp-tree.h (struct lang_type): Remove search_slot.
18715         (CLASSTYPE_SEARCH_SLOT): Remove.
18716         (emit_base_init): Change prototype.
18717         (initialize_vtbl_ptrs): Likewise.
18718         (expand_indirect_vtbls_init): Likewise.
18719         (clear_search_slots): Remove.
18720         * decl.c (lang_mark_tree): Don't mark search_slot.
18721         * init.c (initialize_vtbl_ptrs): Simplify.
18722         (emit_base_init): Likewise.
18723         * search.c (struct vbase_info): Document decl_ptr.
18724         (convert_pointer_to_single_level): Remove.
18725         (dfs_find_vbases): Remove.
18726         (dfs_init_base_pointers): Simplify.
18727         (dfs_clear_vbase_slots): Remove.
18728         (dfs_vtable_path_unmark): New function.
18729         (init_vbase_pointers): Simplify.
18730         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
18731         (expand_indirect_vtbls_init): Simplify.  Don't call
18732         mark_all_temps_used.
18733         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
18734         initialize_vtbl_ptrs.
18735
18736 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
18737
18738         * except.c: Add static prototypes.
18739
18740 2000-05-20  H.J. Lu  <hjl@gnu.org>
18741
18742         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
18743
18744 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
18745
18746         Don't create a separate copy of virtual bases for the
18747         CLASSTYPE_VBASECLASSES list.
18748         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
18749         (BINFO_FOR_VBASE): Remove.
18750         (CANONICAL_BINFO): Adjust.
18751         (binfo_for_vbase): New function.
18752         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
18753         instead of BINFO_FOR_VBASE.
18754         (build_vbase_pointer): Likewise.
18755         (build_secondary_vtable): Likewise.
18756         (dfs_mark_primary_bases): Likewise.
18757         (mark_primary_bases): Likewise.
18758         (layout_nonempty_base_or_field): Likewise.
18759         (dfs_set_offset_for_shared_vbases): Likewise.
18760         (dfs_set_offset_for_unshared_vbases): Likewise.
18761         (layout_virtual_bases): Likewise.  Adjust for changes to the
18762         CLASSTYPE_VBASECLASSES list.
18763         (dump_class_hierarchy_r): Use binfo_for_vbase
18764         instead of BINFO_FOR_VBASE.
18765         (dump_class_hierarchy): Likewise.
18766         (finish_vtbls): Likewise.
18767         (build_vtbl_initializer): Adjust for changes to the
18768         CLASSTYPE_VBASECLASSES list.
18769         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
18770         * decl.c (finish_destructor_body): Adjust for changes to the
18771         CLASSTYPE_VBASECLASSES list.
18772         * init.c (sort_base_init): Use binfo_for_vbase.
18773         (construct_virtual_bases): Adjust for changes to the
18774         CLASSTYPE_VBASECLASSES list.
18775         (expand_member_init): Use binfo_for_vbase.
18776         (build_vbase_delete):  Adjust for changes to the
18777         CLASSTYPE_VBASECLASSES list.
18778         * method.c (do_build_copy_constructor): Likewise.
18779         * rtti.c (get_base_offset): Use binfo_for_vbase.
18780         (expand_class_desc): Remove #if 0'd code.
18781         * search.c (struct vbase_info): Remove vbase_types.
18782         (get_base_distance):  Use binfo_for_vbase.
18783         (lookup_field_queue_p): Use CANONICAL_BINFO.
18784         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
18785         (get_pure_virtuals): Adjust for changes to the
18786         CLASSTYPE_VBASECLASSES list.
18787         (dfs_find_vbases): Use binfo_for_vbase.
18788         (dfs_init_vbase_pointers): Likewise.
18789         (init_vbase_pointers): Don't initialize vi.vbase_types.
18790         (virtual_context): Use binfo_for_vbase.
18791         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
18792         CLASSTYPE_VBASECLASSES list.
18793         (expand_indirect_vtbls_init): Simplify.
18794         (dfs_get_vbase_types): Don't replicate virtual bases.
18795         (find_vbase_instance): Use binfo_for_vbase.
18796         (binfo_for_vbase): New function.
18797         * typeck.c (get_delta_difference): Use binfo_for_vbase.
18798
18799 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
18800
18801         * decl2.c (finish_anon_union): Generalize error messages to handle
18802         anonymous structures.
18803         * init.c (perform_member_init): Remove `name' parameter.
18804         (build_field_list): New function.
18805         (sort_member_init): Handle anonymous union initialization order
18806         correctly.  Check for multiple initializations of the same union.
18807         (emit_base_init): Don't look up fields by name here.
18808         (expand_member_init): Record the result of name lookup for future
18809         reference.
18810         * typeck.c (build_component_ref): Fix formatting.
18811
18812 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
18813
18814         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
18815         * typeck.c (build_x_compound_expr): Replace warn_unused with
18816         warn_unused_value.
18817
18818         * decl2.c (lang_decode_option): Update -Wall unused flags by
18819         calling set_Wunused.
18820
18821 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
18822
18823         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
18824         * init.c (dfs_vtable_path_unmark): Remove.
18825         * search.c (marked_new_vtable_p): Likewise.
18826         (unmarked_new_vtable_p): Likewise.
18827         (dfs_search_slot_nonempty_p): Likewise.
18828         (dfs_mark): Likewise.
18829         (dfs_vtable_path_unmark): Likewise.
18830         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
18831         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
18832         (dfs_init_vbase_pointers): Remove special-case new ABI code.
18833         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
18834         (init_vbase_pointers): Simplify.
18835         (expand_indirect_vtbls_init): Likewise.
18836
18837         * class.c (copy_virtuals): New function.
18838         (build_primary_table): Use it.
18839         (build_secondary_vtable): Likewise.
18840         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
18841         indicate that no vcall offset is required.
18842         (add_virtual_function): Likewise.
18843         (modify_all_vtables): Likewise.
18844         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
18845         (dfs_accumulate_vtbl_inits): Likewise.
18846         (build_vtbl_initializer): Make changes to handle construction
18847         vtables.
18848         (dfs_build_vcall_offset_vtbl_entries): Likewise.
18849         (build_rtti_vtbl_entries): Likewise.
18850         (build_vtable_entries): Handle a NULL vcall_index.
18851
18852 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
18853
18854         * decl2.c (lang_decode_option): Fix thinko.
18855
18856 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
18857
18858         * except.c (check_handlers): New fn.
18859         * cp-tree.h: Declare it.
18860         * semantics.c (finish_handler_sequence): Call it.
18861         (finish_function_handler_sequence): Likewise.
18862         (finish_handler_parms): Set TREE_TYPE on the handler.
18863         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
18864         * search.c (get_base_distance_recursive): If protect>1, ignore
18865         special access.
18866         (get_base_distance): Don't reduce watch_access.
18867
18868 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
18869
18870         * lex.c: #include diagnostic.h.
18871         (lang_init_options): Set default prefixing rules.
18872
18873         * lang-options.h: Add -fdiagnostics-show-location=.
18874
18875         * decl2.c: #include diagnostic.h.
18876         (lang_decode_option): Handle -fdiagnostics-show-location=.
18877
18878 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
18879
18880         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
18881         * vec.cc: Revert my 2000-05-07 change.
18882
18883 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
18884
18885         * class.c (check_field_decls): Complain about non-static data
18886         members with same name as class in class with constructor.
18887
18888 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
18889
18890         * decl.c (grokdeclarator): Allow non-static data members with
18891         same name as class.
18892
18893 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
18894
18895         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
18896         and pending_inline.filename.  Update prototypes.
18897         * decl.c (define_label): Constify filename parameter.
18898         * decl2.c (warn_if_unknown_interface): Constify local char *.
18899         * input.c Constify input_source.filename. Don't declare
18900         input_filename or lineno.  Constify filename parameter to feed_input.
18901         * lex.c (init_parse): Constify parameter and return value.
18902         (cp_pragma_interface, cp_pragma_implementation): Constify
18903         filename argument.
18904         (reinit_parse_for_method, reinit_parse_for_block,
18905         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
18906         Constify local char *.
18907         * pt.c: Don't declare lineno or input_filename.
18908         (print_template_context, tsubst_friend_function, tsubst_decl,
18909         tsubst, instantiate_decl): Constify local char *.
18910         * semantics.c (expand_body): Constify local char *.
18911         * tree.c (build_srcloc): Constify filename parameter.
18912         * typeck.c (c_expand_asm_operands): Constify filename
18913         parameter.
18914
18915 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
18916
18917         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
18918         offsetof expansion.
18919
18920 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
18921
18922         * inc/cxxabi.h:  Fix typos in comment.
18923         (__base_class_info::__offset): Use a static_cast.
18924
18925 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
18926
18927         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
18928         of std::size_t and std::ptrdiff_t respectively.
18929         * tinfo.cc: Likewise.
18930         * vec.cc: Likewise.
18931
18932 2000-05-06  Richard Henderson  <rth@cygnus.com>
18933
18934         * typeck.c (build_c_cast): Don't warn integer->pointer size
18935         mismatch for constants.
18936
18937 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
18938
18939         * rtti.c (ptmd_initializer): Set non-public, if class is
18940         incomplete.
18941
18942         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
18943         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
18944         __cxa_vec_delete): Likewise.
18945         * tinfo.cc (__dynamic_cast): Likewise.
18946         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
18947         __cxa_vec_delete): Likewise.
18948
18949 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
18950
18951         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
18952         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
18953         (lang_decl_flags): Add vcall_offset.
18954         (THUNK_VCALL_OFFSET): Use it.
18955         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
18956         * method.c (make_thunk): Create the lang_decl here, not in
18957         emit_thunk.
18958         (emit_thunk): Make generic thunks into ordinary functions once
18959         they have been fed to expand_body.
18960         * semantics.c (expand_body): Set current_function_is_thunk here.
18961
18962 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18963
18964         * class.c (update_vtable_entry_for_fn): Prototype.
18965
18966         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
18967         and `tmpl'.
18968
18969         * search.c (dfs_build_inheritance_graph_order): Prototype.
18970
18971 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
18972
18973         * cp-tree.h (special_function_kind): Add various kinds of
18974         destructors.
18975         (special_function_p): New function.
18976         * class.c (overrides): Don't let one kind of destructor override
18977         another.
18978         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
18979         whether or not to instantiate a template.
18980         * tree.c (special_function_p): Define.
18981
18982 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
18983
18984         * cp-tree.def (THUNK_DECL): Remove.
18985         * cp-tree.h (DECL_THUNK_P): New macro.
18986         (DECL_NON_THUNK_FUNCTION_P): Likewise.
18987         (DECL_EXTERN_C_FUNCTION_P): Likewise.
18988         (SET_DECL_THUNK_P): Likewise.
18989         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
18990         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
18991         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
18992         * decl.c (decls_match): Use DECL_EXTERN_C_P.
18993         (duplicate_decls): Likewise.
18994         (pushdecl): Likewise.  Adjust thunk handling.
18995         (grokfndecl): Use DECL_EXTERN_C_P.
18996         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
18997         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
18998         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
18999         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
19000         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
19001         DECL_NO_STATIC_CHAIN.
19002         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
19003         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
19004         * search.c (covariant_return_p): Remove THUNK_DECL handling.
19005         * ir.texi: Update.
19006
19007 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
19008
19009         * tree.c (walk_tree): Set lineno.
19010
19011 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
19012
19013         * exception.cc: Update license notice.
19014         * new.cc: Likewise.
19015         * new1.cc: Likewise.
19016         * new2.cc: Likewise.
19017         * tinfo.cc: Likewise.
19018         * tinfo2.cc: Likewise.
19019         * vec.cc: Likewise.
19020         * inc/cxxabi.h: Likewise.
19021         * inc/exception: Likewise.
19022         * inc/new: Likewise.
19023         * inc/new.h: Likewise.
19024         * inc/typeinfo: Likewise.
19025
19026 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
19027
19028         * tree.c (build_target_expr_with_type): If we already have a
19029         TARGET_EXPR, just return it.
19030
19031         * optimize.c (initialize_inlined_parameters): Don't generate an
19032         EXPR_STMT if we can just use DECL_INITIAL.
19033         * decl.c (emit_local_var): Only make the initialization a
19034         full-expression if stmts_are_full_exprs_p.
19035
19036 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
19037
19038         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
19039         macro.
19040         * call.c (standard_conversion): Use it.
19041         (direct_reference_binding): Likewise.
19042         (build_over_call): Likewise.
19043         (is_properly_derived_from): Likewise.
19044         (compare_ics): Likewise.
19045         * class.c (resolves_to_fixed_type_p): Likewise.
19046         * optimize.c (declare_return_variable): Likewise.
19047         * pt.c (is_specialization_of): Likewise.
19048         (unify): Likewise.
19049         * typeck.c (comp_target_parms): Likeiwse.
19050         (build_static_cast): Likewise.
19051         (build_reinterpret_cast): Likewise.
19052         (build_const_cast): Likewise.
19053         (comp_ptr_ttypes_real): Likewise.
19054         (comp_ptr_ttypes_const): Likewise.
19055         * typeck2.c (process_init_constructor): Likewise.
19056
19057 2000-04-30  Scott Snyder <snyder@fnal.gov>
19058
19059         * decl.c (finish_destructor_body): Use the base destructor when
19060         destroying virtual bases.
19061
19062 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
19063
19064         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
19065         STMT_EXPRs.
19066         * optimize.c (struct inline_data): Add target_exprs field.
19067         (declare_return_variable): When a function returns an aggregate,
19068         use the variable declared in the TARGET_EXPR as the remapped
19069         DECL_RESULT.
19070         (expand_call_inline): Update the pending target_exprs stack.
19071         (optimize_function): Initialize the stack.
19072
19073         * decl2.c (finish_file): Fix typo in comment.
19074
19075         * method.c (emit_thunk): Don't try to return a `void' value.
19076
19077         * optimize.c (initialize_inlined_parameters): If the parameter is
19078         addressable, we need to make a new VAR_DECL, even if the
19079         initializer is constant.
19080
19081 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
19082
19083         * decl.c (grok_op_properties): Add an extra check of argtypes.
19084
19085 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
19086
19087         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
19088         variables.
19089         (initialize_inlined_parameters): Try to avoid creating new
19090         VAR_DECLs.
19091
19092 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
19093
19094         * lex.c (my_get_run_time): Remove.
19095         (init_filename_times): Use get_run_time instead of my_get_run_time.
19096         (check_newline): Likewise.
19097         (dump_time_statistics): Likewise.
19098         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
19099         of computing elapsed time explicitly.
19100
19101 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
19102
19103         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
19104         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
19105         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
19106         before calling decl_constant_value.
19107         * class.c (check_bitfield_decl): Likewise.
19108         * cvt.c (ocp_convert): Likewise.
19109         (convert): Likewise.
19110         * decl.c (compute_array_index_type): Likewise.
19111         (build_enumerator): Likewise.
19112         * decl2.c (check_cp_case_value): Likewise.
19113         * pt.c (convert_nontype_argument): Likewise.
19114         (tsubst): Likewise.
19115         * typeck.c (decay_conversion): Likewise.
19116         (build_compound_expr): Likewise.
19117         (build_reinterpret_cast): Likewise.
19118         (build_c_cast): Likewise.
19119         (convert_for_assignment): Likewise.
19120
19121 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
19122
19123         * decl.c (finish_function): Don't play games with DECL_INLINE.
19124
19125 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
19126
19127         * ir.texi: Correct typo.
19128
19129 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
19130
19131         * decl.c (grokdeclarator): Reject VLAs as members.
19132
19133 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
19134
19135         * call.c (standard_conversion): Accept conversion between
19136         COMPLEX_TYPEs.
19137
19138         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
19139
19140 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
19141
19142         * decl2.c (finish_file): Remove double setup for accounting
19143         compile time.
19144
19145 2000-04-24  Robert Lipe <robertlipe@usa.net>
19146
19147         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
19148
19149 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
19150
19151         * new.cc (set_new_handler): Needs to be in std::.
19152
19153 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
19154
19155         * cp-tree.h (lang_decl): Remove pretty_function_p.
19156         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
19157         language-specific node.
19158         * decl.c (cp_make_fname_decl): Use build_decl, not
19159         build_lang_decl, to build the variables.
19160         (grokvardecl): Don't call build_lang_decl for local variables in
19161         templates.
19162         (grokdeclarator): Don't call build_lang_decl for local type
19163         declarations in templates.
19164         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
19165         zero'd memory, rather than calling memset.
19166         * pt.c: Include hashtab.h.
19167         (local_specializations): New variable.
19168         (retrieve_local_specialization): Use it.
19169         (register_local_specialization): Likewise.
19170         (tsubst_decl): Don't assume local variables have
19171         DECL_LANG_SPECIFIC.
19172         (instantiate_decl): Set up local_specializations.
19173         * Makefile.in (HTAB_H): New variable.
19174
19175 2000-04-23  Richard Henderson  <rth@cygnus.com>
19176
19177         * typeck.c (c_expand_asm_operands): Restore the original
19178         contents of the output list.
19179
19180 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
19181
19182         * ir.texi:  Document complex number representation.
19183
19184 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
19185
19186         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
19187         (target_incomplete_p): New function.
19188         (tinfo_base_init): Create comdat NTBS name variable.
19189         (ptr_initializer): Add non_public parameter. Calculate it.
19190         (ptmd_initializer): Likewise.
19191         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
19192         (create_real_tinfo_var): Add non_public parameter. Use it.
19193         Push proxy into global namespace.
19194         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
19195         New enumeration.
19196         * inc/typeinfo (type_info::before, type_info::operator==):
19197         Compare __name addresses.
19198
19199         * tinfo2.cc: Remove new-abi builtins comment.
19200
19201 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
19202
19203         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
19204
19205         * call.c (joust): Exit early if we get the same function, too.
19206
19207         * decl2.c (key_method): Return NULL_TREE for template classes.
19208         (import_export_class): Don't need to check for template classes.
19209
19210 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
19211
19212         * lex.c: Remove references to cccp.c.
19213
19214 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
19215
19216         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
19217         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
19218         (DECL_DESTRUCTOR_P): Use destructor_attr.
19219         (DECL_CONST_MEMFUNC_P): Reimplement.
19220         (DECL_VOLATILE_MEMFUNC_P): Remove.
19221         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
19222         (overrides): Use DECL_DESTRUCTOR_P.
19223         (check_for_override): Likewise.
19224         * decl.c (start_function): Likewise.
19225         * decl2.c (grokfclassfn): Likewise.
19226         (check_classfn): Likewise.
19227         (grok_function_init): Likewise.
19228
19229 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
19230
19231         * decl2.c (grokfield): Issue error on illegal data member
19232         declaration.
19233
19234 2000-04-17  Mark P Mitchell  <mark@codesourcery.com>
19235
19236         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
19237
19238 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
19239
19240         * class.c (build_vtable_entry): Don't build thunks for type-info
19241         functions.
19242
19243 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
19244
19245         * decl.c (decls_match): Allow a redeclaration of a builtin to
19246         specify args while the builtin did not.
19247
19248 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
19249
19250         * cp-tree.def (THUNK_DECL): Add to documentation.
19251         * cp-tree.h (flag_huge_objects): Declare.
19252         * class.c (modify_vtable_entry): Tidy.
19253         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
19254         Calculate delta appropriately for the new ABI.
19255         (dfs_modify_vtables): Use it.
19256         (modify_all_vtables): Fix thinko in code to add overriding copies
19257         of functions to primary vtables.
19258         (build_clone): Fix typo in comment.
19259         (clone_function_decl): Correct order of destructors in vtable.
19260         (build_vbase_offset_vtbl_entries): Adjust comment.
19261         (dfs_vcall_offset_queue_p): Remove.
19262         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
19263         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
19264         (build_vtable_entry): Correct check for pure virtual functions.
19265         Don't declare flag_huge_objects.
19266         * decl.c (flag_huge_objects): Remove declaration.
19267         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
19268         Use int_size_in_bytes.
19269         (emit_thunk): Handle vcall offset thunks.
19270
19271 2000-04-15  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19272
19273         * decl2.c (parse_time, varconst_time): Delete declarations.
19274         (finish_file): Delete LINENO declaration.
19275         START_TIME and THIS_TIME now long.
19276
19277 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
19278
19279         * class.c (build_base_field): Reformat comment.
19280
19281         * inc/cxxabi.h (stddef.h): Comment inclusion.
19282         (__base_class_info::__offset): Comment shift.
19283
19284 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
19285
19286         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
19287         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
19288         (cp_push_exception_identifier): New macro.
19289         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
19290         (DECL_BASE_DESTRUCTOR_P): Likewise.
19291         (DECL_DELETING_DESTRUCTOR_P): Likewise.
19292         (get_vtbl_decl_for_binfo): Fix formatting.
19293         (in_charge_arg_for_name): New macro.
19294         (maybe_build_cleanup_and_delete): Remove declaration.
19295         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
19296         (in_charge_arg_for_name): New function.
19297         (build_new_method_call): Use it.  Handle cloned destructors.
19298         (build_clone): Don't make the base constructor virtual.
19299         Automatically defer generated functions.
19300         (clone_function_decl): Handle destructors, too.
19301         (clone_constructors_and_destructors): Likewise.
19302         (create_vtable_ptr): Don't create a vtable entry for a cloned
19303         function.
19304         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
19305         (initialize_predefined_identifiers): Update appropriately.
19306         (finish_destructor_body): Simplify.
19307         (maybe_build_cleanup_and_delete): Remove.
19308         * except.c (expand_throw): Handle new-ABI destructors.
19309         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
19310         (build_dtor_call): New function.
19311         (build_delete): Use it.  Simplify.
19312         * optimize.c (maybe_clone_body): Handle destructors.
19313         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
19314
19315         * exception.cc (cleanup_fn): New typedef.
19316         (CALL_CLEANUP): New macro.
19317         (cp_eh_info): Use them.
19318         (__cp_push_exception): Likewise.
19319         (__cp_pop_exception): Likewise.
19320
19321 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
19322
19323         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
19324         (complete_dtor_identifier): New macro.
19325         (CLASSTYPE_FIRST_CONVERSION): Remove.
19326         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
19327         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
19328         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
19329         (CLASSTYPE_CONSTRUCTORS): Likewise.
19330         (CLASSTYPE_DESTRUCTORS): Likewise.
19331         (lang_decl): Add cloned_function.
19332         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
19333         (DECL_BASE_CONSTRUCTOR_P): Likewise.
19334         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
19335         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
19336         (DECL_CLONED_FUNCTION_P): Likewise.
19337         (DECL_CLONED_FUNCTION): Likewise.
19338         (clone_function_decl): Declare.
19339         (maybe_clone_body): Likewise.
19340         * call.c (build_user_type_conversion_1): Call complete object
19341         constructors in the new ABI.
19342         (build_new_method_call): Don't add in-charge parameters under the
19343         new ABI.
19344         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
19345         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
19346         CLASSTYPE_DESTRUCTOR_SLOT.
19347         (build_clone): New function.
19348         (clone_function_decl): Likewise.
19349         (clone_constructors_and_destructors): Likewise.
19350         (check_bases_and_members): Use it.
19351         * decl.c (iniitialize_predefined_identifiers): Initialize
19352         complete_dtor_identifier.
19353         (finish_function): Don't add extra code to a clone.
19354         (lang_mark_tree): Mark cloned_function.
19355         * decl2.c (mark_used): Don't bother trying to instantiate things
19356         we synthesized.
19357         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
19358         * method.c (set_mangled_name_for_decl): Don't treat clones as
19359         constructors.
19360         (synthesize_method): Sythesize cloned functions, not the clones.
19361         * optimize.c (inline_data): Update comment on ret_label.
19362         (remap_block): Don't assume DECL_INITIAL exists.
19363         (copy_body_r): Allow ret_label to be NULL.
19364         (maybe_clone_body): Define.
19365         * pt.c (tsubst_decl): Handle clones.
19366         (instantiate_clone): New function.
19367         (instantiate_template): Use it.
19368         (set_mangled_name_for_template_decl): Don't treat clones as
19369         constructors.
19370         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
19371         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
19372         * semantics.c (expand_body): Clone function bodies as necessary.
19373
19374         * optimize.c (remap_decl): Avoid sharing structure for arrays
19375         whose size is only known at run-time.
19376         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
19377
19378         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
19379         to has_in_charge_parm_p.
19380         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
19381         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
19382         (DECL_COPY_CONSTRUCTOR_P): New macro.
19383         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
19384         (build_user_type_conversion_1): Likewise.
19385         (convert_like_real): Likewise.
19386         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
19387         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
19388         (copy_args_p): Likewise.
19389         (grok_ctor_properties): Likewise.
19390         (start_function): Likewise.
19391         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
19392         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
19393         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
19394         * method.c (do_build_copy_constructor): Use
19395         DECL_HAS_IN_CHARGE_PARM_P.
19396         (synthesize_method): Likewise.
19397         * pt.c (instantiate_template): Remove goto.
19398         * tree.c (build_cplus_method_type): Remove mention of obstacks in
19399         comment.
19400
19401         * cp-tre.h (finish_function): Change prototype.
19402         * decl.c (end_cleanup_fn): Adjust caller.
19403         (finish_function): Take only one parameter.
19404         * decl2.c (finish_objects): Adjust caller.
19405         (finish_static_storage_duration_function): Likewise.
19406         * method.c (emit_thunk): Likewise.
19407         * parse.y: Likewise.
19408         * parse.c: Regenerated.
19409         * pt.c (instantiate_decl): Likewise.
19410         * rtti.c (synthesize_tinfo_fn): Likewise.
19411         * semantics.c (expand_body): Likewise.
19412
19413         * cp-tree.h (copy_decl): New function.
19414         * class.c (finish_struct_1): Use it.
19415         * lex.c (copy_decl): Define it.
19416         * pt.c (tsubst_decl): Likewise.
19417         * tree.c (copy_template_template_parm): Likewise.
19418
19419         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
19420         has_nonpublic_assign_ref.
19421         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
19422         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
19423         * class.c (finish_struct_methods): Don't set
19424         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
19425         (interface_only): Don't declare.
19426         (interface_unknown): Likewise.
19427
19428 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
19429
19430         * tree.h (HAVE_TEMPLATES): Remove definition.
19431         * lang-options.h (-fthis-is-variable): Remove documentation.
19432
19433 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
19434
19435         * class.c (instantiate_type): Handle object-relative template-id.
19436
19437         * semantics.c (finish_expr_stmt): Call convert_to_void here.
19438         * decl.c (cplus_expand_expr_stmt): Not here.
19439
19440         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
19441         Initialize exprtype earlier.
19442
19443         * parse.y (fn.def1): Check for defining types in return types.
19444
19445         * decl.c (check_tag_decl): Notice extra fundamental types.
19446         Diagnose empty decls in classes, too.
19447
19448         * decl.c (grokdeclarator): Don't override an anonymous name if no
19449         declarator was given.
19450
19451         * cvt.c (convert_to_void): Call resolve_offset_ref.
19452
19453         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
19454
19455         * decl2.c (decl_namespace): Handle getting a type.
19456
19457         * typeck.c (build_c_cast): Re-enable warning for cast between
19458         pointer and integer of different size.
19459
19460 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
19461
19462         * inc/cxxabi.h (__pointer_type_info): Add restrict and
19463         incomplete flags.
19464         (__pointer_type_info::__pointer_catch): New virtual function.
19465         (__pointer_to_member_type_info): Derive from
19466         __pointer_type_info. Adjust.
19467         (__pointer_to_member_type_info::__do_catch): Remove.
19468         (__pointer_to_member_type_info::__is_pointer_p): Declare.
19469         (__pointer_to_member_type_info::__pointer_catch): Declare.
19470         * rtti.c (qualifier_flags): Add restrict flag.
19471         (ptmd_initializer): Reorder members.
19472         (create_tinfo_types): Expand comments. Reorder
19473         ptmd_desc_type_node members.
19474         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
19475         Implement.
19476         (__pointer_type_info::__do_catch): Move specific code into
19477         __pointer_catch. Call it.
19478         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
19479         specific catch checking. Fix void conversion check.
19480         (__pointer_to_member_type_info::__do_catch): Remove.
19481         (__pointer_to_member_type_info::__pointer_catch): Implement.
19482
19483 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
19484
19485         * lex.c (init_parse): Remove traces of classof and headof.
19486         * decl2.c (flag_operator_names): Default to 1.
19487         (lang_decode_option): Do not set it for -ansi.
19488
19489 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
19490
19491         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
19492         (DECL_MAIN_VARIANT): Remove.
19493         * decl.c (duplicate_decls): Don't set it.
19494         (start_function): Likewise.
19495         (lang_mark_tree): Don't mark it.
19496         * decl2.c (defer_fn): Don't use it.
19497         * lex.c (retrofit_lang_decl): Don't set it.
19498         * pt.c (tsubst_decl): Likewise.
19499         * ptree.c (print_lang_decl): Don't print it.
19500         * typeck.c (mark_addressable): Don't use it.
19501
19502 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
19503
19504         * vec.cc: Include <new> and <exception>.
19505         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
19506         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
19507         terminate.
19508         (__cxa_vec_delete): Catch dtor exceptions.
19509
19510 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
19511
19512         Prepend __ to implementation defined names.
19513         * inc/typeinfo (type_info): Rename _name to __name.
19514         (type_info::type_info): Rename parameter.
19515         (type_info::operator==, type_info::operator!=,
19516         type_info::before): Likewise.
19517         (type_info::is_pointer_p, type_info::is_function_p,
19518         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
19519         parameters.
19520         * inc/cxxabi.h
19521         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
19522         (__pointer_type_info::__pointer_type_info): Likewise.
19523         (__pointer_type_info::is_pointer_p,
19524         __pointer_type_info::do_catch): Prepend __. Rename parameters.
19525         (__array_type_info::__array_type_info): Rename parameters.
19526         (__function_type_info::__function_type_info): Likewise.
19527         (__function_type_info::is_function_p): Prepend __.
19528         (__enum_type_info::__enum_type_info): Rename parameters.
19529         (__pointer_to_member_type_info::__pointer_to_member_type_info):
19530         Likewise.
19531         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
19532         parameters.
19533         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
19534         (__class_type_info::__class_type_info): Rename parameters.
19535         (__class_type_info::sub_kind): Prepend __. Adjust member names.
19536         (__class_type_info::upcast_result,
19537         __class_type_info::dyncast_result): Prepend __. Move definition
19538         into tinfo.cc.
19539         (__class_type_info::do_upcast, __class_type_info::do_catch,
19540         __class_type_info::find_public_src,
19541         __class_type_info::do_dyncast,
19542         __class_type_info::do_find_public_src): Prepend __. Rename
19543         parameters.
19544         (__si_class_type_info::__si_class_type_info): Rename parameters.
19545         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
19546         __si_class_type_info::do_find_public_src): Prepent __. Rename
19547         parameters.
19548         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
19549         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
19550         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
19551         parameters.
19552         (__dynamic_cast): Rename parameters.
19553         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
19554         type_info::do_catch, type_info::do_upcast): Prepend __.
19555         (contained_p, public_p, virtual_p, contained_public_p,
19556         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
19557         (__class_type_info::do_catch,
19558         __class_type_info::do_upcast): Prepend __. Adjust.
19559         (__class_type_info::__upcast_result,
19560         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
19561         Adjust.
19562         (__class_type_info::find_public_src): Prepend __. Adjust.
19563         (__class_type_info::do_find_public_src,
19564         __si_class_type_info::do_find_public_src,
19565         __vmi_class_type_info::do_find_public_src): Likewise.
19566         (__class_type_info::do_dyncast,
19567         __si_class_type_info::do_dyncast,
19568         __vmi_class_type_info::do_dyncast): Likewise.
19569         (__class_type_info::do_upcast,
19570         __si_class_type_info::do_upcast,
19571         __vmi_class_type_info::do_upcast): Likewise.
19572         (__dynamic_cast): Adjust.
19573         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
19574         (__function_type_info::is_function_p): Likewise.
19575         (__pointer_type_info::do_catch): Likewise. Adjust.
19576         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
19577         (__throw_type_match_rtti_2): Adjust.
19578         (__is_pointer): Adjust.
19579
19580 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
19581
19582         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
19583         (complete_ctor_identifier): New macro.
19584         (special_function_kind): Add sfk_copy_constructor and
19585         sfk_assignment_operator.
19586         (LOOKUP_HAS_IN_CHARGE): Remove.
19587         (cons_up_default_function): Rename to ...
19588         (implicitly_declare_fn): ... this.
19589         * call.c (build_new_method_call): Add in-charge parameters for
19590         constructors here.
19591         * class.c (add_implicitly_declared_members): Change parameter name
19592         from cant_have_assignment to cant_have_const_assignment.
19593         Replace calls to cons_up_default_function to implicitly_declare_fn.
19594         * cvt.c (ocp_convert): Use complete_ctor_identifier.
19595         * decl.c (initialize_predefined_identifiers): Initialize it.
19596         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
19597         complex expression.
19598         * init.c (expand_default_init): Don't calculate the in-charge
19599         parameter here.
19600         (build_new_1): Likewise.
19601         * lex.c (cons_up_default_function): Move to method.c.
19602         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
19603         (implicitly_declare_fn): New function.
19604         * typeck.c (build_static_cast): Use complete_ctor_identifier.
19605         (build_modify_expr): Likewise.
19606         * typeck2.c (build_functional_cast): Likewise.
19607
19608         Under the new ABI, constructors don't return `this'.
19609         * cp-tree.h (warn_reorder): Declare.
19610         (special_function_kind): New enum.
19611         (global_base_init_list): Remove declaration.
19612         (emit_base_init): Don't return a value.
19613         (check_base_init): Don't declare.
19614         (is_aggr_typedef): Likewise.
19615         * decl.c (check_special_function_return_type): New function.
19616         (return_types): Remove.
19617         (grokdeclarator): Use check_special_function_return_type.
19618         (start_function): Don't initialize ctor_label under the new ABI.
19619         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
19620         * init.c (begin_init_stmts): Move to top of file.
19621         (finish_init_stmts): Likewise.
19622         (warn_reorder): Don't declare.
19623         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
19624         value.
19625         (check_base_init): Remove.
19626         (is_aggr_typedef): Likewise.
19627         (build_new_1): Don't use the return value of a constructor.
19628         * semantics.c (setup_vtbl_ptr): Don't use the return value
19629         of emit_base_init.
19630         * typeck.c (check_return_expr): Don't magically convert return
19631         statements into `return this' in constructors under the new ABI.
19632
19633         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
19634         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
19635         (base_ctor_identifier): New macro.
19636         (base_dtor_identifier): Likewise.
19637         (deleting_dtor_identifier): Likewise.
19638         * decl.c: Don't include obstack.h.
19639         (obstack_chunk_alloc): Don't define.
19640         (obstack_chunk_free): Likewise.
19641         (struct predefined_identifier): New type.
19642         (initialize_predefined_identifiers): New function.
19643         (init_decl_processing): Use it.
19644         (debug_temp_inits): Remove.
19645         (start_method): Don't call preserve_data.
19646         (hack_incomplete_structures): Update comment.
19647         * init.c (init_init_processing): Don't initialize
19648         nelts_identifier.
19649         (build_offset_rf): Remove dead code.
19650         (build_delete): Use CLASSTYPE_N_BASECLASSES.
19651         * search.c (init_search_processing): Don't initialize
19652         vptr_identifier.
19653
19654 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19655
19656         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
19657         some sign_compare warnings.
19658
19659 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
19660
19661         Rename abi::__vmi_class_type_info members.
19662         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
19663         base_list, detail_masks members to vmi_flags, vmi_base_count,
19664         vmi_bases and vmi_flags_masks respectively.
19665         (__vmi_class_type_info::vmi_flags_masks): Rename
19666         details_unknown_mask to flags_unknown_mask.
19667         * tinfo.cc (__class_type_info::do_upcast): Adjust.
19668         (__vmi_class_type_info::do_find_public_src): Adjust.
19669         (__vmi_class_type_info::do_dyncast): Adjust.
19670         (__vmi_class_type_info::do_upcast): Adjust.
19671
19672 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
19673
19674         * tinfo.cc (convert_to_base): New function.
19675         (get_vbase_offset): Remove. Move into convert_to_base.
19676         (__vmi_class_type_info::do_find_public_src): Adjust.
19677         (__vmi_class_type_info::do_dyncast): Adjust.
19678         (__vmi_class_type_info::do_upcast): Adjust.
19679
19680 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
19681
19682         * tinfo.cc (operator=): Use __builtin_strcmp.
19683         * tinfo2.cc (before): Likewise.
19684
19685 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
19686
19687         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
19688         (DECL_SAVED_INLINE): Rename to ...
19689         (DECL_DEFERRED_FN): ... this.
19690         (in_function_p): Remove declaration.
19691         (mark_inline_for_output): Rename to ...
19692         (defer_fn): ... this.
19693         * decl.c (finish_function): Adjust call to mark_inline_for_output.
19694         (in_function_p): Remove definition.
19695         * decl2.c (saved_inlines): Rename to ...
19696         (deferred_fns): ... this.
19697         (saved_inlines_used): Rename to ...
19698         (deferred_fns_used): ... this.
19699         (mark_inline_for_output): Rename to ...
19700         (defer_fn): ... this.
19701         (finish_file): Adjust accordingly.
19702         (init_decl2): Likewise.
19703         * lex.c (cons_up_default_function): Likewise.
19704         * pt.c (mark_decl_instantiated): Likewise.
19705         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
19706         circumstances.
19707         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
19708         * semantics.c (expand_body): Defer more functions.
19709
19710 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
19711
19712         * vec.cc: New file.
19713         * Make-lang.in (CXX_LIB2FUNCS): Add it.
19714         (vec.o): Build it.
19715         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
19716         __cxa_vec_delete): Declare.
19717
19718 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
19719
19720         * rtti.c (dfs_class_hint_mark): New static function.
19721         (dfs_class_hint_unmark): New static function.
19722         (class_hint_flags): Use them.
19723
19724 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
19725
19726         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
19727
19728 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
19729
19730         * cp-tree.h (instantiate_decl): Change prototype.
19731         * decl2.c (mark_used): Adjust call.
19732         * optimize.c (inlinable_function_p): Adjust handling of templates.
19733         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
19734         (do_type_instantiation): Likewise.
19735         (instantiate_decl): Defer more templates.
19736         (instantiate_pending_templates): Adjust logic to handle inline
19737         friend functions.
19738
19739         * Makefile.in (GGC_H): New variable.  Use it throughout in place
19740         of ggc.h.
19741
19742         * call.c: Don't include obstack.h.  Include ggc.h.
19743         (obstack_chunk_alloc): Don't define.
19744         (obstack_chunk_free): Likewise.
19745         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
19746         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
19747         (pop_switch): Free it.
19748
19749         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
19750
19751         * dump.c (dequeue_and_dump): Don't try to print the bit_position
19752         if we don't have a DECL_FIELD_OFFSET.
19753
19754 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
19755
19756         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
19757         special_function_p.
19758
19759 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19760
19761         * cfns.gperf (hash, libc_name_p): Prototype.
19762
19763         * rtti.c (build_dynamic_cast_1): Constification.
19764
19765         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
19766
19767         * semantics.c (deferred_type_access_control): Prototype.
19768
19769 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
19770
19771         Correct many new ABI issues regarding vbase and vcall offset
19772         layout.
19773         * cp-tree.h (BINFO_VTABLE): Document.
19774         (struct lang_type): Tweak formatting.
19775         (BINFO_PRIMARY_BINFO): Add to documentation.
19776         (CLASSTYPE_VSIZE): Fix typo in comment.
19777         (CLASSTYPE_VBASECLASSES): Update documentation.
19778         (BINFO_VBASE_MARKED): Remove.
19779         (SET_BINFO_VBASE_MARKED): Likewise.
19780         (CLEAR_BINFO_VBASE_MARKED): Likewise.
19781         (BINFO_FIELDS_MARKED): Remove.
19782         (SET_BINFO_FIELDS_MARKED): Likewise.
19783         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
19784         (enum access_kind): New enumeration.
19785         (num_extra_vtbl_entries): Remove declaration.
19786         (size_extra_vtbl_entries): Likewise.
19787         (get_vtbl_decl_for_binfo): New function.
19788         (dfs_vbase_unmark): Remove declaration.
19789         (mark_primary_bases): Likewise.
19790         * class.c (SAME_FN): Remove.
19791         (struct vcall_offset_data_s): Move definition.
19792         (build_vbase_pointer): Use `build', not `build_binary_op', to
19793         access the vbase pointer under the new ABI.
19794         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
19795         (build_primary_vtable): Likewise.
19796         (dfs_mark_primary_bases): Move here from search.c.
19797         (mark_primary_bases): Likewise.
19798         (determine_primary_bases): Under the new ABI, don't make a base
19799         class a primary base just because we don't yet have any virtual
19800         functions.
19801         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
19802         (num_vfun_entries): Remove.
19803         (dfs_count_virtuals): Likewise.
19804         (num_extra_vtbl_entries): Likewise.
19805         (size_extra_vtbl_entries): Likewise.
19806         (layout_virtual_bases): Iterate in inheritance graph order under
19807         the new ABI.
19808         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
19809         indicate that a vfield is present.
19810         (init_class_processing): Initialize access_public_node, etc., from
19811         ak_public, etc.
19812         (get_vtbl_decl_for_binfo): New function.
19813         (dump_class_hierarchy_r): Likewise.
19814         (dump_class_hierarchy): Use it.
19815         (finish_vtbls): Build the vtbls in inheritance graph order.
19816         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
19817         (initialize_vtable): Use get_vtbl_decl_for_binfo.
19818         (accumulate_vtbl_inits): Add comments explaining why a pre-order
19819         walk is required.
19820         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
19821         where the vptr points, even for primary vtables.
19822         (build_vtbl_initializer): Adjust handling of vbase and vcall
19823         offsets.
19824         (build_vcall_and_vbase_vtable_entries): New function.
19825         (dfs_build_vbase_offset_vtbl_entries): Remove.
19826         (build_vbase_offset_vtbl_entries): Reimplement.
19827         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
19828         were already handled in a primary base class vtable.
19829         (build_vcall_offset_vtbl_entries): Adjust.
19830         (build_rtti_vtbl_entries): Adjust.
19831         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
19832         * init.c (expand_virtual_init): Simplify.
19833         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
19834         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
19835         * search.c (BINFO_ACCESS): New macro.
19836         (SET_BINFO_ACCESS): Likewise.
19837         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
19838         (access_in_type): Likewise.
19839         (dfs_accessible_p): Likewise.
19840         (protected_accessible_p): Likewise.
19841         (lookup_fnfields_1): Adjust documentation.
19842         (dfs_mark_primary_bases): Move to class.c
19843         (mark_primary_bases): Likewise.
19844         (dfs_vbase_unmark): Remove.
19845         (virtual_context): Use BINFO_FOR_VBASE.
19846         (dfs_get_vbase_types): Simplify.
19847         (dfs_build_inheritance_graph_order): New function.
19848         (get_vbase_types): Use it.
19849         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
19850
19851         * tinfo.cc (get_vbase_offset): New function.
19852         (__vmi_class_type_info::do_find_public_src): Use it.
19853         (__vmi_class_type_info::do_dyncast): Likewise.
19854         (__vmi_class_type_info::do_upcast): Likewise.
19855
19856 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
19857
19858         * lang-specs.h: Pass -fno-show-column to the preprocessor.
19859
19860 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
19861
19862         * rtti.c (class_hint_flags): Rename flags.
19863         (class_initializer): Remove flags.
19864         (synthesize_tinfo_var): Combine offset and flags. Add flags
19865         for __vmi_class_type_info.
19866         (create_tinfo_types): Remove flags from __class_type_info and
19867         __si_class_type_info. Merge flags and offset from
19868         base_class_type_info.
19869         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
19870         (__base_class_info::is_virtual_p): Adjust.
19871         (__base_class_info::is_public_p): Adjust.
19872         (__base_class_info::offset): New accessor.
19873         (__class_type_info::details): Remove member.
19874         (__class_type_info::__class_type_info): Lose details.
19875         (__class_type_info::detail_masks): Remove.
19876         (__si_class_type_info::__si_class_type_info): Lose details.
19877         (__vmi_class_type_info::details): New member.
19878         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
19879         (__vmi_class_type_info::detail_masks): New member.
19880         * tinfo.cc (__class_type_info::do_upcast): Initialize result
19881         with unknown_details_mask.
19882         (__vmi_class_type_info::do_find_public_src): Adjust
19883         (__vmi_class_type_info::do_dyncast): Adjust.
19884         (__vmi_class_type_info::do_upcast): Set result details, if
19885         needed. Adjust.
19886         (__dynamic_cast): Temporarily #if out optimization.
19887
19888 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
19889
19890         * rtti.c (get_tinfo_decl): Mark used.
19891         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
19892         mark as dealt with, if we output it.
19893
19894 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
19895
19896         * class.c: Reorganize to put virtual function table initialization
19897         machinery at the end of the file.
19898
19899 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
19900
19901         * class.c (finish_struct): Use bitsize_zero_node.
19902         * pt.c (instantiate_class_template): Likewise.
19903
19904 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
19905
19906         Put RTTI entries at negative offsets in new ABI.
19907         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
19908         vbase offset at index -3, not -1.
19909         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
19910         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
19911         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
19912         (build_rtti_vtbl_entries): New function.
19913         (set_rtti_entry): Remove.
19914         (build_primary_vtable): Don't use it.
19915         (build_secondary_vtable): Likewise.
19916         (start_vtable): Remove.
19917         (first_vfun_index): New function.
19918         (set_vindex): Likewise.
19919         (add_virtual_function): Don't call start_vtable.  Do call
19920         set_vindex.
19921         (set_primary_base): Rename parameter.
19922         (determine_primary_base): Likewise.
19923         (num_vfun_entries): Don't use skip_rtti_stuff.
19924         (num_extra_vtbl_entries): Include RTTI information.
19925         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
19926         (skip_rtti_stuff): Remove.
19927         (dfs_modify_vtables): Don't use it.
19928         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
19929         (layout_nonempty_base_or_field): Update size handling.
19930         (create_vtable_ptr): Tweak.
19931         (layout_class_type): Adjust parameter names.
19932         (finish_struct_1): Simplify.
19933         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
19934         (skip_rtti_stuff): Remove.
19935         (first_vfun_index): New function.
19936         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
19937         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
19938         (marked_vtable_pathp): Declare.
19939         (unmarked_vtable_pathp): Likewise.
19940         * error.c (dump_expr): Use first_vfun_index to calculate vtable
19941         offsets.
19942         * rtti.c (build_headof): Look for RTTI at negative offsets.
19943         (get_tinfo_decl_dynamic): Likewise.
19944         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
19945         here.
19946         (create_pseudo_type_info): Do it here instead.  Adjust so that
19947         vptr points at first virtual function.
19948         * search.c (marked_vtable_pathp): Make it global.
19949         (unmarked_vtable_pathp): Likewise.
19950         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
19951         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
19952         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
19953         (get_pure_virtuals): Likewise.
19954         (expand_upcast_fixups): Likewise.
19955         * tree.c (debug_binfo): Likewise.
19956         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
19957         negative offset.
19958
19959 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19960
19961         * class.c (check_field_decl): Fix typo.
19962         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
19963         (check_methods): Likewise.
19964         (check_field_decls): Likewise.
19965         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
19966         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
19967         Use DECL_RESULT_FLD, not DECL_RESULT.
19968         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
19969         * lex.c (identifier_type): Likewise.
19970         * pt.c (determine_specialization, lookup_template_class): Likewise.
19971         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
19972         (resolve_overloaded_unification, more_specialized): Likewise.
19973         * semantics.c (finish_member_declaration): Likewise.
19974         * typeck.c (build_x_function_call): Likewise.
19975
19976 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
19977
19978         * class.c (layout_empty_base): Handle empty bases with non-byte
19979         alignment.
19980         (build_base_field): Likewise.
19981         (layout_virtual_bases): Likewise.
19982
19983         * class.c (finish_struct_1): Fix typo in this change:
19984
19985         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19986
19987 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
19988
19989         * decl.c (grokdeclarator): Count partial specializations when
19990         keeping track of how many template classes have been seen.
19991
19992         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
19993
19994 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19995
19996         * class.c (build_vbase_pointer_fields): layout_field now place_field.
19997         (get_vfield_offset): Use byte_position.
19998         (set_rtti_entry): Set OFFSET to ssizetype zero.
19999         (get_binfo_offset_as_int): Deleted.
20000         (dfs_record_base_offsets): Use tree_low_cst.
20001         (dfs_search_base_offsets): Likewise.
20002         (layout_nonempty_base_or_field): Reflect changes in RLI format
20003         and call byte_position.
20004         (layout_empty_base): Convert offset to ssizetype.
20005         (build_base_field): use rli_size_unit_so_far.
20006         (dfs_propagate_binfo_offsets): Do computation in proper type.
20007         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
20008         (layout_class_type): Reflect changes in RLI names and fields.
20009         (finish_struct_1): Set DECL_FIELD_OFFSET.
20010         * dump.c (dequeue_and_dump): Call bit_position.
20011         * expr.c (cplus_expand_constant): Use byte_position.
20012         * rtti.c (expand_class_desc): Use bitsize_one_node.
20013         * typeck.c (build_component_addr): Use byte_position and don't
20014         special case for zero offset.
20015
20016 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
20017
20018         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
20019
20020         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
20021         tinfo object.
20022         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
20023         vtable.
20024
20025 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
20026
20027         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
20028         DECL_P macros.
20029         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
20030         make_typename_type, check_initializer, cp_finish_decl,
20031         xref_tag): Likewise.
20032         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
20033         decl_namespace, arg_assoc_template_arg, arg_assoc,
20034         validate_nonmember_using_decl, do_class_using_decl): Likewise.
20035         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
20036         args_to_string): Likewise.
20037         * friend.c (is_friend): Likewise.
20038         * lex.c (note_got_semicolon, note_list_got_semicolon,
20039         is_global): Likewise.
20040         * method.c (build_overload_nested_name, build_overload_value,
20041         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
20042         * parse.y (typename_sub, typename_sub1): Likewise.
20043         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
20044         process_partial_specialization, convert_template_argument,
20045         template_args_equal, add_pending_template, lookup_template_class,
20046         for_each_template_parm_r, maybe_fold_nontype_arg,
20047         tsubst, instantiate_template, type_unification_real, unify,
20048         instantiate_pending_templates, set_mangled_name_for_template_decl):
20049         Likewise.
20050         * repo.c (repo_get_id, repo_template_used): Likewise.
20051         * search.c (lookup_field_1): Likewise.
20052         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
20053         * xref.c (classname): Likewise.
20054
20055 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
20056
20057         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
20058         (CANONICAL_BINFO): New macro.
20059         (BINFO_NEW_VTABLE_MARKED): Use it.
20060         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
20061         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
20062         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
20063         not TREE_TYPE.
20064         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
20065         (build_secondary_vtable): Likewise.
20066         (dfs_finish_vtbls): Likewise.
20067         (dfs_accumulate_vtbl_inits): Likewise.
20068         (accumulate_vtbl_inits): New function.
20069         (finish_vtbls): Make sure that virtual bases come after
20070         non-virtual bases in the vtable group.
20071         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
20072         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
20073         * search.c (struct vbase_info): Move definition.
20074         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
20075         (unmarked_new_vtable_p): Likewise.
20076         (dfs_mark_vtable_path): Remove.
20077         (dfs_mark_new_vtable): Remove.
20078         (dfs_unmark_new_vtable): Likewise.
20079         (dfs_clear_search_slot): Likewise.
20080         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
20081         (dfs_clear_vbase_slots): Likewise.
20082         (init_vbase_pointers): LIkewise.
20083
20084 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
20085
20086         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
20087         SIZETYPE to a non-SIZETYPE.
20088
20089 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
20090
20091         * class.c (layout_virtual_bases): Adjust names in conditionally
20092         compiled code.
20093
20094         * class.c (record_base_offsets): New function.
20095         (layout_conflict_p): Likewise.
20096         (layout_nonempty_base_or_field): Use it.
20097         (layout_empty_base): New function.
20098         (build_base_field): Use it.
20099         (build_base_fields): Update comment.
20100         (layout_virtual_bases): Fold in a little code form
20101         layout_basetypes.  Use layout_empty_base.
20102         (layout_basetypes): Remove.
20103         (end_of_class): New function.
20104         (layout_class_type): Use it.  Adjust.
20105
20106         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
20107         (fntype_p): Remove.
20108         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
20109         comment.
20110         (dfs_skip_nonprimary_vbases_markedp): Likewise.
20111         * typeck.c (fntype_p): Remove.
20112
20113         * cp-tree.h (TI_SPEC_INFO): Remove.
20114         (CLASSTYPE_TI_SPEC_INFO): Likewise.
20115         * pt.c (process_partial_specialization): Likewise.
20116
20117         * class.c (build_base_field): Fix thinko in computation of binfo
20118         offsets.
20119
20120         * tree.c (mark_local_for_remap_p): Mark variables declared in
20121         TARGET_EXPRs as well.
20122
20123 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
20124
20125         * typeck.c (require_complete_type, complete_type,
20126         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
20127         build_array_ref, convert_arguments, pointer_diff,
20128         build_x_unary_op, build_unary_op, build_c_cast,
20129         build_modify_expr): Use COMPLETE_TYPE_P etc.
20130         * call.c (is_complete, convert_like_real,
20131         build_new_method_call): Likewise.
20132         * class.c (build_vbase_pointer_fields, check_bases,
20133         build_base_field, finish_struct_1, pushclass): Likewise.
20134         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
20135         * decl.c (maybe_process_template_type_declaration, pushtag,
20136         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
20137         layout_var_decl, check_initializer, cp_finish_decl,
20138         grokdeclarator, require_complete_types_for_parms,
20139         grok_op_properties, xref_tag, xref_basetypes,
20140         check_function_type): Likewise.
20141         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
20142         * friend.c (do_friend): Likewise.
20143         * init.c (build_offset_ref): Likewise.
20144         * parse.y (structsp): Likewise.
20145         * pt.c (maybe_process_partial_specialization,
20146         tsubst_friend_function, instantiate_class_template, tsubst,
20147         do_type_instantiation, instantiate_pending_templates): Likewise.
20148         * repo.c (repo_get_id): Likewise.
20149         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
20150         synthesize_tinfo_var, emit_support_tinfos): Likewise.
20151         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
20152         * semantics.c (begin_class_definition): Likewise.
20153         * tree.c (build_cplus_method_type): Likewise.
20154         * typeck2.c (digest_init, build_functional_cast,
20155         add_exception_specifier): Likewise.
20156         * parse.h, parse.c: Regenerated.
20157
20158 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
20159
20160         * inc/cxxabi.h: New header file. Define new-abi entry points.
20161         (__pointer_type_info::target): Rename member to ...
20162         (__pointer_type_info::type): ... here.
20163         (__base_class_info::type): Rename member to ...
20164         (__base_class_info::base): ... here.
20165         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
20166         * cp-tree.h (CPTI_ABI): New global tree enumeration.
20167         (abi_node): New global tree node.
20168         * decl.c (abi_node): Document.
20169         (init_decl_processing): Initialize abi_node.
20170         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
20171         (get_vmi_pseudo_type_info): Likewise.
20172         (create_tinfo_types): Likewise.
20173         (emit_support_tinfos): Likewise.
20174         * tinfo.h (cxxabi.h): Include for new-abi.
20175         Move rtti class definitions to new header file.
20176         * tinfo.cc (abi): Use the namespace.
20177         (std): Move new abi rtti classes from here ...
20178         (__cxxabiv1): ... to here.
20179         * tinfo2.cc (cxxabi.h): Include for new-abi.
20180         Move rtti class definitions to new header file.
20181         (std): Move new abi rtti classes from here ...
20182         (__cxxabiv1): ... to here.
20183         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
20184         namespace.
20185
20186 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
20187             Jason Merrill  <jason@casey.cygnus.com>
20188
20189         * method.c (build_overload_int): Use host_integerp.
20190
20191 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
20192
20193         * init.c (build_offset_ref): Handle the case of a templated member
20194         function.
20195
20196 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
20197
20198         * except.c (expand_exception_blocks): Clear catch_clauses_last.
20199
20200 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
20201
20202         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
20203         * class.c (check_bitfield_decl): Turn illegal bitfields into
20204         non-bitfields.
20205         (dfs_propagate_binfo_offsets): Adjust for new size_binop
20206         semantics.
20207         (dfs_offset_for_unshared_vbases): Likewise.
20208         * cvt.c (cp_convert_to_pointer): Convert NULL to a
20209         pointer-to-member correctly under the new ABI.
20210         * expr.c (cplus_expand_constant): Don't use cp_convert when
20211         turning an offset into a pointer-to-member.
20212         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
20213         when dereferencing them under the new ABI.
20214         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
20215         of pointers-to-members under the new ABI.
20216
20217         * class.c (check_bitfield_decl): Remove restriction on really long
20218         bitfields.
20219         (layout_class_type): Implement new ABI handling of bitfields
20220         longer than their types.
20221
20222 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
20223
20224         * parse.y (extdefs): Call ggc_collect.
20225         * parse.c: Regenerated.
20226
20227 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
20228
20229         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
20230         (note_name_declared_in_class): Use OVL_CURRENT to get at a
20231         potential overload.
20232
20233 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20234
20235         * class.c (build_vbase_path): Use integer_zerop.
20236         (build_vtable_entry): Use tree_low_cst.
20237         (get_vfield_offset): Use bit_position.
20238         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
20239         Use tree_low_cst.
20240         (check_bitfield_decl): Set DECL_SIZE using convert.
20241         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
20242         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
20243         Use tree_low_cst.
20244         (finish_struct_1): Use bit_position.
20245         (dump_class_hierarchy): Use tree_low_cst.
20246         * cp-tree.h (min_precision): Add declaration.
20247         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
20248         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
20249         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
20250         * expr.c (cplus_expand_constant): Use bit_position.
20251         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
20252         * rtti.c (get_base_offset): Use bit_position.
20253         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
20254         host_integerp, and tree_low_cst.
20255         (pointer_int_sum): Use integer_zerop.
20256         (build_component_addr): Use bit_position.
20257
20258 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
20259
20260         * typeck.c (require_complete_type): Don't assume size_zero_node.
20261         (complete_type_or_else): Likewise.
20262
20263 2000-03-16  Steven Grady <grady@digitaldeck.com>
20264             Jason Merrill  <jason@casey.cygnus.com>
20265
20266         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
20267
20268 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
20269
20270         * decl2.c (grokfield): Bail out if type is error_mark_node.
20271
20272 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
20273
20274         * tinfo2.cc (__ptr_to_member_data): Rename to ...
20275         (__pointer_to_member_data): ... here. Adjust.
20276         * rtti.c (create_tinfo_types): Adjust.
20277
20278 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
20279
20280         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
20281         * decl.c (ref_desc_type_node): Undocument.
20282         * rtti.c (ptr_ref_initializer): Rename to ...
20283         (ptr_initializer): ... here. Adjust comments.
20284         (ptmd_initializer): Fix comment thinko.
20285         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
20286         (create_tinfo_types): Remove ref_desc_type_node init.
20287         * tinfo2.cc (__reference_type_info): Remove.
20288
20289 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
20290
20291         * decl.c (cp_finish_decl): Remove obsolete comment.
20292
20293         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
20294
20295 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
20296
20297         * cp-tree.h: Tweak documentation.
20298         * class.c (build_vbase_pointer_fields): Layout the fields, too.
20299         (avoid_overlap): Remove.
20300         (get_binfo_offset_as_int): New function.
20301         (dfs_serach_base_offsets): Likewise.
20302         (layout_nonempty_base_or_field): Likewise.
20303         (build_base_field): Layout fields here.  Avoid placing two objects
20304         of the same type at the same address, under the new ABI.
20305         (build_base_fields): Adjust accordingly.
20306         (create_vtable_ptr): Return the new field, but don't attach it to
20307         TYPE_FIELDS.
20308         (remove_base_field): Remove.
20309         (remove_base_fields): Remove.
20310         (layout_basetypes): Adjust accordingly.
20311         (layout_class_type): Call layout_field for each field, rather than
20312         just making a wholesale call to layout_type.
20313
20314 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
20315
20316         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
20317
20318 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
20319
20320         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
20321
20322         * except.c (dtor_nothrow): New fn.
20323         (do_pop_exception): Use it.  Take type parm.
20324         (push_eh_cleanup): Take type parm.
20325         (expand_start_catch_block): Pass it.
20326         (build_eh_type_type_ref): Accept null type.
20327
20328 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
20329
20330         * cp-tree.h (revert_static_member_fn): Change prototype.
20331         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
20332         (grok_op_properties): Likewise.
20333         (start_function): Likewise.
20334         (revert_static_member_fn): Simplify.
20335         * pt.c (check_explicit_specialization): Adjust call to
20336         revert_static_member_fn.
20337
20338 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
20339
20340         * cp-tree.h (scope_kind): New type.
20341         (tmpl_spec_kind): Likewise.
20342         (declare_pseudo_global_level): Remove.
20343         (pseudo_global_level_p): Rename to template_parm_scope_p.
20344         (pushlevel): Remove declaration.
20345         (begin_scope): New function.
20346         (finish_scope): Likewise.
20347         (current_tmpl_spec_kind): Likewise.
20348         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
20349         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
20350         Add template_spec_p.
20351         (toplevel_bindings_p): Adjust.
20352         (declare_pseudo_global_level): Remove.
20353         (pseudo_global_level_p): Rename to template_parm_scope_p.
20354         (current_tmpl_spec_kind): New function.
20355         (begin_scope): Likewise.
20356         (finish_scope): Likewise.
20357         (maybe_push_to_top_level): Adjust.
20358         (maybe_process_template_type_declaration): Likewise.
20359         (pushtag): Likewise.
20360         (pushdecl_nonclass_level): Likewise.
20361         (lookup_tag): Likewise.
20362         (grokfndecl): Handle member template specializations.  Share
20363         constructor and non-constructor code.
20364         * decl2.c (check_classfn): Handle member template specializations.
20365         * pt.c (begin_template_parm_list): Use begin_scope.
20366         (begin_specialization): Likewise.
20367         (end_specialization): Likewise.
20368         (check_explicit_specialization): Use current_tmpl_spec_kind.
20369         Handle member template specializations.
20370         (end_template_decl): Use finish_scope.  Remove call to
20371         get_pending_sizes.
20372         (push_template_decl_real): Remove bogus error message.
20373         (tsubst_decl): Fix typo in code contained in comment.
20374         (instantiate_template): Handle member template specializations.
20375         (most_general_template): Likewise.
20376
20377 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
20378
20379         * lex.c (whitespace_cr): Compress consecutive calls to warning().
20380         (do_identifier): Ditto for error().
20381
20382         * pt.c (convert_nontype_argument): Ditto for cp_error().
20383         (convert_template_argument): Ditto for cp_pedwarn().
20384
20385 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
20386
20387         * exception.cc (__check_null_eh_spec): New fn.
20388         * except.c (expand_end_eh_spec): Call it if the spec is throw().
20389
20390 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
20391
20392         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
20393         * except.c (expand_end_eh_spec): Add the return type.
20394         * rtti.c (throw_bad_cast): Add the parmtypes.
20395         (throw_bad_typeid): Likewise.
20396
20397         * semantics.c (expand_stmt): Only leave out rtl for unused
20398         artificials, and set DECL_IGNORED_P on them as well.
20399         * decl.c (wrapup_globals_for_namespace): Likewise.
20400
20401 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
20402
20403         * decl.c (maybe_commonize_var): Skip all artificial decls.
20404         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
20405
20406 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
20407
20408         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
20409         * cp-tree.h: Declare flag_enforce_eh_specs.
20410         * decl.c (store_parm_decls, finish_function): Check it.
20411
20412         C library functions don't throw.
20413         * Makefile.in (cfns.h): New target.
20414         (except.o): Depend on it.
20415         * Make-lang.in (cc1plus): Depend on cfns.gperf.
20416         * cfns.gperf: New file.
20417         * cfns.h: Generated.
20418         * except.c: Include it.
20419         (nothrow_libfn_p): New fn.
20420         * decl.c (grokfndecl): Use it.
20421         * cp-tree.h: Declare it.
20422
20423         * decl.c (push_overloaded_decl_1, auto_function,
20424         define_function): Lose.
20425         (build_library_fn_1): New static fn.
20426         (builtin_function): Use it.
20427         (get_atexit_node): Use build_library_fn_ptr.
20428         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
20429         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
20430         push_void_library_fn, push_throw_library_fn): New fns.
20431         * cp-tree.h: Declare them.
20432         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
20433         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
20434         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
20435         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
20436         * rtti.c (build_runtime_decl): Lose.
20437         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
20438         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
20439         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
20440
20441         * call.c (build_call): Remove result_type parm.
20442         Call mark_used on unused artificial fns.
20443         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
20444
20445 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
20446
20447         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
20448         appropriate.
20449         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
20450         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
20451         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
20452         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
20453         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
20454         expand_generic_desc): Likewise.
20455
20456 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
20457
20458         * exception.cc (__cp_pop_exception): Cleanup the original object.
20459
20460 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
20461
20462         * decl.c (grok_op_properties): Merge conversion to void warning
20463         with other silly op warnings.
20464
20465 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
20466
20467         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
20468         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
20469
20470 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
20471
20472         * decl.c (cp_make_fname_decl): New function.
20473         (wrapup_globals_for_namespace): Don't emit unused static vars.
20474         (init_decl_processing): Remove comment about use of
20475         array_domain_type. Set make_fname_decl.
20476         (cp_finish_decl): Remove __FUNCTION__ nadgering.
20477         * semantics.c (begin_compound_stmt): Remove
20478         current_function_name_declared flagging.
20479         (expand_stmt): Don't emit unused local statics.
20480         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
20481         specially.
20482
20483 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
20484
20485         * typeck.c (convert_for_assignment): Don't look at array
20486         initializer.
20487         * call.c (convert_like_real): Likewise.
20488
20489 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
20490
20491         Add initial support for '\uNNNN' specifier.
20492         * lex.c (read_ucs): New fn.
20493         (readescape, skip_white_space): Call it.
20494         (is_extended_char, is_extended_char_1): New fns.
20495         (utf8_extend_token): New fn, #if 0'd out.
20496         (real_yylex): Treat extended chars like letters.
20497
20498         * search.c (note_debug_info_needed): Walk the bases even if we
20499         weren't deferring the type itself.
20500
20501 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20502
20503         * decl2.c (finish_objects): Constify a char*.
20504
20505         * method.c (emit_thunk): Likewise.
20506
20507 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
20508
20509         * typeck.c (dubious_conversion_warnings): Look through
20510         REFERENCE_TYPE.
20511
20512 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20513
20514         * class.c (dfs_modify_vtables): I is now unsigned.
20515         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
20516         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
20517         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
20518         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
20519         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
20520         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
20521         Call integer_all_onesp.
20522         * typeck2.c (process_init_constructor): Use compare_tree_int.
20523
20524         * lang-specs.h (as): Don't call if -syntax-only.
20525
20526 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
20527
20528         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
20529         RTL_EXPR_HAS_NO_SCOPE after all.
20530
20531 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
20532
20533         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
20534         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
20535         RTL_EXPR_HAS_NO_SCOPE.
20536
20537         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
20538         later.
20539
20540         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
20541
20542 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
20543
20544         * call.c (convert_like): Macrofy.
20545         (convert_like_with_context): New macro.
20546         (convert_like_real): Renamed from convert_like.  Add calling
20547         context parameters, for diagnostics. Add recursive flag.  Call
20548         dubious_conversion_warnings for outer conversion.
20549         (build_user_type_conversion): Use convert_like_with_context.
20550         (build_over_call): Likewise. Don't warn about dubious
20551         conversions here. Adjust convert_default_arg calls.
20552         (convert_default_arg): Add context parameters for diagnostics.
20553         Pass through to convert_like_with_context.
20554         * cp-tree.h (convert_default_arg): Add context parameters.
20555         (dubious_conversion_warnings): Prototype new function.
20556         * typeck.c (convert_arguments): Adjust convert_default_arg call.
20557         (dubious_conversion_warnings): New function, broken
20558         out of convert_for_assignment.
20559         (convert_for_assignment): Adjust.
20560
20561 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
20562
20563         * decl2.c (key_method): Break out from...
20564         (import_export_vtable, import_export_class): ...here.
20565
20566         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
20567         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
20568
20569         * search.c (note_debug_info_needed, dfs_debug_mark,
20570         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
20571         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
20572
20573 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
20574
20575         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
20576         typos.
20577
20578 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
20579
20580         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
20581         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
20582         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
20583         (lang_type): Split gets_new into has_new and has_array_new.
20584         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20585         (TYPE_GETS_NEW): Split into ...
20586         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
20587         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
20588         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
20589         (build_op_new_call): Don't declare.
20590         (build_new_1): Likewise.
20591         * call.c (build_op_new_call): Remove.
20592         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
20593         instead of TYPE_NEEDS_DESTRUCTOR.
20594         (finish_struct_bits): Likewise.
20595         (add_implicitly_declared_members): Likewise.
20596         (check_field_decl): Likewise.
20597         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
20598         correctly under the new ABI.
20599         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
20600         instead of TYPE_NEEDS_DESTRUCTOR.
20601         (initialize_local_var): Likewise.
20602         (destroy_local_var): Likewise.
20603         (cp_finish_decl): Likewise.
20604         (register_dtor_fn): Likewise.
20605         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
20606         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
20607         TYPE_VEC_DELETE_TAKES_SIZE here.
20608         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
20609         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
20610         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20611         (finish_destructor_body): Likewise.
20612         (maybe_build_cleanup_1): Likewise.
20613         * decl2.c (do_static_destruction): Likewise.
20614         * init.c (build_new_1): Make it static.
20615         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20616         (expand_cleanup_for_base): Likewise.
20617         (get_cookie_size): New function.
20618         (build_new_1): Handle array-new cookies correctly under the new
20619         ABI.
20620         (build_vec_delete_1): Likewise.
20621         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20622         (build_delete): Likewise.
20623         (build_vec_delete): Handle array-new cookies correctly under the new
20624         ABI.
20625         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20626         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
20627         TYPE_HAS_ARRAY_NEW_OPERATOR.
20628         * ptree.c (print_lang_type): Check them.
20629         * search.c (context_for_name_lookup): Fix typo in comment.
20630         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20631         * tree.c (break_out_cleanups): Likewise.
20632         (build_cplus_array_test_1): Likewise.
20633         (cp_build_qualified_type_real): Likewise.
20634         * typeck.c (complete_type): Likewise.
20635
20636         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
20637         the command-line, not the end.
20638
20639 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
20640
20641         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
20642
20643 2000-03-02  Tom Tromey  <tromey@cygnus.com>
20644
20645         * cp-tree.h (build_java_class_ref): Declare.
20646         * init.c (build_java_class_ref): No longer static.
20647         * except.c (expand_throw): Generate a Java-style `throw' if the
20648         thrown object is a "Java" object.
20649         (initialize_handler_parm): Generate a Java-style lookup of
20650         exception info if the caught object is a "Java" object.
20651         (catch_language, catch_language_init): New globals.
20652         (decl_is_java_type): New function.
20653         (expand_start_catch_block): Don't call push_eh_info() or
20654         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
20655         class reference to build_catch_block.
20656
20657 2000-03-02  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20658
20659         * typeck.c (comptypes): Treat sizetype like its language equivalent.
20660
20661 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
20662
20663         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
20664         to merge reference/pointer code and fix incorrect warnings.
20665
20666 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
20667
20668         * search.c (protected_accessible_p): Use context_for_name_lookup.
20669
20670         * init.c (construct_virtual_bases): Fix thinko.
20671         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
20672
20673 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
20674
20675         * decl.c (current_function_decl): Move to toplev.c.
20676
20677 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
20678
20679         * pt.c (fn_type_unification): Unify return type, whenever
20680         provided.
20681         (get_bindings_real): Only pass return type when necessary.
20682         Remove explicit return type check.
20683         * class.c (resolve_address_of_overloaded_function): Pass desired
20684         return type to fn_type_unification.
20685
20686 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20687
20688         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
20689         DECL_FIELD_SIZE.
20690         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
20691         DECL_FIELD_SIZE.
20692         * rtti.c (expand_class_desc): Likewise.
20693         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
20694         (THUNK_VCALL_OFFSET): Likewise.
20695         (THUNK_DELTA): Reflect changes in ../tree.h.
20696
20697 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
20698
20699         * search.c (protected_accessible_p): Also allow the access if
20700         the member is public in DERIVED.  Lose TYPE parm.
20701         (friend_accessible_p): Lose TYPE parm.
20702         (accessible_p): Adjust.
20703
20704 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20705
20706         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
20707         on things that are not sizes; ssize_binop deleted.
20708         Call size_diffop when appropriate.
20709         (dfs_build_vcall_offset_vtbl_entries): Likewise.
20710         (build_primary_vtable, build_secondary_vtable): Likewise.
20711         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
20712         Variable I is HOST_WIDE_INT.
20713         (get_vfield_offset): Pass proper types to size_binop.
20714         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
20715         (finish_struct_1): Likewise.
20716         (skip_rtti_stuff): Arg N is now pointer to signed.
20717         (layout_class_type): Use size_zero_node.
20718         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
20719         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
20720         * decl.c (complete_arry_type): Pass proper types to size_binop.
20721         (xref_basetypes): BINFO_OFFSET is sizetype.
20722         * error.c (dump_expr): Don't use size_binop non-sizes.
20723         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
20724         * init.c (construct_virtual_bases): Fix type error.
20725         (build_vec_delete_1): Pass proper type to size_binop and don't
20726         fold result.
20727         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
20728         * rtti.c (get_base_offset): Pass proper type to size_binop.
20729         * search.c (dfs_find_vbases): Fix type error.
20730         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
20731         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
20732         * tree.c (debug_binfo): Variable N is signed.
20733         Use HOST_WIDE_INT_PRINT_DEC.
20734         * typeck.c (comptypes): sizetype is same as equivalent integer type.
20735         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
20736         size_one_node and size_zero_node.
20737         (c_alignof): Use size_one_node.
20738         (build_component_addr): Pass proper types to size_binop.
20739         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
20740
20741 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
20742
20743         Implement class scope using-declarations for functions.
20744         * class.c (handle_using_decl): Call add_method for used functions.
20745         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
20746         (add_method): Used functions are hidden by local functions.
20747         (check_bases_and_members): Handle using-decls before finalizing
20748         CLASSTYPE_METHOD_VEC.
20749         * call.c (add_function_candidate): Add ctype parm; if nonzero,
20750         override the type of 'this' accordingly.
20751         (add_template_candidate, add_template_candidate_real): Add ctype parm.
20752         (convert_class_to_reference, build_user_type_conversion_1,
20753         build_new_function_call, build_object_call, build_new_op,
20754         build_new_method_call): Pass ctype parm.
20755
20756         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
20757         the baselink.
20758         * call.c (convert_class_to_reference, build_user_type_conversion_1,
20759         build_new_function_call, build_object_call, build_new_op,
20760         build_new_method_call, build_op_delete_call): Don't get basetype_path
20761         from a baselink.
20762         * typeck.c (build_component_ref): Likewise.
20763         * init.c (build_offset_ref): Likewise.
20764         (resolve_offset_ref): Don't call enforce_access.
20765         Call build_scoped_ref.
20766         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
20767         would cause an error or if -pedantic.
20768         * class.c (alter_access): Lose binfo parm.
20769
20770 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
20771
20772         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
20773         types.
20774
20775 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
20776
20777         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
20778         pseudo_type_info creation into the std namespace
20779
20780 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
20781
20782         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
20783         (import_export_class): Remove declaration.
20784         * decl2.c (import_export_class): Make it static.
20785         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
20786         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
20787         EXPR_WITH_FILE_LOCATION.
20788         * lex.c (check_newline): Tweak filename/lineno setting.
20789         * semantics.c (begin_while_stmt): Fix typo in comment.
20790
20791 2000-02-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20792
20793         * lang-options.h (-fmessage-length=): Add missing option.
20794
20795         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
20796
20797 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
20798
20799         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
20800
20801 2000-02-25  Jim Wilson  <wilson@cygnus.com>
20802
20803         * optimize.c (expand_call_inline): Emit the return label before
20804         evaluating the return value.
20805
20806 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
20807
20808         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
20809         than duplicating functionality here.
20810         * optimize.c: Include input.h.
20811         (expand_call_inline): Use push_srcloc and pop_srcloc.
20812         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
20813         * parse.c: Regenerated.
20814         * Makefile.in (lex.o): Depend on input.h.
20815         (optimize.o): Likewise.
20816
20817 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
20818
20819         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
20820         function type, rather than ICE.
20821
20822 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
20823
20824         * decl.c (grokdeclarator): Call decl_type_access_control.
20825         * parse.y (parse_end_decl): Don't call decl_type_access_control if
20826         decl is null.
20827
20828 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
20829
20830         * decl.c (decls_match): Remove obsolete static member nadgering.
20831
20832 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
20833
20834         * decl.c (grokdeclarator): Change ANSI to ISO.
20835         * lex.c (consume_string, readescape, do_identifier): Likewise.
20836         (parse_float, real_yylex): Likewise.
20837         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
20838         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
20839         new_type_id, maybe_label_decls, simple_stmt,
20840         for.init.statement): Likewise.
20841         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
20842         * semantics.c (finish_named_return_value): Likewise.
20843         * parse.c: Regenerate.
20844
20845 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
20846
20847         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
20848         (CPTI_CLASS_STAR_TYPE): Remove.
20849         (vtable_index_type): Likewise.
20850         (class_star_type_node): Remove.
20851         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
20852         (build_binary_op_nodefault): Remove.
20853         * call.c (build_new_op): Use build_binary_op instead of
20854         build_binary_op_nodefault.
20855         * decl.c (init_decl_processing): Remove class_star_type_node
20856         initialization.  Make delta_type_node ptrdiff_type_node under the
20857         new ABI.  Initialize vtable_index_type.
20858         (build_ptrmemfunc_type): Build different structures for the new
20859         ABI.
20860         (build_enumerator): Use build_binary_op instead of
20861         build_binary_op_nodefault.
20862         * method.c (build_overload_value): Mangle pointers-to-members
20863         appropriately under the new ABI.
20864         * typeck.c (build_array_ref): Use build_binary_op instead of
20865         build_binary_op_nodefault.
20866         (get_member_function_from_ptrfunc): Adjust for the new ABI.
20867         (build_binary_op_nodefault): Rename to ...
20868         (build_binary_op): ... this.  Remove old version.  Adjust for
20869         pointer-to-member comparisons under the new ABI.
20870         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
20871         (build_ptrmemfunc): Adjust for the new ABI.
20872         (expand_ptrmemfunc_cst): Likewise.
20873         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
20874         (pfn_from_ptrmemfunc): Adjust for the new ABI.
20875
20876 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
20877
20878         * call.c (build_object_call): Compress consecutive calls to
20879         cp_error.
20880         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
20881         (build_op_delete_call): Adjust message formatting.
20882
20883         * class.c (check_bases): Compress consecutive calls to
20884         cp_pedwarn.
20885         (finish_struct_anon): Say 'ISO C++'.
20886
20887         * decl.c (start_decl): Same here.
20888         (grok_reference_init): Likewise.
20889         (grokfndecl): Correct message formatting.
20890         (grokfndecl): Improve diagnostic.
20891         (check_static_variable_definition): Likewise. Say 'ISO C++'
20892         (compute_array_index_type): Say 'ISO C++'
20893         (create_array_type_for_decl): Compress consecutive calls to
20894         cp_error.
20895         (grokdeclarator): Say 'ISO C++'
20896         (grok_op_properties): Likewise.
20897
20898         * decl2.c (delete_sanity): Clairify diagnostic.
20899         (check_member_template): Same here.
20900         (grok_function_init): Use consistent terminology.
20901
20902         * expr.c (do_case): Say 'ISO C++'
20903
20904         * friend.c (do_friend): Compress consecutive calls to warning.
20905
20906 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
20907
20908         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
20909         * class.c (build_secondary_vtable): Reorganize.  Don't create a
20910         new vtable under the new ABI.
20911         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
20912         computing the size.
20913         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
20914         the initializing elements.
20915         (initialize_vtable): New function.
20916         (dfs_finish_vtbls): Use it.
20917         (dfs_accumulate_vtbl_inits): New function.
20918         (finish_vtbls): Merge primary and secondary vtables under the new
20919         ABI.
20920         (finish_struct_1): Remove redundant call to layout_vtable_decl.
20921         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
20922         aren't VAR_DECLs.
20923
20924         * class.c (build_vtable): New function, split out from ...
20925         (get_vtable_decl): ... here, and ...
20926         (build_secondary_vtable): ... here.
20927
20928         * pt.c (tsubst_decl): Fix formatting.
20929
20930 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20931
20932         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
20933         (avoid_overlap, build_base_field): Likewise.
20934         (build_base_field, build_base_fields, is_empty_class):
20935         Test DECL_SIZE with integer_zero.
20936         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
20937         * cp-tree.h (struct lang_type): New field size_unit.
20938         (CLASSTYPE_SIZE_UNIT): New macro.
20939         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
20940         (cp_finish_decl): Delete -Wlarger-than processing.
20941         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
20942         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
20943         * tree.c (make_binfo): binfo vector is one entry longer.
20944         (walk_tree): Walk DECL_SIZE_UNIT.
20945
20946 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
20947
20948         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
20949         comment.
20950         (build_vtable_entry): Don't assume all vtable entries are
20951         functions.
20952         (build_vtbl_initializer): Adjust accordingly.
20953         (get_vtable_decl): Fix formatting.
20954
20955 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
20956
20957         * semantics.c (deferred_type_access_control): Walk the entire
20958         type_lookups list.
20959         (save_type_access_control): Rename from
20960         initial_deferred_type_access_control.  Just remember the value.
20961         (decl_type_access_control): New fn.
20962         (begin_function_definition): Use deferred_type_access_control, after
20963         we've started the function.  Set type_lookups to error_mark_node.
20964         * parse.y (frob_specs, fn.def1): Adjust.
20965         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
20966         (parse_end_decl, parse_bitfield0, parse_method): New fns.
20967         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
20968         (after_type_component_declarator0): Likewise.
20969         (after_type_component_declarator): Likewise.
20970         (notype_component_declarator): Likewise.
20971         * cp-tree.h: Adjust.
20972
20973         * decl.c (redeclaration_error_message): Allow redeclaration of
20974         namespace-scope decls.
20975
20976 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
20977
20978         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
20979
20980 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
20981
20982         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
20983         * decl2.c (grokclassfn): Likewise.
20984
20985         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
20986
20987         * decl2.c (lang_decode_option): Don't set default message length
20988         here.
20989         * lex.c (lang_init_options): Set it here.
20990
20991 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
20992
20993         Make DECL_CONTEXT mean the class in which a member function was
20994         declared, even for a virtual function.
20995         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
20996         (DECL_FRIEND_CONTEXT): New macro.
20997         (DECL_REAL_CONTEXT): Remove.
20998         (SET_DECL_FRIEND_CONTEXT): Likewise.
20999         (DECL_VIRTUAL_CONTEXT): Adjust.
21000         (DECL_CLASS_SCOPE_P): Use TYPE_P.
21001         (add_friends): Remove.
21002         (hack_decl_function_context): Likewise.
21003         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
21004         CP_DECL_CONTEXT.
21005         (build_over_call): Fix indentation.  Use DECL_CONTEXT
21006         instead of DECL_CLASS_CONTEXT.
21007         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
21008         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
21009         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21010         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
21011         (build_base_field): Likewise.
21012         (finish_struct_1): Likewise.
21013         (build_self_reference): Likewise.
21014         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
21015         DECL_REAL_CONTEXT.
21016         (pushtag): Use decl_function_context, not
21017         hack_decl_function_context.
21018         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
21019         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
21020         (pushdecl): Remove bogus code.
21021         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
21022         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
21023         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21024         Use decl_function_context, nothack_decl_function_context.
21025         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
21026         (grokdeclarator): Likewise.  Use decl_function_context, not
21027         hack_decl_function_context.
21028         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
21029         (start_function): Use DECL_FRIEND_CONTEXT, not
21030         DECL_CLASS_CONTEXT.  Use decl_function_context, not
21031         hack_decl_function_context.
21032         (finish_function): Use decl_function_context, not
21033         hack_decl_function_context.
21034         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
21035         DECL_CLASS_CONTEXT.
21036         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
21037         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
21038         (grokfield): Likewise.
21039         (finish_builtin_type): Likewise.
21040         (finish_vtable_vardec): Use decl_function_context, not
21041         hack_decl_function_context.
21042         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21043         (start_static_initialization_or_destruction): Likewise.
21044         (finish_static_initialization_or_destruction): Likewise.
21045         (mark_used): Adjust logic for deciding when to synthesize methods.
21046         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
21047         DECL_REAL_CONTEXT.
21048         * error.c (dump_function_decl): Use DECL_CONTEXT, not
21049         DECL_CLASS_CONTEXT.
21050         * friend.c (is_friend): Likewise.
21051         (add_friends): Remove.
21052         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
21053         * lex.c (begin_definition_of_inclass_inline): Use
21054         decl_function_context, not hack_decl_function_context.
21055         (process_next_inline): Likewise.
21056         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
21057         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
21058         DECL_CLASSS_CONTEXT.
21059         (hack_identifier): Likewise.
21060         (synthesize_method):  Use decl_function_context, not
21061         hack_decl_function_context.
21062         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
21063         DECL_REAL_CONTEXT.
21064         (is_member_template): Use decl_function_context, not
21065         hack_decl_function_context.  Use DECL_CONTEXT, not
21066         DECL_CLASS_CONTEXT.
21067         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
21068         DECL_CLASS_CONTEXT.
21069         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
21070         DECL_REAL_CONTEXT.
21071         (push_template_decl_real): Likewise.
21072         (instantiate_class_template): Don't call add_friends.
21073         (tsubst_default_argument): Use DECL_CONTEXT, not
21074         DECL_REAL_CONTEXT.
21075         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
21076         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21077         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
21078         DECL_CLASS_CONTEXT.
21079         * repo.c (repo_inline_used): Likewise.
21080         * search.c (current_scope): Adjust for new _CONTEXT macros.
21081         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
21082         DECL_REAL_CONTEXT.
21083         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21084         (lookup_fnfields_here):Likewise.
21085         (check_final_overrider): Likewise.
21086         (init_vbase_pointers): Likewise.
21087         (virtual_context): Likewise.
21088         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
21089         (expand_body): Use decl_function_context, not
21090         hack_decl_function_context.
21091         * tree.c (hack_decl_function_context): Remove.
21092         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
21093         DECL_CLASS_CONTEXT.
21094         * typeck2.c (error_not_base_type): Likewise.
21095
21096 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
21097
21098         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
21099
21100 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
21101
21102         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
21103
21104 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
21105
21106         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
21107
21108 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
21109
21110         * decl2.c (lang_decode_option): Enable automatic line wrapping.
21111
21112 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
21113
21114         * parse.y (frob_specs): Split out...
21115         (parse_decl): From here.
21116         (fn.def2): Call initial_deferred_type_access_control.
21117         (after_type_component_declarator0): Call frob_specs.
21118         (notype_component_declarator0): Likewise.
21119         * search.c (friend_accessible_p): Nested classes are friends of their
21120         enclosing classes.
21121
21122 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
21123
21124         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
21125         used to create an implicit temporary.
21126
21127         * class.c (dfs_modify_vtables): Tweak calculation of functions to
21128         override.
21129
21130 2000-02-08  Nathan Sidwell  <nathan@acm.org>
21131
21132         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
21133         strip array element qualifiers too.
21134
21135 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
21136
21137         * decl.c (store_parm_decls): Don't build cleanups for parameters
21138         while processing_template_decl.
21139
21140 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
21141
21142         * cp-tree.h (struct saved_scope): Add incomplete field.
21143         (namespace_scope_incomplete): New macro.
21144         * decl.c (pushdecl): Use it.
21145         (hack_incomplete_structures): Use it.  See through artificial
21146         binding levels.
21147         (mark_saved_scope): Mark it.
21148
21149         Implement access control for nested types.
21150         * search.c (type_access_control): New fn.
21151         (accessible_p): Now we do perform access control for types.
21152         * semantics.c (deferred_type_access_control): New fn.
21153         (initial_deferred_type_access_control): New fn.
21154         (begin_function_definition): Call it.  Add lookups parm.
21155         * decl.c (struct binding_level): Add this_class field.
21156         (pushlevel_class): Set it.
21157         (mark_binding_level): Mark it.
21158         (lookup_name_real): Use it.  Call type_access_control.
21159         (mark_saved_scope): Mark lookups field.
21160         * cp-tree.h (flagged_type_tree): Add lookups field.
21161         (struct saved_scope): Add lookups field.
21162         (type_lookups): New macro.
21163         * parse.y (declmods): Now <ftype>.
21164         (parse_decl): Add lookups parm.  Call
21165         initial_deferred_type_access_control.
21166         (lang_extdef): Clear type_lookups.
21167         (typed_declspecs, declmods, typespec): Set lookups field.
21168         (initdcl): Call deferred_type_access_control.
21169         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
21170         component_decl_1, named_parm): Adjust.
21171         * friend.c (is_friend): Nested classes are friends of their
21172         enclosing classes.
21173
21174         * class.c (currently_open_derived_class): New fn.
21175         * method.c (hack_identifier): Use it.
21176
21177         * lex.c (do_identifier): Remove obsolete code.
21178
21179         * parse.y (typed_typespecs): Propagate new_type_flag properly.
21180
21181 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
21182
21183         * tinfo.h: Remove apostrophes from C++ comment (xgettext
21184         thinks this file is plain C).
21185
21186 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
21187
21188         * Makefile.in (call.o): Depend on $(EXPR_H).
21189
21190         * call.c: Include "expr.h".
21191
21192         * class.c (dump_class_hierarchy): Add prototype.
21193
21194         * search.c (dfs_get_pure_virtuals): Likewise.
21195
21196 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
21197
21198         * parse.y (simple_stmt): Allow :: token in asm parameter list.
21199         * parse.c: Rebuilt.
21200
21201 2000-01-31  Jim Wilson  <wilson@cygnus.com>
21202
21203         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
21204         Store it in DECL_FCONTEXT.
21205         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
21206
21207 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
21208
21209         * tinfo.h (old abi): #include "tconfig.h".
21210         * tinfo.cc (convert_to_base): Move into old abi section.
21211
21212 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
21213
21214         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
21215         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
21216         (BINFO_PRIMARY_BINFO): New macro.
21217         (BF_DELTA): Rename to ...
21218         (BV_DELTA): ... this.
21219         (BF_VCALL_INDEX): Rename to ...
21220         (BV_VCALL_INDEX): ... this.
21221         (BF_FN): Rename to ...
21222         (BV_FN): ... this.
21223         * class.c (build_vbase_path): Adjust for changes to reverse_path.
21224         (set_rtti_entry): Rename BF_ macros to BV_ variants.
21225         (modify_vtable_entry): Simplify.
21226         (add_virtual_function): Rename BF_ macros to BV_ variants.
21227         (build_vtable_initializer): Likewise.
21228         (get_class_offset_1): Remove.
21229         (dfs_get_class_offset): Likewise.
21230         (get_class_offset): Likewise.
21231         (dfs_find_final_overrider): New function.
21232         (find_final_overrider): Likewise.
21233         (modify_one_vtable): Remove.
21234         (dfs_find_base): New function.
21235         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
21236         find_final_overrider.
21237         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
21238         virtuals.
21239         (dfs_fixup_vtable_deltas): Remove.
21240         (override_one_vtable): Remove.
21241         (merge_overrides): Likewise.
21242         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
21243         unreal chilren of virtual bases.
21244         (finish_struct_1): Don't use merge_overrides.  Don't use
21245         dfs_fixup_vtable_deltas.
21246         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
21247         BINFOs.
21248
21249 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
21250             Jason Merrill  <jason@yorick.cygnus.com>
21251
21252         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
21253
21254 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
21255
21256         * exception.cc (__throw_bad_typeid): Add missing std::.
21257
21258 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
21259
21260         * cp-tree.h (make_thunk): PROTO -> PARAMS.
21261
21262 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
21263
21264         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
21265
21266         Runtime support for new-abi rtti.
21267         * inc/typeinfo (type_info::operator!=): Define in class.
21268         (type_info::before, type_info::name, type_info::operator==,
21269         type_info::operator!=): Define new ABI implementations.
21270         (type_info::is_pointer_p, type_info::is_function_p): Declare
21271         new virtual functions.
21272         (type_info::do_catch, type_info::do_upcast): Likewise.
21273
21274         * tinfo.h (__base_class_info): Define new class.
21275         (__class_type_info): Likewise.
21276         (__si_class_type_info): Likewise.
21277         (__vmi_class_type_info): Likewise.
21278         (__dynamic_cast): Prototype.
21279
21280         * tinfo.cc: Conditionalize old and new rtti mechanisms.
21281         (type_info::is_pointer_p): Define new function.
21282         (type_info::is_function_p): Likewise.
21283         (type_info::do_catch): Likewise.
21284         (type_info::do_upcast): Likewise.
21285         (vtable_prefix): New structure for vtable access.
21286         (adjust_pointer): Define new template function.
21287         (contained_p, public_p, virtual_p, contained_public_p,
21288         contained_nonpublic_p, contained_nonvirtual_p): Define new
21289         functions.
21290         (nonvirtual_base_type): New local variable.
21291         (__class_type_info::~__class_type_info): Define.
21292         (__si_class_type_info::~__si_class_type_info): Likewise.
21293         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
21294         (__class_type_info::do_catch): Define new function.
21295         (__class_type_info::do_upcast): Likewise.
21296         (__class_type_info::find_public_src): Likewise.
21297         (__class_type_info::do_find_public_src): Likewise.
21298         (__si_class_type_info::do_find_public_src): Likewise.
21299         (__vmi_class_type_info::do_find_public_src): Likewise.
21300         (__class_type_info::do_dyncast): Likewise.
21301         (__si_class_type_info::do_dyncast): Likewise.
21302         (__vmi_class_type_info::do_dyncast): Likewise.
21303         (__class_type_info::do_upcast): Likewise.
21304         (__si_class_type_info::do_upcast): Likewise.
21305         (__vmi_class_type_info::do_upcast): Likewise.
21306         (__dynamic_cast): Likewise.
21307
21308         * tinfo2.cc (__fundamental_type_info): Define new class.
21309         (__pointer_type_info): Likewise.
21310         (__reference_type_info): Likewise.
21311         (__array_type_info): Likewise.
21312         (__function_type_info): Likewise.
21313         (__enum_type_info): Likewise.
21314         (__ptr_to_member_type_info): Likewise.
21315         (__fundamental_type_info::~__fundamental_type_info): Define.
21316         (__pointer_type_info::~__pointer_type_info): Likewise.
21317         (__reference_type_info::~__reference_type_info): Likewise.
21318         (__array_type_info::~__array_type_info): Likewise.
21319         (__function_type_info::~__function_type_info): Likewise.
21320         (__enum_type_info::~__enum_type_info): Likewise.
21321         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
21322         (__pointer_type_info::do_catch): Define new function.
21323         (__ptr_to_member_type_info::do_catch): Define new function.
21324
21325         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
21326         (__is_pointer): Likewise.
21327
21328         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
21329
21330 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
21331
21332         * cp/class.c (build_vtable): Rename to build_primary_vtable.
21333         (prepare_fresh_vtable): Rename to build_secondary_vtable.
21334         (make_new_vtable): New function.
21335         (modify_vtable_entry): Handle generation of new vtables correctly.
21336         (modify_one_vtable): Remove unused parameter.
21337         (dfs_fixup_vtable_deltas): Likewise.
21338         (override_one_vtable): Use build_secondary_vtable.
21339         (finish_struct_1): Use build_primary_vtable and
21340         build_secondary_vtable.
21341
21342 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
21343
21344         * cp/decl.c: Adjust variable names, comments, help strings.
21345
21346 2000-01-29  Nathan Sidwell  <nathan@acm.org>
21347
21348         * new2.cc (operator delete[]): Use operator delete, don't assume
21349         implementation.
21350
21351 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
21352
21353         * class.c (build_vtbl_initializer): Add argument to
21354         build_vtable_entry call.
21355
21356 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
21357
21358         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
21359         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
21360         (BF_DELTA): New macro.
21361         (BF_VCALL_INDEX): Likewise.
21362         (BF_FN): Likewise.
21363         (THUNK_VCALL_OFFSET): Likewise.
21364         (make_thunk): Change prototype.
21365         * class.c (build_vtable_entry): Integrate
21366         build_vtable_entry_for_fn.  Handle vcall indices.
21367         (build_vtable_entry_for_fn): Remove.
21368         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
21369         BF_VCALL_INDEX, BF_FN.
21370         (modify_vtable_entry): Integrate common code from
21371         modify_one_vtable and dfs_fixup_vtable_deltas.
21372         (add_virtual_function): Set BF_VCALL_INDEX.
21373         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
21374         and BF_FN.
21375         (modify_one_vtable): Simplify.
21376         (dfs_fixup_vtable_deltas): Likewise.
21377         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
21378         * method.c (make_thunk): Handle vcall indices.
21379
21380 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
21381
21382         Compiler side new abi rtti (not enabled).
21383         * cp-tree.h (new_abi_rtti_p): New macro.
21384         (emit_support_tinfos): Prototype new function.
21385         (tinfo_decl_p): Likewise.
21386         (emit_tinfo_decl): Likwise.
21387         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
21388         macros.
21389         (doing_runtime): New local static.
21390         (init_rtti_processing): Add new-abi initializer.
21391         (get_tinfo_decl): Add new-abi logic.
21392         (tinfo_from_decl): Likewise.
21393         (build_dynamic_cast_1): Likewise.
21394         (qualifier_flags): New static function.
21395         (tinfo_base_init): Likewise.
21396         (generic_initializer): Likewise.
21397         (ptr_ref_initializer): Likewise.
21398         (ptmd_initializer): Likewise.
21399         (class_hint_flags): Likewise.
21400         (class_initializer): Likewise.
21401         (synthesize_tinfo_var): Likewise.
21402         (create_real_tinfo_var): Likewise.
21403         (create_pseudo_type_info): Likewise.
21404         (get_vmi_pseudo_type_info): Likewise.
21405         (create_tinfo_types): Likewise.
21406         (emit_support_tinfos): New global function.
21407         (tinfo_decl_p): New global predicate.
21408         (emit_tinfo_decl): New global function.
21409         * class.c (set_rtti_entry): Generalize for old and new rtti.
21410         (build_vtbl_initializer): Likewise.
21411         * decl2.c (finish_file): Likewise.
21412
21413 2000-01-27  Jim Wilson  <wilson@cygnus.com>
21414
21415         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
21416         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
21417
21418 2000-01-27  Mike Stump  <mrs@wrs.com>
21419
21420         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
21421         for scopes.
21422
21423 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
21424
21425         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
21426
21427 2000-01-26  J"orn Rennecke <amylaar@cygnus.co.uk>
21428
21429         * optimize.c (calls_setjmp_r): Supply new argument
21430         to special_function_p.
21431
21432 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
21433
21434         * call.c: PROTO -> PARAMS.
21435         * class.c: Likewise.
21436         * cp-tree.h: Likewise.
21437         * cvt.c: Likewise.
21438         * decl.c: Likewise.
21439         * decl.h: Likewise.
21440         * decl2.c: Likewise.
21441         * dump.c: Likewise.
21442         * errfn.c: Likewise.
21443         * error.c: Likewise.
21444         * except.c: Likewise.
21445         * expr.c: Likewise.
21446         * init.c: Likewise.
21447         * input.c: Likewise.
21448         * lex.c: Likewise.
21449         * lex.h: Likewise.
21450         * method.c: Likewise.
21451         * optimize.c: Likewise.
21452         * parse.y: Likewise.
21453         * pt.c: Likewise.
21454         * repo.c: Likewise.
21455         * rtti.c: Likewise.
21456         * search.c: Likewise.
21457         * semantics.c: Likewise.
21458         * spew.c: Likewise.
21459         * tree.c: Likewise.
21460         * typeck.c: Likewise.
21461         * typeck2.c: Likewise.
21462         * xref.c: Likewise.
21463
21464 2000-01-25  Richard Henderson  <rth@cygnus.com>
21465
21466         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
21467
21468 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
21469
21470         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
21471         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
21472         (struct vcall_offset_data_s): New type.
21473         (dfs_vcall_offset_queue_p): New function.
21474         (dfs_build_vcall_offset_vtbl_entries): Likewise.
21475         (build_vcall_offset_vtbl_entries): Likewise.
21476         (layout_vtable_decl): Likewise.
21477         (num_vfun_entries): Likewise.
21478         (num_extra_vtbl_entries): Add the entries for vcall offsets.
21479         (build_vtbl_initializer): Likewise.
21480         (dfs_finish_vtabls): Use layout_vtable_decl.
21481         (modify_one_vtables): Always duplicate vtables under the new ABI.
21482         (finish_struct_1): Use layout_vtable_decl.
21483
21484 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
21485
21486         * decl.c (member_function_or_else): Change third arg from a format
21487         specifier to an `enum overload_flags'.  Callers changed.
21488
21489 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
21490
21491         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
21492         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
21493         build_const_cast, get_delta_difference, check_return_expr): Avoid
21494         ANSI string concatenation usage.
21495
21496 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
21497
21498         * class.c (layout_class_type): Put the fields required to make a
21499         class non-empty at the end, not the beginning, of the TYPE_FIELDs
21500         list.
21501
21502 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
21503
21504         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
21505         template.
21506
21507         * decl2.c (mark_used): Do instantiate inlines that have been
21508         explicitly instantiated.
21509
21510 2000-01-24  Richard Henderson  <rth@cygnus.com>
21511
21512         * call.c (build_over_call): Use expand_tree_builtin.
21513         * typeck.c (build_function_call_real): Likewise.
21514         (build_binary_op_nodefault): Handle unordered compares.
21515
21516 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
21517
21518         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
21519         cp_tree_index values.
21520         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
21521         New global node #defines for them.
21522         * rtti.c (call_void_fn): Replace with ...
21523         (build_runtime_decl): ... new static function.
21524         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
21525         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
21526         (build_dynamic_cast_1): Always produce correctly typed result.
21527         Explicitly produce type_info addresses. Use dynamic_cast_node.
21528         * exception.cc (__throw_bad_cast): Return `void *'.
21529         (__throw_bad_typeid): Return `const type_info &'.
21530
21531 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
21532
21533         * cp-tree.h (get_vtable_decl): Prototype new function.
21534         * class.c (get_vtable_decl): New function. Broken out from ...
21535         (build_vtable): ... here. Use it.
21536         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
21537         by get_vtable_decl.
21538
21539 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
21540
21541         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
21542         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
21543         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
21544         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
21545         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
21546         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
21547         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
21548         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
21549         (CPTI_TINFO_VAR_ID): New enumeration.
21550         (__tp_desc_type_node, __access_mode_type_node,
21551         __bltn_desc_type_node, __user_desc_type_node,
21552         __class_desc_type_node, __ptr_desc_type_node,
21553         __attr_desc_type_node, __func_desc_type_node,
21554         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
21555         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
21556         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
21557         enum_desc_type_node, class_desc_type_node,
21558         si_class_desc_type_node, vmi_class_desc_type_node,
21559         ptmd_desc_type_node, base_desc_type_node): New #defines.
21560         (tinfo_fn_id, tinfo_fn_type): Rename to ...
21561         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
21562         (tinfo_var_id): New enumeration.
21563         (DECL_TINFO_FN_P): Augment comment.
21564         * decl.c (cp_global_trees): Adjust documentation.
21565         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
21566         tinfo_decl_type and tinfo_var_id.
21567         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
21568         (build_typeid): Remove unused variable.
21569         (get_tinfo_var): Use tinfo_var_id.
21570         (tinfo_name): New static function.
21571         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
21572         (tinfo_from_decl): Likewise.
21573         (get_base_offset): New static function, broken out of
21574         expand_class_desc.
21575         (expand_si_desc): Use tinfo_name.
21576         (expand_class_desc): Likewise. Lose local static variable.
21577         Use base_desc_type_node. Use get_base_offset.
21578         (expand_ptr_desc): Use tinfo_name.
21579         (expand_attr_desc): Likewise.
21580         (expand_generic_desc): Likewise.
21581
21582         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
21583         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
21584
21585 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
21586
21587         * cp-tree.h (__eprintf): Remove declaration.
21588         * tree.c (__eprintf): Remove definition.
21589
21590 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
21591             Mark Mitchell  <mark@codesourcery.com>
21592
21593         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
21594         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
21595
21596 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
21597
21598         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
21599
21600 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
21601
21602         * cp-tree.h (register_dtor_fn): New function.
21603         * decl.c (destroy_local_static): Rename to ...
21604         (register_dtor_fn): ... this.  Give it external linkage.
21605         (expand_static_init): Use it.
21606         * decl2.c (do_static_initialization): Likewise, if using
21607         __cxa_atexit.
21608         (do_static_destruction): Check that __cxa_atexit is not in use.
21609         (finish_file): Don't call do_static_destruction if using
21610         __cxa_atexit.
21611
21612         * typeck.c (convert_arguments): Restore two-message error
21613         reporting.
21614
21615 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
21616
21617         Remap dynamic cast hint values to be consistent across ABIs.
21618         * search.c (dynamic_cast_base_recurse): Remap generated value.
21619         (get_dynamic_cast_base_type): Adjust documentation.
21620         * tinfo.h (__user_type_info::dyncast): Likewise.
21621         (__user_type_info::find_public_subobj): Remap BOFF meaning.
21622         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
21623         (__class_type_info::do_dyncast): Likewise.
21624         (__class_type_info::do_find_public_subobj): Likewise.
21625         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
21626
21627 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
21628
21629         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
21630
21631         * typeck2.c (incomplete_type_error): Restore previous
21632         cp_error and cp_error_at call sequence.
21633
21634 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
21635
21636         * class.c (dump_class_hierarchy): Make format agree with argument;
21637         cast pointer to unsigned long and print with %lx.
21638
21639 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
21640
21641         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
21642
21643         * typeck.c (composite_pointer_type, common_type,
21644         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
21645         build_function_call_real, convert_arguments,
21646         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
21647         build_unary_op, mark_addressable, build_compound_expr,
21648         build_static_cast, build_reinterpret_cast, build_const_cast,
21649         build_c_cast, build_modify_expr, get_delta_difference,
21650         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
21651         'ISO C++'.  Fusion consecutive calls to diagnostic message routines
21652         into a single one.
21653         * typeck2.c (readonly_error, abstract_virtuals_error,
21654         process_init_constructor, check_for_new_type): Likewise.
21655
21656 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
21657
21658         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
21659         VAR_DECLs.
21660
21661 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
21662
21663         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
21664         (build_x_typeid): Likewise.
21665         (get_tinfo_fn): Likewise.
21666         (get_tinfo_fn_unused): Rename to ...
21667         (get_tinfo_decl): ... here.
21668         * rtti.c (build_headof): Replace logic error with assertion.
21669         (get_tinfo_fn_dynamic): Rename to ...
21670         (get_tinfo_decl_dynamic): ... here. Make static. Use
21671         complete_type_or_else.
21672         (build_x_typeid): Move into ...
21673         (build_typeid): ... here. Adjust call to
21674         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
21675         throw_bad_typeid expression.
21676         (get_tinfo_fn_unused): Rename to ...
21677         (get_tinfo_decl): ... here. Adjust comment.
21678         (get_tinfo_fn): Delete.
21679         (tinfo_from_decl): New static function.
21680         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
21681         (get_typeid): Use complete_type_or_else.
21682         (build_dynamic_cast_1): Adjust calls to
21683         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
21684         * parse.y (primary): Adjust call to build_typeid.
21685         * except.c (build_eh_type_type_ref): Adjust call to
21686         get_tinfo_decl. Mark as used.
21687         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
21688         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
21689         * parse.c: Regenerated.
21690
21691 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
21692
21693         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
21694         calling convention.
21695         (resolves_to_fixed_type_p): Document calling convention.
21696         * rtti.c (build_x_typeid): Initialize NONNULL.
21697
21698         * cp-tree.h (build_shared_int_cst): New function.
21699         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
21700         * class.c (modify_vtable_entry): Likewise.
21701         (add_virtual_function): Split out code to generated shared
21702         INTEGER_CSTs to build_share_int_cst.
21703         (modify_all_vtables): Handle all the overridden functions here.
21704         Add overridden functions from non-primary virtual bases to the
21705         primary vtable.
21706         (finish_struct_1): Adjust call to modify_all_vtables.  Add
21707         overridden functions from non-primary bases to the vtable.
21708         * tree.c (build_shared_int_cst): New function.
21709
21710         * cp-tree.h (scratchalloc): Remove.
21711         (build_scratch_list): Likewise.
21712         * call.c (convert_class_to_reference): Replace build_scratch_list
21713         and build_expr_list with build_tree_list.
21714         (add_candidate): Replace scratchalloc with expralloc.  Note memory
21715         leak.
21716         (build_user_type_conversion_1):  Replace build_scratch_list
21717         and build_expr_list with build_tree_list.
21718         (build_new_op): Likewise.
21719         (build_op_delete_call): Likewise.
21720         (convert_like): Likewise.
21721         * cvt.c (ocp_convert): Likewise.
21722         * decl.c (start_decl): Likewise.
21723         (start_function): Likewise.
21724         (finish_destructor_body): Likewise.
21725         (maybe_build_cleanup_1): Likewise.
21726         * decl2.c (reparse_decl_as_expr): Likewise.
21727         * init.c (perform_member_init): Likewise.
21728         (expand_cleanup_for_base): Likewise.
21729         (build_builtin_delete_call): Likewise.
21730         (build_new_1): Likewise.
21731         (build_delete): Likewise.
21732         * method.c (do_build_assign_ref): Likewise.
21733         * parse.y (already_scoped_stmt): Likewise.
21734         (nontrivial_exprlist): Likewise.
21735         (net_initializer): Likewise.
21736         (initlist): Likewise.
21737         * parse.c: Regenerated.
21738         * rtti.c (build_x_typeid): Likewise.
21739         (build_dynamic_cast_1): Likewise.
21740         * typeck.c (build_x_compound_expr): Likewise.
21741         (build_static_cast): Likewise.
21742         (build_modify_expr): Likewise.
21743
21744         * cp-tree.h (DECL_VINDEX): Add documentation.
21745         * class.c (build_vtable_entry): Likewise.
21746         (start_vtable): Add comment.
21747         (add_virtual_function): Replace pending_hard_virtuals with
21748         overridden_virtuals and pending_virtuals with new_virtuals.
21749         Replace redundant assignments with assertions.
21750         (check_for_override): Add comment.
21751         (check_bases_and_members): Replace pending_hard_virtuals with
21752         overridden_virtuals and pending_virtuals with new_virtuals.
21753         (create_vtbl_ptr): Likewise.
21754         (layout_class_type): Likewise.
21755         (finish_struct_1): Likewise.  Add comments.
21756
21757 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
21758
21759         * class.c (finish_struct_1): Replace redundant code with
21760         assertions.
21761
21762         * cp-tree.h (flag_new_abi): Move.
21763         (flag_use_cxa_atexit): Likewise.
21764         (flag_honor_std): Likewise.
21765         (flag_rtti): Likewise.
21766         (vbase_offsets_in_vtable_p): Define.
21767         (vptrs_present_everywhere_p): Likewise.
21768         (TYPE_CONTAINS_VPTR_P): Likewise.
21769         (dfs_walk_real): Declare.
21770         * class.c (build_vbase_pointer_fields): Check
21771         vbase_offsets_in_vtable_p.
21772         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
21773         BINFO_VPTR_FIELD.
21774         (build_vbase_offset_vtbl_entries): Simplify.
21775         (build_vbase_offset_vtbl_entries): Adjust.
21776         (build_vbase_pointer): Add ability to look up vbase offsets in
21777         vtable.
21778         (start_vtable): New function.
21779         (add_virtual_function): Use it.
21780         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
21781         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
21782         (build_vtbl_initializer): Take the type of the complete object as
21783         input.  Use it to correctly calculate vbase offsets.
21784         (dfs_finish_vtbls): Pass the complete type to
21785         build_vtbl_initializer.
21786         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
21787         (create_vtable_ptr): Create a vtable even if there are no
21788         new virtual functions, under the new ABI.
21789         (finish_struct_1): Likewise.
21790         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
21791         * decl.c (exapnd_static_init): Remove call to
21792         preserve_initializer.
21793         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
21794         vtables.
21795         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
21796         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
21797         (construct_virtual_bases): Don't initialize virtual base pointers
21798         under the new ABI.
21799         (build_aggr_init): Clean up comment.
21800         (expand_aggr_init_1): Likewise.
21801         * rtti.c (expand_class_desc): Store the virtual function table
21802         index where the vbase offset lives in the offset field.
21803         * search.c (dfs_walk_real): Make it global.
21804         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
21805         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
21806
21807         * tinfo.h (USItype): Make it signed under the new ABI.
21808         * tinfo.cc (convert_to_base): New function.  Encapsulate base
21809         conversion logic here.
21810         (__class_type_info::do_upcast): Use it.
21811         (__class_type_info::do_dyncast): Likewise.
21812         (__class_type_info::do_find_public_subobj): Likewise.
21813
21814         * init.c (construct_virtual_bases): Don't look up the addresses of
21815         virtual bases at run-time.
21816
21817         * class.c (build_vbase_pointer): Relocate.
21818         (build_vbase_pointer_fields): Likewise.
21819         (dfs_build_vbase_offset_vtbl_entries): Likewise.
21820         (build_vbase_offset_vtbl_entries): Likewise.
21821
21822         * decl.c (init_decl_processing): Complain if -fnew-abi
21823         -fno-vtable-thunks is used.
21824
21825         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
21826         flag_new_abi.
21827
21828 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
21829
21830         * cp-tree.h (num_extra_vtbl_entries): New function.
21831         (size_extra_vtbl_entries): Likewise.
21832         (dfs_vtable_path_unmark): Likewise.
21833         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
21834         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
21835         * class.c (num_extra_vtbl_entries): New function.
21836         (size_extra_vtbl_entries): Likewise.
21837         (dfs_build_vbase_offset_vtbl_entries): New function.
21838         (build_vbase_offset_vtbl_entries): Likewise.
21839         (build_vtbl_initializer): Use it.
21840         (finish_struct_1): Adjust vtable sizes (using
21841         num_extra_vtbl_entries).
21842         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
21843         THUNK_DECL is non-NULL before expanding it.
21844         * init.c (expand_virtual_init): Adjust the vtable pointer by
21845         size_extra_vtbl_entries before storing it.
21846         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
21847         Handle TREE_LIST parameters here, not in the dfs_* functions.
21848         (dfs_unmarked_real_bases_queue_p): Adjust.
21849         (dfs_marked_real_bases_queue_p): Likewise.
21850         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
21851         (dfs_vtable_path_marked_real_bases_queue_p): New function.
21852         (dfs_vtable_path_unmark): Likewise.
21853
21854 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
21855
21856         * optimize.c (copy_body_r): Clear the operand three of a
21857         TARGET_EXPR when copying it.
21858
21859 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
21860
21861         * method.c (build_decl_overload_real): Check whether we are in ::
21862         before returning __builtin_new/delete.
21863
21864 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
21865
21866         * pt.c (tsubst_friend_function): Improve comment.
21867         (instantiate_decl): Avoid crashing when a "nested" function is
21868         instantiated from the top level.
21869
21870         * dump.c (dqeueue_and_dump): Dump
21871         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
21872
21873 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
21874
21875         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
21876
21877 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
21878
21879         * g++spec.c (lang_specific_driver): Add -fnew-abi if
21880         ENABLE_NEW_GXX_ABI defined.
21881         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
21882         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
21883         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
21884
21885 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
21886
21887         * decl.c (start_cleanup_fn): Call pushdecl.
21888
21889         * call.c (convert_class_to_reference): Fix typos.
21890         (build_conditional_expr): Handle errors gracefully.
21891         * class.c (push_nested_class): Likewise.
21892         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
21893         (DECL_THIS_EXTERN): Use it.
21894         (DECL_THIS_STATIC): Likewise.
21895         * cvt.c (convert_to_void): Handle errors gracefully.
21896         (build_expr_type_conversion): Likewise.
21897         * decl.c (maybe_push_decl): Likewise.
21898         (start_decl_1): Likewise.
21899         (require_complete_types_for_parms): Likewise.
21900         * parse.y (structsp): Likewise.
21901         (base_class): Likewise.
21902         * parse.c: Regenerated.
21903         * pt.c (finish_member_template_decl): Likewise.
21904         * typeck.c (decay_conversion): Likewise.
21905
21906         * cp-tree.h (dfs_skip_vbases): New function.
21907         (find_vbase_instance): Likewise.
21908         * class.c (determine_primary_base): Allow a nearly empty base to
21909         serve as a primary base class under the new ABI.
21910         (get_class_offset_1): Rename to ...
21911         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
21912         messages here.
21913         (get_class_offset): Use it.  Issue error messages here.
21914         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
21915         find the right copies of virtual bases.
21916         (fixup_vtable_deltas1): Rename to ...
21917         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
21918         bases as primary bases.
21919         (fixup_vtable_deltas): Remove.
21920         (override_one_vtable): Handle virtual bases as primary bases.
21921         (merge_overrides): Likewise.
21922         (finish_struct_1): Likewise.
21923         (dump_class_hierarchy): Dump primary-ness of bases as well.
21924         * search.c (mark_primary_bases): Use a pre-order traversal to
21925         handle primary virtual bases.
21926         (dfs_skip_vbases): New fiunction.
21927         (expand_upcast_fixups): Adjust to handle primary virtual bases.
21928         (fixup_virtual_upcast_offsets): Likewise.
21929         (fixup_all_virtual_upcast_offsets): Likewise.
21930         (dfs_find_vbase_instances): New function.
21931         (find_vbase_instance): Likewise.
21932
21933 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
21934
21935         * lex.c (DIR_SEPARATOR): Delete macro.
21936
21937 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
21938
21939        * decl2.c (lang_decode_option): Handle automatic line wrapping
21940        option.
21941
21942 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
21943
21944         * friend.c (do_friend): Don't resolve scopes when processing
21945         template declarations, even if the qualifying scope doesn't
21946         involve template parameters.
21947
21948 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
21949
21950         * class.c (dfs_modify_vtables_queue_p): Remove.
21951         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
21952         and dfs_marked_real_bases_queue_p instead of
21953         dfs_modify_vtables_queue_p.
21954
21955         * class.c (build_vbase_path): Simplify.
21956         (dfs_propagate_binfo_offsets): New function.
21957         (propagate_binfo_offsets): Use it.
21958         (remove_base_field): Simplify.
21959         (dfs_set_offset_for_vbases): Remove.
21960         (dfs_set_offset_for_shared_vbases): New function.
21961         (dfs_set_offset_for_unshared_vbases): Likewise.
21962         (layout_virtual_bases): Use them.
21963         (layout_basetypes): Don't call propagate_binfo_offsets.
21964         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
21965         for the vbases.
21966
21967         * class.c (build_base_field): New function, split out from ...
21968         (build_base_fields): ... here.  Use it.  Allocate primary bases
21969         first, under the new ABI.
21970         (get_vtable_entry): Remove.
21971         (remove_base_field): New function, split out from ...
21972         (remove_base_fields): ... here.  Adjust since primary bases come
21973         first under the new ABI.
21974
21975         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
21976         (initialize_vtbl_ptrs): New function.
21977         (expand_indirect_vtbls_init): Change prototype.
21978         (convert_pointer_to_vbase): Declare.
21979         * init.c (expand_direct_vtbls_init): Remove.
21980         (dfs_initialize_vtbl_ptrs): New function.
21981         (initialize_vtbl_ptrs): Likewise.
21982         (emit_base_init): Use initialize_vtbl_ptrs.
21983         * search.c (convert_pointer_to_vbase): Make it global.
21984         (expand_indirect_vtbls_init): Remove vtable initialization code.
21985         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
21986
21987         * class.c (dfs_finish_vtbls): New function.
21988         (finish_vtbls): Use it.
21989         (dump_class_hierarchy): New function.
21990
21991         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
21992         (BINFO_VBASE_PRIMARY_P): New macro.
21993         (BINFO_VIRTUALS): Add to documentation.
21994         (SET_BINFO_PRIMARY_MARKED_P): Remove.
21995         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
21996         (dfs_mark_primary_bases_queue_p): Likewise.
21997         (dfs_unmarked_real_bases_queue_p): New function.
21998         (dfs_marked_real_bases_queue_p): Likewise.
21999         * search.c (dfs_mark_primary_bases): Adjust.
22000         (mark_primary_bases): Likewise.
22001         (get_shared_vbase_if_not_primary): New function.
22002         (dfs_unmarked_real_bases_queue_p): Likewise.
22003         (dfs_marked_real_bases_queue_p): Likewise.
22004         (dfs_get_pure_virtuals): Simplify.
22005         (get_pure_virtuals): Likewise.
22006
22007 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
22008
22009         * lex.c: Include tm_p.h.
22010
22011 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
22012
22013         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
22014
22015 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
22016
22017         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
22018         * pt.c (instantiate_decl): Defer comdat templates that might not be
22019         needed.
22020
22021         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
22022         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
22023         (finish_file): Likewise.
22024
22025         * decl2.c (import_export_class): Undo 12/14 change.
22026
22027         * error.c (dump_decl): operator new, not operatornew.
22028
22029         * class.c (field_decl_cmp): A nontype is "greater" than a type.
22030         * search.c (lookup_field_1): Look for the last field with the
22031         desired name.
22032
22033 2000-01-05  Nathan Sidwell  <nathan@acm.org>
22034
22035         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
22036         FUNCTION_DECL.
22037
22038 2000-01-05  Nathan Sidwell  <nathan@acm.org>
22039
22040         * typeck.c (build_static_cast): Don't strip target qualifiers
22041         when casting from a class.
22042
22043 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
22044
22045         * class.c (warn_hidden): Initialize variable `fndecl'.
22046
22047 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
22048
22049         * decl.c (flag_isoc9x): New variable to be able to use code in
22050         c-common.c.  For now always zero.
22051
22052 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
22053
22054         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
22055         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
22056         or unshare_base_binfos for virtual bases here.
22057         * search.c (dfs_get_vbase_types): Do it here.
22058         (get_vbase_types): Adjust.
22059
22060 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
22061
22062         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
22063         (BINFO_PRIMARY_MARKED_P): Use flag 5.
22064         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
22065         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
22066         (unmark_primary_bases): Remove declaration.
22067         (unmarkedp): Declare.
22068         (dfs_vbase_unmark): Likewise.
22069         * class.c (determine_primary_base): Return immediately if there
22070         are no base classes.  Call mark_primary_bases here.
22071         (modify_all_direct_vtables): Remove.
22072         (modify_all_indirect_vtables): Remove.
22073         (dfs_modify_vtables_queue_p): New function.
22074         (dfs_modify_vtables): New function.
22075         (modify_all_vtables): Use them.
22076         (build_base_fields): Build FIELD_DECLs for primary virtual base
22077         classes.
22078         (create_vtable_ptr): Don't call determine_primary_base here.
22079         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
22080         (dfs_set_offset_for_vbases): ... this.
22081         (layout_virtual_bases): Use it.
22082         (layout_class_type): Call determine_primary_base here.
22083         * search.c (unmarkedp): Make it global.
22084         (shared_marked_p): Simplify.
22085         (shared_unmarked_p): Likewise.
22086         (dfs_primary_bases_queue_p): Remove.
22087         (dfs_unmark_primary_bases): Likewise.
22088         (unmark_primary_bases): Likewise.
22089         (mark_primary_bases): Simplify.
22090         (get_pure_virtuals): Don't call mark_primary_bases here.
22091         (dfs_vbase_unmark): New function.
22092         (get_vbase_types): Simplify.
22093
22094         * class.c (struct base_info): Remove.
22095         (determine_primary_base): Take has_virtual_p rather than a
22096         base_info as input.  Don't calculate max_has_virtual.
22097         (finish_struct_bits): Remove max_has_virtual argument.
22098         (create_vtable_ptr): Remove max_has_virtual_p argument.
22099         (layout_virtual_bases): Remove max argument.
22100         (layout_basetypes): Likewise.
22101         (layout_class_type): Remove max_has_virtual_p argument.
22102         (finish_struct_1): Remove max_has_virtual.
22103
22104         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
22105         (layout_basetypes): Remove.
22106         * class.c (propagate_binfo_offsets): Moved here from tree.c.
22107         Update to handle primary virtual bases.
22108         (remove_base_fields): New function, split out from
22109         layout_basetypes.
22110         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
22111         (layout_virtual_bases): New function, split out from
22112         layout_basetypes.  Update to handle primary virtual bases.
22113         (layout_basetypes): Moved here from tree.c.  Use
22114         remove_base_fields and layout_virtual_bases.
22115         * search.c (dfs_mark_primary_bases_queue_p): New function.
22116         (mark_primary_bases): Use it.
22117         * tree.c (CEIL): Remove.
22118         (propagate_binfo_offsets): Remove.
22119         (layout_basetypes): Remove.
22120
22121 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
22122
22123         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
22124         (BINFO_PRIMARY_MARKED_P): New macro.
22125         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
22126         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
22127         (mark_primary_bases): New function.
22128         (unmark_primary_bases): Likewise.
22129         * search.c (get_abstract_virtuals_1): Remove.
22130         (dfs_mark_primary_bases): New function.
22131         (mark_primary_bases): Likewise.
22132         (dfs_unmark_primary_bases): Likewise.
22133         (unmark_primary_bases): Likewise.
22134         (dfs_get_pure_virtuals): Likewise.
22135
22136 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
22137
22138         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
22139         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
22140         (modify_one_vtable): Adjust.
22141         (fixup_vtable_deltas1): Likewise.
22142         (override_one_vtable): Likewise.
22143         * search.c (get_abstract_virtuals_1): Likewise.
22144         (get_pure_virtuals): Likewise.
22145         (expand_upcast_fixups): Likewise.
22146         * tree.c (debug_binfo): Likewise.
22147
22148         * class.c (build_vtable): Don't return a value.  Don't rebuild
22149         vtables for bases that have already been handled.
22150         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
22151         already been handled.
22152         (modify_one_vtable): Adjust accordingly.
22153         (fixup_vtable_deltas1): Likewise.
22154         (finish_struct_1): Likewise.
22155
22156 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
22157
22158         * call.c (build_new_method_call): Also check destructors.