OSDN Git Service

PR c++/10903
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2003-07-16  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2
3         PR c++/10903
4         * pt.c (convert_nontype_argument): Fix thinko in diagnostic.
5         Improve.
6
7 2003-07-15  Mark Mitchell  <mark@codesourcery.com>
8
9         * cp-tree.def (LOOKUP_EXPR): Remove.
10         * cp-tree.h (cp_id_kind): Add CP_ID_KIND_UNQUALIFIED_DEPENDENT.
11         (LOOKUP_EXPR_GLOBAL): Remove.
12         (get_bindings): Remove.
13         (is_aggr_type_2): Remove.
14         * call.c (resolved_scoped_fn_name): Remove support for
15         LOOKUP_EXPR.
16         * decl.c (grokfndecl): Likewise.
17         (grokdeclarator): Likewise.
18         * error.c (dump_decl): Likewise.
19         (dump_expr): Likewise.
20         * friend.c (do_friend): Likewise.
21         * init.c (build_offset_ref): Likewise.
22         * lex.c (unqualified_fn_lookup_error): Use pedwarn.  Do not create
23         LOOKUP_EXPRs 
24         * mangle.c (write_expression): Remove support for LOOKUP_EXPR.
25         * parser.c (cp_parser_postfix_expression): Modify Koenig lookup
26         test.
27         * pt.c (get_bindings): Give it internal linkage.
28         (check_explicit_specialization): Remove support for LOOKUP_EXPR.
29         (lookup_template_function): Likewise.
30         (for_each_tempalte_parm_r): Likewise.
31         (tsubst_decl): Likewise.
32         (tsubst_qualified_id): Handle template template parameters.
33         (tsubst_copy): Remove support for LOOKUP_EXPR.
34         (tsubst_copy_and_build): Likewise.
35         (most_general_template): Likewise.
36         (value_dependent_expression_p): Likewise.
37         (type_dependent_expression_p): Note that IDENTIFIER_NODEs are
38         always dependent.
39         * semantics.c (perform_koenig_lookup): Do not create
40         IDENTIFIER_NODEs.
41         (finish_fname): Likewise.
42         (finish_id_expression): Likewise.
43         * tree.c (is_aggr_type_2): Remove.
44         
45 2003-07-16  Gabriel Dos Reis  <gdr@integrable-solutions.net>
46
47         PR c++/11531
48         * typeck.c (check_return_expr): Fix thinko in diagnostic.
49
50 2003-07-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
51
52         PR c++/10108
53         * pt.c (tsubst_decl) <TEMPLATE_DECL>: Add a check for
54         error_mark_node.
55
56 2003-07-14  Mark Mitchell  <mark@codesourcery.com>
57
58         PR c++/11509
59         * pt.c (dependent_scope_ref_p): New function.
60         (value_dependent_expression_p): Use it.
61         (type_dependent_expression_p): Likewise.        
62         
63         * pt.c (tsubst_friend_function): Use reregister_specialization.
64
65         PR c++/7019
66         * cp-tree.h (lookup_qualified_name): Adjust prototype.
67         * decl.c (lookup_qualified_name): Add complain parameter.  Adjust
68         call to is_aggr_type.
69         * parser.c (cp_parser_lookup_name): Adjust call to
70         lookup_qualified_name.
71         * pt.c (tsubst_qualified_id): Likewise.
72         (tsubst_copy_and_build): Likewise.
73         * semantics.c (finish_qualified_id_expr): Deal with erroneous
74         expressions.
75
76 2003-07-14  Gabriel Dos Reis <gdr@integrable-solutions.net>
77
78         PR c++/11510
79         * call.c (op_error): Properly format  REALPART_EXPR and
80         IMAGPART_EXPR. 
81         * error.c (dump_expr): Likewise.
82
83 2003-07-14  Gabriel Dos Reis <gdr@integrable-solutions.net>
84
85         * error.c (dump_expr): Handle EMPTY_CLASS_EXPR.
86
87 2003-07-14  Gabriel Dos Reis  <gdr@integrable-solutions.net>
88
89         PR c++/5293
90         * call.c (initialize_reference): Improve diagnostic.
91
92 2003-07-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
93
94         PR c++/11154
95         * pt.c (more_specialized_class): Add full_args parameter.
96         (most_specialized_class): Adjust calls to more_specialized_class.
97         * cp-tree.h (more_specialized_class): Adjust declaration.
98
99 2003-07-14  Dan Nicolaescu  <dann@ics.uci.edu>
100
101         * lex.c (enum tree_node_kind): Delete.
102
103 2003-07-13  Mark Mitchell  <mark@codesourcery.com>
104
105         PR c++/11503
106         * cp-tree.h (DECL_SELF_REFERENCE_P): New macro.
107         (SET_DECL_SELF_REFERENCE_P): Likewise.
108         * class.c (build_self_reference): Use SET_DECL_SELF_REFERENCE_P.
109         * pt.c (tsubst_decl): Copy it.
110         * search.c (lookup_base): Use DECL_SELF_REFERENCE_P.
111
112         * pt.c (reregister_specialization): Fix thinko in previous change.
113         
114         * cp-tree.h (cp_id_kind): New type.
115         (unqualified_name_lookup_error): Change prototype.
116         (unqualified_fn_lookup_error): New function.
117         (do_identifier): Remove.
118         (do_scoped_id): Likewise.
119         (tsubst_copy_and_build): Change prototype.
120         (reregister_specialization): New function.
121         (perform_koenig_lookup): Likewise.
122         (finish_id_expression): Likewise.
123         * call.c (build_method_call): Adjust call to
124         unqualified_name_lookup_error.
125         * decl.c (duplicate_decls): Use reregister_specialization.
126         * lex.c (is_global): Remove.
127         (unqualified_name_lookup_error): Return a value.
128         (do_identifier): Remove.
129         (do_scoped_id): Likewise.
130         (identifier_typedecl_value): Remove.
131         (unqualified_fn_lookup_error): New function.
132         * parser.c (cp_parser_id_kind): Remove.
133         (cp_parser_non_constant_id_expression): Remove.
134         (cp_parser_primary_expression): Use finish_id_expression.
135         (cp_parser_class_or_namespace_name): Use cp_id_kind, not
136         cp_parser_id_kind.
137         (cp_parser_postfix_expression): Use perform_koenig_lookup.
138         (cp_parser_template_argument): Use cp_id_kind.
139         (cp_parser_fold_non_dependent_expr): Adjust call to
140         tsubst_copy_and_build.
141         * pt.c (unregister_specialization): Rename to ...
142         (reregister_specialization): This.
143         (tsubst_friend_function): Use it.
144         (maybe_fold_nontype_arg): Adjust call to tsubst_copy_and_build.
145         (tsubst_qualified_id): Likewise.
146         (tsubst_expr): Likewise.
147         (tsubst_copy_and_build): Add function_p parameter.  Use
148         finish_id_expression.  Introduce RECUR macro.
149         (tsubst_non_call_postfix_expression): New function.
150         (regenerate_decl_from_template): Use reregister_specialization.
151         * semantics.c (perform_koenig_lookup): New function.
152         (finish_id_expression): Likewise.
153         
154 2003-07-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
155
156         * pt.c (push_access_scope_real): Remove.
157         (push_access_scope): Move code from push_access_scope_real.
158         (pop_access_scope): Don't check for TEMPLATE_DECL.
159         (instantiate_template): Defer access checking during template
160         substitution.
161         (regenerate_decl_from_template): Tidy.
162
163 2003-07-11  Nathanael Nerode  <neroden@gcc.gnu.org>
164
165         PR c++/11437
166         * operators.def: Add definitions for __imag__, __real__.
167
168 2003-07-11  Nathan Sidwell  <nathan@codesourcery.com>
169
170         PR c++/11050
171         * parser.c (cp_parser_expression_list): Rename to ...
172         (cp_parser_parenthesized_expression_list): ... here. Add attribute
173         parameter, parse the surounding parentheses.
174         (cp_parser_skip_to_closing_parenthesis): Add recover and or_comma
175         parameters. Return int.
176         (cp_parser_skip_to_closing_parenthesis or comma): Remove.
177         (cp_parser_postfix_expression): Adjust function call parsing.
178         (cp_parser_new_placement): Adjust.
179         (cp_parser_new_initializer): Likewise.
180         (cp_parser_cast_expression): Likewise.
181         (cp_parser_selection_statement): Likewise.
182         (cp_parser_mem_initializer): Likewise.
183         (cp_parser_asm_definition): Likewise.
184         (cp_parser_init_declarator): Likewise.
185         (cp_parser_declarator): Make
186         cdtor_or_conv_p an int ptr.
187         (cp_parser_direct_declarator): Likewise. Check for a parameter
188         list on cdtors & conv functions.
189         (cp_parser_initializer): Adjust.
190         (cp_parser_member_declaration): Adjust.
191         (cp_parser_attribute_list): Move code into
192         cp_parser_parens_expression_list.
193         (cp_parser_functional_cast): Adjust.
194         * pt.c (type_dependent_expression_p): Erroneous expressions are
195         non-dependent.
196
197 2003-07-11  Geoffrey Keating  <geoffk@apple.com>
198
199         * decl.c (cp_finish_decl): Handle 'used' attribute.
200
201         * cp-lang.c (c_reset_state): New dummy routine.
202         * cp-tree.h (finish_file): Move prototype to c-common.h.
203         * parser.c (c_parse_file): Rename from yyparse; don't call finish_file.
204
205 2003-07-11  Mark Mitchell  <mark@codesourcery.com>
206
207         PR c++/8327
208         * pt.c (tsubst_qualified_id): Implement suggested resolution for
209         Core Issue 2.
210         (type_dependent_expression_p): Likewise.
211
212 2003-07-10  Mark Mitchell  <mark@codesourcery.com>
213
214         * typeck.c (build_binary_op): Do not warn about signed
215         vs. unsigned comparisons in the bodies of templates.
216
217         PR c++/9411
218         * parser.c (cp_parser_postfix_expression): Check dependency of
219         functions.
220
221 2003-07-09  Mark Mitchell  <mark@codesourcery.com>
222
223         PR c++/10032
224         * decl.c (cxx_init_decl_processing): With -pedantic, pedwarns are
225         still errors.
226
227         PR c++/10527
228         * error.c (decl_to_string): Do not print default argument
229         expressions.
230
231         * cp-tree.h (break_out_calls): Remove declaration.
232         * tree.c (break_out_calls): Remove.
233         * typeck.c (build_modify_expr): Avoid invalid sharing of trees.
234         
235 2003-07-09  Nathan Sidwell  <nathan@codesourcery.com>
236
237         PR c++ 9483
238         * class.c (check_field_decls): Pass DECL_NAME to constructor_name_p.
239         * decl2.c (constructor_name_p): Avoid repeated constructor_name
240         calls.
241         * decl.c (grokdeclarator): Refactor ctor/dtor detection.
242
243 2003-07-09  Mark Mitchell  <mark@codesourcery.com>
244
245         * typeck.c (build_x_unary_op): Take note of the fact that
246         PREINCREMENT_EXPR and POSTINCREMENT_EXPR are binary operations on
247         trees.
248
249         * parser.c (cp_parser_primary_expression): Preserve the form of
250         qualified expressions in templates, even if they are not
251         dependent.
252         * pt.c (convert_nontype_argument): Handle non-dependent SCOPE_REFs.
253         (tsubst_qualified_id): Likewise.
254         * search.c (accessible_p): Treat everything in the body of a
255         template as accessible.
256
257 2003-07-08  Mark Mitchell  <mark@codesourcery.com>
258
259         * cp-tree.def (NON_DEPENDENT_EXPR): New node.
260         * cp-tree.h (build_call_from_tree): Remove.
261         (build_member_call): Likewise.
262         (dependent_template_arg_p): Remove.
263         (any_dependent_template_arguments_p): New function.
264         (dependent_template_id_p): Likewise.
265         (any_type_dependent_arguments_p): Likewise.
266         (build_non_dependent_expr): Likewise.
267         (build_non_dependent_args): Likewise.
268         (build_x_compound_expr): Adjust prototype.
269         * call.c (build_new_method_call): Handle non-dependent expressions
270         correctly.
271         * decl2.c (grok_array_decl): Likewise.
272         (build_offset_ref_call_from_tree): Likewise.
273         (build_call_from_tree): Remove.
274         * error.c (dump_decl): Handle NON_DEPENDENT_EXPR.
275         (dump_expr): Likewise.
276         * init.c (build_member_call): Remove.
277         * mangle.c (write_expression): Update handling for template-ids.
278         * parser.c (cp_parser_primary_expression): Use
279         any_dependent_template_arguments_p.  Update constant-expression
280         handling.
281         (cp_parser_postfix_expression): Use
282         any_type_dependent_arguments_p.  Simplify call processing.
283         (cp_parser_unary_expression): Simplify.
284         (cp_parser_expression): Adjust for changes to
285         build_x_compound_expr.
286         (cp_parser_template_argument): Implement standard-conforming
287         parsing of non-type template arguments.
288         (cp_parser_direct_declarator): Use
289         cp_parser_fold_non_dependent_expr.
290         (cp_parser_fold_non_dependent_expr): New function.
291         (cp_parser_next_token_ends_template_argument_p): Likewise.
292         * pt.c (convert_template_argument): Do not call
293         maybe_fold_nontype_arg.
294         (tsubst_baselink): Likewise.
295         (tsubst_copy_and_build): Share common code.  Make sizeof/alignof
296         processing work correctly for non-dependent expressions.  Adjust
297         handling of COMPOUND_EXPR.  Simplify call processing.
298         (value_dependent_expression_p): Deal with functional casts and
299         sizeof/alignof correctly.
300         (type_dependent_expression_p): Handle overloaded functions.
301         (any_type_dependent_arguments_p): New function.
302         (any_dependent_template_arguments_p): Likewise.
303         (dependent_template_p): Treat SCOPE_REFs as dependent.
304         (dependent_template_id_p): Simplify.
305         (build_non_dependent_expr): New function.
306         (build_non_dependent_args): Likewise.
307         * semantics.c (finish_stmt_expr): Don't make dependent
308         statement-expresions have void type.
309         (finish_call_expr): Handle non-dependent expressions
310         correctly.
311         * tree.c (lvalue_p_1): Treat NON_DEPENDENT_EXPRs as lvalues.
312         * typeck.c (cxx_sizeof_or_alignof_type): Give the expression
313         type size_t, even in templates.
314         (expr_sizeof): Likewise.
315         (finish_class_member_access_expr): Handle non-dependent expressions
316         correctly.
317         (build_x_indirect_ref): Likewise.
318         (build_x_binary_op): Likewise.
319         (build_x_unary_op): Likewise.
320         (build_x_conditional_expr): Likewise.
321         (build_x_compound_expr): Likewise.
322         * typeck2.c (build_x_arrow): Likewise.
323
324 Wed Jul  9 02:28:39 CEST 2003  Jan Hubicka  <jh@suse.cz>
325
326         * cp-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New.
327         * decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS.
328         (start_function): Use DECL_ESTIMATED_INSNS.
329         * optimize.c (maybe_clone_body): Use DECL_ESTIMATED_INSNS.
330
331         * decl2.c (maybe_emit_vtables): Fix marking vtables as needed in
332         unit-at-a-time
333
334 2003-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
335
336         PR c++/11030
337         * pt.c (instantiate_class_template): Don't call xref_tag to
338         inject name when the friend class is a specialization.
339
340 2003-07-07  Mark Mitchell  <mark@codesourcery.com>
341
342         * cp-tree.h (build_scoped_method_call): Remove.
343         (lookup_qualified_name): Remove parameter.
344         (tsubst_copy_and_build): Declare.
345         (finish_qualified_object_call_expr): Remove.
346         (check_accessibility_of_qualified_id): New function.
347         (finish_qualified_id_expr): Likewise.
348         (non_reference): Likewise.
349         (build_expr_from-tree): Remove.
350         * call.c (non_reference): Remove.
351         (build_scoped_method_call): Likewise.
352         (build_method_call): Use error_operand_p.  Assert that we are not
353         processing a template.
354         (standard_conversion): Use non_reference.
355         * class.c (build_vtbl_entry_ref): Likewise.
356         (build_vtbl_ref_1): Likewise.
357         * cvt.c (build_expr_type_conversion): Use non_reference.
358         * decl.c (lookup_qualified_name): Remove flags parameter.
359         (grok_op_properties): Use non_reference.
360         * decl2.c (grok_array_decl): Likewise.
361         (build_expr_from_tree): Remove.
362         (build_offset_ref_call_from_tree): Update comment.
363         * error.c (parm_to_string): Call reinit_global_formatting_buffer.
364         * except.c (prepare_eh_types): Use non_reference.
365         (can_convert_eh): Likewise.
366         * init.c (build_dtor_call): Avoid using build_method_call.
367         * mangle.c (write_template_param): Remove misleading comment.
368         * method.c (locate_copy): Use non_reference.
369         * parser.c (cp_parser_scope_through_which_access_occurs): Remove.
370         (cp_parser_primary_expression): Do not create SCOPE_REFs is
371         non-dependent contexts.
372         (cp_parser_postfix_expression): Use finish_qualified_id_expr.
373         (cp_parser_direct_declarator): Use tsubst_copy_and_build, not
374         build_expr_from_tree.
375         (cp_parser_lookup_name): Adjust call to lookup_qualified_name.
376         Use check_accessibility_of_qualified_id.
377         * pt.c (maybe_fold_nontype_arg): Use tsubst_copy_and_build, not
378         build_expr_from_tree.
379         (tsubst_baselink): New function.
380         (tsubst_qualified_id): Likewise.
381         (tsubst_copy): Use them.  Remove support for METHOD_CALL_EXPR.
382         (tsubst_expr): Adjust call to lookup_qualified_name.
383         (tsubst_copy_and_build): Handle SCOPE_REFs specially.  Adjust
384         handling of CALL_EXPRs.
385         (value_dependent_expression_p): Use INTEGRAL_OR_ENUMERATION_TYPE_P.
386         * rtti.c (get_tinfo_decl_dynamic): Use non_reference.
387         * search.c (check_final_overrider): Likewise.
388         * semantics.c (check_accessibility_of_qualified_id): New function.
389         (finish_qualified_object_call_expr): Remove.
390         * typeck.c (target_type): Use non_reference.
391         (cxx_sizeof_or_alignof_type): Likewise.
392         (dubious_conversion_warnings): Likewise.
393         (convert_for_initialization): Likewise.
394         (non_reference): New function.
395
396 2003-07-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
397
398         * decl.c (print_binding_level, print_other_binding_stack,
399         print_binding_stack): Merge uses of HOST_PTR_PRINTF with adjacent
400         stdio calls.
401         * ptree.c (cxx_print_decl, cxx_print_binding): Likewise.
402
403 2003-07-07  Andreas Jaeger  <aj@suse.de>
404
405         * friend.c: Convert to ISO C90 prototypes.
406
407         * Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output
408         language.
409         * cfns.h: Regenerate.
410
411         * typeck.c: Convert remaining prototypes to ISO C90.
412         * search.c: Likewise.
413
414         * decl2.c (build_expr_from_tree): Convert prototype to ISO C90.
415         * semantics.c (expand_or_defer_fn): Likewise
416         * mangle.c (discriminator_for_string_literal): Likewise.
417         * g++spec.c (lang_specific_driver): Likewise.
418
419         * search.c (lookup_base_r): Remove unused variable.
420
421 2003-07-07  Nathan Sidwell  <nathan@codesourcery.com>
422
423         * semantics.c: (genrtl_try_block) Adjust emit_line_note
424         calls.
425
426 2003-07-07  Andreas Jaeger  <aj@suse.de>
427
428         * search.c (lookup_base_r): Remove unused variable.
429
430 2003-07-06  Michael Chastain  <mec@shout.net>
431
432         PR debug/10055
433         * lex.c (cxx_init): Call push_srcloc and pop_srcloc rather than
434         assigning to input_filename directly.
435
436 2003-07-06  Kazu Hirata  <kazu@cs.umass.edu>
437
438         * call.c: Fix comment formatting.
439         * class.c: Likewise.
440         * cp-tree.h: Likewise.
441         * decl.c: Likewise.
442         * decl2.c: Likewise.
443         * error.c: Likewise.
444         * method.c: Likewise.
445         * name-lookup.c: Likewise.
446         * parser.c: Likewise.
447         * pt.c: Likewise.
448         * rtti.c: Likewise.
449         * search.c: Likewise.
450         * typeck.c: Likewise.
451
452 2003-07-06  Mark Mitchell  <mark@codesourcery.com>
453
454         PR c++/11345
455         * search.c (lookup_base_r): Remove is_non_public and
456         within_current_scope parameters.  Remove other dead code.
457         (lookup_base): Adjust call to lookup_base_r.
458         (adjust_result_of_qualified_name_lookup): Improve comment.
459         * semantics.c (finish_call_expr): Use maybe_dummy_object.
460
461 2003-07-06  Neil Booth  <neil@daikokuya.co.uk>
462
463         * cp-lang.c (LANG_HOOKS_HANDLE_FILENAME,
464         LANG_HOOKS_MISSING_ARGUMENT): Override.
465
466 2003-07-05  Mark Mitchell  <mark@codesourcery.com>
467
468         PR c++/11431
469         * typeck.c (build_static_cast): Check for reference conversions
470         earlier.
471
472 2003-07-04  Mark Mitchell  <mark@codesourcery.com>
473
474         * cp-tree.h (perform_integral_promotions): Declare.
475         * call.c (build_addr_func): Use decay_conversion.
476         (convert_arg_to_ellipsis): Likewise.  Remove misleading comment.
477         (convert_for_arg_passing): Use perform_integral_promotions.
478         * cvt.c (build_expr_type_conversion): Use decay_conversion.
479         (type_promotes_to): Do not return a cv-qualified type.
480         * decl.c (grok_reference_init): Fix formatting.
481         (get_atexit_node): Use decay_conversion.
482         (build_enumerator): Use perform_integral_promotions.
483         * init.c (build_vec_init): Use decay_conversion.
484         * semantics.c (finish_expr_stmt): Likewise.
485         (finish_switch_cond): Use perform_integral_promotions.
486         * typeck.c (default_conversion): Likewise.
487         (perform_integral_promotions): New function.
488         (build_indirect_ref): Use decay_conversion.
489         (build_array_ref): Use perform_integral_promotions.
490         (convert_arguments): Use decay_conversion.
491         (build_unary_op): Use perform_integral_promotions.
492         (build_c_cast): Use decay_conversion.
493         (build_modify_expr): Likewise.
494         (convert_for_initialization): Likewise.
495         * typeck2.c (build_x_arrow): Likewise.
496
497 2003-07-04  Kazu Hirata  <kazu@cs.umass.edu>
498
499         * call.c: Fix comment typos.
500         * class.c: Likewise.
501         * cp-tree.h: Likewise.
502         * cvt.c: Likewise.
503         * decl2.c: Likewise.
504         * decl.c: Likewise.
505         * init.c: Likewise.
506         * mangle.c: Likewise.
507         * parser.c: Likewise.
508         * pt.c: Likewise.
509         * search.c: Likewise.
510         * semantics.c: Likewise.
511         * tree.c: Likewise.
512         * typeck.c: Likewise.
513
514 2003-07-04  Zack Weinberg  <zack@codesourcery.com>
515
516         * parser.c (cp_lexer_read_token): No need to handle string
517         constant concatenation.
518
519 2003-07-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
520
521         * cp-tree.h (GCC_DIAG_STYLE, ATTRIBUTE_GCC_CXXDIAG): Define.
522         (cp_error_at, cp_warning_at, cp_pedwarn_at): Mark with
523         ATTRIBUTE_GCC_CXXDIAG.
524
525 2003-07-03  Mark Mitchell  <mark@codesourcery.com>
526
527         * call.c (build_addr_func): Handle bound pointers-to-members.
528         (build_method_call): Do not call resolve_offset_ref.
529         (implicit_conversion): Likewise.
530         (resolve_scoped_fn_name): Use finish_non_static_data_member, not
531         resolve_offset_ref.
532         (resolve_args): Do not call resolve_offset_ref.
533         (build_conditional_expr): Likewise.
534         (build_new_method_call): Likewise.
535         * cp-tree.def (OFFSET_REF): Update documentation.
536         * cvt.c (cp_convert_to_pointer): Update handling of conversions from
537         pointers to members to pointers.
538         (ocp_convert): Do not call resolve_offset_ref.
539         (convert_to_void): Likewise.
540         (build_expr_type_conversion): Likewise.
541         * decl2.c (delete_sanity): Likewise.
542         * init.c (resolve_offset_ref): Simplify greatly.
543         (build_vec_delete): Do not call resolve_offset_ref.
544         * parser.c (cp_parser_postfix_expression): Call resolve_offset_ref
545         if appropriate.
546         (cp_parser_unary_expression): Use
547         cp_parser_simple_cast_expression.
548         (cp_parser_delete_expression): Likewise.
549         (cp_parser_cast_expression): Likewise.
550         (cp_parser_pm_expression): Use cp_parser_binary_op.
551         (cp_parser_simple_cast_expression): New function.
552         * rtti.c (build_dynamic_cast_1): Do not call resolve_offset_ref.
553         * semantics.c (finish_increment_expr): Likewise.
554         (finish_typeof): Likewise.
555         * tree.c (lvalue_p_1): Do not handle OFFSET_REF.
556         * typeck.c (require_complete_type): Do not handle OFFSET_REFs.
557         (decay_conversion): Do not call resolve_offset_ref.
558         (finish_class_member_access_expr): Likewise.
559         (convert_arguments): Likewise.
560         (build_x_binary_op): Handle DOTSTAR_EXPR.
561         (condition_conversion): Do not call resolve_offset_ref.
562         (unary_complex_lvalue): Likewise.
563         (build_static_cast): Likewise.
564         (build_reinterpret_cast): Likewise.
565         (build_const_cast): Likewise.
566         (build_c_cast): Likewise.
567         (build_modify_expr): Likewise.
568         (convert_for_assignment): Likewise.
569         (convert_for_initialization): Likewise.
570         * typeck2.c (build_x_arrow): Likewise.
571         (build_m_component_ref): Simplify.
572
573         * call.c (build_scoped_method_call): Use convert_to_void.
574         (build_method_call): Likewise.
575         * class.c (check_field_decls): Remove dead code.
576         * cvt.c (convert_from_reference): Remove OFFSET_TYPE handling.
577         * decl2.c (grok_array_decl): Remove dead code.
578         (arg_assoc_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
579         as pointer-to-member representation.
580         * init.c (build_offset_ref): Tidy.
581         (build_vec_delete_1): Use convert_to_void.
582         * mangle.c (write_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
583         as pointer-to-member representation.
584
585 2003-07-03  Nathan Sidwell  <nathan@codesourcery.com>
586
587         PR c++/9162
588         * decl.c (grokdeclarator): Return friend decls, not
589         void_type_node.
590         * decl2.c (grokfield): Alter friend decl check.
591         * parser.c (struct cp_parser): Document default_arg chain on
592         unparsed_functions_queue.
593         (cp_parser_save_default_args): New.
594         (cp_parser_init_declarator, cp_parser_function_definition,
595         cp_parser_member_declaration): Call it.
596         (cp_parser_class_specifier): Remove unused variable. Alter
597         processing of unparsed_functions_queue.
598
599 2003-07-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
600
601         * class.c (add_method, check_field_decl): Fix format specifier.
602         * decl.c (duplicate_decls, pushdecl, check_goto,
603         fixup_anonymous_aggr, maybe_commonize_var, grokdeclarator,
604         start_enum): Likewise.
605         * decl2.c (ambiguous_decl): Likewise.
606         * pt.c (redeclare_class_template): Likewise.
607
608 2003-07-02  Nathan Sidwell  <nathan@codesourcery.com>
609
610         PR c++/10219
611         * pt.c (type_unification_real): Don't unify exprs of error type.
612         * tree.c (error_type): Don't die on error_type.
613
614         PR c++/9779
615         * decl2.c (arg_assoc_class): Don't die on NULL type.
616         * typeck.c (type_unknown_p): Don't die on untyped expressions.
617
618 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
619
620         PR c++/6949
621         * decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local
622         classes.
623
624 2003-07-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
625
626         * error.c (locate_error): %P takes an `int', not a `tree'.
627
628 Wed Jul  2 00:36:48 CEST 2003  Jan Hubicka  <jh@suse.cz>
629
630         * decl2.c (defer_fn): Set DECL_DEFER_OUTPUT.
631         (finish-file): Do not process function with DECL_DEFER_OUTPUT clear;
632         clear DECL_DEFER_OUTPUT once function is processed; avoid flags
633         massaging.
634
635         * cp-tree.h (DECL_NEEDED_P): Support unit-at-a-time
636         (expand_or_defer_fn): Declare.
637         (lower_function): Declare.
638         * decl.c (start_cleanup_fn): Use expand_or_defer_fn.
639         * decl2.c: Include cgraph.h and varpool.h
640         (maybe_emit_vtables):  Make explicit instantations as needed.
641         (mark_member_pointers, lower_function): New functions.
642         (finish_file): Do unit-at-a-time.
643         * method.c (synthesize_method): Use expand_or_defer_fn.
644         * optimize.c (maybe_clone_body): Use expand_or_defer_fn.
645         * parser.c (cp_parser_function_definition_after_decl): Use
646         expand_or_defer_fn.
647         * pt.c (instantiate_decl): Likewise.
648         * semantics.c: Include cgraph.h
649         (expand_or_defer_fn): Break out from ...
650         (expand_body): ... here; deal with unit-at-a-time.
651         * cp-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION,
652         LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Define.
653
654 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
655
656         * call.c (resolve_scoped_fn_name): Return error_mark_node for
657         erroneous cases.
658
659 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
660
661         PR c++/11149
662         * call.c (resolve_scoped_fn_name): Check that the qualifying scope
663         is a class type.
664
665 2003-07-01  Giovanni Bajo  <giovannibajo@libero.it>
666
667         PR c++/8046
668         * error.c (dump_decl): Handle BIT_NOT_EXPR as
669         pseudo destructor calls.
670
671 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
672
673         * cp-tree.h (define_label): Replace filename and lineno
674         arguments with a location_t.
675         * decl.c (pop_label): Adjust define_label call.
676         (define_label): Replace filename and lineno arguments with a
677         location_t.
678         * semantics.c (finish_label): Adjust define_label call.
679
680 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
681
682         PR c++/9559
683         * decl2.c (grokfield): Do not build NOP_EXPRs around the
684         error_mark_node.
685
686 2003-06-30  Neil Booth  <neil@daikokuya.co.uk>
687
688         * Make-lang.in: Update.
689         * cp-lang.c (c_language): Define.
690         (LANG_HOOKS_INIT_OPTIONS): Use common hook.
691         * cp-tree.h (cxx_init_options): Remove.
692         * lex.c: Don't include diagnostic.h.
693         (cxx_init_options): Remove.
694
695 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
696
697         PR c++/4933
698         * error.c (dump_expr): Support correctly the COMPOUND_EXPR
699         tree generated within a template. Use dump_expr to dump an
700         expression sizeof.
701
702 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
703
704         * mangle.c (write_expression): Exit gracefully when trying to
705         mangle a CALL_EXPR.
706
707 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
708
709         PR c++/10750
710         * parser.c (cp_parser_primary_expression): A VAR_DECL with a
711         (value- or type-) dependent expression as DECL_INITIAL is a
712         valid constant-expression (at parser time).
713
714 2003-06-30  Giovanni Bajo <giovannibajo@libero.it>
715
716         PR c++/11106
717         * error.c (dump_decl): Call dump_decl to dump the DECL_NAME for a
718         USING_DECL, instead of print_tree_identifier.
719
720 2003-06-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
721
722         * cp-tree.h (language_to_string): Adjust declaration.
723         * dump.c (cp_dump_tree): Adjust usage.
724         * error.c (dump_char): Use output_formatted_scalar. Tidy.
725         (parm_to_string): Lose unused parameter.  Tidy.
726         (expr_to_string): Likewise.
727         (code_to_string): Likewise.
728         (language_to_string): Likewise.
729         (op_to_string): Likewise.
730         (assop_to_string): Likewise.
731         (digit_buffer): Remove.
732         (dump_type): Format builtin vector type as __vector__.
733
734 2003-06-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
735
736         * error.c (print_integer): Remove.
737         (dump_type_suffix): Adjust.
738         (dump_expr): Likewise.
739
740 2003-06-28  Nathan Sidwell  <nathan@codesourcery.com>
741
742         * error.c (print_instantiation_partial_context): Take a
743         location_t.
744         (print_instantiation_full_context): Adjust.
745         (print_instantiation_context): Adjust.
746
747         * cp-tree.h (cp_line_of, cp_file_of): Remove.
748         * error.c (cp_line_of, cp_file_of): Merge into ...
749         (location_of): ... here. Make static, return a location_t.
750         (cp_error_at, cp_warning_at, cp_pedwarn_at): Adjust.
751
752 2003-06-28  Nathan Sidwell  <nathan@codesourcery.com>
753
754         PR c++/10784
755         * call.c (joust): Move warn_conversion check outwards.
756
757 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
758
759         * decl.c (build_typename_type)
760         * mangle.c (write_template_template_arg)
761         * parser.c (cp_parser_scope_through_which_access_occurs)
762         * pt.c (push_access_scope_real, push_access_scope, pop_access_scope)
763         * repo.c (get_base_filename)
764         * semantics.c (maybe_convert_cond):
765         Mark the definition static, matching the forward declaration.
766
767 2003-06-27  Mark Mitchell  <mark@codesourcery.com>
768
769         PR c++/10468
770         * pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly.
771
772 2003-06-27  Mark Mitchell  <mark@codesourcery.com>
773
774         PR c++/10796
775         * decl.c (finish_enum): Implement DR377.
776
777         * decl.c (cp_finish_decl): Don't make variables with reference
778         type readonly while they are being initialized.
779
780 2003-06-26  Mark Mitchell  <mark@codesourcery.com>
781
782         PR c++/11332
783         * typeck.c (build_static_cast): Avoid returning expressions with
784         reference type.
785
786 2003-06-26  Nathan Sidwell  <nathan@codesourcery.com>
787
788         * call.c (build_op_delete_call): Use strip_array_call. Correct
789         error message to say 'delete' or 'delete[]'.
790
791 2003-06-26  Giovanni Bajo  <giovannibajo@libero.it>
792
793         PR c++/8266
794         * pt.c (check_explicit_specialization): When looking up a
795         template function from an identifier outside class-scope, bind
796         it to CP_DECL_CONTEXT.
797
798 2003-06-25  Mark Mitchell  <mark@codesourcery.com>
799
800         PR c++/10990
801         * search.c (lookup_base_r): Rely on accessible_p, rather than
802         trying to emulate that logic here.
803
804         PR c++/10931
805         * call.c (convert_like): Pass issue_conversion_warnings.
806         (convert_like_with_context): Likewise.
807         (convert_like_real): Add issue_conversion_warnings parameter.
808         (perform_direct_initialization_if_possible): New function.
809         * cp-tree.h (perform_direct_initialization_if_possible): Declare it.
810         * typeck.c (check_for_casting_away_constness): New function.
811         (build_static_cast): Rewrite.
812
813 2003-06-24  Nathan Sidwell  <nathan@codesourcery.com>
814
815         * call.c (enforce_access): Assert we get a binfo.
816         (build_op_delete_call): Pass a binfo to
817         perform_or_defer_access_check.
818         * class.c (alter_access): Likewise.
819         * decl.c (make_typename_type): Likewise.
820         (make_unbound_class_template): Likewise.
821         * lex.c (do_identifier): Likewise.
822         * method.c (hack_identifier): Likewise.
823         * parser.c (cp_parser_lookup_name): Likewise.
824         * search.c (lookup_member): Likewise. Move IDENTIFIER_CLASS_VALUE
825         test.
826         * semantics.c (finish_non_static_data_member): Likewise.
827         (perform_or_defer_access_check): Expect a binfo.
828         * typeck.c (comptypes): Expect types.
829
830         * mangle.c (find_substitution): Don't pass a non-type to same_type_p
831         * friend.c (make_friend_class): Likewise.
832         * pt.c (check_default_tmpl_args): Likewise.
833         (lookup_template_class): Likewise.
834
835 Tue Jun 24 15:30:05 CEST 2003  Jan Hubicka  <jh@suse.cz>
836
837         * method.c (thunk_labelno): Move outside ifdef block to make garbage
838         collector happy.
839
840 Tue Jun 24 13:52:34 CEST 2003  Jan Hubicka  <jh@suse.cz>
841
842         * class.c (build_vtable): Make vtables.
843         * cp-tree.h (DECL_VTABLE_OR_VTT_P): New macro.
844         * decl2.c (output_vtable_inherit): Rename to ...
845         (prepare_assemble_variable): ... this one; change interface.
846         (maybe_emit_vtables): Do not call output_vtable_inherit.
847         * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Define.
848         * cp-tree.h (prepare_assemble_variable): New.
849
850 2003-06-23  Andrew Pinski <pinskia@physics.uc.edu>
851
852         * method.c: add prototype for make_alias_for_thunk.
853         (thunk_labelno, make_alias_for_thunk): only define
854         if ASM_OUTPUT_DEF is defined.
855
856 2003-06-23  Jakub Jelinek  <jakub@redhat.com>
857
858         * method.c (thunk_labelno): New variable.
859         (make_alias_for_thunk): New function.
860         (use_thunk): Use it if defined ASM_OUTPUT_DEF.  Put the thunk
861         into the same section as the function it is calling.
862         Include gt-cp-method.h.
863         * Make-lang.in (gt-cp-method.h): Depend on s-gtype.
864         (cp/method.o): Depend on gt-cp-method.h.
865         * config-lang.in (gtfiles): Add $(srcdir)/cp/method.c.
866
867 Mon Jun 23 19:41:27 CEST 2003  Jan Hubicka  <jh@suse.cz>
868
869         * decl.c (register_dtor_fn): Mark cleanup as used.
870         * decl2.c (mark_vtable_entries): Skip nops.
871         * rtti.c (get_tinfo_ptr): Mark tinfo as used.
872         (build_dynamic_cast_1): Likewise.
873         (tinfo_base_init): Likewise.
874         (emit_tinfo_decl): Likewise.
875
876 2003-06-23  Jakub Jelinek  <jakub@redhat.com>
877
878         * mangle.c (hash_type): Val is the TREE_LIST itself, not a pointer
879         to it.
880
881 2003-06-21  Gabriel Dos Reis <gdr@integrable-solutions.net>
882
883         PR c++/10784
884         * call.c (joust): Warn about choosing conversion sequence only if
885         -Wconversion.
886
887 2003-06-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
888
889         PR c++/10864
890         * call.c (op_error): Tidy.
891         * error.c (dump_expr): Properly format 'T()' when T is an
892         aggregate type.
893
894 2003-06-21  Gabriel Dos Reis <gdr@integrable-solutions.net>
895
896         PR c++/10915
897         * decl.c (grok_op_properties): Warn possible confusing conversion
898         only if -Wconversion.
899
900 2003-06-20  Mark Mitchell  <mark@codesourcery.com>
901
902         PR c++/10749
903         * parser.c (cp_parser_class_head): See through dependent names
904         when parsing a class-head.
905
906         PR c++/10845
907         * pt.c (try_class_unification): Correct handling of member class
908         templates.
909
910 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
911
912         * semantics.c (genrtl_finish_function): Adjust
913         expand_function_end call.
914
915 2003-06-19  Mark Mitchell  <mark@codesourcery.com>
916
917         PR c++/10939
918         * pt.c (tsubst_decl): Do not try to substitute into non-dependent
919         functions.
920         (value_dependent_expression_p): Correct logic for FUNCTION_DECLs.
921
922         PR c++/9649
923         * cp-tree.h (pushdecl_class_level): Change prototype.
924         (push_class_level_binding): Likewise.
925         * decl.c (add_binding): Reject duplicate static data members.
926         (pushdecl_class_level): Return a value indicating whether or not
927         the binding was valid.
928         (push_class_level_binding): Likewise.
929         * semantics.c (finish_member_declaration): Don't keep invalid
930         declarations.
931
932         PR c++/11041
933         * call.c (initialize_reference): Do not use cp_finish_decl to emit
934         temporary variables.
935         * cp-tree.h (static_aggregates): Declare.
936         (pushdecl_top_level_and_finish): Likewise.
937         * decl.c (pushdecl_top_level_1): New function.
938         (pushdecl_top_level): Use it.
939         (pushdecl_top_level_and_finish): New function.
940         (initialize_local_var): Remove redundant code.
941         (cp_finish_decl): Remove support for RESULT_DECLs.  Don't check
942         building_stmt_tree.
943         * decl.h (static_aggregates): Remove.
944         * decl2.c (get_guard): Use pushdecl_top_level_and_finish.
945         * rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish.
946         (tinfo_base_init): Likewise.
947
948 2003-06-19  Matt Austern  <austern@apple.com>
949
950         PR c++/11228
951         * init.c (build_zero_init): Assert that number of array elements
952         is an integer constant.
953         (build_default_init) Don't use build_zero_init for arrays with
954         variable number of elements.
955
956 2003-06-19  Andreas Jaeger  <aj@suse.de>
957
958         * cp-tree.h: Remove duplicated declarations.
959
960 2003-06-18  Nathanael Nerode  <neroden@gcc.gnu.org>
961
962         * pt.c: Convert to ISO C.
963         * semantics.c: Convert to ISO C.
964
965 2003-06-18  Nathan Sidwell  <nathan@codesourcery.com>
966
967         * cp-tree.h (comp_except_specs, compparms, cp_has_mutable_p,
968         at_least_as_qualified_p, more_qualified_p): Return bool.
969         * typeck.c: ANSIFY function definitions.
970         (comp_array_types): Take redeclaration bool parameter.
971         (comptypes): Rearrange STRICT handling.
972         (at_least_as_qualified_p, more_qualified_p,
973         comp_cv_qualification): Cache cv quals.
974         (compparms): Rearrange loop.
975
976 2003-06-18  Nathan Sidwell  <nathan@codesourcery.com>
977
978         * cp-tree.h (COMPARE_RELAXED): Rename to ...
979         (COMPARE_DERIVED): ... here. Adjust comment.
980         (resolve_typename_type_in_current_instantiation): Remove.
981         (cp_tree_equal, comptypes): Return a bool.
982         * cvt.c (convert_to_reference): Adjust comptypes call.
983         * pt.c (template_args_equal, unify,): Adjust cp_tree_equal call.
984         (resolve_typename_type_in_current_instantiation): Remove.
985         * tree.c (cp_tree_equal): Return bool. Cope with TEMPLATE_DECLs and
986         IDENTIFIER_NODEs. Abort if undeciderable. Adjust recursive
987         calls. Refactor code.
988         * typeck.c (comp_array_types): Return bool. Lose callback.
989         parameter. Adjust cp_tree_equal calls.
990         (comptypes): Return bool. Adjust strict handling. Remove relaxed
991         enumeration and java type handling. Deal with typename types here.
992         Adjust recursive and cp_tree_equals calls. Adjust base and derived
993         checking.
994         (comp_target_types): Remove unreachable code. Adjust
995         same_or_base_type_p calls.
996         (ptr_reasonably_similar): Adjust base and derived check.
997
998         * typeck.c (maybe_warn_about_returning_address_of_local): Remove
999         unused calculation.
1000         (check_return_expr): Adjust error messages.
1001         * cp-tree.def (SCOPE_REF): Correct comment.
1002
1003 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
1004
1005         * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
1006         string again.
1007
1008 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
1009
1010         * optimize.c (dump_function): Form complete flag name by
1011         prefixing 'fdump-' to string returned by dump_flag_name().
1012
1013 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
1014
1015         * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
1016         string.
1017
1018 2003-06-17  Jason Merrill  <jason@redhat.com>
1019
1020         PR c++/10929
1021         * decl.c (grokfndecl): Don't mark a function inline for
1022         -finline-functions if it isn't defined.
1023
1024 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
1025
1026         PR c++/10712
1027         * class.c (handle_using_decl): Robustify.
1028
1029         PR c++/11105
1030         * cp-tree.h (DECL_CONV_FN_TYPE): New method.
1031         * mangle.c (struct globals): Remove internal_mangling_p.
1032         (write_unqualified_name): Use DECL_CONV_FN_TYPE.
1033         (write_template_parm): Don't write out the level number.
1034         (conv_type_names): New variable.
1035         (hash_type): New function.
1036         (compare_type): Likewise.
1037         (mangle_conv_op_name_for_type): Don't try to mangle conversion
1038         operator names.
1039         * search.c (lookup_conversion_operator): New function.
1040         (lookup_fnfields_1): Use it.
1041
1042 2003-06-17  Andreas Jaeger  <aj@suse.de>
1043
1044         * except.c: Remove duplicate declaration of push_eh_cleanup.
1045
1046         * call.c: Remove extra declaration of inhibit_warnings.
1047
1048 2003-06-16  Nathanael Nerode  <neroden@gcc.gnu.org>
1049
1050         2003-06-16  Jens-Michael Hoffmann  <jensmh@gmx.de>
1051         * mangle.c: Convert to ISO C.
1052
1053 2003-06-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1054
1055         * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR
1056         macro.
1057
1058 2003-06-16  Nathanael Nerode  <neroden@gcc.gnu.org>
1059
1060         * tree.c: Convert to ISO C.
1061
1062 2003-06-16  Kazu Hirata  <kazu@cs.umass.edu>
1063
1064         * cp-tree.h: Follow spelling conventions.
1065         * mangle.c: Likewise.
1066         * method.c: Likewise.
1067         * parser.c: Likewise.
1068
1069 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
1070
1071         * decl.c (start_function): Adjust init_function_start call.
1072         * method.c (use_thunk): Likewise.
1073         * semantics.c (genrtl_start_function): Likewise.
1074
1075 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
1076
1077         * Make-lang.in: Remove c-options.o.
1078
1079 2003-06-13  Nathanael Nerode  <neroden@gcc.gnu.org>
1080
1081         * lex.c: Convert to ISO C.
1082
1083         2003-05-19  Jens-Michael Hoffmann  <jensmh@gmx.de>
1084         * init.c: removes use of PARAMS macro.  Use ISO style function
1085         declarations.  (Not copyright-significant change.)
1086
1087         * rtti.c: Remove PARAMS.
1088
1089         * typeck2.c: Convert to ISO C.
1090
1091 2003-06-12  Mark Mitchell  <mark@codesourcery.com>
1092
1093         PR c++/10635
1094         * typeck.c (build_c_cast): Check that the destination type is
1095         complete.
1096
1097 2003-06-11  Mark Mitchell  <mark@codesourcery.com>
1098
1099         PR c++/10432
1100         * cp-tree.h (finish_declarator): Remove.
1101         * decl.c (cp_finish_decl): Make sure to pop_nested_class even for
1102         erroneous declarations.
1103         * semantics.c (finish_declarator): Remove.
1104
1105 2003-06-11  Roger Sayle  <roger@eyesopen.com>
1106
1107         * decl2.c (generate_ctor_or_dtor_function): Avoid expanding a
1108         global static constructor/destructor if it will be empty, i.e.
1109         either doesn't call any ctors/dtors or only calls pure or const
1110         ctors/dtors.
1111
1112 2003-06-11  Mark Mitchell  <mark@codesourcery.com>
1113
1114         * mangle.c (tm_p.h): Include it.
1115         * Make-lang.in (cp/mangle.o): Depend on $(TM_P_H).
1116
1117         PR c++/11131
1118         * tree.c (cp_cannot_inline_fn): Check for "inline" before
1119         instantiation.
1120
1121 2003-06-10  Jason Merrill  <jason@redhat.com>
1122
1123         PR c++/10968
1124         * pt.c (mark_decl_instantiated): Clear DECL_COMDAT.
1125
1126 2003-06-10  Andrew Pinski  <pinskia@physics.uc.edu>
1127
1128         * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY.
1129         (start_cleanup_cnt): New.
1130
1131 2003-06-10  Mark Mitchell  <mark@codesourcery.com>
1132
1133         PR c++/11131
1134         * cp-tree.h (template_for_substitution): Declare.
1135         * decl2.c (mark_used): Use it when figuring out whether or not a
1136         function is inline.
1137         * pt.c (template_for_substitution): Give it external linkage.
1138         * tree.c (cp_cannot_inline_tree_fn): Instantiate as early as
1139         possible.
1140
1141 2003-06-09  Zack Weinberg  <zack@codesourcery.com>
1142
1143         PR 8861
1144         * mangle.c (write_real_cst): New function.  Implement
1145         ABI-compliant mangling of floating-point literals when
1146         -fabi-version>=2; provide backward compatibility with 3.3 when
1147         -fabi-version=1 (with warning).  Clarify commentary.
1148         (write_template_arg_literal): Use write_real_cst.
1149
1150 2003-06-07  Andreas Jaeger  <aj@suse.de>
1151
1152         * cp/decl.c (xref_tag): Remove undefined macro NONNESTED_CLASSES.
1153
1154 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
1155
1156         * cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
1157         (LANG_HOOKS_HANDLE_OPTION): Override.
1158         * cp-tree.h (cxx_init_options): Update.
1159         * lex.c (cxx_init_options): Update.
1160
1161 Thu Jun  5 18:33:40 CEST 2003  Jan Hubicka  <jh@suse.cz>
1162
1163         * Make-lang.in:  Add support for stageprofile and stagefeedback
1164
1165 2003-06-04  J"orn Rennecke <joern.rennecke@superh.com>
1166
1167         * decl.c (grokdeclarator): Error_mark_node in, error_mark_node out.
1168
1169 2003-06-04  Andreas Jaeger  <aj@suse.de>
1170
1171         * g++spec.c (lang_specific_driver): Remove ALT_LIBM usage.
1172
1173 2003-06-03  Jason Merrill  <jason@redhat.com>
1174
1175         * cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors.
1176
1177         * cp/decl.c (reshape_init): Handle vectors.
1178
1179         * testsuite/g++.dg/init/array10.C: New.
1180
1181 2003-06-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1182
1183         PR c++/10940
1184         * pt.c (check_explicit_specialization): Check for 'static'
1185         earlier.
1186
1187 2003-05-31  Diego Novillo  <dnovillo@redhat.com>
1188
1189         * class.c (dump_array): Call CONSTRUCTOR_ELTS to access
1190         the operand of a CONSTRUCTOR node.
1191
1192 2003-05-31  Gabriel Dos Reis <gdr@integrable-solutions.net>
1193
1194         * decl.c (cp_binding_level::this_entity): Rename from this_class.
1195         (cxx_scope_descriptor): New function.
1196         (cxx_scope_debug): Likewise.
1197         (push_binding_level): Use it.
1198         (pop_binding_level): Likewise.
1199         (suspend_binding_level): Likewise.
1200         (resume_binding_level): Likewise.
1201         (pushlevel_class): Adjust use of this_class.
1202         (pushtag): Likewise.
1203         (lookup_name_real): Likewise.
1204         (global_scope_name): New variable.
1205         (initialize_predefined_identifiers): Initialize it.
1206         (push_namespace): Use it.
1207         (make_cxx_scope): New function.
1208         (pushlevel): Use it.
1209         (pushlevel_class): Likewise.
1210         (push_binding_level): Simplify.  Loose the last two arguments.
1211         (make_binding_level): Remove.
1212         (initial_push__namespace_scope): New function.
1213         (push_namespace): Use it.  Simplify.
1214         (cxx_init_decl_processing): Likewise.
1215         (declare_namespace_level): Remove.
1216
1217 2003-05-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1218
1219         PR c++/10956
1220         * pt.c (instantiate_decl): Don't use full template arguments if
1221         we are dealing with specializations.
1222
1223 2003-05-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1224
1225         * decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS.
1226         (binding_depth): Unconditionally define.
1227         (is_class_level): Likewise.
1228         (indent): Likewise.  Take an indenting parameter.
1229         (push_binding_level): Remove conditional definittion.
1230         (pop_binding_level): Likewise.
1231         (suspend_binding_level): Likewise.
1232         (resume_binding_level): Likewise.
1233         (pushlevel): Likewise.
1234         (pushlevel_class): Likewise.
1235         (poplevel_class): Likewise.
1236         (pop_everything): Likewise.
1237
1238 2003-05-27  Gabriel Dos Reis <gdr@integrable-solutions.net>
1239
1240         * name-lookup.h (global_scope_p): New macro.
1241         * decl.c (pop_binding_level): Use it.  Don't refer directly to
1242         global_binding_level.
1243         (suspend_binding_level): Likewise.
1244         (global_bindings_p): Likewise.
1245         (print_other_binding_stack): Likewise.
1246         (print_binding_stack): Likewise.
1247         (maybe_push_to_top_level): Likewise.
1248         (pushdecl_namespace_level): Likewise.
1249         (cxx_init_decl_processing): Likewise.
1250         (start_decl): Likewise.
1251         (cp_finish_decl): Likewise.
1252         (start_function): Likewise.
1253         (global_binding_level): Remove.
1254
1255 2003-05-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1256
1257         * parser.c (cp_parser_explicit_instantiation): Restore old
1258         access before template instantiation.
1259
1260 2003-05-23  Geoffrey Keating  <geoffk@apple.com>
1261
1262         * lang-specs.h: Use -o to specify preprocessor's output file.
1263         Make -no-integrated-cpp work when building PCH files.
1264
1265 2003-05-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1266
1267         PR c++/10682
1268         * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
1269         check for implicitly created typedef to an enum.
1270
1271 2003-05-21  Jason Merrill  <jason@redhat.com>
1272
1273         * init.c (build_vec_delete): Copy the address into a temporary
1274         variable before calling build_vec_delete_1.
1275         * decl2.c (delete_sanity): Don't call stabilize_reference.
1276
1277 2003-05-21  Nathan Sidwell  <nathan@codesourcery.com>
1278
1279         * pt.c (register_specialization): Update the decl's location,
1280         if necessary.
1281         (check_explicit_specialization): Likewise.
1282
1283 2003-05-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1284
1285         * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX.
1286
1287 2003-05-21  Danny Smith  <dannysmith@users.sourceforge.net>
1288
1289         PR c++/9738
1290         * decl.c (duplicate_decls): Re-invoke make_decl_rtl
1291         if the old decl had instantiated DECL_RTL.
1292         (Base on Richard Henderson 2003-05-13 patch to c-decl.c).
1293
1294 2003-05-19  Matt Austern  <austern@apple.com>
1295
1296         * lang-options.h: Document -Wno-invalid-offsetof
1297         * typeck.c (build_class_member_access_expr): Don't complain about
1298         (Foo *)p->x for non-POD Foo if warn_invalid_offset is zero.
1299
1300 2003-05-18 Andrew Pinski <pinskia@physics.uc.edu>
1301
1302         * name-lookup.c (free_binding_entry): fix where the GTY markers are.
1303         (binding_entry_make): Make entry->chain NULL after getting an entry.
1304         fix the spelling of chain in a comment.
1305         (binding_table_free): speed up by having temporary variable.
1306         (binding_table_new): set table->chain to be NULL after allocating
1307         a table.
1308         (cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set
1309         binding->previous to NULL after getting an binding for speed.
1310
1311 2003-05-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1312
1313         * cp-tree.h (struct lang_type_class): Replace data member tags
1314         with hash-table nested_udts.
1315         (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS.
1316         * class.c (unreverse_member_declarations): Don't touch
1317         CLASSTYPE_TAGS.
1318         (pushclass): Use cxx_remember_type_decls.
1319         * decl.c (struct cp_binding_level): Replace data member tags with
1320         hash-table type_decls.
1321         (pop_binding_level): Handle level->type_decls.
1322         (kept_level_p): Adjust.
1323         (poplevel): Remove unused local variable.
1324         (bt_print_entry): New function.
1325         (print_binding_level): Use it.
1326         (push_namespace): Build current_binding_level->type_decls.
1327         (maybe_process_template_type_declaration): Adjust.
1328         (pushtag): Likewise.
1329         (clear_anon_tags): Use binding_table_remove_anonymous_types.
1330         (gettags): Remove.
1331         (cxx_remember_type_decls):  Rename from storetags.  Adjust.
1332         (lookup_tag): Use binding_table_find_anon_type.  Tidy.
1333         (lookup_tag_reverse): Use binding_table_reverse_maybe_remap.
1334         (cxx_init_decl_processing): Build global_binding_level->type_decls.
1335         (store_parm_decls): Remove pointless code.
1336         * name-lookup.c (free_binding_entry): New variable.
1337         (ENTRY_INDEX): New macro.
1338         (struct binding_table_s): New datatype.
1339         (binding_entry_make): New function.
1340         (binding_entry_free): Likewise.
1341         (binding_table_construct): Likewise.
1342         (binding_table_free): Likewise.
1343         (binding_table_new): Likewise.
1344         (binding_table_expand): Likewise.
1345         (binding_table_insert): Likewise.
1346         (binding_table_find): Likewise.
1347         (binding_table_find_anon_type): Likewise.
1348         (binding_table_reverse_maybe_remap): Likewise.
1349         (binding_table_remove_anonymous_types): Likewise.
1350         (binding_table_foreach): Likewise.
1351         * name-lookup.h (binding_table): New type.
1352         (binding_entry): Likewise.
1353         (bt_foreach_proc): Likewise.
1354         (struct binding_entry_s): New datatype.
1355         (SCOPE_DEFAULT_HT_SIZE): New macro.
1356         (CLASS_SCOPE_HT_SIZE): Likewise.
1357         (NAMESPACE_ORDINARY_HT_SIZE): Likewise.
1358         (NAMESPACE_STD_HT_SIZE): Likewise.
1359         (GLOBAL_SCOPE_HT_SIZE): Likewise.
1360         (binding_table_new): Declare.
1361         (binding_table_free): Likewise.
1362         (binding_table_insert): Likewise.
1363         (binding_table_find_anon_type): Likewise.
1364         (binding_table_reverse_maybe_remap): Likewise.
1365         (binding_table_remove_anonymous_types): Likewise.
1366         (binding_table_foreach): Likewise.
1367         (binding_table_find): Likewise.
1368         (cxx_remember_type_decls): Likewise.
1369         * pt.c (bt_instantiate_type_proc): New function.
1370         (do_type_instantiation): Use it.
1371         * search.c (lookup_field_r): Use binding_table_find.
1372
1373 2003-05-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1374
1375         * semantics.c (perform_deferred_access_checks): Don't discard
1376         checked access.
1377
1378 2003-05-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1379
1380         * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
1381         libiberty VA_ macros, always use stdarg.
1382         * rtti.c (create_pseudo_type_info): Likewise.
1383         * tree.c (build_min_nt, build_min): Likewise.
1384
1385 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1386
1387         * ptree.c (cxx_print_type, cxx_print_xnode): Use string
1388         concatentation on HOST_WIDE_INT_PRINT_* format specifier to
1389         collapse multiple function calls into one.
1390         * tree.c (debug_binfo): Likewise.
1391
1392 2003-05-15  Jason Merrill  <jason@redhat.com>
1393
1394         PR c++/5388
1395         * call.c (conditional_conversion): Don't consider implicit
1396         conversions if T2 is a base of T1.
1397         * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
1398         (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
1399
1400         * parser.c (cp_parser_primary_expression): Convert a static data
1401         member from reference.
1402
1403 2003-05-15  Mark Mitchell  <mark@codesourcery.com>
1404
1405         * call.c (build_op_delete_call): Avoid creating unnecessary types.
1406         * class.c (instantiate_type): Remove tests for tf_no_attributes.
1407         * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
1408         (COMPARE_NO_ATTRIBUTES): Remove.
1409         * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
1410
1411         PR c++/8385
1412         * semantics.c (finish_typeof): Refine type-dependency check.
1413
1414 2003-05-13  Jason Merrill  <jason@redhat.com>
1415
1416         * typeck.c (build_modify_expr): Don't always stabilize the lhs and
1417         rhs.  Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
1418
1419 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1420
1421         * method.c (synthesize_method): Call push/pop_deferring_access_checks.
1422
1423 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1424
1425         PR c++/10230, c++/10481
1426         * semantics.c (finish_non_static_data_member): Handle when the
1427         non-static member is not from a base of the current class type.
1428
1429 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1430
1431         PR c++/10552
1432         * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
1433         template and has dependent context.
1434
1435 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1436
1437         * pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
1438
1439 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1440
1441         PR c++/9252
1442         * cp-tree.h (saved_scope): Remove check_access field.
1443         (tsubst_flags_t): Remove tf_parsing.
1444         * decl.c (maybe_push_to_top_level): Don't initialize
1445         scope_chain->check_access.
1446         (make_typename_type, make_unbound_class_template): Don't use
1447         tf_parsing.
1448         (register_dtor_fn): Use push/pop_deferring_access_checks
1449         instead of scope_chain->check_access.
1450         * method.c (use_thunk): Likewise.
1451         * parser.c (cp_parser_explicit_instantiation
1452         (cp_parser_constructor_declarator_p): Don't call
1453         push/pop_deferring_access_checks here.
1454         (cp_parser_template_argument, cp_parser_class_name): Don't use
1455         tf_parsing.
1456         (yyparse): Check flag_access_control.
1457         * pt.c (instantiate_class_template): Call
1458         push/pop_deferring_access_checks.
1459         * semantics.c (push_deferring_access_checks): Propagate
1460         dk_no_check.
1461         (perform_or_defer_access_check): Make sure basetype_path is
1462         a type before comparison.
1463         * call.c (build_op_delete_call, build_over_call): Use
1464         perform_or_defer_access_check.
1465         * class.c (alter_access): Likewise.
1466         * init.c (build_offset_ref): Likewise.
1467         * lex.c (do_identifier): Likewise.
1468         * method.c (hack_identifier): Likewise.
1469         * search.c (lookup_member): Likewise.
1470         * semantics.c (finish_non_static_data_member): Likewise.
1471         (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
1472         instead of flag_access_control.
1473
1474 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1475
1476         PR c++/9554
1477         * parser.c (cp_parser_class_name): Remove check_access parameter.
1478         All caller adjusted.  Update declaration.
1479         (cp_parser_lookup_name): Likewise.
1480         * semantics.c (push_deferring_access_checks): Change parameter type
1481         to enum deferring_kind.  All caller adjusted.
1482         (resume_deferring_access_checks): Adjust to use new enum.
1483         (stop_deferring_access_checks): Likewise.
1484         (perform_or_defer_access_check): Likewise.
1485         * cp-tree.h (deferring_kind): New enum.
1486         (deferred_access): Adjust field type.
1487         (push_deferring_access_checks): Update declaration.
1488
1489 2003-05-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1490
1491         PR c++/10555, c++/10576
1492         * pt.c (lookup_template_class): Handle class template with
1493         multiple levels of parameters when one of the levels contain
1494         errors.
1495
1496 2003-05-08  Jason Merrill  <jason@redhat.com>
1497
1498         * init.c (build_new_1): Don't reuse a TARGET_EXPR in an
1499         expression.  Undo some of the recent reorg.
1500
1501 2003-05-07  Richard Henderson  <rth@redhat.com>
1502
1503         PR c++/10570
1504         * cfns.gperf: Comment out POSIX thread cancellation points,
1505         plus abort and raise.
1506         * cfns.h: Regenerate.
1507
1508 2003-05-07  Jason Merrill  <jason@redhat.com>
1509
1510         * call.c (build_conditional_expr): Don't assume that the folded
1511         expression has result_type.
1512
1513 2003-05-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1514
1515         * typeck.c (build_unary_op): Deal with const qualifier in
1516         invalid pointer-to-member earlier.
1517
1518 2003-05-05  Jason Merrill  <jason@redhat.com>
1519
1520         PR c++/9537
1521         * call.c (conditional_conversion): Build an RVALUE_CONV if
1522         we're just changing the cv-quals.
1523         (build_conditional_expr): Don't call convert to change
1524         cv-quals.
1525
1526 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1527
1528         PR c++/10496
1529         * typeck.c (build_unary_op): Don't output const qualifier when
1530         output invalid pointer-to-member diagnostics.
1531
1532 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1533
1534         * decl.c: Fix typos.
1535
1536 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1537
1538         PR c++/4494
1539         * decl.c (start_function): Use same_type_p to check return type
1540         of main.
1541
1542 2003-05-03  Zack Weinberg  <zack@codesourcery.com>
1543
1544         PR c/10604
1545         * cp/typeck.c (build_x_compound_expr): No need to check
1546         extra_warnings as well as warn_unused_value.
1547
1548 2003-05-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1549
1550         PR c++/9364, c++/10553, c++/10586
1551         * decl.c (make_typename_type): Don't crash on illegal code.
1552
1553 2003-05-03  Nathan Sidwell  <nathan@codesourcery.com>
1554
1555         * class.c (finish_struct): Use location_t and input_location
1556         directly.
1557         * decl.c (make_label_decl): Likewise.
1558         (use_label): Likewise.
1559         * decl2.c (warn_if_unknown_interface): Likewise.
1560         (start_static_initialization_or_destruction): Likewise.
1561         (generate_ctor_or_dtor_function): Likewise.
1562         (finish_file): Likewise.
1563         * error.c (print_instantiation_full_context): Likewise.
1564         * init.c (create_temporary_var): Likewise.
1565         * method.c (synthesize_method): Likewise.
1566         * parser.c (cp_token): Likewise.
1567         (cp_lexer_set_source_position_from_token): Likewise.
1568         (cp_lexer_get_preprocessor_token): Likewise.
1569         (cp_parser_statement): Likewise.
1570         * pt.c (tsubst_friend_function): Likewise.
1571         (instantiate_class_template): Likewise.
1572         (tsubst_decl): Likewise.
1573         (tsubst): Likewise.
1574         (instantiate_decl): Likewise.
1575         * semantics.c (begin_class_definition): Likewise.
1576         (expand_body): Likewise.
1577
1578 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
1579
1580         * class.c (finish_struct): Rename lineno to input_line.
1581         * decl.c (push_binding_level, pop_binding_level,
1582         suspend_binding_level, resume_binding_level, make_label_decl,
1583         use_label, start_function): Likewise.
1584         * decl2.c (warn_if_unknown_interface,
1585         start_static_initialization_or_destruction,
1586         generate_ctor_or_dtor_function, finish_file): Likewise.
1587         * error.c (cp_line_of, print_instantiation_full_context,
1588         print_instantiation_context): Likewise.
1589         * except.c (check_handlers_1, check_handlers): Likewise.
1590         * init.c (create_temporary_var): Likewise.
1591         * method.c (use_thunk, synthesize_method): Likewise.
1592         * parser.c (cp_lexer_set_source_position_from_token,
1593         cp_lexer_get_preprocessor_token): Likewise.
1594         * pt.c (push_tinst_level, pop_tinst_level,
1595         tsubst_friend_function, instantiate_class_template, tsubst_decl,
1596         tsubst, tsubst_expr, instantiate_decl): Likewise.
1597         * semantics.c (genrtl_try_block, finish_label_stmt,
1598         begin_class_definition, expand_body,
1599         genrtl_finish_function): Likewise.
1600         * tree.c (build_min_nt, build_min): Likewise.
1601
1602 2003-05-01  Mark Mitchell  <mark@codesourcery.com>
1603
1604         * decl2.c (comdat_linkage): Don't externalize explicit
1605         instantiations.
1606
1607 2003-05-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1608
1609         PR c++/10554
1610         * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
1611         is not NULL.
1612
1613 2003-05-01  Steven Bosscher  <steven@gcc.gnu.org>
1614
1615         * cp-tree.h (struct lang_id2): Remove.  Move fields from here...
1616         (struct lang_identifier): ... to here.
1617         (LANG_ID_FIELD): Remove.
1618         (SET_LANG_ID): Remove.
1619         (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
1620         (SET_IDENTIFIER_LABEL_VALUE): Likewise.
1621         (IDENTIFIER_IMPLICIT_DECL): Likewise.
1622         (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
1623         (IDENTIFIER_ERROR_LOCUS): Likewise.
1624         (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
1625
1626 2003-05-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1627
1628         PR c++/8772
1629         * pt.c (convert_template_argument): Correct diagnostic.
1630
1631 2003-04-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1632
1633         PR c++/9432, c++/9528
1634         * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
1635
1636 2003-04-30  Garbiel Dos Reis  <gcc@integrable-solutions.net>
1637
1638         * decl.c (check_previous_goto_1): Adjust prototype.
1639         (check_previous_goto): Adjust use.
1640         (check_switch_goto): Likewise.
1641         (use_label): Adjust.
1642         (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
1643         (struct named_label_use_list): Use location_t datatype.
1644
1645 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
1646
1647         PR c++/10551
1648         * pt.c (mark_decl_instantiated): Defer all explicit instantiations
1649         that have not yet been written out.
1650
1651 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
1652
1653         PR c++/10549
1654         * class.c (layout_class_type): Mark overlong bitfields as having
1655         the maximum size permitted by their type, after layout.
1656
1657         PR c++/10527
1658         * error.c (dump_expr): Correctly handling of NEW_EXPR.4
1659
1660 2003-04-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1661
1662         * call.c (build_operator_new_call): Fix typo.
1663         * lang-options.h: Likewise.
1664
1665 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
1666
1667         PR c++/10515
1668         * cp-tree.h (lookup_field_1): Declare it.
1669         * search.c (lookup_field_1): Make it public.
1670         * decl.c (reshape_init): Handle designated initializers.
1671
1672         * decl.c (maybe_commonize_var): Further tweak support for systems
1673         without weak symbols.
1674
1675 2003-04-27  Mark Mitchell  <mark@codesourcery.com>
1676
1677         * decl.c (maybe_commonize_var): Fix thinko in last patch.
1678
1679 2003-04-27  Mark Mitchell  <mark@codesourcery.com>
1680
1681         PR c++/10506
1682         * method.c (use_thunk): Decrement immediate_size_expand.
1683
1684         PR c++/10503
1685         * cp-tree.h (DECL_VAR_MARKED_P): New macro.
1686         (DECL_MAYBE_TEMPLATE): Remove.
1687         * class.c (fixed_type_or_null): Avoid infinite recursion.
1688
1689         * decl.c (maybe_commonize_var): Make the code match the comments.
1690         * pt.c (instantiate_decl): Move call to import_export_decl.
1691
1692 2003-04-26  Mark Mitchell  <mark@codesourcery.com>
1693
1694         * decl2.c (finish_file): Fix merge botch.
1695
1696 2003-04-25  Mark Mitchell  <mark@codesourcery.com>
1697
1698         * decl2.c (finish_file): Don't call import_export_decl for
1699         functions that are not defined.
1700         (handle_class_head): Robustify.
1701         * pt.c (instantiate_decl): Do not call cp_finish_decl for
1702         variables that are not defined.
1703
1704 2003-04-24  Sylvain Pion  <Sylvain.Pion@mpi-sb.mpg.de>
1705
1706         * call.c (print_z_candidates): Fix off by one error.
1707
1708 2003-04-24  Nathan Sidwell  <nathan@codesourcery.com>
1709
1710         PR c++/10337
1711         * call.c (joust): Don't warn about conversion ops that are exact
1712         or cv-conversions. Rearrange to avoid multiple type comparisons.
1713
1714 2003-04-23  Mark Mitchell  <mark@codesourcery.com>
1715
1716         PR c++/10471
1717         * call.c (build_cxx_call): Robustify.
1718
1719 2003-04-23  Neil Booth  <neil@daikokuya.co.uk>
1720
1721         * Make-lang.in (lex.o): Remove mbchar.h.
1722         * lex.c (MULTIBYTE_CHARS): Lose.
1723         * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
1724         in c-lex.c.
1725
1726 2003-04-23  Mark Mitchell  <mark@codesourcery.com>
1727
1728         PR c++/9847
1729         * cp-tree.h (duplicate_tag_error): Remove.
1730         * class.c (duplicate_tag_error): Remove.
1731         * semantics.c (begin_class_definition): Return immediately for a
1732         duplicate class definition.
1733
1734         PR c++/10451
1735         * decl.c (grokdeclarator): Correct logic for "mutable" errors.
1736
1737 2003-04-22  Mark Mitchell  <mark@codesourcery.com>
1738
1739         PR c++/10446
1740         * search.c (lookup_fnfields_1): Handle empty slots in the method
1741         vector.
1742
1743         PR c++/10428
1744         * decl.c (check_elaborated_type_specifier): New function, split
1745         out from ...
1746         (xref_tag): ... here.  Use the new function in more places.
1747
1748         * rtti.c (throw_bad_typeid): Use build_cxx_call.
1749
1750 2003-04-21  Mark Mitchell  <mark@codesourcery.com>
1751
1752         * call.c (build_over_call): Use build_cxx_call.
1753         (build_cxx_call): New method, split out of build_over_call.
1754         * cp-tree.h (language_function): Add can_throw.
1755         (build_cxx_call): Declare it.
1756         * decl.c (finish_function): If a function does not contain any
1757         calls to functions that can throw an exception, indicate that
1758         fact.
1759         * decl2.c (mark_used): Do not defer the instantiation of
1760         functions, if the current function does not throw.
1761         * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
1762         * pt.c (instantiate_decl): Make sure import_export_decl is called
1763         before emitting things.
1764         * rtti.c (throw_bad_cast): Use build_cxx_call.
1765         (build_dynamic_cast_1): Likewise.
1766         * typeck.c (build_function_call): Likewise.
1767
1768 2003-04-21  Nathan Sidwell  <nathan@codesourcery.com>
1769
1770         PR c++/9881
1771         * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
1772         expressions. Reverts my 2002-08-08 patch.
1773
1774         * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
1775         cheaper early exit.
1776
1777 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
1778
1779         * cp/decl2.c (start_static_storage_duration_function): Take count
1780         arg, don't check if it wraps round.
1781         (generate_ctor_or_dtor_function): Add locus arg, use it.
1782         (generate_ctor_and_dtor_functions_for_priority): Data arg is a
1783         locus.
1784         (finish_file): Set line numbers to past EOF for synthesized
1785         functions.
1786
1787 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
1788
1789         PR c++/10405
1790         * search.c (lookup_field_1): Final scan goes backwards for
1791         types, forwards for non-types.
1792
1793 2003-04-17  Roger Sayle  <roger@eyesopen.com>
1794
1795         PR c/10375
1796         * decl.c (duplicate_decls): Preserve "const", "noreturn" and
1797         "nothrow" function attributes.
1798
1799 2003-04-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1800
1801         PR c++/10347
1802         * pt.c (type_dependent_expression_p): Handle array new.
1803
1804 2003-04-15  Mark Mitchell  <mark@codesourcery.com>
1805
1806         PR c++/10381
1807         * parser.c (cp_parser_primary_expression): Reorganize logic for
1808         dealing with name lookup failures.
1809
1810 2003-04-15  Jason Merrill  <jason@redhat.com>
1811
1812         * decl2.c (mark_used): Don't instantiate anything if
1813         skip_evaluation.
1814
1815 2003-04-14  Ziemowit Laski  <zlaski@apple.com>
1816
1817         * tree.c (build_cplus_array_type_1): Do not call
1818         uses_template_parms() on a NULL index_type.
1819
1820 2003-04-13  Roger Sayle  <roger@eyesopen.com>
1821
1822         * decl.c (duplicate_decls): Preserve pure and malloc attributes.
1823
1824 2003-04-12  Mark Mitchell  <mark@codesourcery.com>
1825
1826         PR c++/10300
1827         * init.c (build_new_1): Reorganize.
1828
1829 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
1830
1831         * class.c (initialize_array)
1832         * decl.c (reshape_init)
1833         * decl2.c (build_expr_from_tree)
1834         * init.c (build_zero_init)
1835         * pt.c (tsubst_copy, tsubst_copy_and_build)
1836         * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
1837         (ptm_initializer, class_initializer, get_pseudo_ti_init)
1838         * semantics.c (finish_compound_literal)
1839         * typeck.c (build_ptrmemfunc1)
1840         * typeck2.c (store_init_value, process_init_constructor)
1841         (build_functional_cast): Use build_constructor.
1842
1843 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
1844
1845         * call.c (print_z_candidates): Use gcc_gettext_width, not
1846         strlen, to determine how much padding to use.
1847
1848 2003-04-10  Zack Weinberg  <zack@codesourcery.com>
1849
1850         * decl.c: Update all calls to shadow_warning.
1851
1852 2003-04-10  Mark Mitchell  <mark@codesourcery.com>
1853
1854         * class.c (layout_class_type): Correct handling for overlong
1855         bit-fields whose width is the same as an integer type.
1856
1857 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
1858
1859         * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
1860         * cp-lang.c (cp_tree_size): New function.
1861         (LANG_HOOKS_TREE_SIZE): Override.
1862
1863         * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
1864         tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
1865         (union lang_tree_node): Remove common and srcloc members.
1866         (build_srcloc_here): Don't prototype.
1867         * decl.c (cp_tree_node_structure): Kill SRCLOC case.
1868         * pt.c (pending_templates): Correct comment.
1869         * tree.c (build_srcloc, build_srcloc_here): Kill.
1870
1871 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
1872
1873         * call.c: Include intl.h.
1874         (print_z_candidate): Always use inform; get rid of errfn
1875         argument. Reorganize so that all the strings get picked up
1876         by xgettext.  Note obligation of caller to pass first argument
1877         through gettext.
1878         (print_z_candidates): Update to match.  Indent second and
1879         successive candidates by strlen() of translated message.
1880         (joust): Restructure ambiguous-conversion pedwarn so that
1881         translators see a complete sentence.  Update calls to
1882         print_z_candidate.
1883
1884         * Make-lang.in (cp/call.o): Update dependencies.
1885
1886 2003-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1887
1888         * decl.c (set_current_binding_level): Delete, revert last change.
1889         (current_binding_level): Modify to allow it as as lvalue.
1890
1891 2003-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1892
1893         * name-lookup.c (find_binding): Pass appropriate pointer type to
1894         POP_TIMEVAR_AND_RETURN.
1895
1896 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1897
1898         * Make-lang.in (cp-warn): Add $(STRICT_WARN).
1899         * cp-tree.h: Don't insist on having GNUC.
1900
1901 2003-04-03  Jason Merrill  <jason@redhat.com>
1902
1903         * cvt.c (ocp_convert): Only abort if we try to convert an object
1904         of TREE_ADDRESSABLE type.
1905
1906         * class.c (build_vtable): Set DECL_ALIGN here.
1907         (get_vtable_decl): Not here.
1908         (layout_vtable_decl): Or here.
1909         (create_vtable_ptr): Or here.
1910         (layout_class_type): Or here.
1911         (check_bitfield_decl): Don't mess with field alignment.
1912
1913 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1914
1915         * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
1916         DEF_ASSN_OPERATOR): Delete spurious semi-colon.
1917         * rtti.c (dfs_class_hint_mark): Likewise.
1918
1919         * decl.c (push_local_name, push_class_level_binding,
1920         maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
1921         functions returning void.
1922         * decl2.c (add_using_namespace): Likewise.
1923
1924         * decl.c (print_binding_level, print_other_binding_stack,
1925         print_binding_stack): Cast argument of %p specifier to void*.
1926         * ptree.c (cxx_print_decl): Likewise.
1927
1928         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
1929         VAR_FUNCTION_OR_PARM_DECL_CHECK,
1930         VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
1931         BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
1932         LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
1933
1934         * decl.c (set_current_binding_level): New macro.  Use throughout
1935         when setting the current binding level.
1936
1937         * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
1938         in enum.
1939         * method.c (mangling_flags): Likewise.
1940
1941         * cp-tree.h (lang_type_header): Add __extension__ and use
1942         CHAR_BITFIELD for members.
1943
1944 2003-04-02  Geoffrey Keating  <geoffk@apple.com>
1945
1946         PR other/9274
1947         * mangle.c: Include gt-cp-mangle.h.
1948         (subst_identifiers): Mark with GTY.
1949         * config-lang.in (gtfiles): Add cp/mangle.c.
1950         * Make-lang.in: (gt-cp-mangle.h): New rule.
1951         (cp/mangle.o): Depends on gt-cp-mangle.h.
1952
1953 2003-04-01  Andrew Pinski  <pinskia@physics.uc.edu>
1954
1955         * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
1956         after \$(srcdir)/cp/name-lookup.h.
1957         * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
1958         of ggc_alloc.  Include gt-cp-name-lookup.h at the end of the file.
1959         * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
1960         (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
1961
1962 2003-03-31  Jason Merrill  <jason@redhat.com>
1963
1964         PR java/10145
1965         * class.c (check_field_decl): Don't set DECL_ALIGN.
1966
1967 2003-03-30  Mark Mitchell  <mark@codesourcery.com>
1968
1969         PR c++/7647
1970         * decl.c (grokdeclarator): Tidy, slightly.
1971         * search.c (lookup_field_1): Add want_type parameter.
1972         (lookup_field_r): Adjust call to lookup_field_1.
1973
1974 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1975
1976         * Make-lang.in (cp/name-lookup.o): Add more dependencies.
1977
1978 2003-03-30  Gabriel Dos Reis <gdr@integrable-solutions.net>
1979
1980         * cp-tree.h (binding_for_name: Move to name-lookup.h  Adjust
1981         prototype.
1982         (cxx_scope_find_binding_for_name): Likewise.
1983         * decl.c (find_binding: Move to name-lookup.c.
1984         (binding_for_name): Likewise.
1985         (cxx_scope_find_binding_for_name): Likewise.
1986         (BINDING_LEVEL):  Remove.
1987         (push_binding): Tidy.
1988         (push_class_binding): Likewise.
1989         (pop_binding): Likewise.
1990         (poplevel): Likewise.
1991         (poplevel_class): Likewise.
1992         (set_identifier_type_value_with_scope): Likewise.
1993         (push_overloaded_decl): Likewise.
1994         (lookup_tag): Likewise.
1995         (unqualified_namespace_lookup): Likewise.
1996         (lookup_name_current_level): Likewise.
1997         (maybe_inject_for_scope_var): Likewise.
1998         (namespace_binding): Move to name-lookup.c.
1999         (set_namespace_binding): Likewise.
2000         * decl2.c (lookup_using_namespace): Tidy.
2001         (qualified_lookup_using_namespace): Likewise.
2002         (do_toplevel_using_decl): Likewise.
2003         * name-lookup.c: Include "timevar.h"
2004         * name-lookup.h (cxx_scope):  Declare.
2005         (struct cxx_binding): Lose member "has_level".  Adjust "scope"
2006         member declaration.
2007         (BINDING_SCOPE): Adjust definition.
2008         (BINDING_HAS_LEVEL_P): Remove.
2009
2010 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2011
2012         * name-lookup.c: New file.
2013         * name-lookup.h: Likewise..
2014         * decl.c (push_binding): Adjust use cxx_binding_make.
2015         (free_bindings): Move to name-lookup.c
2016         (pop_binding): Use cxx_binding_free.
2017         (binding_for_name): Tidy.
2018         * cp-tree.h: Include "name-lookup.h"
2019         (cxx_binding_make): Move to name-lookup.h
2020         (cxx_binding_clear): Likewise.
2021         (struct cxx_binding): Likewise.
2022         (LOCAL_BINDING_P): Likewise.
2023         (INHERITED_VALUE_BINDING_P): Likewise.
2024         (BINDING_SCOPE): Likewise.
2025         (BINDING_HAS_LEVEL_P): Likewise.
2026         (BINDING_VALUE): Likewise.
2027         (BINDING_TYPE): Likewise.
2028         * config-lang.in (gtfiles): Add cp/name-lookup.h
2029         * Make-lang.in (cp/name-lookup.o): New rule.
2030         (CXX_OBJS): Add cp/name-lookup.o
2031         (CXX_TREE_H): Add cp/name-lookup.h
2032
2033 2003-03-28  Jason Merrill  <jason@redhat.com>
2034
2035         PR c++/10245
2036         * cvt.c (force_rvalue): New fn.
2037         * call.c (build_conditional_expr): Use it.
2038         * cp-tree.h: Declare it.
2039
2040 2003-03-28  Mike Stump  <mrs@apple.com>
2041
2042         * error.c (dump_expr): Add 0x to printed hex numbers to make
2043         output match source code better.
2044
2045 2003-03-28  Mark Mitchell  <mark@codesourcery.com>
2046
2047         PR c++/10218
2048         * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
2049         definitions.
2050
2051         * decl2.c (generate_ctor_or_dtor_function): Tolerate a
2052         non-existant ssdf_decls array.
2053         (finish_file): Call generator_ctor_or_dtor_function when there are
2054         static constructors or destructors and no other static
2055         initializations.
2056
2057 2003-03-28  Nathan Sidwell  <nathan@codesourcery.com>
2058
2059         PR c++/10047
2060         * decl2.c (finish_file): Don't warn about explicitly instantiated
2061         inline decls.
2062
2063 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
2064
2065         PR c++/10224
2066         * pt.c (lookup_template_class): Only check instantiated args if
2067         they do not contain template parameters.
2068
2069 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
2070
2071         PR c++/10158
2072         * parser.c (cp_parser_function_definition): Set
2073         DECL_INITIALIZED_IN_CLASS for members.
2074         * pt.c (instantiate_decl): Only reduce the template args for
2075         friends that are not defined in class.
2076
2077 2003-03-25  Jason Merrill  <jason@redhat.com>
2078
2079         * call.c (print_z_candidate): Change name of first arg to msgid.
2080         (joust): Add comment for translators.
2081
2082 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
2083
2084         PR c++/9898, PR c++/383, DR 322
2085         * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
2086         through reference types on both PARM and ARG.
2087
2088 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
2089
2090         PR c++/10119
2091         * error.c (dump_expr) <BASELINK>: Use dump_expr.
2092         * pt.c (maybe_fold_nontype_args): New function.
2093         (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
2094         <TEMPLATE_ID_EXPR>: Break out folding code, call it.
2095         (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
2096         maybe_fold_nontype_args.
2097
2098 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
2099
2100         PR c++/10026
2101         * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
2102
2103 2003-03-23  Mark Mitchell  <mark@codesourcery.com>
2104
2105         PR c++/7086
2106         * typeck.c (cxx_mark_addressable):  Adjust call to
2107         gen_mem_addressof or put_var_into_stack.
2108
2109 2003-03-22  Nathan Sidwell  <nathan@codesourcery.com>
2110
2111         PR c++/9978, c++/9708
2112         * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
2113         * call.c (add_template_candidate_real): Adjust
2114         instantiate_template call.
2115         * class.c (resolve_address_of_overloaded_function): Likewise.
2116         * decl.c (build_enumerator): Set TREE_CONSTANT.
2117         * pt.c (check_instantiated_args): New.
2118         (push_inline_template_parms_recursive): Set TREE_CONSTANT,
2119         TREE_READONLY.
2120         (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
2121         (reduce_template_parm_level): Likewise.
2122         (process_template_parm): Likewise.
2123         (check_explicit_specialization): Adjust instantiate_template call.
2124         (convert_template_argument): Don't check non-type argument here.
2125         (lookup_template_class): Check them here.
2126         (tsubst_friend_function): Adjust instantiate_template call.
2127         (instantiate_template): Add tsubst_flags parameter, use it. Check
2128         instantiated args.
2129
2130 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
2131
2132         * decl.c: Update calls to shadow_warning.
2133
2134 2003-03-21  Nathan Sidwell  <nathan@codesourcery.com>
2135
2136         PR c++/9898
2137         * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
2138         (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
2139
2140 2003-03-20  Mark Mitchell  <mark@codesourcery.com>
2141
2142         * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
2143         friends.
2144         * cp/pt.c (instantiate_class_template): Fix formatting.
2145
2146 2003-03-14  Matt Austern  <austern@apple.com>
2147
2148         * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
2149         (unemitted_tinfo_decl_p): Remove.
2150         (emit_tinfo_decl): Change declaration to remove unused parameter.
2151         * decl2.c (finish_file): Change tinfo emission to loop through
2152         unemitted_tinfo_decls array instead of looping through all decls.
2153         * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
2154         unused second parameter.
2155         (init_rtti_processing): initialize unemitted_tinfo_decls varray.
2156         (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
2157         (emit_tinfo_decl): remove unused second parameter, add assertion
2158         that decl hasn't already been emitted.
2159
2160 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
2161
2162         * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
2163         type from 'int' to 'bool'. Replace 0 and 1 with true and false in
2164         return statements.
2165
2166 2003-03-19  Jason Merrill  <jason@redhat.com>
2167
2168         PR c++/8316, c++/9315, c++/10136
2169         * call.c (print_z_candidate): Split out from...
2170         (print_z_candidiates): ...here.
2171         (joust): Use it.
2172
2173 2003-03-17  Roger Sayle  <roger@eyesopen.com>
2174
2175         PR c++/10031
2176         * decl.c (duplicate_decls): Use the new type when prototyping
2177         anticipated decls, even when the types match.  This defines the
2178         exception list for the built-in function.
2179
2180 2003-03-17  Jason Merrill  <jason@redhat.com>
2181
2182         PR c++/10091
2183         * typeck.c (build_class_member_access_expr): Compare
2184         TYPE_MAIN_VARIANTs.
2185
2186 2003-03-17  Mark Mitchell  <mark@codesourcery.com>
2187
2188         PR c++/9639
2189         * parser.c (cp_parser_declarator_id): Clear parser->scope.
2190
2191 2003-03-16  Jason Merrill  <jason@redhat.com>
2192
2193         PR c++/9993
2194         * decl.c (finish_function): Only allow the NRVO to use variables
2195         declared at function scope.
2196
2197 2003-03-17  Andreas Jaeger  <aj@suse.de>
2198
2199         * Make-lang.in (cp/TAGS): Remove.
2200
2201 2003-03-16  Nathan Sidwell  <nathan@codesourcery.com>
2202
2203         PR c++/9629
2204         * cp-tree.h (struct language_function): Add in_base_initializer.
2205         (in_base_initializer): define it.
2206         (expand_member_init): Remove INIT param.
2207         * init.c (expand_member_init): Remove INIT param, return the member.
2208         (emit_mem_initializers): Set in_base_initializer.
2209         * class.c (build_base_path): Check in_base_initializer.
2210         * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
2211         * pt.c (tsubst_initializer_list): Likewise.
2212
2213 2003-03-16   Gabriel Dos Reis <gdr@integrable-solutions.net>
2214
2215         * decl.c (binding_for_name): Fix initialization thinko.
2216
2217 2003-03-15  Gabriel Dos Reis <gdr@integrable-solutions.net>
2218
2219         Compile-time improvement: 2/n.
2220         * cp-tree.h (struct cxx_binding): New datatype;
2221         (struct lang_identifier): Use it.
2222         (LOCAL_BINDING_P): Adjust definition.
2223         (INHERITED_VALUE_BINDING_P): Likewise.
2224         (BINDING_SCOPE): Likewise.
2225         (BINDING_HAS_LEVEL_P): Likewise.
2226         (BINDING_VALUE): Likewise.
2227         (BINDING_TYPE): Likewise.
2228         (IDENTIFIER_VALUE): Likewise.
2229         (struct tree_binding): Remove.
2230         (TS_CP_BINDING): Likewise.
2231         ((union lang_tree_node): Remove field "binding".
2232         (cxx_binding_clear): New macro.
2233         (binding_for_name): Adjust return type.
2234         (qualified_lookup_using_namespace): Adjust prototype.
2235         (lookup_using_namespace): Adjust prototype.
2236         (cxx_scope_find_binding_for_name): Declare.
2237         * cp-tree.def: Remove CPLUS_BINDING definition.
2238         * decl.c (push_binding): Adjust local variable type.
2239         (add_binding): Likewise.
2240         (push_class_binding): Likewise.
2241         (pop_binding): Likewise.
2242         (poplevel): Likewise.
2243         (poplevel_class): Likewise.
2244         (free_bindings):  Adjust type.
2245         (find_binding): Adjust return type, add a third parameter. Remove
2246         non-useful assertion now that we use static typing.
2247         (cxx_scope_find_binding_for_name): New function.
2248         (binding_for_name): Use it.  Adjust local variable type. Simplify.
2249         (namespace_binding):  Simplify.
2250         (set_namespace_binding): Likewise.
2251         (set_identifier_type_value_with_scope): Adjust local variable type.
2252         (lookup_tag): Don't type-abuse of local variable 'old'.
2253         (lookup_namespace_name): Likewise.  Allocate binding on stack.
2254         (select_decl): Adjust prototype.
2255         (unqualified_namespace_lookup):  Allocate binding on stack.
2256         Don't type-abuse of local variable 'val'.
2257         (lookup_name_real): Likewise.
2258         (maybe_inject_for_scope_var): Adjust local variable type.
2259         (cp_tree_node_structure): Remove CPLUS_BINDING case label.
2260         (namespace_binding): Adjust logic, simplify.
2261         (BINDING_LEVEL): Adjust definition.
2262         (push_class_level_binding): Adjust local variable type.
2263         (struct cxx_saved_binding): Adjust field 'binding' type.
2264         * decl2.c (ambiguous_decl): Adjust prototype.
2265         (lookup_using_namespace): Adjust local variable type.
2266         (qualified_lookup_using_namespace): Catch type error and correct
2267         ensueing logic error.
2268         (do_nonmember_using_decl): Adjust local variable type.  Allocate
2269         temporary cxx_binding on stack.
2270         (do_toplevel_using_decl): Adjust local variable type.
2271         * ptree.c (cxx_print_cxx_binding): New function.
2272         (cxx_print_identifier): Use it.
2273         (cxx_print_xnode): Delete CPLUS_BINDING case label.
2274
2275 2003-03-15  Roger Sayle  <roger@eyesopen.com>
2276
2277         * tree.c (count_functions): Fix whitespace.
2278
2279 2003-03-15  Neil Booth  <neil@daikokuya.co.uk>
2280
2281         * Make-lang.in: Update.
2282
2283 2003-03-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2284
2285         PR c++/6440
2286         * pt.c (maybe_process_partial_specialization): Handle
2287         member class template when enclosing class template is
2288         explicit specialized.
2289         (most_general_template): Stop looking when DECL is already
2290         specialized.
2291
2292 2003-03-13  Jason Merrill  <jason@redhat.com>
2293
2294         PR c++/9420
2295         * search.c (lookup_conversions): Call complete_type here.
2296         * call.c (implicit_conversion): Not here.
2297
2298 2003-03-13  Mark Mitchell  <mark@codesourcery.com>
2299
2300         * decl2.c (do_nonmember_using_decl): Correct handling of
2301         simultaneous type/non-type bindings.
2302
2303         * call.c (initialize_reference): Remove bogus assertion.
2304         * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
2305
2306 2003-03-12  Andrew Lewycky  <andrew@mxc.ca>
2307
2308         PR c++/7050
2309         * expr.c (cxx_expand_expr): Return const0_rtx for throw
2310         expressions.
2311
2312 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
2313
2314         PR c++/9474
2315         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
2316         to merge old and new declarations.
2317
2318 2003-03-12  Alexandre Oliva  <aoliva@redhat.com>
2319
2320         * g++.1: Remove.
2321         * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
2322         (cp/g++.1): Build it from scratch in the build tree.
2323         (c++.install-man): Depend on it.  Install it from the build tree.
2324         (c++.mostlyclean): Clean it.
2325
2326 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
2327
2328         PR c++/9474
2329         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
2330         to merge old and new declarations.
2331
2332         PR c++/9924
2333         * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
2334
2335 2003-03-11  Jason Merrill  <jason@redhat.com>
2336
2337         PR c++/9820
2338         * search.c (lookup_member): Fix handling of functions in a class
2339         being defined.
2340
2341 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
2342
2343         PR c++/8700
2344         * call.c (convert_class_to_reference): Adjust usage of
2345         splice_viable.
2346         (any_viable): Remove.
2347         (splice_viable): Combine with any_viable.
2348         (print_z_candidates): Avoid printing duplicates.
2349         (build_user_type_conversion_1): Adjust usage of splice_viable.
2350         (build_new_function_call): Likewise.
2351         (build_operator_new_call): Likewise.
2352         (build_object_call): Likewise.
2353         (build_conditional_expr): Likewise.
2354         (build_new_op): Likewise.
2355         (build_new_method_call): Likewise.
2356         (joust): Remove spurious comment.
2357         * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
2358         * decl2.c (arg_assoc_class): Simplify.
2359         * friend.c (add_friend): Likewise.
2360
2361 2003-03-11  Jason Merrill  <jason@redhat.com>
2362
2363         PR c++/8660
2364         * decl2.c (check_classfn): A member template only matches a
2365         member template.
2366
2367 2003-03-11  Neil Booth  <neil@daikokuya.co.uk>
2368
2369         * Make-lang.in (CXX_C_OBJS): Update.
2370         * lang-specs.h: Don't define __GNUG__ here.
2371
2372 2003-03-10  Mark Mitchell  <mark@codesourcery.com>
2373
2374         * call.c (perform_overload_resolution): New function.
2375         (build_new_function_call): Use it.
2376         (build_operator_new_call): Likewise.
2377         (add_candidates): Add explicit_targs and template_only parameters.
2378         (build_new_op): Adjust accordingly.
2379         * cp-tree.h (build_operator_new_call): New function.
2380         (build_function_call_real): Remove.
2381         (build_function_call_maybe): Likewise.
2382         * init.c (build_new_1): Use build_operator_new_call.
2383         * typeck.c (build_function_call_real): Rename to ...
2384         (build_function_call): ... this.
2385
2386 2003-03-10  Devang Patel  <dpatel@apple.com>
2387
2388         PR c++/9394
2389         * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
2390
2391 2003-03-10  Jason Merrill  <jason@redhat.com>
2392
2393         PR c++/9798
2394         * decl.c (push_using_directive): Push before recursing.
2395
2396         PR c++/9868, c++/9524
2397         * call.c (resolve_scoped_fn_name): Handle the case of a function
2398         pointer member.
2399
2400         * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
2401         argument in the pointer-to-member case.
2402
2403 2003-03-09  Mark Mitchell  <mark@codesourcery.com>
2404
2405         PR c++/9373
2406         * cp-lang.c (cxx_get_alias_set): Use alias set zero for
2407         pointers to member functions.
2408
2409         PR c++/8534
2410         * decl.c (build_ptrmemfunc_type): Do not allow default arugments
2411         in pointer-to-member-function types.
2412
2413 2003-03-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2414
2415         * expr.c (cplus_expand_constant): Use C90 prototype style.
2416         (cxx_expand_expr): Likewise.
2417
2418 2003-03-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2419
2420         PR c++/9970
2421         * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
2422         functions.
2423
2424 2003-03-08  Geoffrey Keating  <geoffk@apple.com>
2425
2426         * lang-specs.h (c++-header): Change .pch to .gch.
2427
2428 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
2429
2430         * cp-tree.h (cxx_init): Update prototype.
2431         * lex.c (cxx_init): Similarly.
2432
2433 2003-03-08  Mark Mitchell  <mark@codesourcery.com>
2434
2435         PR c++/9823
2436         * cp-tree.h (begin_mem_initializers): Remove.
2437         * parser.c (cp_parser_mem_initializer_list): Inline it here.
2438         Do not call finish_mem_initializers if not in a constructor.
2439         (cp_parser_class_head): Fix typo in error message.
2440         * semantics.c (begin_mem_initializers): Remove.
2441         * testsuite/g++.dg/parser/constructor1.C: New test.
2442
2443         PR c++/9809
2444         * call.c (add_function_candidate): Skip builtin fuctions that have
2445         not yet been declared.
2446
2447         PR c++/9982
2448         * init.c (build_new_1): Correct logic for determining whether or
2449         not to use an array cookie.
2450
2451         PR c++/9524
2452         * parser.c (cp_parser_postfix_expression): Call
2453         finish_non_static_data_member, even when processing_template_decl.
2454
2455         PR c++/9912
2456         * cp-tree.h (is_ancestor): New function.
2457         (handle_class_head): Change prototype.
2458         * decl2.c (is_namespace_ancestor): Rename to ...
2459         (namespace_anecestor): ... this.
2460         (set_decl_namespace): Adjust accordingly.
2461         (handle_class_head): Remove unncessary parameters.
2462         * parser.c (cp_parser_class_head): Check that
2463         nested-name-specifiers are used appropriately.
2464
2465 2003-03-07  Mark Mitchell  <mark@codesourcery.com>
2466
2467         * call.c (reference_binding): Remove REF_IS_VAR parameter.
2468         (implicit_conversion): Adjust call to reference_binding.
2469         (make_temporary_var_for_ref_to_type): Add TYPE parameter.
2470         (initialize_reference): Adjust handling for references bound to
2471         rvalues.
2472         * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
2473         prototype.
2474         (real_non_cast_lvalue_p): New method.
2475         * cvt.c (build_up_reference): Adjust use of
2476         make_temporary_var_for_ref_to_temp.
2477         * tree.c (real_non_cast_lvalue_p): New method.
2478
2479 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2480
2481         * except.c (init_exception_processing): Use C90 prototype style.
2482         (cp_protect_cleanup_actions): Likewise.
2483         (prepare_eh_type): Likewise.
2484         (build_eh_type_type): Likewise.
2485         (build_exc_ptr): Likewise.
2486         (do_begin_catch): Likewise.
2487         (dtor_nothrow): Likewise.
2488         (do_end_catch): Likewise.
2489         (push_eh_cleanup): Likewise.
2490         (decl_is_java_type): Likewise.
2491         (choose_personality_routine): Likewise.
2492         (initialize_handler_parm): Likewise.
2493         (expand_start_catch_block): Likewise.
2494         (expand_end_catch_block): Likewise.
2495         (begin_eh_spec_block): Likewise.
2496         (finish_eh_spec_block): Likewise.
2497         (do_allocate_exception): Likewise.
2498         (do_free_exception): Likewise.
2499         (wrap_cleanups_r): Likewise.
2500         (stabilize_throw_expr): Likewise.
2501         (build_throw): Likewise.
2502         (complete_ptr_ref_or_void_ptr_p): Likewise.
2503         (is_admissible_throw_operand): Likewise.
2504         (nothrow_libfn_p): Likewise.
2505         (can_convert_eh): Likewise.
2506         (check_handlers_1): Likewise.
2507         (check_handlers): Likewise.
2508
2509 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
2510
2511         * call.c (merge_conversion_sequences): New function.
2512         (build_conv): Set ICS_USER_FLAG for USER_CONVs.
2513         (convert_class_to_reference): Correct handling of second
2514         standard conversion sequence in a user-defined conversion
2515         sequence.
2516         (build_user_type_conversion_1): Use merge_conversion_sequences.
2517         * cp-tree.def: Add comments for CONV nodes.
2518         * rtti.c (get_tinfo_decl): Use build_address/build_nop.
2519
2520 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2521
2522         * error.c (init_error): Use C90 prototype style.
2523         (dump_scope): Likewise.
2524         (dump_qualifiers): Likewise.
2525         (dump_template_argument): Likewise.
2526         (dump_template_argument_list): Likewise.
2527         (dump_template_parameter): Likewise.
2528         (dump_template_bindings): Likewise.
2529         (dump_type): Likewise.
2530         (dump_typename): Likewise.
2531         (class_key_or_enum): Likewise.
2532         (dump_aggr_type): Likewise.
2533         (dump_type_prefix): Likewise.
2534         (dump_type_suffix): Likewise.
2535         (dump_global_iord): Likewise.
2536         (dump_simple_decl): Likewise.
2537         (dump_decl): Likewise.
2538         (dump_template_decl): Likewise.
2539         (dump_function_decl): Likewise.
2540         (dump_parameters): Likewise.
2541         (dump_exception_spec): Likewise.
2542         (dump_function_name): Likewise.
2543         (dump_template_parms): Likewise.
2544         (dump_char): Likewise.
2545         (dump_expr_list): Likewise.
2546         (dump_expr): Likewise.
2547         (dump_binary_op): Likewise.
2548         (dump_unary_op): Likewise.
2549         (type_as_string): Likewise.
2550         (expr_as_string): Likewise.
2551         (decl_as_string): Likewise.
2552         (context_as_string): Likewise.
2553         (lang_decl_name): Likewise.
2554         (cp_file_of): Likewise.
2555         (cp_line_of): Likewise.
2556         (decl_to_string): Likewise.
2557         (expr_to_string): Likewise.
2558         (fndecl_to_string): Likewise.
2559         (code_to_string): Likewise.
2560         (language_to_string): Likewise.
2561         (parm_to_string): Likewise.
2562         (op_to_string): Likewise.
2563         (type_to_string): Likewise.
2564         (assop_to_string): Likewise.
2565         (args_to_string): Likewise.
2566         (cv_to_string): Likewise.
2567         (cxx_print_error_function): Likewise.
2568         (cp_diagnostic_starter): Likewise.
2569         (cp_diagnostic_finalizer): Likewise.
2570         (cp_print_error_function): Likewise.
2571         (function_category): Likewise.
2572         (print_instantiation_full_context): Likewise.
2573         (print_instantiation_partial_context): Likewise.
2574         (maybe_print_instantiation_context): Likewise.
2575         (print_instantiation_context): Likewise.
2576         (cp_printer): Likewise.
2577         (print_integer): Likewise.
2578         (print_non_consecutive_character): Likewise.
2579         (locate_error): Likewise.
2580
2581 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
2582
2583         PR c++/9965
2584         * call.c (reference_binding): Add ref_is_var parameter.
2585         (implicit_conversion): Adjust call to reference_binding.
2586         (initialize_reference): Likewise.
2587
2588         PR c++/9400
2589         * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
2590         PARM_DECLs.
2591
2592         PR c++/9791
2593         * class.c (get_basefndecls): Use lookup_fnfields_1.
2594
2595 2003-03-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2596
2597         PR c++/9188
2598         * parser.c (cp_parser_type_parameter): Remove redundant `expect'
2599         in error message.
2600         (cp_parser_single_declaration): Likewise.
2601
2602 2003-03-05  Jason Merrill  <jason@redhat.com>
2603
2604         PR c++/9440
2605         * call.c (build_conditional_expr): Use convert rather than an
2606         explicit NOP_EXPR.
2607
2608 2003-03-02  Matt Austern  <austern@apple.com>
2609
2610         * decl.c (cp_binding_level): Add static_decls varray member.
2611         (add_decl_to_level): Add static/inline namespace scope
2612         declarations to static_decls array.
2613         (wrapup_global_for_namespace): Pass static_decls only, instead of
2614         all decls, to wrapup_global_declarations/check_global_declarations.
2615         (push_namespace): Initialize static_decls for ordinary namespaces.
2616         (cxx_init_decl_processing): Initialize static_decls for global
2617         namespace.
2618
2619 2003-03-05  Mark Mitchell  <mark@codesourcery.com>
2620
2621         * class.c (end_of_class): Correct thinko.
2622
2623 2003-03-04  Nathanael Nerode  <neroden@gcc.gnu.org>
2624
2625         * config-lang.in: Replace ${libstdcxx_version} by its value.
2626
2627 2003-03-04  Gabriel Dos Reis <gdr@integrable-solutions.net>
2628
2629         * cp-tree.h (cxx_saved_binding): Declare.
2630         (struct saved_scope): Adjust type of field 'old_binding'.
2631         * decl.c (cxx_saved_binding_make): New macro.
2632         (struct cxx_saved_binding): Define.
2633         (store_bindings): Adjust prototype.  Use cxx_saved_binding to save
2634         C++ bindings.
2635         (maybe_push_to_top_level): Adjust local variable type.
2636         (pop_from_top_level): Likewise.
2637
2638 2003-03-04  Tom Tromey  <tromey@redhat.com>
2639
2640         * Make-lang.in (c++.tags): New target.
2641
2642 2003-03-04  Neil Booth  <neil@daikokuya.co.uk>
2643
2644         * Make-lang.in: Update.
2645
2646 2003-03-03  Jason Merrill  <jason@redhat.com>
2647
2648         * decl.c (finish_enum): Do set the type in a template. Simplify.
2649         * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
2650
2651 2003-03-03  Mark Mitchell  <mark@codesourcery.com>
2652
2653         PR c++/9878
2654         * call.c (convert_class_to_reference): Correct conversion
2655         sequences.
2656         (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
2657         (implicit_conversion): Adjust call to reference_binding.
2658         (add_candidate): Change type of candidates parameter.
2659         (add_function_candidate): Likewise.
2660         (add_conv_candidate): Likewise.
2661         (build_builtin_candidate): Likewise.
2662         (add_builtin_candidate): Likewise.
2663         (add_builtin_candidates): Likewise.
2664         (add_template_candidate_real): Likewise.
2665         (add_template_candidate): Likewise.
2666         (add_template_conv_candidate): Likewise.
2667         (build_user_type_conversion_1): Adjust accordingly.
2668         (build_object_call): Likewise.
2669         (build_conditional_expr): Likewise.
2670         (add_candidates): Likewise.
2671         (build_new_op): Likewise.
2672         (convert_like_real): Use USER_CONV_CAND.  Use build_nop.
2673         (build_new_method_call): Adjust calls to add_function_candidate.
2674         (make_temporary_var_for_ref_to_temp): New function.
2675         (initialize_reference): Add decl parameter.
2676         * class.c (build_rtti_vtbl_entries): Use build_address and
2677         build_nop.
2678         * cp-tree.h (initialize_reference): Change prototype.
2679         (make_temporary_var_for_ref_to_temp): New function.
2680         (build_type_conversion): Change prototype.
2681         (build_address): New function.
2682         (build_nop): Likewise.
2683         * cvt.c (cp_convert_to_pointer): Adjust call to
2684         build_type_conversion.  Avoid indicating redundant NOP_EXPRs.
2685         Use build_nop.
2686         (convert_to_pointer_force): Use build_nop.
2687         (build_up_reference): Use make_temporary_var_for_ref_to_temp.
2688         (convert_to_reference): Adjust call to build_type_conversion.
2689         (ocp_convert): Likewise.
2690         (build_type_conversion): Remove for_sure parameter.
2691         * decl.c (grok_reference_init): Use initialize_reference.
2692         * typeck.c (build_address): New function.
2693         (build_nop): Likewise.
2694         (build_unary_op): Use them.
2695         (build_ptrmemfunc): Tidy slightly.
2696         (convert_for_initialization): Adjust call to
2697         initialize_reference.
2698         * typeck2.c (store_init_value): Remove #if 0'd code.
2699
2700 2003-03-03  Jason Merrill  <jason@redhat.com>
2701
2702         * decl.c (start_function): Clear DECL_NUM_STMTS.
2703
2704         * class.c (get_vtable_decl): Use vtbl_type_node.
2705         (build_primary_vtable): Check for it.
2706
2707 2003-03-02  Aldy Hernandez  <aldyh@redhat.com>
2708
2709         * decl.c (check_initializer): Check for vector_opaque_p.
2710
2711 2003-03-02  Ashif Harji  <asharji@uwaterloo.ca>
2712
2713         * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
2714           invoke an external cpp during compilation.
2715
2716 2003-03-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2717
2718         * decl.c (duplicate_decls): Convert use of warning_with_decl() to
2719         that of warning().
2720         (start_decl): Likewise.
2721         (start_function): Likewise.
2722
2723 2003-03-01  Neil Booth  <neil@daikokuya.co.uk>
2724
2725         * Make-lang.in (CXX_C_OBJS): Update.
2726
2727 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
2728
2729         PR c++/9892
2730         * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
2731         instantiating it.
2732
2733 2003-02-28  Aldy Hernandez  <aldyh@redhat.com>
2734
2735         * parser.c (cp_parser_init_declarator): Revert opaque
2736         vector_opaque_p change.
2737         Do not include target.h.
2738
2739 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
2740
2741         PR c++/9879
2742         * cp-tree.h (build_zero_init): Add parameter.
2743         * decl.c (cp_finish_decl): Adjust call.
2744         * init.c (build_zero_init): Add nelts parameter.  Adjust recursive
2745         calls.
2746         (build_default_init): Add nelts parameter.  Adjust calls to
2747         build_zero_init.
2748         (build_new_1): Adjust call to build_default_init.
2749         * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
2750
2751 2003-02-26  Devang Patel  <dpatel@apple.com>
2752
2753         * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
2754         required.  Postpone enum setting for template decls.
2755         (build_enumerator): Delay copying value node until finish_enum
2756         (). Remove #if 0'ed code.
2757         * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
2758         (tsubst_copy): Add check for enum type.
2759
2760 2003-02-25  Mark Mitchell  <mark@codesourcery.com>
2761
2762         PR c++/9683
2763         * decl2.c (prune_vars_needing_no_initialization): Do not throw
2764         away initializations for DECL_EXTERNAL VAR_DECLs.
2765         (finish_file): Adjust accordingly.
2766         * pt.c (instantiate_decl): Do not defer VAR_DECLs.
2767
2768 2003-02-24 Gabriel Dos Reis  <gdr@integrable-solutions.net>
2769
2770         * decl.c (add_binding): Time TV_NAME_LOOKUP.
2771         (push_class_binding): Likewise.
2772         (set_namespace_binding): Likewise.
2773
2774 2003-02-24  Mark Mitchell  <mark@codesourcery.com>
2775
2776         PR c++/9836
2777         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
2778         specializations back to the main template.
2779         * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
2780         * pt.c (resolve_typename_type): Likewise.
2781
2782 2003-02-24  Jeffrey D. Oldham  <oldham@codesourcery.com>
2783
2784         PR c++/9778
2785         * pt.c (tsubst_copy_and_build): For a templated function inside a
2786         scope, process template arguments.
2787
2788 2003-02-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2789
2790         PR c++/9602
2791         * typeck2.c (abstract_virtuals_error): Don't check when
2792         TYPE is still template parameter dependent.
2793
2794 2003-02-23  Mark Mitchell  <mark@codesourcery.com>
2795
2796         PR c++/5333
2797         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
2798         * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
2799         * pt.c (instantiate_class_template): Don't try to instantiate
2800         dependent types.
2801         (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
2802
2803 2003-02-21  Mark Mitchell  <mark@codesourcery.com>
2804
2805         PR c++/9749
2806         * decl.c (grokdeclarator): Do not allow parameters with variably
2807         modified types.
2808
2809 2003-02-21  Nathan Sidwell  <nathan@codesourcery.com>
2810
2811         * search.c (grow_bfs_bases): Remove. Fold into ...
2812         (bfs_walk): ... here, fix fencepost error. Fix merge lossage
2813         in previous patch.
2814
2815 2003-02-20  Mark Mitchell  <mark@codesourcery.com>
2816
2817         PR c++/9729
2818         * mangle.c (mangle_conv_op_name_for_type): Issue an error message
2819         when the G++ 3.2 ABI prevents correct compilation.
2820
2821 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
2822
2823         Change base class access representation. Share virtual base
2824         binfos.
2825         * cp/call.c (build_special_member_call): Remove binfo_for_vbase
2826         call.
2827         * cp/class.c (build_base_path): Likewise.
2828         (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
2829         (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
2830         (make_new_vtable): Adjust.
2831         (force_canonical_binfo_r): Delete.
2832         (force_canonical_binfo): Delete.
2833         (mark_primary_virtual_base): Delete.
2834         (dfs_unshared_virtual_bases): Delete.
2835         (mark_primary_bases): Adjust.
2836         (maybe_warn_about_overly_private_class): Adjust.
2837         (dfs_base_derived_from): Delete.
2838         (base_derived_from): Follow the inheritance chain.
2839         (struct find_final_overrider_data): Add vpath member.
2840         (dfs_find_final_overrider): Adjust.
2841         (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
2842         (find_final_overrider): Adjust.
2843         (update_vtable_entry_for_fn): Adjust.
2844         (modify_all_vtables): Adjust.
2845         (walk_subobject_offsets): Adjust.
2846         (layout_nonempty_base_or_field): Adjust.
2847         (layout_empty_base): Remove last parameter. Adjust.
2848         (build_base_field): Adjust.
2849         (build_base_fields): Adjust.
2850         (propagate_binfo_offsets): Remove last parameter. Adjust.
2851         (dfs_set_offset_for_unshared_vbases): Delete.
2852         (layout_virtual_bases): Adjust.
2853         (finish_struct_1): Adjust.
2854         (init_class_processing): Don't init access nodes.
2855         (dfs_get_primary_binfo): Delete.
2856         (get_primary_binfo): Adjust.
2857         (dump_class_hierarchy_r): Remove most derived arg, add IGO
2858         parameter. Adjust.
2859         (dump_class_hierarchy): Adjust.
2860         (finish_vtbls): Adjust.
2861         (get_original_base): Delete.
2862         (build_vtt_inits): Adjust.
2863         (dfs_build_secondary_vptr_vtt_inits): Adjust.
2864         (dfs_ctor_vtable_bases_queue_p): Adjust.
2865         (build_ctor_vtbl_group): Adjust.
2866         (dfs_accumulate_vtbl_inits): Adjust.
2867         (build_vtbl_initializer): Adjust.
2868         (build_vbase_offset_vtbl_entries): Adjust.
2869         (add_vcall_offset_vtbl_entries_1): Adjust.
2870         * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
2871         (access_*_node): Remove.
2872         (CANONICAL_BINFO): Delete.
2873         (BINFO_UNSHARED_MARKED): Remove.
2874         (BINFO_MARKED): Set LANG_FLAG_0 directly.
2875         (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
2876         (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
2877         (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
2878         Delete.
2879         (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
2880         (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
2881         (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
2882         Delete.
2883         (BINFO_DEPENDENT_BASE_P): New.
2884         (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
2885         index.
2886         (markedp, unmarkedp): Adjust.
2887         (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
2888         dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
2889         find_vbase_instance, binfo_for_vbase): Delete.
2890         (copied_binfo, original_binfo): Declare.
2891         (finish_base_specifier): Add virtual_p arg.
2892         (unshare_base_binfos): Delete.
2893         (copy_base_binfos): Declare.
2894         (reverse_path): Delete.
2895         * cp/decl.c (xref_basetypes): Access and virtuality passed
2896         differently. Don't copy direct base binfos here. Call
2897         copy_base_binfos.
2898         * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
2899         (initialize_vtbl_ptrs): Adjust.
2900         (expand_member_init): Adjust.
2901         * cp/parser.c (cp_parser_base_specifier): Adjust.
2902         * cp/pt.c (instantiate_class_template): Adjust.
2903         (get_template_base_recursive): Adjust.
2904         * cp/rtti.c (get_pseudo_ti_init): Adjust.
2905         (get_pseudo_ti_desc): Adjust.
2906         * cp/tree.c (unshare_base_binfos): Rename to ...
2907         (copy_base_binfos): ... here, reimplement.
2908         (make_binfo): Set BINFO_DEPENDENT_BASE_P.
2909         (reverse_path): Remove.
2910         * cp/typeck.c (get_delta_difference): Adjust error messages.
2911         * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
2912         * cp/search.c (lookup_base_r): Adjust.
2913         (dynamic_cast_base_recurse): Adjust.
2914         (canonical_binfo): Remove.
2915         (dfs_canonical_queue): Remove.
2916         (dfs_assert_unmarked_p): Remove.
2917         (assert_canonical_unmarked): Remove.
2918         (shared_marked_p, shared_unmarked_p): Remove.
2919         (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
2920         (dfs_access_in_type): Adjust.
2921         (access_in_type): Adjust.
2922         (dfs_accessible_queue_p): Adjust.
2923         (dfs_accessible_p): Adjust.
2924         (is_subobject_of_p_1, is_subobject_of_p): Remove.
2925         (struct lookup_field_info): Remove from_dep_base_p field.
2926         (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
2927         (lookup_field_r): Remove dependent base code.
2928         (lookup_member): Likewise.
2929         (dfs_walk, dfs_walk_real): Add access arg to queue fn.
2930         (dfs_unmarked_real_bases_queue_p): Remove.
2931         (dfs_marked_real_bases_queue_p): Remove.
2932         (dfs_skip_vbases): Remove.
2933         (dfs_get_pure_virtuals): Adjust.
2934         (markedp, unmarkedp): Adjust.
2935         (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
2936         (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
2937         (dfs_unmark): Adjust.
2938         (dfs_get_vbase_types):Remove.
2939         (dfs_build_inheritance_graph_order): Remove.
2940         (get_vbase_types): Remove
2941         (dfs_find_vbase_instance): Remove.
2942         (find_vbase_instance): Remove.
2943         (dfs_debug_unmarkedp): Adjust.
2944         (dependent_base_p): Remove.
2945         (dfs_push_type_decls): Adjust.
2946         (dfs_push_decls): Adjust.
2947         (dfs_no_overlap_yet): Adjust.
2948         (copied_binfo): New function.
2949         (original_binfo): New function.
2950         (binfo_for_vbase): Remove.
2951
2952 2003-02-18  Zack Weinberg  <zack@codesourcery.com>
2953
2954         * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
2955         (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
2956         vectors, for speed.
2957
2958 2003-02-18  Mark Mitchell  <mark@codesourcery.com>
2959
2960         PR c++/9704
2961         * class.c (layout_class_type): In the 3.2 ABI, take into account
2962         trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
2963
2964 2003-02-18  Matt Austern <austern@apple.com>
2965
2966         * cp/cp-lang.c: Change lang hooks so that final_write_globals does
2967         nothing for C++.
2968         * cp/decl.c (wrapup_globals_for_namespace): Remove special
2969         handling of global namespace.
2970
2971 2003-02-18  Geoffrey Keating  <geoffk@apple.com>
2972
2973         * cp-tree.h (rid_to_yy): Delete.
2974         (C_RID_YYCODE): Delete.
2975         (finish_file): Delete redundant declaration.
2976
2977 2003-02-18  Jason Merrill  <jason@redhat.com>
2978
2979         PR c++/9623
2980         * decl.c (reshape_init): Don't mess with initializer labels.
2981
2982         PR c++/9485
2983         * parser.c (cp_parser_postfix_expression): Set idk properly for
2984         object->scope::member.
2985
2986 2003-02-18  Ben Elliston  <bje@redhat.com>
2987
2988         PR other/7350
2989         * decl.c (duplicate_decls): Fix typo in comment.
2990
2991 2003-02-17  Michael Elizabeth Chastain <mec@shout.net>
2992
2993         PR debug/9717
2994         * class.c (build_base_field): Mark fields for base classes with
2995         DECL_IGNORED_P.
2996
2997 2003-02-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2998
2999         PR c++/9457
3000         * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
3001         CONSTRUCTOR_ELTS only once.
3002
3003 2003-02-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3004
3005         PR c++/9459
3006         * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
3007         (dump_type_suffix): Likewise.
3008
3009 2003-02-14  Nathan Sidwell  <nathan@codesourcery.com>
3010
3011         * search.c: ANSIfy function declarations and definitions.
3012         * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
3013         * call.c (build_method_call, resolve_scoped_fn_name,
3014         build_java_interface_fn_ref): Adjust lookup_field, lookup_member
3015         calls.
3016         * class.c (handle_using_decl): Likewise.
3017         * decl.c (make_typename_type, make_unmound_class_template,
3018         start_decl, compute_array_index_type): Likewise.
3019         * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
3020         * init.c (expand_member_init, build_member_call): Likewise.
3021         * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
3022         resolve_typename_type): Likewise.
3023         * typeck.c (lookup_destructor, finish_class_member_access_exprm
3024         build_prememfunc_access_expr): Likewise.
3025
3026 2003-02-13  Gabriel Dos Reis <gdr@integrable-solutions.net>
3027
3028         * decl2.c: Include "timevar.h".
3029         (namespace_ancestor): Time name lookup.
3030         (add_using_namespace): Likewise.
3031         (lookup_using_namespace): Likewise.
3032         (qualified_lookup_using_namespace): Likewise.
3033         (decl_namespace): Likewise.
3034         (lookup_arg_dependent): Likewise.
3035         * lex.c (do_identifier): Likewise.
3036         (do_scoped_id): Likewise.
3037         * pt.c (lookup_template_class): Likewise.
3038
3039 2003-02-14   Andrew Pinski <pinskia@physics.uc.edu>
3040
3041         * decl.c: (define_label): Fix warning for return 0 instead of NULL.
3042
3043 2003-02-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3044
3045         * decl.c: Include "timevar.h".
3046         (poplevel): Time name lookup.
3047         (find_binding): Likewise.
3048         (push_namespace): Likewise.
3049         (pop_nested_namespace): Likewise.
3050         (store_bindings): Likewise.
3051         (maybe_push_to_top_level): Likewise.
3052         (pop_from_top_level): Likewise.
3053         (push_local_name): Likewise.
3054         (pushtag): Likewise.
3055         (pushdecl): Likewise.
3056         (pushdecl_with_scope): Likewise.
3057         (pushdecl_namespace_level): Likewise.
3058         (pushdecl_top_level): Likewise.
3059         (pushdecl_class_level): Likewise.
3060         (push_class_level_binding): Likewise.
3061         (push_using_decl): Likewise.
3062         (push_using_directive): Likewise.
3063         (push_overloaded_decl): Likewise.
3064         (lookup_label): Likewise.
3065         (define_label): Likewise.
3066         (lookup_tag): Likewise.
3067         (lookup_tag_reverse): Likewise.
3068         (lookup_namespace_name): Likewise.
3069         (select_decl): Likewise.
3070         (unqualified_namespace_lookup): Likewise.
3071         (lookup_name_real): Likewise.
3072         (lookup_name_current_level): Likewise.
3073         (lookup_type_current_level): Likewise.
3074         (maybe_inject_for_scope_var): Likewise.
3075         (xref_tag): Likewise.
3076
3077         * Make-lang.in (cp/decl.o): Add dependency on timevar.h
3078
3079 2003-02-12  Phil Edwards  <pme@gcc.gnu.org>
3080
3081         * decl.c (build_enumerator):  Remove unneeded test.
3082
3083 2003-02-09  Dan Nicolaescu  <dann@ics.uci.edu>
3084
3085         * cp-tree.h (struct lang_type_header): Make all fields unsigned
3086         char.
3087
3088 2003-02-03  Mark Mitchell  <mark@codesourcery.com>
3089
3090         PR c++/7129
3091         * call.c (z_candidate): Add args.
3092         (convert_class_to_reference): Set it.
3093         (implicit_conversion): Tidy.
3094         (add_candidate): Add args parameter.
3095         (add_function_candidate): Adjust call to add_candidate.
3096         (add_conv_candidate): Likewise.
3097         (build_builtin_candidate): Likewise.
3098         (build_user_type_conversion_1): Eliminate wasteful tree_cons
3099         usage.
3100         (build_new_function_call): Likewise.
3101         (build_object_call): Likewise.
3102         (add_candidates): New function.
3103         (build_new_op): Use it.
3104         (covert_like_real): Adjust call to build_over_call.
3105         (build_over_call): Remove args parameter.
3106         * operators.def: Add <?= and >?=.
3107
3108 2003-02-01  Richard Sandiford  <rsandifo@redhat.com>
3109
3110         * typeck.c (build_indirect_ref): Don't check flag_volatile.
3111
3112 2003-01-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3113
3114         PR c++/8849
3115         * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
3116
3117 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
3118
3119         * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
3120         BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
3121         (BINFO_LANG_ELTS): New #define.
3122         * tree.c (make_binfo): Use BINFO_LANG_ELTS.
3123
3124 2003-01-30  Geoffrey Keating  <geoffk@apple.com>
3125
3126         * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
3127
3128 2003-01-30  Mark Mitchell  <mark@codesourcery.com>
3129
3130         * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
3131         for class types.
3132         * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
3133         rather than TYPE_LANG_FLAG_0.
3134         (TYPE_BUILT_IN): Remove.
3135         (TYPE_DEPENDENT_P): New macro.
3136         (TYPE_DEPENDENT_P_VALID): Likewise.
3137         (lang_type_class): Add fields_readonly.
3138         * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
3139         * pt.c (dependent_type_p_r): New function, split out from ...
3140         (dependent_type_p): ... here.  Memoize results.
3141         * search.c (dependent_base_p): Use dependent_type_p, not
3142         uses_template_parms.
3143         * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
3144         for class types.
3145
3146 2003-01-29  Mark Mitchell  <mark@codesourcery.com>
3147
3148         * call.c (build_field_call): Use build_new_op, not build_opfncall.
3149         (prep_operand): New function.
3150         (build_new_op): Use it.  Remove dead code.
3151         * class.c (pushclass): Change "modify" parameter type from int to
3152         bool.
3153         (currently_open_class): Use same_type_p, not pointer equality.
3154         (push_nested_class): Adjust calls to pushclass, remove modify
3155         parameter.
3156         * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
3157         (pushclass): Change prototype.
3158         (push_nested_class): Likewise.
3159         (grokoptypename): Remove.
3160         (build_opfncall): Remove.
3161         (value_dependent_expression_p): Declare.
3162         (resolve_typename_type): Likewise.
3163         (resolve_typename_type_in_current_instantiation): Likewise.
3164         (enter_scope_of): Remove.
3165         (tsubst): Remove.
3166         (tsubst_expr): Likewise.
3167         (tsubst_copy): Likewise.
3168         (tsubst_copy_and_build): Likewise.
3169         * decl.c (warn_about_implicit_typename_lookup): Remove.
3170         (finish_case_label): Return error_mark_node for erroneous labels.
3171         (start_decl): Adjust calls to push_nested_class.
3172         (grokfndecl): Call push_scope/pop_scope around call to
3173         duplicate_decls.
3174         (grokdeclarator): Do not call tsubst.
3175         (start_function): Adjust calls to push_nested_class.
3176         * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
3177         (check_classfn): Use push_scope/pop_scope around type comparisions.
3178         (grokoptypename): Remove.
3179         (push_sscope): Adjust call to push_nested_class.
3180         * error.c (dump_type): Show cv-qualification of typename types.
3181         * init.c (build_member_call): Use build_new_op, not
3182         build_opfncall.
3183         * method.c (build_opfncall): Remove.
3184         * parser.c (cp_parser): Add allow_non_constant_expression_p and
3185         non_constant_expression_p.
3186         (cp_parser_constant_expression): Adjust prototype.
3187         (cp_parser_resolve_typename_type): Remove.
3188         (cp_parser_non_constant_expression): New function.
3189         (cp_parser_non_constant_id_expression): Likewise.
3190         (cp_parser_new): Set allow_non_constant_expression_p and
3191         non_constant_expression_p.
3192         (cp_parser_primary_expression): Reject `this' and `va_arg' in
3193         constant-expressions.  Note that dependent names aren't really
3194         constant.
3195         (cp_parser_postfix_expression): Reject conversions to non-integral
3196         types in constant-expressions.  Neither are increments or
3197         decrements.
3198         (cp_parser_unary_expression): Reject increments and decrements in
3199         constant-expressions.
3200         (cp_parser_direct_new_declarator): Adjust call to
3201         cp_parser_constant_expression.
3202         (cp_parser_cast_expression): Reject conversions to non-integral
3203         types in constant-expressions.
3204         (cp_parser_assignment_expression): Rejects assignments in
3205         constant-expressions.
3206         (cp_parser_expression): Reject commas in constant-expressions.
3207         (cp_parser_labeled_statement): Adjust call to
3208         cp_parser_constant_expression.
3209         (cp_parser_direct_declarator): Simplify array bounds, even in
3210         templates, when they are non-dependent.  Use
3211         resolve_typename_type, not cp_parser_resolve_typename_type.
3212         (cp_parser_class_head): Use resolve_typename_type, not
3213         cp_parser_resolve_typename_type.
3214         (cp_parser_member_declaration): Adjust call to
3215         cp_parser_constant_expression.
3216         (cp_parser_constant_initializer): Likewise.
3217         (cp_parser_constructor_declarator): Use resolve_typename_type, not
3218         cp_parser_resolve_typename_type.
3219         (cp_parser_late_parsing_default_args): Adjust call to
3220         push_nested_class.
3221         * pt.c (tsubst): Give it internal linkage.
3222         (tsubst_expr): Likewise.
3223         (tsubst_copy): Likewise.
3224         (tsubst_copy_and_build): Likewise.
3225         (push_access_scope_real): Likewise.
3226         (tsubst_friend_class): Likewise.
3227         (instantiate_class_template): Adjust call to pushclass.
3228         (value_dependent_expression_p): Give it external linkage.
3229         Robustify.
3230         (resolve_typename_type): New function.
3231         * semantics.c (finish_call_expr): Use build_new_op, not
3232         build_opfncall.
3233         (begin_constructor_declarator): Remove.
3234         (begin_class_definition): Adjust call to pushclass.
3235         (enter_scope_of): Remove.
3236         * typeck.c (comptypes): Resolve typename types as appropriate.
3237         (build_x_indirect_ref): Use build_new_op, not build_opfncall.
3238         (build_x_compound_expr): Likewise.
3239         (build_modify_expr): Likewise.
3240         (build_x_modify_expr): Likewise.
3241         * typeck2.c (build_x_arrow): Likewise.
3242
3243 2003-01-29  Fariborz Jahanian  <fjahanian@apple.com>
3244
3245         * pt.c (last_pending_template) Declare GTY().
3246
3247 2003-01-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3248
3249         PR c++/8591
3250         * parser.c (cp_parser_elaborated_type_specifier): Convert
3251         TEMPLATE_DECL to TYPE_DECL only when processing template friends.
3252         (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
3253
3254 2003-01-28  Nathan Sidwell  <nathan@codesourcery.com>
3255
3256         PR c++/9437
3257         * pt.c (unify): Don't unify '*T' with 'U C::*'.
3258
3259         PR c++/3902
3260         * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
3261         inside a declarator.
3262
3263 2003-01-27  Nathan Sidwell  <nathan@codesourcery.com>
3264
3265         * class.c (update_vtable_entry_for_fn): Add index parameter.
3266         Generate vcall thunk for covariant overriding from a virtual
3267         primary base.
3268         (dfs_modify_vtables): Adjust.
3269
3270 2003-01-25  Nathan Sidwell  <nathan@codesourcery.com>
3271
3272         PR c++/9403
3273         * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
3274         template keyword.
3275         (cp_parser_base_specifier): Look for and consume a
3276         TEMPLATE keyword. Replace switch with array index.
3277
3278         PR c++/795
3279         * semantics.c (finish_non_static_data_member): Remember the
3280         field's type even in a template.
3281
3282         PR c++/9415
3283         * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
3284         already scoped.
3285
3286         PR c++/8545
3287         * parser.c (cp_parser_cast_expression): Be more tentative.
3288
3289 2003-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3290
3291         * cp-tree.h (flagged_type_tree_s): Remove.
3292         (check_for_new_type): Likewise.
3293         * typeck2.c (check_for_new_type): Likewise.
3294
3295 2003-01-23  Nathanael Nerode  <neroden@gcc.gnu.org>
3296
3297         * dump.c: ANSIfy function declarations and definitions.
3298
3299         * cp-tree.h, decl.h: Get rid of PARAMS.  Again.
3300
3301 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
3302
3303         PR c++/9354
3304         * init.c (build_new): Set the type of the new-expression, even
3305         when processing_templte_decl.
3306
3307         PR c++/9216
3308         * parser.c (cp_parser_primary_expression): Improve error message
3309         for templates used in an expression context.
3310
3311         PR c++/8696
3312         * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
3313         parse when encountering "typedef".
3314
3315 2003-01-22  Nathanael Nerode  <neroden@gcc.gnu.org>
3316
3317         * class.c, parser.c: ANSIfy function definitions and declarations.
3318
3319 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
3320
3321         PR c++/9328
3322         * error.c (dump_decl): For an OVERLOAD, just print the name of the
3323         function; it doesn't make sense to try to print its type.
3324         * semantics.c (finish_typeof): Issue errors about invalid uses.
3325
3326         PR c++/9298
3327         * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
3328         function.
3329         (cp_parser_expression_statement): Use it.
3330         (cp_parser_explicit_instantiation): Likewise.
3331         * pt.c (do_decl_instantiation): Improve error handling logic.
3332
3333 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
3334
3335         PR c++/9384
3336         * parser.c (cp_parser_using_declaration): Issue error messages
3337         about name resolution failures here.
3338
3339         PR c++/9388
3340         * class.c (currently_open_derived_class): Use dependent_type_p.
3341         * cp-tree.h (dependent_type_p): New function.
3342         (dependent_template_arg_p): Likewise.
3343         (dependent_template_p): Likewise.
3344         (type_dependent_expression_p): Likewise.
3345         * parser.c (cp_parser_dependent_type_p): Remove.
3346         (cp_parser_value_dependent_type_p): Likewise.
3347         (cp_parser_type_dependent_expression_p): Likewise.
3348         (cp_parser_dependent_template_arg_p): Likewise.
3349         (cp_parser_dependent_template_id_p): Likewise.
3350         (cp_parser_dependent_template_p): Likewise.
3351         (cp_parser_diagnose_invalid_type_name): Replace
3352         cp_parser_dependent_type_p with dependent_type_p, etc.
3353         (cp_parser_primary_expresion): Likewise.
3354         (cp_parser_nested_name_specifier_opt): Likewise.
3355         (cp_parser_postfix_expression): Likewise.
3356         (cp_parser_unary_expression): Likewise.
3357         (cp_parser_template_name): Likewise.
3358         (cp_parser_class_name): Likewise.
3359         (cp_parser_lookup_name): Likewise.
3360         * pt.c (dependent_type_p): New function.
3361         (value_dependent_expression_p): Likewise.
3362         (type_dependent_expression_p): Likewise.
3363         (dependent_template_arg_p): Likewise.
3364         (dependent_template_id_p): Likewise.
3365         (dependent_template_p): Likewise.
3366
3367         PR c++/9285
3368         PR c++/9294
3369         * parser.c (cp_parser_simple_declaration): Return quickly when
3370         encountering errors.
3371
3372 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3373
3374         Make-lang.in (cp/decl.o-warn): Add -Wno-error.
3375
3376 2003-01-17  Jason Merrill  <jason@redhat.com>
3377
3378         PR c++/9167, c++/9358
3379         * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
3380
3381 2003-01-17  Jason Merrill  <jason@redhat.com>
3382
3383         PR c++/9342
3384         * call.c (build_conditional_expr): Always do lvalue-rvalue
3385         conversion.
3386
3387 2003-01-17  Mark Mitchell  <mark@codesourcery.com>
3388
3389         PR c++/9294
3390         * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
3391         * cp-tree.h (BASELINK_BINFO): Adjust.
3392         (BASELINK_FUNCTIONS): Likewise.
3393         (BASELINK_ACCESS_BINFO): Likewise.
3394         (tree_baselink): New structure.
3395         (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
3396         (lang_tree_node): Add baselink.
3397         * decl.c (cp_tree_node_structure): Add BASELINK case.
3398         * search.c (build_baselink): Adjust.
3399         * tree.c (cp_walk_subtrees): Add BASELINK case.  Remove BASELINK_P
3400         test from TREE_LIST case.
3401
3402         PR c++/9272
3403         * parser.c (cp_parser_constructor_declarator_p): Do not assume
3404         that a constructor cannot be declared outside of its own class.
3405
3406         * parser.c (cp_parser_resolve_typename_type): If the scope cannot
3407         be resolved, neither can the qualified name.
3408
3409         * rtti.c (get_pseudo_ti_desc): Fix thinko.
3410
3411 2003-01-16  Jason Merrill  <jason@redhat.com>
3412
3413         PR c++/8564
3414         * init.c (build_vec_init): Re-add maxindex parm.
3415         (perform_member_init, build_aggr_init): Pass it.
3416         (build_new_1): Pass it. Use an incomplete array type for full_type.
3417         * typeck.c (build_modify_expr): Pass it.
3418         * cp-tree.h: Adjust.
3419
3420 2003-01-16  Jeffrey D. Oldham  <oldham@codesourcery.com>
3421
3422         * cp-tree.h (tsubst_copy_and_build): New declaration.
3423         * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
3424         (tsubst_expr): Use 'tsubst_copy_and_build'.  Update initial comment.
3425         (tsubst_copy_and_build): New function.
3426
3427 2003-01-16  Mark Mitchell  <mark@codesourcery.com>
3428
3429         * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
3430         (PARTIAL_INSTANTIATION_P): Remove.
3431         (IMPLICIT_TYPENAME_P): Likewise.
3432         (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
3433         (build_typename_type): Remove declaration.
3434         (parmlist_is_exprlist): Likewise.
3435         * decl.c (build_typename_type): Make it static, remove third
3436         parameter.
3437         (push_class_binding): Don't do implicit typename stuff.
3438         (make_typename_type): Likewise.
3439         (lookup_name_real): Likewise.
3440         (grokdeclarator): Don't try to convert declarations into
3441         initializations.  Don't do implicit typename stuff.
3442         (parmlist_is_exprlist): Remove.
3443         (xref_basetypes): Simplify.
3444         * decl2.c (grokfield): Don't try to convert declarations into
3445         initializations.
3446         (build_anon_union_vars): Do this while processing templates, too.
3447         (finish_anon_union): Likewise.
3448         * error.c (dump_type): Remove implicit typename handling.
3449         * parser.c (cp_parser_diagnose_invalid_type_name): New method.
3450         (cp_parser_primary_expression): Correct handling of names not
3451         found by unqualified name lookup in templates.
3452         (cp_parser_nested_name_specifier_opt): Avoid checking dependency
3453         of types when possible.
3454         (cp_parser_simple_declaration): Complain intelligently about some
3455         invalid declarations.
3456         (cp_parser_member_declaration): Likewise.
3457         (cp_parser_constructor_declarator_p): Don't check when we're in a
3458         function scope.
3459         * pt.c (instantiate_class_template): Remove
3460         PARTIAL_INSTANTIATION_P gunk.
3461         * search.c (lookup_field_r): Don't build implicit typenames.
3462         (marked_pushdecls_p): Don't enter dependent base types.
3463         (unmarked_pushdecls_p): Likewise.
3464         * semantics.c (begin_class_definition): Remove implicit typename
3465         stuff.
3466
3467 2003-01-16  Nathan Sidwell  <nathan@codesourcery.com>
3468
3469         PR c++/9212
3470         * parser.c (cp_parser_direct_declarator): If accepting either
3471         abstract or named, the name must be an unqualified-id.
3472
3473 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3474
3475         * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
3476
3477 2003-01-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3478
3479         * decl2.c (check_classfn): Fix uninitialized warning.
3480         (build_anon_union_vars): Likewise.
3481         * pt.c (tsubst_copy): Likewise.
3482
3483 2003-01-14  Jeffrey D. Oldham  <oldham@codesourcery.com>
3484
3485         Further conform g++'s __vmi_class_type_info to the C++ ABI
3486         specification.
3487         * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
3488         the specification.
3489         (class_hint_flags): Likewise.
3490
3491 2003-01-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3492
3493         * config-lang.in: Add semantics.c to gtfiles.
3494         * cp-tree.h (flagged_type_tree_s): Remove lookups field.
3495         (saved_scope): Likewise.
3496         (type_lookups): Remove.
3497         (deferred_access): New structure.
3498         (type_access_control): Remove.
3499         (save_type_access_control): Likewise.
3500         (reset_type_access_control): Likewise.
3501         (decl_type_access_control): Likewise.
3502         (push_deferring_access_checks): Declare.
3503         (resume_deferring_access_checks): Likewise.
3504         (stop_deferring_access_checks): Likewise.
3505         (pop_deferring_access_checks): Likewise.
3506         (get_deferred_access_checks): Likewise.
3507         (pop_to_parent_deferring_access_checks): Likewise.
3508         (perform_deferred_access_checks): Likewise.
3509         (perform_or_defer_access_check): Likewise.
3510         * decl.c (make_typename_type): Use perform_or_defer_access_check.
3511         (make_unbound_class_template): Likewise.
3512         (grokdeclarator): Don't call decl_type_access_control.
3513         * parser.c (cp_parser_context): Remove deferred_access_checks
3514         and deferring_access_checks_p fields.
3515         (cp_parser_context_new): Adjust.
3516         (cp_parser): Remove access_checks_lists.
3517         (cp_parser_defer_access_check): Remove.
3518         (cp_parser_start_deferring_access_checks): Remove.
3519         (cp_parser_stop_deferring_access_checks): Remove.
3520         (cp_parser_perform_deferred_access_checks): Remove.
3521         (cp_parser_nested_name_specifier_opt): Use new deferred access
3522         functions.
3523         (cp_parser_simple_declaration): Likewise.
3524         (cp_parser_template_id): Likewise.
3525         (cp_parser_function_definition): Likewise.
3526         (cp_parser_class_specifier): Likewise.
3527         (cp_parser_lookup_name): Likewise.
3528         (cp_parser_single_declaration): Likewise.
3529         (cp_parser_pre_parsed_nested_name_specifier): Likewise.
3530         (cp_parser_parse_tentatively): Likewise.
3531         (cp_parser_parse_definitely): Likewise.
3532         (yyparse): Likewise.
3533         (cp_parser_init_declarator): Remove access_checks parameter.
3534         Use new deferred access functions.
3535         (cp_parser_function_definition_from_specifiers_and_declarator):
3536         Likewise.
3537         (cp_parser_class_head): Remove deferring_access_checks_p and
3538         saved_access_checks parameters.  Use new deferred access functions.
3539         (cp_parser_member_specification_opt): Don't call
3540         reset_type_access_control.
3541         * search.c (type_access_control): Remove.
3542         * semantics.c: Include "gt-cp-semantics.h".
3543         (deferred_type_access_control): Remove.
3544         (deferred_access_stack): New variable.
3545         (deferred_access_free_list): Likewise.
3546         (push_deferring_access_checks): New function.
3547         (resume_deferring_access_checks): Likewise.
3548         (stop_deferring_access_checks): Likewise.
3549         (pop_deferring_access_checks): Likewise.
3550         (get_deferred_access_checks): Likewise.
3551         (pop_to_parent_deferring_access_checks): Likewise.
3552         (perform_deferred_access_checks): New function, adapted from
3553         cp_parser_perform_deferred_access_checks.
3554         (perform_or_defer_access_check): New function, adapted from
3555         cp_parser_defer_access_check.
3556         (current_type_lookups): Remove.
3557         (deferred_type_access_control): Likewise.
3558         (decl_type_access_control): Likewise.
3559         (save_type_access_control): Likewise.
3560         (reset_type_access_control): Likewise.
3561         (begin_function_definition): Adjust.
3562         (begin_class_definiton): Likewise.
3563
3564 2003-01-13  Jason Merrill  <jason@redhat.com>
3565
3566         PR c++/8748
3567         * class.c (build_base_path): Take the address before calling save_expr.
3568
3569         * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
3570         all the ambiguous conversions are bad.
3571
3572         * class.c (maybe_warn_about_overly_private_class): Don't stop
3573         searching when we find a nonprivate method.
3574
3575         * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
3576
3577 2003-01-12  Mark Mitchell  <mark@codesourcery.com>
3578
3579         * cp-tree.h (get_arglist_len_in_bytes): Remove.
3580
3581         PR c++/9264
3582         * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
3583         typeame types more robustly.
3584
3585 2003-01-11  Phil Edwards  <pme@gcc.gnu.org>
3586
3587         * parser.c:  Fix comment typos.
3588
3589 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
3590
3591         PR c++/9099
3592         * parser.c (cp_parser_scope_through_which_access_occurs): Handle
3593         an object_type which is not a class type.
3594
3595 2003-01-10  Geoffrey Keating  <geoffk@apple.com>
3596
3597         * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
3598         (cp_parser_late_parsing_default_args): Likewise.
3599
3600 2003-01-10  Nathanael Nerode  <neroden@gcc.gnu.org>
3601
3602         * cfns.gperf: ANSIfy function declarations.
3603         * cfns.h: Regenerate.
3604         * cp-tree.h: ANSIfy function declarations.
3605
3606 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
3607
3608         * cp-tree.h (reparse_absdcl_as_expr): Remove.
3609         (reparse_absdcl_as_casts): Likewise.
3610         (reparse_decl_as_expr): Likewise.
3611         (finish_decl_parsing): Likewise.
3612         * decl2.c (reparse_absdcl_as_expr): Remove.
3613         (reparse_absdcl_as_casts): Likewise.
3614         (repase_decl_as_expr): Likewise.
3615         (finish_decl_parsing): Likewise.
3616
3617         PR c++/9128
3618         PR c++/9153
3619         PR c++/9171
3620         * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
3621         function.
3622         (cp_parser_nested_name_specifier_opt): Correct the
3623         check_dependency_p false.
3624         (cp_parser_postfix_expression): Fix formatting.
3625         (cp_parser_decl_specifier_seq): Avoid looking for constructor
3626         declarators when possible.
3627         (cp_parser_template_id): Avoid performing name-lookup when
3628         possible.
3629         (cp_parser_class_head): Do not count specializations when counting
3630         levels of templates.
3631         (cp_parser_constructor_declarator_p): Return immediately if
3632         there's no chance that the tokens form a constructor declarator.
3633         * rtti.c (throw_bad_typeid): Add comment.  Do not return an
3634         expression with reference type.
3635         (get_tinfo_decl_dynamic): Do not return an expression with
3636         reference type.
3637         (build_typeid): Add comment.  Do not return an expression with
3638         reference type.
3639         * typeck.c (build_class_member_access_expr): Improve handling of
3640         conditionals and comma-expressions as objects.
3641
3642 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
3643
3644         * cfns.gperf: ANSIfy function declarations.
3645         * cfns.h: Regenerate.
3646         * cp-tree.h: ANSIfy function declarations.
3647         * parser.c: ANSIfy function declarations & definitions.
3648
3649         * decl.c (bad_specifiers): Fix parameter order error I introduced.
3650
3651 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
3652
3653         Merge from pch-branch:
3654
3655         2003-01-09  Geoffrey Keating  <geoffk@apple.com>
3656
3657         Merge to tag pch-merge-20030102:
3658
3659         * semantics.c (finish_translation_unit): Don't call finish_file.
3660         * parser.c: Don't include ggc.h.
3661         (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
3662         read first token here.  Don't allow PCH files after the first
3663         token is read.
3664         (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
3665         (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
3666         (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
3667         (cp_parser_late_parsing_for_member): Don't duplicate call to
3668         cp_lexer_set_source_position_from_token.
3669         (cp_parser_late_parsing_default_args): Likewise.
3670         (yyparse): Call finish_file after clearing the_parser.
3671
3672         2002-12-11  Geoffrey Keating  <geoffk@apple.com>
3673
3674         * Make-lang.in: Remove $(GGC_H) from all dependencies.
3675         (CXX_TREE_H): Add $(GGC_H).
3676         * class.c: Don't include ggc.h.
3677         (field_decl_cmp): Make parameters be 'const void *' to match qsort.
3678         (method_name_cmp): Likewise.
3679         (resort_data): New variable.
3680         (resort_field_decl_cmp): New.
3681         (resort_method_name_cmp): New.
3682         (resort_sorted_fields): New.
3683         (resort_type_method_vec): New.
3684         (finish_struct_methods): Delete cast.
3685         (finish_struct_1): Delete cast.
3686         * cp-tree.h: Include ggc.h.
3687         (struct lang_type_class): Add reorder attribute to field `methods'.
3688         (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
3689         (resort_sorted_fields): New prototype.
3690         (resort_type_method_vec): New prototype.
3691         * call.c: Don't include ggc.h.
3692         * decl.c: Likewise.
3693         * decl2.c: Likewise.
3694         * init.c: Likewise.
3695         * lex.c: Likewise.
3696         * method.c: Likewise.
3697         * optimize.c: Likewise.
3698         * parse.y: Likewise.
3699         * pt.c: Likewise.
3700         * repo.c: Likewise.
3701         * search.c: Likewise.
3702         * semantics.c: Likewise.
3703         * spew.c: Likewise.
3704         * tree.c: Likewise.
3705
3706         * lang-specs.h: Remove comment.
3707
3708         2002-12-03  Geoffrey Keating  <geoffk@apple.com>
3709
3710         * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
3711         (operator_name_info): Mark to be saved for PCH, specify size.
3712         (assignment_operator_name_info): Likewise.
3713
3714         2002-11-19  Geoffrey Keating  <geoffk@apple.com>
3715
3716         * decl.c (anon_cnt): Mark to be saved for PCH.
3717
3718         2002-10-25  Geoffrey Keating  <geoffk@apple.com>
3719
3720         * lex.c  (init_reswords): Delete now-untrue comment.
3721         Allocate ridpointers using GGC.
3722
3723         2002-10-04  Geoffrey Keating  <geoffk@apple.com>
3724
3725         * cp-tree.h (union lang_decl_u2): Add tags to all fields.
3726
3727         * g++spec.c (lang_specific_driver): Don't include standard
3728         libraries in `added'.
3729
3730         2002-08-27  Geoffrey Keating  <geoffk@redhat.com>
3731
3732         * decl2.c (finish_file): Call c_common_write_pch.
3733         * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
3734
3735         2002-08-17  Geoffrey Keating  <geoffk@redhat.com>
3736
3737         * g++spec.c (lang_specific_driver): Treat .h files as C++ header
3738         files when using g++.
3739         * lang-specs.h: Handle compiling C++ header files.
3740
3741 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
3742
3743         * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
3744
3745 2003-01-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3746
3747         * pt.c (push_access_scope_real): Call push_to_top_level for
3748         function in namespace scope.
3749         (pop_access_scope): Call pop_from_top_level for function in
3750         namespace scope.
3751
3752 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
3753
3754         * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
3755
3756 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
3757
3758         * Make-lang.in (c++.install-common, c++.install-man,
3759         c++.uninstall): Prepend $(DESTDIR) to destination paths in
3760         all (un)installation commands.
3761         (c++.install-common): Rewrite $(LN) commands to support
3762         DESTDIR with "ln" as well as with "ln -s".
3763
3764 2003-01-08  Jason Merrill  <jason@redhat.com>
3765
3766         * parser.c (cp_parser_primary_expression): See through explicitly
3767         scoped ALIAS_DECLs, too.
3768
3769 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
3770
3771         * decl.c: Remove some #if 0 code.
3772
3773         * decl.c: ANSIfy function declarations.
3774
3775 2003-01-07  Mark Mitchell  <mark@codesourcery.com>
3776
3777         * parser.c (cp_parser_asm_definition): Correct handling of omitted
3778         operands.
3779
3780 2003-01-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3781
3782         PR c++/9030
3783         * decl.c (make_typename_type): Check access only when tf_error.
3784         (make_unbound_class_template): Likewise.
3785         * pt.c (saved_access_scope): New variable.
3786         (push_access_scope_real): New function.
3787         (push_access_scope): Likewise.
3788         (pop_access_scope): Likewise.
3789         (tsubst_default_argument): Use them.
3790         (instantiate_template): Likewise.
3791         (regenerate_decl_from_template): Likewise.
3792         (instantiate_decl): Likewise.
3793         (get_mostly_instantiated_function_type): Likewise.
3794
3795 2003-01-07  Nathanael Nerode <neroden@gcc.gnu.org>
3796
3797         * tree.c: Delete bogus #if 0 code.
3798
3799 2003-01-07  Andreas Schwab  <schwab@suse.de>
3800
3801         * class.c (layout_class_type): Don't use
3802         PCC_BITFIELD_TYPE_MATTERS if not defined.
3803
3804 2003-01-06  Mark Mitchell  <mark@codesourcery.com>
3805
3806         PR c++/9165
3807         * decl2.c (build_cleanup): Mark the object as used.
3808
3809         * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
3810         (hash_local_specialization): New function.
3811         (register_local_specialization): Revert 2003-01-05 change.
3812         (instantiate_decl): Use hash_local_specialization when creating
3813         the local_specializations table.
3814
3815         * decl2.c (mark_used): Do not synthesize thunks.
3816
3817         * class.c (layout_class_type): Correct handling of unnamed
3818         bitfields wider than their types.
3819
3820         PR c++/9189
3821         * parser.c (cp_parser): Remove default_arg_types.  Update
3822         documentation for unparsed_functions_queues.
3823         (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
3824         parameter.
3825         (cp_parser_new): Don't set parser->default_arg_types.
3826         (cp_parser_function_definition): Adjust usage of
3827         unparsed_funtions_queues.
3828         (cp_parser_class_specifier): Don't mess with
3829         parser->default_arg_types.  Handle default argument processing in
3830         a separate phase from function body processing.
3831         (cp_parser_template_declaration_after_export): Adjust usage of
3832         unparsed_functions_queues.
3833         (cp_parser_late_parsing_for_member): Do not handle default
3834         arguments.
3835
3836 2003-01-06  Nathan Sidwell  <nathan@codesourcery.com>
3837
3838         PR c++/9109
3839         * parser.c (cp_parser_declarator_kind): New enum.
3840         (cp_parser_declarator): Adjust.
3841         (cp_parser_direct_declarator): Adjust. Allow for either named or
3842         abstract declarator. Prefer abstract, if possible. Allow
3843         parenthesized function name.
3844         (cp_parser_condition): Adjust cp_parser_declarator call.
3845         (cp_parser_explicit_instantiation): Likewise.
3846         (cp_parser_init_declarator): Likewise.
3847         (cp_parser_type_id): Likewise.
3848         (cp_parser_function_definition): Likewise.
3849         (cp_parser_member_declaration): Likewise.
3850         (cp_parser_parameter_declaration): Use cp_parser_declarator to do
3851         the tentative parsing.
3852         (cp_parser_exception_declaration): Likewise.
3853
3854 2003-01-05  Mark Mitchell  <mark@codesourcery.com>
3855
3856         * parser.c (cp_parser_template_parameter): Adjust call to
3857         cp_parser_parameter_declaration.
3858         (cp_parser_parameter_declaration_list): Likewise.
3859         (cp_parser_parameter_declaration): Replace
3860         greater_than_is_operator_p with template_parm_p parameter.  Do not
3861         cache tokens for template default arguments.
3862
3863         * pt.c (retrieve_local_specialization): Use htab_find, not
3864         htab_find_with_hash.
3865         (register_local_specialization): Use htab_find_slot, not
3866         htab_find_slot_with_hash.
3867         (instantiate_decl): Pass a hash function to htab_create.
3868
3869 2003-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3870
3871         * parser.c (cp_parser_binary_expression,
3872         cp_parser_multiplicative_expression,
3873         cp_parser_additive_expression, cp_parser_shift_expression,
3874         cp_parser_relational_expression, cp_parser_equality_expression,
3875         cp_parser_and_expression, cp_parser_exclusive_or_expression,
3876         cp_parser_inclusive_or_expression,
3877         cp_parser_logical_and_expression, cp_parser_logical_or_expression,
3878         cp_parser_binary_expression): Const-ify.
3879
3880 2003-01-04  Mark Mitchell  <mark@codesourcery.com>
3881
3882         * method.c (use_thunk): Disable access control while building the
3883         body of the thunk.
3884
3885 2003-01-03  Nathanael Nerode  <neroden@gcc.gnu.org>
3886
3887         * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
3888         front end.
3889
3890 2003-01-03  Matt Austern  <austern@apple.com>
3891
3892         * cp-tree.h (struct lang_type_class): add field for key method
3893         (cp_global_trees): rename dynamic_classes to keyed_classes
3894         (key_method): add definition
3895         * class.c (finish_struct_1): compute class's key method, and add
3896         the class to keyed_classes list if there is no key method.
3897         * decl.c (finish_function): add class to keyed_classes list if we
3898         see a definition of the class's key method.
3899         * pt.c (instantiate_class_template): add template specialization
3900         of a dynamic class to keyed_classes list.
3901         * decl2.c (key_method): remove
3902         (finish_file): iterate only through keyed_classes list when
3903         deciding whether to emit vtables, remove class from its list after
3904         we do the emission.
3905
3906 2003-01-02  Jason Merrill  <jason@redhat.com>
3907
3908         * call.c (build_conditional_expr): Stabilize lvalues properly.
3909         * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
3910         * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
3911         Don't allow CALL_EXPR or VA_ARG_EXPR, either.
3912
3913         * call.c (convert_like_real): Call decl_constant_value for an
3914         IDENTITY_CONV even if there are no more conversions.
3915
3916         * cvt.c (build_up_reference): Don't push unnamed temps.
3917
3918         * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
3919
3920         * dump.c (cp_dump_tree): Don't try to dump class-specific fields
3921         for a backend struct.
3922
3923         * except.c (wrap_cleanups_r, build_throw): Make
3924         MUST_NOT_THROW_EXPRs void.
3925         * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
3926
3927         * init.c (build_vec_delete_1): Pre-evaluate the base address.
3928
3929         * init.c (get_temp_regvar): Simplify logic.
3930
3931         * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
3932         our replacement is a decl.
3933
3934         * decl.c (cp_make_fname_decl): Push the decls inside the
3935         outermost scope.
3936
3937 2003-01-03  Nathan Sidwell  <nathan@codesourcery.com>
3938
3939         PR c++/45, c++/3784
3940         * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
3941         the same too.
3942
3943 2003-01-03  Graham Stott  <graham.stott@btinternet.com>
3944
3945         * parser.c (struct cp_parser): Add access_checks_lists field
3946         (cp_parser_simple_declaration): Use.
3947         (cp_parser_init_declarator): Likewise.
3948
3949 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
3950
3951         * parser.c (cp_parser_declaration): Accept the __extension__
3952         keyword before the declaration.
3953
3954         PR c++/2843
3955         * parser.c (cp_parser_parameter_declaration): Allow attributes to
3956         appear after the declarator.
3957
3958         * call.c (build_new_method_call): Fix typo in message format
3959         string.
3960
3961 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
3962
3963         * parser.c (cp_lexer_next_token_is): Declare it inline.
3964         (cp_lexer_set_source_position_from_token): Likewise.
3965         (cp_lexer_debugging_p): Likewise.
3966         (cp_parser_parsing_tentatively): Likewise.
3967         (cp_parser_nested_name_specifier_opt): Reduce the number of calls
3968         to the cp_lexer_peek_token.
3969
3970         * parser.c (cp_parser_sizeof_operand): Do not evaluate the
3971         expression.
3972
3973 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
3974
3975         * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
3976         cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
3977         cp/repo.c: Fix copyright years.
3978
3979 2003-01-01  Neil Booth  <neil@daikokuya.co.uk>
3980
3981         * lex.c: Remove superfluous include of cpplib.h.
3982         (CONSTRAINT): Define without conditions.
3983         (init_cp_pragma): Use c_register_pragma.
3984
3985 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
3986
3987         * .cvsignore: Remove.
3988
3989 2002-12-31  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3990
3991         * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
3992           except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
3993           lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
3994           pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
3995           typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
3996           copyright header.
3997         * lex.h: parse.y is dead, so don't mention it.  Also replace the
3998           copyright header with the default GNU copyright header.
3999
4000 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
4001
4002         * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
4003         (lookup_name_namespace_only): Likewise.
4004         (begin_only_namespace_names): Likewise.
4005         (end_only_namespace_names): Likewise.
4006         * decl.c (only_namespace_names): Remove.
4007         (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
4008         (lookup_name_real): Do not check only_namespace_names.
4009         (lookup_name_namespace_only): Remove.
4010         (begin_only_namespace_names): Likewise.
4011         (end_only_namespace_names): Likewise.
4012         * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
4013         nested-name-specifiers more gracefully.
4014         (cp_parser_class_or_namespace_name): Avoid looking up namespace
4015         names when they cannot possibly appear.
4016         (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
4017         (cp_parser_elaborated_type_specifier): Likewise.
4018         (cp_parser_namespace_name): Only look for namespace names.
4019         (cp_parser_lookup_name): Add is_namespace parameter.
4020         (cp_parser_lookup_name_simple): Adjust call to
4021         cp_parser_lookup_name.
4022
4023         * parser.c (cp_parser_dependent_type_p): Fix thinko.
4024
4025 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
4026
4027         * .cvsignore: Update.
4028
4029 2002-12-31  Nathan Sidwell  <nathan@codesourcery.com>
4030
4031         * class.c (modify_vtable_entry): Remove unused variable.
4032         (get_vcall_index): Always expect a non-thunk.
4033         (update_vtable_entry_for_fn): Combine covariant adjustments, when
4034         overriding a thunk. Pass get_vcall_index a non-thunk.
4035
4036         * decl2.c (finish_file): Mark undefined inlines as extern.
4037
4038 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
4039
4040         * cp-tree.def (RETURN_INIT): Remove.
4041         * cp-tree.h (DECL_IN_MEMORY_P): Remove.
4042         (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
4043         (note_level_for_for): Remove.
4044         (note_level_for_try): Likewise.
4045         (note_level_for_catch): Likewise.
4046         (finish_named_return_value): Likewise.
4047         (do_pushlevel): Change prototype.
4048         (pending_lang_change): Remove.
4049         * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
4050         sk_for.
4051         (note_level_for_for): Remove.
4052         (note_level_for_try): Likewise.
4053         (note_level_for_catch): Likewise.
4054         (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
4055         * parser.c (cp_parser_context_free_list): Make it "deletable".
4056         (cp_parser_template_argument): Remove misleading comment.
4057         * pt.c (tsubst_expr): Remove RETURN_INIT code.
4058         * semantics.c (genrtl_named_return_value): Remove.
4059         (do_pushlevel): Take a scope kind as an argument.
4060         (begin_if_stmt): Adjust.
4061         (begin_while_stmt): Likewise.
4062         (begin_for_stmt): Likewise.
4063         (finish_for_init_stmt): Likewise.
4064         (begin_switch_stmt): Likewise.
4065         (begin_handler): Likewise.
4066         (begin_compound_stmt): Likewise.
4067         (finish_named_return_value): Remove.
4068         (cp_expand_stmt): Remove RETURN_INIT case.
4069         * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
4070
4071 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
4072
4073         PR c++/9112
4074         * parser.c (cp_parser_direct_declarator): Handle erroneous
4075         parenthesized declarators correctly.
4076
4077 2002-12-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4078
4079         * cp-tree.h (pending_lang_change): Declare.
4080
4081 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
4082
4083         * parser.c (cp_parser_context_free_list): New variable.
4084         (cp_parser_context_new): Use it.
4085         (cp_parser_error): Check return code from
4086         cp_parser_simulate_error.
4087         (cp_parser_simulate_error): Return a value.
4088         (cp_parser_id_expression): Optimize common case.
4089         (cp_parser_class_name): Likewise.
4090         (cp_parser_class_specifier): Adjust call to
4091         cp_parser_late_parsing_default_args.
4092         (cp_parser_lookup_name): Optimize common case.
4093         (cp_parser_late_parsing_for_member): Adjust call to
4094         cp_parser_late_parsing_default_args.
4095         (cp_parser_late_parsing_default_args): Add scope parameter.
4096         (cp_parser_require): Avoid creating the error message unless it's
4097         needed.
4098         (cp_parser_parse_definitely): Place free'd contexts on the free
4099         list.
4100
4101         * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
4102
4103 2002-12-30  David Edelsohn  <edelsohn@gnu.org>
4104
4105         * parser.c (cp_parser_parameter_declaration_clause): Treat system
4106         header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
4107
4108 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
4109
4110         * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
4111         GCC, not GNU CC.
4112
4113 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
4114
4115         * parse.y: Remove.
4116         * spew.c: Likewise.
4117         * Make-lang.in (gt-cp-spew.h): Remove.
4118         * cp-tree.h (do_pending_lang_change): Remove.
4119         (do_identifier): Change prototype.
4120         (finish_id_expr): Remove.
4121         * decl.c (lookup_name_real): Remove yylex variable.
4122         * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
4123         * lex.c (init_cpp_parse): Remove.
4124         (reduce_cmp): Likewise.
4125         (token_cmp): Likewise.
4126         (yychar): Likewise.
4127         (lastiddecl): Likewise.
4128         (token_count): Likewise.
4129         (reduce_count): Likewise.
4130         (yyhook): Likewise.
4131         (print_parse_statistics): Likewise.
4132         (do_pending_lang_change): Likewise.
4133         (do_identifier): Remove parsing parameter.
4134         * lex.h (lastiddecl): Remove.
4135         (looking_for_typename): Remove.
4136         (looking_for_template): Likewise.
4137         (pending_lang_change): Likewise.
4138         (yylex): Likewise.
4139         * semantics.c (finish_id_expr): Remove.
4140
4141         * decl.c (grokdeclarator): Diagnost "extern thread" and "static
4142         thread" correctly.
4143
4144 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
4145
4146         * decl.c, decl2.c, decl.h:  GCC, not GNU CC.  This is the C++ front
4147         end, not the C front end.
4148
4149 2002-12-30  Nathan Sidwell  <nathan@codesourcery.com>
4150
4151         * cp-tree.h (THUNK_TARGET): New macro.
4152         (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
4153         (finish_thunk): Remove offset parms.
4154         * class.c (find_final_overrider): Look through thunks.
4155         (get_vcall_index): Use THUNK_TARGET.
4156         (update_vtable_entry_for_fn): Look through thunks. Set covariant
4157         fixed offset here. Adjust finish_thunk call.
4158         (build_vtbl_initializer): Adjust finish_thunk calls.
4159         * mangle.c (mangle_call_offset): Remove superfluous if.
4160         (mangle_thunk): Adjust.
4161         * method.c (make_thunk): Adjust.
4162         (finish_thunk): Adjust.
4163         (thunk_adjust): Remove assert.
4164         (use_thunk): Use THUNK_TARGET
4165         * dump1.c (cp_dump_tree): Adjust thunk dumping.
4166
4167         PR c++/9054
4168         * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
4169         * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
4170
4171 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4172
4173         Remove traditional C constructs 4/n.
4174         * decl2.c (grok_method_quals, warn_if_unknown_interface,
4175         grok_x_components, cp_build_parm_decl, build_artificial_parm,
4176         maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
4177         delete_sanity, check_member_template, check_java_method,
4178         check_classfn, finish_static_data_member_decl, grokfield,
4179         grokbitfield, grokoptypename, grok_function_init,
4180         cplus_decl_attributes, constructor_name, defer_fn,
4181         build_anon_union_vars, finish_anon_union, coerce_new_type,
4182         coerce_delete_type, comdat_linkage, maybe_make_one_only,
4183         key_method, import_export_vtable, import_export_class,
4184         output_vtable_inherit, import_export_decl, import_export_tinfo,
4185         build_cleanup, get_guard, get_guard_bits, get_guard_cond,
4186         set_guard, start_objects, finish_objects,
4187         start_static_storage_duration_function,
4188         finish_static_storage_duration_function, get_priority_info,
4189         start_static_initialization_or_destruction,
4190         finish_static_initialization_or_destruction,
4191         do_static_initialization, do_static_destruction,
4192         prune_vars_needing_no_initialization, write_out_vars,
4193         reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
4194         add_using_namespace, merge_functions, ambiguous_decl,
4195         lookup_using_namespace, lookup_using_namespace,
4196         qualified_lookup_using_namespace, set_decl_namespace,
4197         decl_namespace, current_decl_namespace, push_decl_namespace,
4198         pop_decl_namespace, push_scope, pop_scope, add_function,
4199         arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
4200         lookup_arg_dependent, do_namespace_alias,
4201         validate_nonmember_using_decl, do_nonmember_using_decl,
4202         do_toplevel_using_decl, do_local_using_decl,
4203         do_class_using_decl, do_using_directive, check_default_args,
4204         mark_used, handle_class_head): Use C90 prototypings.  Use booleans.
4205         * parser.c (cp_parser_class_head): Use booleanss.
4206         * decl.c (walk_globals, walk_vtables): Likewise.
4207         * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
4208         walk_globals): Change return type from 'int' to 'bool'.
4209         * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
4210         throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
4211         build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
4212         get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
4213         qualifier_flags, tinfo_base_init, generic_initializer,
4214         ptr_initializer, dfs_class_hint_mark, ptm_initializer,
4215         dfs_class_hint_unmark, class_hint_flags, class_initializer,
4216         typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
4217         get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
4218         unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
4219         * repo.c (repo_compile_flags, repo_template_declared,
4220         repo_template_defined, repo_class_defined, repo_get_id,
4221         repo_template_used, repo_vtable_used, repo_inline_used,
4222         repo_tinfo_used, repo_template_instantiated, extract_string,
4223         open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
4224         finish_repo): Likewise.
4225         * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
4226         cxx_print_xnode): Likewise..
4227         * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
4228         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
4229         * cxxfilt.c (demangle_it, print_demangler_list, usage,
4230         standard_symbol_characters, hp_symbol_characters, main, fatal):
4231         Likewise.
4232         (strip_underscore):  Change type from 'int' to 'bool'.
4233         (main): Use boolean constants.
4234
4235 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4236
4237         Remove traditional C constructs 3/n.
4238         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
4239         build_up_reference, warn_ref_binding, convert_to_reference,
4240         convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
4241         convert_to_void, convert, convert_force, build_type_conversion,
4242         build_expr_type_conversion, type_promotes_to,
4243         perform_qualification_conversions): Use C90 prototyping style.
4244         * decl2.c (grok_array_decl): Use boolean constant.
4245         (delete_sanity): Likewise.
4246         * typeck.c (build_unary_op): Likewise.
4247         * semantics.c (finish_switch_cond): Likewise.
4248         * parser.c (cp_parser_direct_new_declarator): Likewise.
4249         * init.c (build_new): Likewise.
4250
4251 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
4252
4253         * Make-lang.in (po-generated): Remove parse.c.
4254         (CXX_OBJS): Remove parse.o and spew.o.  Add parser.o.
4255         ($(srcdir)/cp/parse.h): Remove target.
4256         ($(srcdir)/cp/parse.c): Likewise.
4257         (gt-cp-parse.h): Likewise.
4258         (gt-cp-parser.h): New target.
4259         (c++.distclean): Do not remove parse.output.
4260         (c++.maintainer-clean): Do not remove parse.c or parse.h.
4261         (cp/spew.o): Remove target.
4262         (cp/lex.o): Adjust dependencies.
4263         (cp/pt.o): Likewise.
4264         (cp/parse.o): Likewise.
4265         (cp/TAGS): Do not mention parse.c.
4266         (cp/parser.o): New target.
4267         * NEWS: Mention the new parser.
4268         * call.c (build_scoped_method_call): Simplify.
4269         (build_method_call): Likewise.
4270         (build_new_function_call): Adjust calls to add_function_candidate
4271         and add_template_candidate.
4272         (build_new_op): Improve handling of erroroneous operands.
4273         (convert_default_arg): Remove circular argument processing.
4274         (name_as_c_string): New function.
4275         (build_new_method_call): Use it.
4276         (perform_implicit_conversion): Use error_operand_p.
4277         * class.c (finish_struct_anon): Use constructor_name_p.
4278         (check_field_decls): Likewise.
4279         (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
4280         (resolve_address_of_overloaded_function): Likewise.
4281         (instantiate_type): Tweak pointer-to-member handling.
4282         (get_primary_binfo): Remove incorrect assertion.
4283         * config-lang.in (gtfiles): Add parser.c, remove parse.c.
4284         * cp-tree.h (DEFARG_TOKENS): New macro.
4285         (default_arg): New structure.
4286         (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
4287         (lang_tree_node): Add default_arg.
4288         (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
4289         (type_info_ref_type): New macro.
4290         (saved_scope): Make processing_explicit_instantiation a boolean.
4291         (check_access): New field.
4292         (unparsed_text): Remove.
4293         (language_function): Remove unparsed_inlines.
4294         (error_operand_p): New macro.
4295         (lang_decl): Adjust pending_inline_info.
4296         (DEFARG_POINTER): Remove.
4297         (tag_types): Add typenames.
4298         (lookup_ualified_name): Declare.
4299         (lookup_name_real): Likewise.
4300         (shadow_tag): Adjust prototype.
4301         (get_scope_of_declarator): Declare it.
4302         (process_next_inline): Remove it.
4303         (check_for_missing_semicolon): Likewise.
4304         (maybe_get_template_decl_from_type_decl): Declare it.
4305         (finish_label_stmt): Adjust prototype.
4306         (finish_non_static_data_meber): Declare it.
4307         (finish_pseudo_destructor_call_expr): Rename to ...
4308         (finish_pseudo_destructor_expr): ... this.
4309         (finish_compound_literal): Declare it.
4310         (begin_inline_definitions): Remove it.
4311         (init_spew): Remove.
4312         (peekyylex): Likewise.
4313         (arbitrate_lookup): Likewise.
4314         (frob_opname): Likewise.
4315         (maybe_snarf_defarg): Likewise.
4316         (add_defarg_fn): Likewise.
4317         (do_pending_defargs): Likewise.
4318         (done_pending_defargs): Likewise.
4319         (unprocessed_defarg_fn): Likewise.
4320         (replace_defarg): Likewise.
4321         (end_input): Likewise.
4322         (get_overloaded_fn): Likewise.
4323         * cvt.c (convert_to_reference): Improve error handling.
4324         * decl.c (lookup_name_real): Do not declare it static.
4325         (maybe_push_to_top_level): Set check_access.
4326         (identifier_type_value): Adjust call to lookup_name_real.
4327         (lookup_qualified_name): New method.
4328         (lookup_name_real): Remove special-case parsing code.
4329         (lookup_name-nonclass): Adjust call to lookup_name_real.
4330         (lookup_name_namespace_only): Likewise.
4331         (lookup_name): Likewise.
4332         (check_tag_decl): Return the type declared.
4333         (shadow_tag): Likewise.
4334         (register_dtor_fn): Tweak check_access.
4335         (grokfndecl): Use constructor_name_p.
4336         (get_scope_of_declarator): New function.
4337         (grokdeclarator): Obscure tweaks for slightly different declarator
4338         representations.
4339         (start_method): Return error_mark_node to indicate failure.
4340         (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
4341         * decl2.c (constructor_name_full): Simplify.
4342         (constructor_name): Use it.
4343         (build_expr_from_tree): Adjust for changes to do new parser.
4344         (push_scope): Improve robustness.
4345         (validate_nonmember_using_decl): Process declarations, not names.
4346         (do_class_using_decl): Likewise.
4347         (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
4348         here.
4349         * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
4350         * expr.c (cxx_expand_expr): Handle BASELINKs.
4351         * init.c (member_init_ok_or_else): Issue more errors.
4352         (build_offset_ref): Tweak handling of FUNCTION_DECLs.
4353         * lex.c: Do not include parse.h.
4354         (yypring): Do not declare.
4355         (yylval): Likewise.
4356         (make_reference_declarator): Remove error-generating code.
4357         (rid_to_yy): Remove.
4358         (cxx_init): Do not call init_spew.
4359         (yypring): Remove.
4360         (check_for_missing_semicolon): Remove.
4361         * lex.h (got_scope): Remove.
4362         (got_object): Remove.
4363         * method.c (hack_identifier): Use finish_non_static_data_member.
4364         (implicitly_declare_fn): Adjust use of constructor_name.
4365         * parser.c: New file.
4366         * pt.c (parse.h): Do not include it.
4367         (maybe_get_template_decl_from_template): Do not declare it.
4368         (finish_member_template_decl): Tweak.
4369         (begin_explicit_instantiation): Adjust for
4370         processing_explicit_instantiation being boolean.
4371         (end_explicit_instantiation): Likewise.
4372         (maybe_process_partial_specialization): Tighten specialization
4373         test.
4374         (retrieve_local_specialization): Adjust ue of hash table.
4375         (eq_local_specializations): New function.
4376         (register_local_specialization): Likewise.
4377         (push_template_decl_real): Remove unnecessary test.
4378         (maybe_get_template_decl_from_type_decl): Don't make it static.
4379         (for_each_template_parm_r): Handle TYPEOF_TYPE.
4380         (tsubst_copy): Use retrieive_local_specialization to handle
4381         PARM_DECL.  Adjust handling of CONST_DECLs.  Handle BASELINKs.
4382         Handle COMPONENT_REFs with pseudo-destructor-expressions.
4383         Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
4384         (tsubst_expr): Pass decls, not names, to do_local_using_decl.
4385         (unify): Tweak handling of CONST_DECLs.
4386         (regenerate_decl_from_template): Use push_nested_class.
4387         (template_for_substitution): New funciton.
4388         (instantiate_decl): Use it.  Register parameters as local
4389         specializations.
4390         * rtti.c (init_rtti_processing): Set type_info_ref_type.
4391         (build_typeid): Use it.
4392         (get_typeid): Likeise.
4393         * search.c (accessible_p): Use check_access, not
4394         flag_access_control.
4395         (adjust_result_of_qualified_name_lookup): Pay attention to the
4396         context_class.
4397         * semantics.c (finish_asm_stmt): Adjust error handling.
4398         (finish_label_stmt): Return the statement.
4399         (finish_non_static_data_member): New function.
4400         (finish_class_expr): Handle BASELINKs.
4401         (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
4402         (finish_object_call_expr): Simplify handling during templates.
4403         (finish_pseudo_destructor_call_expr): Rename to ...
4404         (finish_pseudo_dtor_expr): ... this.
4405         (finish_compound_literal): New function.
4406         (begin_inline_definitions): Remove.
4407         (finish_sizeof): Remove special template handling.
4408         * spew.c: Do not include parse.h.
4409         * tree.c (get_overloaded_fn): Remove.
4410         * typeck.c (build_class_member_access_expr): Handle
4411         PSEUDO_DTOR_EXPR.  Adjust handling of static member functions.
4412         (lookup_destructor): New function.
4413         (finish_class_member_access_expr): Use it.
4414         (convert_arguments): Simplify.
4415         (build_unary_op): Handle BASELINKs.
4416
4417 2002-12-26  Nathan Sidwell  <nathan@codesourcery.com>
4418
4419         PR c++/4803
4420         * decl2.c (mark_used): Defer inline functions.
4421         (finish_file): Merge deferred_fns loops. Check all used
4422         inline functions have a definition.
4423         * method.c (make_thunk): Thunks are not inline.
4424
4425         PR c++/5116, c++/764
4426         * call.c (build_new_op): Make sure template class operands are
4427         instantiated.
4428
4429 2002-12-24  Nathan Sidwell  <nathan@codesourcery.com>
4430
4431         PR C++/7964
4432         * cp-tree.h (resolve_scoped_fn_name): Prototype.
4433         * call.c (resolve_scoped_fn_name): New function. Deal with
4434         more template expansion. Broken out of ...
4435         * parse.y (parse_finish_call_expr): ... here. Call it.
4436         * decl2.c (build_expr_from_tree, CALL_EXPR): Use
4437         resolve_scoped_fn_name and build_call_from_tree.
4438
4439         PR c++/9053
4440         * decl.c (duplicate_decls): Templates may be disambiguated by
4441         return type.
4442
4443         PR c++/8702
4444         * decl2.c (check_classfn): Use lookup_fnfield_1. List all
4445         conversion operators on failure.
4446
4447 2002-12-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4448
4449         Remove traditional C constructs 2/n.
4450         * call.c (tourney, build_field_call, equal_functions, joust,
4451         compare_ics, build_over_call, build_java_interface_fn_ref,
4452         convert_like_real, op_error, build_object_call, resolve_args,
4453         build_vfield_ref, check_dtor_name, build_scoped_method_call,
4454         build_addr_func, build_call, build_method_call, null_ptr_cst_p,
4455         sufficient_parms_p, build_conv, non_reference, strip_top_quals,
4456         standard_conversion, reference_related_p,
4457         reference_compatible_p, convert_class_to_reference,
4458         direct_reference_binding, reference_binding,
4459         ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
4460         add_template_conv_candidate, any_viable, any_strictly_viable,
4461         build_this, splice_viable, print_z_candidates,
4462         build_user_type_conversion, build_new_function_call,
4463         conditional_conversion, build_conditional_expr, build_new_op,
4464         build_op_delete_call, enforce_access, call_builtin_trap,
4465         convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
4466         convert_default_arg, type_passed_as, convert_for_arg_passing,
4467         in_charge_arg_for_name, is_properly_derived_from,
4468         maybe_handle_implicit_object, maybe_handle_ref_bind,
4469         source_type, add_warning, can_convert, can_convert_arg,
4470         perform_implicit_conversion, can_convert_arg_bad,
4471         initialize_reference, add_conv_candidate,
4472         add_template_candidate_real, add_template_candidate): Ansify.
4473
4474 2002-12-22  Nathan Sidwell  <nathan@codesourcery.com>
4475
4476         PR c++/8572
4477         * cp-tree.h (grokoptypename): Add SCOPE parameter.
4478         * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
4479         if in a template scope.
4480         * parse.y (unoperator): Return the scope.
4481         (operator_name): Adjust grokoptypename call.
4482
4483 2002-12-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4484
4485         * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
4486         * decl.c (make_unbound_class_template): Adjust.  Check for tf_error.
4487         * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
4488
4489 2002-12-20  Kazu Hirata  <kazu@cs.umass.edu>
4490
4491         * ChangeLog: Fix a typo.
4492         * class.c: Fix comment typos.
4493         * cp-tree.h: Likewise.
4494
4495 2002-12-18  Jason Merrill  <jason@redhat.com>
4496
4497         Handle anonymous unions at the tree level.
4498         C++ ABI change: Mangle anonymous unions using the name of their
4499         first named field (by depth-first search).  Should not cause
4500         binary compatibility problems, though, as the compiler previously
4501         didn't emit anything for affected unions.
4502         * cp-tree.def (ALIAS_DECL): New tree code.
4503         * decl2.c (build_anon_union_vars): Build ALIAS_DECLs.  Return the
4504         first field, not the largest.
4505         (finish_anon_union): Don't mess with RTL.  Do set DECL_ASSEMBLER_NAME,
4506         push the decl, and write it out at namespace scope.
4507         * decl.c (lookup_name_real): See through an ALIAS_DECL.
4508         (pushdecl): Add namespace bindings for ALIAS_DECLs.
4509         * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
4510         of a decl which doesn't have one.
4511         * typeck.c (build_class_member_access_expr): Don't recurse if
4512         we already have the type we want.
4513
4514 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4515
4516         PR c++/8099
4517         * friend.c (make_friend_class): Allow partial specialization
4518         when declaration is not a template friend.
4519
4520 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4521
4522         PR c++/3663
4523         * pt.c (lookup_template_class): Copy TREE_PRIVATE and
4524         TREE_PROTECTED to created decl nodes.
4525
4526 2002-12-18  Mark Mitchell  <mark@codesourcery.com>
4527
4528         * class.c (build_base_field): Do not set DECL_PACKED on the
4529         FIELD_DECL.
4530
4531 2002-12-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4532
4533         * cp-tree.h (struct tree_srcloc): Use location_t.
4534         (SOURCE_LOCUS): New.
4535         (SRCLOC_FILE, SRCLOC_LINE): Adjust.
4536
4537 2002-12-17  Jason Merrill  <jason@redhat.com>
4538
4539         * decl.c (finish_function): Also complain about no return in
4540         templates.
4541         * semantics.c (finish_return_stmt): Also call check_return_expr in
4542         templates.
4543         * typeck.c (check_return_expr): In a template, just remember that we
4544         saw a return.
4545
4546 2002-12-16  Jason Merrill  <jason@redhat.com>
4547
4548         * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
4549         of the CALL_EXPR.
4550
4551         * semantics.c (do_pushlevel): Call pushlevel after adding the
4552         SCOPE_STMT.
4553         (do_poplevel): Call poplevel before adding the SCOPE_STMT.
4554         * parse.y (function_body): Go back to using compstmt.
4555         * decl.c (pushdecl): Skip another level to get to the parms level.
4556
4557         * call.c (build_new_method_call): Use is_dummy_object to determine
4558         whether or not to evaluate the object parameter to a static member
4559         function.
4560
4561 2002-12-14  Jason Merrill  <jason@redhat.com>
4562
4563         * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
4564         return slot for normal functions.  Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
4565         * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
4566         don't bother with an AGGR_INIT_EXPR.
4567         (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
4568         just generate a new decl normally.  Take return slot parm.
4569         * cp-tree.h: Adjust prototype.
4570
4571 2002-12-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4572
4573         PR C++/8031
4574         * cvt.c (convert_to_pointer_force): Don't try comparing against
4575         erronous type.
4576
4577 2002-12-13  Geoffrey Keating  <geoffk@apple.com>
4578
4579         * cp-tree.h: Have the multiple-include guards around
4580         the entire file.
4581
4582 2002-12-10  David Edelsohn  <edelsohn@gnu.org>
4583
4584         * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
4585         for SPEW_DEBUG.
4586         (snarf_method): Same.
4587         (snarf_defarg): Same.
4588
4589 2002-12-10  Mark Mitchell  <mark@codesourcery.com>
4590
4591         PR c++/8372
4592         * pt.c (tsubst_copy): Handle destructor names more correctly.
4593
4594 2002-12-10  Matt Austern   <austern@apple.com>
4595
4596         * cp-tree.h: get rid of needs_virtual_reinit bit.
4597
4598 2002-12-09  Mark Mitchell  <mark@codesourcery.com>
4599
4600         * NEWS: Document removal of in-class initialization extension for
4601         static data members of non-arithmetic, non-enumeration type.
4602         * decl.c (check_static_variable_definition): Do not allow that
4603         extension.
4604         * decl2.c (grokfield): Do not call digest_init when processing
4605         templates.
4606
4607 2002-12-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4608
4609         * error.c (dump_expr): Fix format specifier warning.
4610
4611 2002-12-04  Geoffrey Keating  <geoffk@apple.com>
4612
4613         * class.c (finish_struct_1): Correct comment.
4614         * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
4615
4616 2002-12-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4617
4618         PR C++/8799
4619         * error.c (dump_expr): Don't ever try to dump a non-existent
4620         expression.
4621
4622 2002-12-03  Nathan Sidwell  <nathan@codesourcery.com>
4623
4624         Implement covariant returns.
4625         * cp-tree.h (IS_AGGR_TYPE_2): Remove.
4626         (struct lang_decl_flags): Add this_thunk_p flag.
4627         Rename vcall_offset to virtual_offset.
4628         (struct lang_decl): Rename delta to fixed_offset.
4629         (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
4630         (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
4631         (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
4632         (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
4633         (make_thunk): Add this_adjusting arg.
4634         (finish_thunk): Declare.
4635         (mangle_thunk): Add this_adjusting arg.
4636         * class.c (get_vcall_index): Use base function for lookup.
4637         (update_vtable_entry_for_fn): Generate covariant thunk.
4638         (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
4639         (build_vtbl_initializer): Use base function for lookup.
4640         Finish covariant thunk here. Adjust thunk generation.
4641         * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
4642         Adjust thunk dumping.
4643         * mangle.c (mangle_call_offset): New function.
4644         (mangle_thunk): Adjust for covariant thunks.
4645         * method.c (make_thunk): Adjust. Do not set name here.
4646         (finish_thunk): New function. Set name here.
4647         (use_thunk): Generate covariant thunks too.
4648         (thunk_adjust): New function.
4649         * search.c (covariant_return_p): Remove. Fold into ...
4650         (check_final_overrider): ... here. Simplify.
4651         * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
4652
4653 2002-12-03  Jason Merrill  <jason@redhat.com>
4654
4655         PR c++/8674
4656         * call.c (build_over_call): Check specifically for TARGET_EXPR
4657         when eliding.
4658
4659         PR c++/8461, c++/8625
4660         * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
4661         (cp_convert_parm_for_inlining): Remove.
4662         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
4663         Remove.
4664         * cp-tree.h (ADDR_IS_INVISIREF): Remove.
4665         * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
4666
4667         * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
4668         an ambiguous conversion.
4669
4670 2002-12-03  Mark Mitchell  <mark@codesourcery.com>
4671
4672         PR c++/8688
4673         * decl.c (reshape_init): Handle erroneous initializers.
4674
4675 2002-12-02  Mark Mitchell  <mark@codesourcery.com>
4676
4677         PR c++/8720
4678         * spew.c (remove_last_token): Make sure that last_chunk is set
4679         correctly.
4680
4681         PR c++/8615
4682         * error.c (dump_expr): Handle character constants with
4683         TREE_OVERFLOW set.
4684
4685 2002-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4686
4687         DR 180
4688         * decl.c (grokdeclarator): Require class-key for all friend class.
4689         Output the correct type and context in the error message.
4690
4691 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
4692
4693         PR c++/5919
4694         * pt.c (unify): Use variably_modified_type_p to test validity of
4695         template argument types.
4696
4697         PR c++/8727
4698         * cp-tree.h (lang_type_class): Add typeinfo_var.
4699         (CLASSTYPE_TYPEINFO_VAR): New macro.
4700         * rtti.c (get_tinfo_decl): Use it.
4701
4702         PR c++/8663
4703         * init.c (expand_member_init): Always get the main variant of a
4704         base class.
4705
4706 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
4707
4708         PR c++/8332
4709         PR c++/8493
4710         * decl.c (cxx_init_decl_processing): Use size_type_node, not
4711         c_size_type_node.
4712         * decl2.c (coerce_new_type): Likewise.
4713         * except.c (do_allocate_exception): Likewise.
4714
4715 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
4716
4717         * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
4718         dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
4719         lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
4720         repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
4721         typeck2.c: Include coretypes.h and tm.h.
4722         * Make-lang.in: Update dependencies.
4723
4724 2002-11-30  Mark Mitchell  <mark@codesourcery.com>
4725
4726         PR c++/8227
4727         * decl.c (layout_var_decl): Deal gracefully with erroneous types.
4728         (check_initializer): Validate the type of the initialized
4729         variable, even if the initializer is absent.
4730         * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
4731
4732         PR c++/8214
4733         * typeck.c (convert_for_assignment): Do not use
4734         decl_constant_value on the operand.
4735
4736         PR c++/8511
4737         * pt.c (instantiate_decl): Handle template friends defined outside
4738         of the class correctly.
4739
4740 2002-11-29  Joe Buck <jbuck@synopsys.com>
4741
4742         * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
4743         anonymous structs.
4744
4745 2002-11-29  Mark Mitchell  <mark@codesourcery.com>
4746
4747         * class.c (walk_subobject_offsets): Recur on binfos as well as on
4748         types.
4749         (layout_nonempty_base_or_field): Pass it a binfo when processing a
4750         base class.
4751         (layout_empty_base): Likewise.
4752         (build_base_field): Likewise.
4753
4754 2002-11-27  Mark Mitchell  <mark@codesourcery.com>
4755
4756         * class.c (build_base_field): Make sure we get the canonical base
4757         when descending through primary bases.
4758
4759 2002-11-26  Geoffrey Keating  <geoffk@apple.com>
4760
4761         * decl.c (check_initializer): Don't error on initialisation of
4762         a scalar with a brace-enclosed expression.
4763
4764 2002-11-26  Nathan Sidwell  <nathan@codesourcery.com>
4765
4766         * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
4767         (template_parms_equal): Remove prototype.
4768         * typeck.c (buuld_indirect_ref): Reformat.
4769
4770 2002-11-25  Jason Merrill  <jason@redhat.com>
4771
4772         * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
4773         and a DO_STMT.
4774
4775 2002-11-25  Mark Mitchell  <mark@codesourcery.com>
4776
4777         * tree.c (cp_build_qualified_type_real): Correct handling of
4778         array types.
4779         * class.c (walk_subobject_offsets): Fix thinko.
4780         (build_base_field): Record offsets of empty bases in primary
4781         virtual bases.
4782         (layout_class_type): Record offsets of empty bases in fields.
4783
4784         * search.c (is_subobject_of_p_1): Fix thinko.
4785         (lookup_field_queue_p): Likewise.
4786
4787 2002-11-24  Mark Mitchell  <mark@codesourcery.com>
4788
4789         * class.c (layout_class_type): Reuse tail padding when laying out
4790         virtual bases.
4791
4792 2002-11-22  Mark Mitchell  <mark@codesourcery.com>
4793
4794         * rtti.c (qualifier_flags): Fix thinko.
4795
4796 2002-11-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4797
4798         Remove traditional C constructs 1/n.
4799         * cp-tree.h (init_method, set_mangled_name_for_decl,
4800         build_opfncall, hack_identifier, make_thunk, use_thunk,
4801         synthesize_method, implicitly_declare_fn,
4802         skip_artificial_parms_for, optimize_function, calls_setjmp_p,
4803         maybe_clone_body): Remove use of PARAMS.
4804
4805         * method.c (do_build_assign_ref, do_build_copy_constructor,
4806         synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
4807         Likewise.
4808         (synthesize_method): Use 'bool' type and constants instead of
4809         'int'.
4810         (locate_copy): Likewise.
4811         (implicitly_declare_fn): Likewise.
4812
4813         * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
4814         Remove old-style declaration.
4815         (maybe_clone_body): Use 'bool' type and constants.
4816
4817 2002-11-21  Glen Nakamura  <glen@imodulo.com>
4818
4819         PR c++/8342
4820         * typeck.c (get_member_function_from_ptrfunc): Make sure that a
4821         SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
4822         of the branches of a COND_EXPR.
4823
4824 2002-11-19  Mark Mitchell  <mark@codesourcery.com>
4825
4826         * pt.c (for_each_template_parm): Free allocated memory.
4827         * search.c (is_subobject_of_p_1): New function.
4828         (is_subobject_of_p): Avoid walking virtual bases multiple times.
4829
4830 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
4831
4832         * g++spec.c (lang_specific_spec_functions): New.
4833
4834 2002-11-15  Kazu Hirata  <kazu@cs.umass.edu>
4835
4836         * ChangeLog: Follow spelling conventions.
4837         * class.c: Likewise.
4838         * decl2.c: Likewise.
4839
4840 2002-11-14  Zack Weinberg  <zack@codesourcery.com>
4841
4842         * search.c (dfs_push_decls): Do not try to reorder elements
4843         3..n of method_vec if method_vec has only two elements.
4844         Reverse order of two tests to avoid accessing unallocated
4845         memory.
4846
4847 2002-11-14  Mark Mitchell  <mark@codesourcery.com>
4848
4849         * class.c (dfs_find_final_overrider): Adjust so that the most
4850         derived object is a binfo, rather than a class type.
4851         (find_final_overrider): Likewise.
4852         (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
4853         (add_vcall_offset): Likewise.
4854
4855 2002-11-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4856
4857         PR c++/8389
4858         * pt.c (instantiate_template): Push class scope for member
4859         functions.
4860         (get_mostly_instantiated_function_type): Likewise.  Don't call
4861         tsubst on context.  Remove CONTEXTP and TPARMSP parameters.
4862         * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
4863         * mangle.c (write_encoding, write_unqualified_name): Adjust.
4864
4865 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
4866
4867         * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
4868         vcall offfsets.  Split out ...
4869         (add_vcall_offset): ... new function.
4870
4871         PR c++/8338
4872         * pt.c (for_each_template_parm): Add htab parameter.
4873         (process_partial_specialization): Adjust call.
4874         (push_template_decl_real): Likewise.
4875         (pair_fn_data): Add visited.
4876         (for_each_template_parm_r): Avoid walking duplicates more than
4877         once.
4878         (uses_template_parms): Adjust call to for_each_template_parm.
4879
4880 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
4881
4882         * class.c (add_implicitly_declared_members): Put implicitly
4883         declared functions at the end of TYPE_METHODs when -fabi-version
4884         is at least 2.
4885
4886 2002-11-05  Geoffrey Keating  <geoffk@apple.com>
4887
4888         * decl2.c (finish_file): Correct spelling.
4889
4890 2002-11-03  Mark Mitchell  <mark@codesourcery.com>
4891
4892         * call.c (build_special_member_call): Do not try to lookup VTTs by
4893         name.
4894         * class.c (vtbl_init_data): Add generate_vcall_entries.
4895         (get_vtable_decl): Do not look up virtual tables by name.
4896         (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
4897         (set_primary_base): Do not set CLASSTYPE_RTTI.
4898         (determine_primary_base): Likewise.
4899         (get_matching_virtual): Remove.
4900         (get_vcall_index): New function.
4901         (update_vtable_entry_for_fn): Do not try to use virtual thunks
4902         when they are not required.  Assign vcall indices at this point.
4903         (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
4904         Do update dynamic_classes.
4905         (build_vtt): Do not add VTTs to the symbol table.
4906         (build_ctor_vtbl_group): Likewise.
4907         (build_vtbl_initializer): Simplify handling of vcall indices.
4908         (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
4909         for the most derived class.
4910         (add_vcall_offset_vtbl_entries_1): But do not actually add them to
4911         the vtable.
4912         * cp-tree.h (dynamic_classes): New macro.
4913         (lang_type_class): Remove rtti.  Add vtables.  Add vcall_indices.
4914         (CLASSTYPE_RTTI): Remove.
4915         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
4916         (CLASSTYPE_VCALL_INDICES): New macro.
4917         (CLASSTYPE_VTABLES): Likewise.
4918         (BV_USE_VCALL_INDEX_P): Remove.
4919         (build_vtable_path): Remove.
4920         * decl2.c (finish_vtable_vardecl): Remove.
4921         (key_method): Remove #if 0'd code.
4922         (finish_vtable_vardecl): Rename to ...
4923         (maybe_emit_vtables): ... this.
4924         (finish_file): Use it.
4925         * search.c (look_for_overrides_here): Update comment.
4926
4927 2002-11-01  Zack Weinberg  <zack@codesourcery.com>
4928
4929         PR c/7353 redux
4930         * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
4931
4932 2002-10-30  Jason Merrill  <jason@redhat.com>
4933
4934         PR c++/8186
4935         * cp-tree.h (ADDR_IS_INVISIREF): New macro.
4936         * call.c (convert_for_arg_passing): Set it.
4937         * except.c (stabilize_throw_expr): Recurse for such an arg.
4938
4939 2002-10-31  Mark Mitchell  <mark@codesourcery.com>
4940
4941         * cp-tree.h (lang_decl_flags): Remove init_priority.
4942         (lang_decl): Add delta.
4943         (GLOBAL_INIT_PRIORITY): Remove.
4944         (THUNK_DELTA): Revise definition.
4945         * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
4946         * dump.c (cp_dump_tree): Don't dump it.
4947
4948 2002-10-30  Mark Mitchell  <mark@codesourcery.com>
4949
4950         PR c++/8160
4951         * typeck2.c (process_init_constructor): Call complete_array_type.
4952
4953         PR c++/8149
4954         * decl.c (make_typename_type): Issue errors about invalid results.
4955
4956 2002-10-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4957
4958         Core issue 287, PR c++/7639
4959         * cp-tree.h (lang_type_class): Add decl_list field.
4960         (CLASSTYPE_DECL_LIST): New macro.
4961         (maybe_add_class_template_decl_list): Add declaration.
4962         * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
4963         (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
4964         (maybe_add_class_template_decl_list): New function.
4965         (add_implicitly_declared_members): Use it.
4966         * decl.c (maybe_process_template_type_declaration): Likewise.
4967         (pushtag): Likewise.
4968         * friend.c (add_friend): Likewise.
4969         (make_friend_class): Likewise.
4970         * semantics.c (finish_member_declaration): Likewise.
4971         (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
4972         * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
4973         to process members and friends in the order of declaration.
4974
4975 2002-10-29  Mark Mitchell  <mark@codesourcery.com>
4976
4977         PR c++/8287
4978         * decl.c (finish_destructor_body): Create the label to jump to
4979         when returning from a destructor here.
4980         (finish_function_body): Rather than here.
4981
4982 2002-10-25  Zack Weinberg  <zack@codesourcery.com>
4983
4984         PR c++/7266
4985         * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
4986         SCOPE_REF is not null before dereferencing it.
4987
4988 2002-10-25  Mark Mitchell  <mark@codesourcery.com>
4989
4990         * call.c (build_over_call): Use DECL_CONTEXT, not
4991         DECL_VIRTUAL_CONTEXT.
4992         * class.c (modify_vtable_entry): Don't mess with
4993         DECL_VIRTUAL_CONTEXT.
4994         (set_vindex): Remove.
4995         (set_primary_base): Remove vfuns_p parameter.
4996         (determine_primary_base): Likewise.
4997         (modify_all_vtables): Likewise.
4998         (layout_class_type): Likewise.  Adjust calls to other functions
4999         accordingly.
5000         (finish_struct_1): Adjust calls to modified functions.  Set
5001         DECL_VINDEX here.
5002         * cp-tree.h (lang_type_class): Remove vsize.
5003         (CLASSTYPE_VSIZE): Remove.
5004         (lang_decl): Remove thunks.
5005         (DECL_THUNKS): Adjust.
5006         (DECL_VIRTUAL_CONTEXT): Remove.
5007         (duplicate_decls): Don't copy it.
5008         * pt.c (build_template_decl): Don't set it.
5009         (tsubst_decl): Likewise.
5010         * typeck.c (expand_ptrmemfunc_cst): Don't use it.
5011
5012         * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
5013         (build_vtable_entry): Remove.
5014         * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
5015         (lang_decl): Add thunks.
5016         (DECL_THUNKS): New macro.
5017         * decl.c (duplicate_decls): Copy it.
5018         * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
5019         * semantics.c (emit_associated_thunks): Simplify.
5020
5021 2002-10-24  David Edelsohn  <edelsohn@gnu.org>
5022
5023         PR c++/7228
5024         * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
5025         lang_type structure exists before accessing field.
5026         (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
5027         (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
5028         (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
5029         * class.c (check_field_decls): Use new macros.
5030         * typeck2.c (process_init_constructor): Remove redundant check for
5031         existence of lang_type structure.
5032
5033 2002-10-24  Mark Mitchell  <mark@codesourcery.com>
5034
5035         * class.c (end_of_base): New method.
5036         (end_of_class): Use it.  Check indirect virtual bases.
5037
5038         * class.c (check_field_decls): Fix typo.
5039
5040 2002-10-23  Mark Mitchell  <mark@codesourcery.com>
5041
5042         PR c++/8067
5043         * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
5044         related variables.
5045
5046         PR c++/7679
5047         * spew.c (next_token): Do not return an endless stream of
5048         END_OF_SAVED_INPUT tokens.
5049         (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
5050         the cached token stream.
5051         (snarf_defarg): Likewise.
5052
5053 2002-10-23  Zack Weinberg  <zack@codesourcery.com>
5054
5055         * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
5056         variably_modified_type_p.
5057         * cp-tree.h: Remove prototype of variably_modified_type_p.
5058         * tree.c (variably_modified_type_p): Remove; now implemented
5059         in language-independent code.
5060
5061 2002-10-22  Mark Mitchell  <mark@codesourcery.com>
5062
5063         PR c++/6579
5064         * spew.c (snarf_parenthesized_expression): New function.
5065         (snarf_block): Use it.
5066
5067 2002-10-22  Richard Henderson  <rth@redhat.com>
5068
5069         * method.c (use_thunk): Always compute vcall_value; assert that
5070         it is not zero.  Use can_output_mi_thunk; use output_mi_thunk
5071         for vcall thunks as well.
5072
5073 2002-10-21  Mark Mitchell  <mark@codesourcery.com>
5074
5075         * class.c (empty_base_at_nonzero_offset_p): New function.
5076         (layout_nonempty_base_or_field): Do not check for conflicts when
5077         laying out a virtual base using the GCC 3.2 ABI.
5078         (build_base_field): Correct checking for presence of empty classes
5079         at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
5080
5081         * class.c (include_empty_classes): Use normalize_rli.
5082         (layout_class_type): Likewise.
5083
5084         * decl.c (reshape_init): Tweak handling of character arrays.
5085
5086         PR c++/8218
5087         * cp-tree.h (lang_type_class): Add contains_empty_class_p.
5088         (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
5089         * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
5090         (check_field_decls): Likewise.
5091         (layout_class_type): Likewise.
5092         (finish_struct_1): Initialize it.
5093         (walk_subobject_offsets): Use it to prune searches.
5094
5095 2002-10-20  Mark Mitchell  <mark@codesourcery.com>
5096
5097         * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
5098         * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
5099         TARGET_ASM_OUTPUT_MI_THUNK in comments.
5100
5101 2002-10-18  Zack Weinberg  <zack@codesourcery.com>
5102
5103         * decl.c (start_decl): Point users of the old initialized-
5104         typedef extension at __typeof__.
5105
5106 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
5107
5108         * Make-lang.in (method.o): Depend on TARGET_H.
5109         * method.c (target.h): Include it.
5110         (use_thunk): Use target hooks.  Use vcall thunks, if available.
5111
5112 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
5113
5114         * class.c (base_derived_from): Make sure return value is a bool.
5115
5116 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
5117
5118         * class.c (find_final_overrider_data_s): Remove overriding_fn and
5119         overriding_base.
5120         (dfs_base_derived_from): New function.
5121         (base_derived_from): Likewise.
5122         (dfs_find_final_overrider): Use base_derived_from.
5123         (find_final_overrider): Adjust.
5124
5125 2002-10-18  Jason Merrill  <jason@redhat.com>
5126
5127         PR c++/8080
5128         * semantics.c (finish_for_cond, finish_while_cond): Don't mess
5129         with condition decls in a template.
5130
5131 2002-10-17  Nathan Sidwell  <nathan@codesourcery.com>
5132
5133         * class.c (add_method): Compare template parms too.
5134
5135 2002-10-17  Mark Mitchell  <mark@codesourcery.com>
5136
5137         PR c++/7584
5138         * class.c (handle_using_decl): Allow the declaration used to be
5139         from an ambiguous base.
5140
5141         * pt.c (convert_template_argument): Revert this change:
5142                 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
5143                 * pt.c (convert_template_argument): Do not fold non-type
5144                 template rguments when inside a template.
5145
5146         * init.c (expand_default_init): Handle brace-enclosed initializers
5147         correctly.
5148
5149 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
5150
5151         * mangle.c (write_expression): Correct handling of enumeration
5152         constants.
5153         (write_template_arg): Likewise.
5154         * pt.c (convert_template_argument): Do not fold non-type template
5155         arguments when inside a template.
5156
5157         PR c++/7478
5158         * cvt.c (convert_to_reference): Allow references as the incoming
5159         type.
5160
5161 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
5162
5163         PR c++/7524
5164         * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
5165         build_qualified_type.
5166
5167 2002-10-15  Richard Henderson  <rth@redhat.com>
5168
5169         * error.c (dump_expr): Use real_to_decimal directly, and with
5170         the new arguments.
5171
5172 2002-10-15  Mark Mitchell  <mark@codesourcery.com>
5173
5174         * decl.c (reshape_init): Fix typo.
5175
5176         * cp-tree.h (operator_name_info_t): Add arity.
5177         * lex.c (init_operators): Initialize it.
5178         * mangle.c (write_conversion_operator_name): New function.
5179         (write_unqualified_name): Use it.
5180         (write_template_args): Accept template arguments as a TREE_LIST.
5181         (write_expression): Adjust handling of qualified names to match
5182         specification.
5183
5184 2002-10-15  Jason Merrill  <jason@redhat.com>
5185
5186         * call.c (call_builtin_trap): New fn.
5187         (convert_arg_to_ellipsis): Use it.  Downgrade error to warning.
5188         (build_call): Don't set current_function_returns_abnormally outside
5189         a function.
5190
5191 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
5192
5193         * class.c (check_field_decls): Remove empty_p parameter.  Instead,
5194         clear CLASSTYPE_EMPTY_P.
5195         (build_base_field): Likewise.
5196         (build_base_fields): Likewise.
5197         (check_bases_and_members): Likewise.
5198         (create_vtbl_ptr): Likewise.
5199         (layout_class_type): Likewise.  Ensure that empty classes have
5200         size zero when used as base classes in the 3.2 ABI.
5201         (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
5202         CLASSTYPE_NEARLY_EMPTY_P.  Adjust calls to avoid passing empty_p
5203         parameter.
5204         (is_empty_class): Correct definition when using post-3.2 ABI.
5205         * cp-tree.h (lang_type_class): Add empty_p.
5206         (CLASSTYPE_EMPTY_P): New macro.
5207
5208 2002-10-12  Nathan Sidwell  <nathan@codesourcery.com>
5209
5210         * init.c (build_delete): Do not apply save_expr for arrays.
5211         (build_vec_delete): Likewise.
5212
5213 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
5214
5215         * decl.c (layout_var_decl): Call layout_decl even for variables
5216         whose type is an array with unspecified bounds.
5217
5218         PR c++/7176
5219         * lex.c (do_identifier): Add another option for the parsing
5220         parameter.
5221         * parse.y (do_id): Use it.
5222
5223 2002-10-11  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5224
5225         PRs C++/6803, C++/7721 and C++/7803
5226         * decl.c (grokdeclarator): Gracefully handle template-name as
5227         decl-specifier.
5228
5229 2002-10-11  Jason Molenda  <jmolenda@apple.com>
5230
5231         * init.c (build_field_list): Provide uses_unions_p with a default
5232         value.
5233
5234 2002-10-11  Mark Mitchell  <mark@codesourcery.com>
5235
5236         PR c++/5661
5237         * cp-tree.h (variably_modified_type_p): New function.
5238         (grokdeclarator) Tighten check for variably modified types as
5239         fields.
5240         * pt.c (convert_template_argument): Do not allow variably modified
5241         types as template arguments.
5242         * tree.c (variably_modified_type_p): New function.
5243
5244         * NEWS: Document removal of "new X = ..." extension.
5245         * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
5246         brace-enclosed initializers.
5247         * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
5248         (initialize_local_var): Remove declaration.
5249         (expand_static_init): Likewise.
5250         * decl.c (next_initializable_field): New function.
5251         (reshape_init): Likewise.
5252         (check_initializer): Use them.  Build dynamic initializer for
5253         aggregates here too.
5254         (initialize_local_var): Simplify, and incorporate cleanup
5255         insertion code as well.
5256         (destroy_local_var): Remove.
5257         (cp_finish_decl): Tidy.
5258         (expand_static_init): Fold checks for whether or not a variable
5259         needs initialization into this function.  Simplify.
5260         * decl2.c (do_static_initialization): Simplify.
5261         * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
5262         be done for us automatically.
5263         (expand_default_init): Handle brace-enclosed initializers
5264         correctly.
5265         (expand_aggr_init_1): Remove RTL-generation code.
5266         (build_vec_init): Remove "new X = ..." support.
5267         * parse.y (new_initializer): Likewise.
5268         * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
5269         brace-enclosed initializer.
5270         (create_pseudo_type_info): Likewise.
5271         * typeck2.c (store_init_value): Don't try to handle digest_init
5272         being called more than once.
5273         (digest_init): Tidy handling of brace-enclosed initializers.
5274
5275 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5276
5277         * decl.c (typename_hash): Use htab_hash_pointer.
5278
5279 2002-10-10  Jim Wilson  <wilson@redhat.com>
5280
5281         * decl.c (duplicate_decls): Don't call decl_attributes.
5282
5283 2002-10-09  Zack Weinberg  <zack@codesourcery.com>
5284
5285         PR c/7353
5286         * decl.c (start_decl): Unconditionally issue error for
5287         'typedef foo = bar'.
5288         (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
5289         (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
5290
5291 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5292
5293         * decl2.c (prune_vtable_vardecl): Delete unused function.
5294
5295 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
5296
5297         PR c++/7754
5298         * decl2.c (finish_anon_union): Do not expand anonymous unions when
5299         procesing template functions.
5300         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
5301         type. Call layout_decl.
5302         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
5303
5304 2002-10-07  Richard Henderson  <rth@redhat.com>
5305
5306         * decl2.c, pt.c: Revert c++/7754 fix.
5307
5308 2002-10-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5309
5310         PR c++/7804
5311         * error.c (dump_expr) [REAL_CST]: Output in decimal format.
5312
5313 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
5314
5315         PR c++/7931
5316         * pt.c (for_each_template_parm_r): Handle BASELINKs.
5317
5318         PR c++/7754
5319         * decl2.c (finish_anon_union): Do not expand anonymous unions when
5320         procesing template functions.
5321         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
5322         type. Call layout_decl.
5323         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
5324
5325 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
5326
5327         PR c++/8006
5328         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
5329         template parameters.
5330         (globals): Add entity and need_abi_warning.
5331         (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
5332         CLASSTYPE_TEMPLATE_INFO.
5333         (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
5334         TYPE_TI_TEMPLATE.
5335         (write_prefix): Handle typename types correctly.
5336         (write_template_prefix): Handle template template parameters
5337         correctly.
5338         (start_mangling): Add entity parameter.
5339         (finish_mangling): Warn about names whose mangling will change.
5340         (mangle_decl_string): Adjust.
5341         (mangle_type_string): Likewise.
5342         (mangle_special_for_type): Likewise.
5343         (mangle_ctor_vtbl_for_type): Likewise.
5344         (mangle_thunk): Likewise.
5345         (mangle_guard_variable): Likewise.
5346         (mangle_ref_init_variable): Likewise.
5347
5348 2002-10-02  Mark Mitchell  <mark@codesourcery.com>
5349
5350         PR c++/7188.
5351         * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
5352         * cp-tree.h (emit_base_init): Rename to ....
5353         (emit_mem_initializers): ... this.
5354         (expand_member_init): Change prototype.
5355         * init.c (perform_member_init): Compute explicit, rather than
5356         requiring it as a parameter.
5357         (sort_member_init): Rename to ...
5358         (sort_mem_initializers): ... this.  Process bases and data members
5359         together.
5360         (sort_base_init): Remove.
5361         (emit_base_init): Rename to ...
5362         (emit_mem_initializers): ... this.
5363         (expand_aggr_vbase_init_1): Remove.
5364         (construct_virtual_bases): Rename to ...
5365         (construct_virtual_base): ... this.
5366         (expand_member_init): Rework handling of base initializers.
5367         * method.c (do_build_copy_constructor): Use
5368         finish_mem_initializers.
5369         * parse.y (member_init): Adjust calls to expand_member_init.
5370         * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
5371         (tsubst_initializer_list): Use expand_member_init.
5372         * semantics.c (finish_mem_intiailizers): Simplify.
5373
5374 2002-10-02  Matt Austern  <austern@apple.com>
5375         * decl.c (walk_vtables_r): Fixed typo that caused result to
5376         never get a nonzero value.
5377
5378 2002-10-02  Roger Sayle  <roger@eyesopen.com>
5379
5380         PR optimization/6627
5381         * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
5382         from here, and move it to tree.h.
5383         * decl.c (cxx_init_decl_processing): If storing the vbit
5384         in function pointers, ensure that force_align_functions_log
5385         is atleast one.
5386
5387 2002-10-02  Matt Austern  <austern@apple.com>
5388
5389         * class.c (check_field_decls): Changed warning about const member
5390         variables so that it doesn't get issued for a class aggregate.
5391
5392 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
5393
5394         * decl.c (cp_finish_decl): Make sure array types are laid out,
5395         even if the array bounds are unknown.
5396
5397 2002-10-01  Steve Ellcey  <sje@cup.hp.com>
5398
5399         * class.c (build_vtbl_initializer): Change build_c_cast
5400         to build1.
5401
5402 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
5403
5404         * decl.c (cp_finish_decl): Make sure array types are laid out,
5405         even if the array bounds are unknown.
5406
5407         * decl.c (cp_finish_decl): Correct check for dynamic
5408         initialization of thread-local storage.
5409
5410 2002-09-30  Nathan Sidwell  <nathan@codesourcery.com>
5411
5412         * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
5413         overloaded.
5414
5415 2002-09-30  Steve Ellcey  <sje@cup.hp.com>
5416
5417         * class.c (build_vtbl_initializer): Add cast.
5418         (add_vcall_offset_vtbl_entries_1):
5419         Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
5420
5421 2002-09-30  Mark Mitchell  <mark@codesourcery.com>
5422
5423         * class.c (walk_subobject_offsets): Correct the calculation of
5424         offsets for virtual bases.  Correct the counting of array
5425         elements.
5426         (layout_nonempty_base_or_field): Simplify.  Correct the
5427         calculation of offsets to be propagated through the binfo
5428         hierarchy.
5429         (build_base_field): Avoid creating a FIELD_DECL for empty bases.
5430         Add the FIELD_DECL to TYPE_FIELDS.
5431         (build_base_fields): Adjust accordingly.
5432         (layout_virtual_bases): Use build_base_field.
5433         (end_of_class): Return a tree, not an integer.
5434         (warn_about_ambiguous_direct_bases): Rename to ...
5435         (warn_about_ambiguous_bases): ... this.
5436         (include_empty_classes): New function.
5437         (layout_class_type): Create an alternative version of the type to
5438         be used when as a base class type.  Do not call
5439         finish_record_layout until we are done laying out the class.
5440         * cp-tree.h (lang_type_class): Remove size, size_unit.  Add
5441         as_base.
5442         (CLASSTYPE_SIZE): Reimplement.
5443         (CLASSTYPE_SIZE_UNIT): Likewise.
5444         (CLASSTYPE_ALIGN): Likweise.
5445         (CLASSTYPE_USER_ALIGN): Likewise.
5446         (CLASSTYPE_AS_BASE): New macro.
5447         (DECL_INITIALIZED_P): Likewise.
5448         (extract_init): Remove prototype.
5449         (build_forced_zero_init): Rename to ...
5450         (build_zero_init): ... this.
5451         (force_store_init_value): Remove.
5452         * decl.c (obscure_complex_init): Remove.
5453         (duplicate_decls): Copy DECL_INITIALIZED_P.
5454         (check_initializer): Do not leave junk in DECL_INITIAL.
5455         (cp_finish_decl): Handle zero-initialization of entities with
5456         static storage duration.
5457         * expr.c (extract_init): Remove.
5458         * init.c (build_forced_zero_init): Remove.
5459         (build_zero_init): New function.
5460         (build_default_init): Use it.
5461         (build_field_list): Skip FIELD_DECLs for base subobjects.
5462         (push_base_cleanups): Likewise.
5463         * method.c (do_build_assign_ref): Likewise.
5464         (synthesize_exception_spec): Likewise.
5465         * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
5466         (regenerate_decl_from_template): To not set DECL_INITIAL for a
5467         static data member whose initialization took place in its class.
5468         (instantiate_decl): Do not pass an initializer to cp_finish_decl
5469         in that situation.
5470         * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
5471         (dfs_unuse_fields): Likewise.
5472         * tree.c (pod_type_p): Handle error_mark_node.
5473         (zero_init_p): Likewise.
5474         * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
5475         subobjects.
5476         * typeck2.c (store_init_value): Remove #if 0'd code.
5477         (force_store_init_value): Remove.
5478         (process_init_constructor): Use build_zero_init.
5479
5480 2002-09-29  Nathan Sidwell  <nathan@codesourcery.com>
5481
5482         PR c++/7788
5483         * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
5484
5485 2002-09-29  Kazu Hirata  <kazu@cs.umass.edu>
5486
5487         * cp-tree.h: Fix comment typos.
5488         * decl.c: Likewise.
5489         * pt.c: Likewise.
5490
5491 2002-09-25  Mark Mitchell  <mark@codesourcery.com>
5492
5493         * cp/class.c (contains_empty_class_p): New method.
5494         (walk_subobject_offsets): Correct computation of field offset.
5495         (layout_empty_base): Correct placement of emtpy base classes.
5496         (layout_class_type): Warn about ABI changes.
5497
5498 2002-09-23  Mark Mitchell  <mark@codesourcery.com>
5499
5500         * cp/class.c (layout_virtual_bases): Do not round the size of the
5501         type to a multiple of the alignment before laying out virtual bases.
5502         (layout_class_type): Correct handling of bit-fields that are wider
5503         than their type inside unions.  Round the size of the type to a
5504         even number of bytes when computing the size without virtual
5505         bases.
5506         * cp/cp-tree.h (abi_version_at_least): New macro.
5507
5508 2002-09-21  Kazu Hirata  <kazu@cs.umass.edu>
5509
5510         * ChangeLog: Follow spelling conventions.
5511         * ChangeLog.2: Likewise.
5512         * call.c: Likewise.
5513         * class.c: Likewise.
5514         * cp-tree.h: Likewise.
5515         * cvt.c: Likewise.
5516         * decl.c: Likewise.
5517         * decl2.c: Likewise.
5518         * except.c: Likewise.
5519         * friend.c: Likewise.
5520         * g++spec.c: Likewise.
5521         * init.c: Likewise.
5522         * lex.c: Likewise.
5523         * mangle.c: Likewise.
5524         * method.c: Likewise.
5525         * operators.def: Likewise.
5526         * optimize.c: Likewise.
5527         * pt.c: Likewise.
5528         * rtti.c: Likewise.
5529         * search.c: Likewise.
5530         * semantics.c: Likewise.
5531         * spew.c: Likewise.
5532         * tree.c: Likewise.
5533         * typeck.c: Likewise.
5534
5535 2002-09-18  Devang Patel  <dpatel@apple.com>
5536
5537         * cp/cp-tree.h: New prototype for walk_vtabls().
5538         * cp/decl.c (walk_vtables_r): New function.
5539         (struct cp_binding_level): Add new members, namespaces,
5540         names_size and vtables.
5541         (add_decl_to_level): Add decl in namespaces or vtables
5542         chain, if conditions match.
5543         (walk_vtables): New function.
5544         (walk_namespaces_r): Travers separate namespace chain
5545         for namespace decls.
5546         (wrapup_globals_for_namespace): Use names_size instead
5547         of list_length().
5548         * cp/decl2.c (finish_file): Use walk_vtables() instead of
5549         walk_globals() to walk vtable decls.
5550
5551 2002-09-18  Nathan Sidwell  <nathan@codesourcery.com>
5552
5553         * decl.c (grokdeclarator): Use assert, not internal_error. Don't
5554         ICE with invalid pointers & references.
5555
5556 2002-09-17  Zack Weinberg  <zack@codesourcery.com>
5557
5558         * Make-lang.in: Remove all references to the demangler.
5559         * cxxfilt.c: Moved to binutils.
5560
5561 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
5562
5563         PR c++/7718
5564         * pt.c (tsubst_decl): Remove assert.
5565
5566         Remove DR 295 implementation.
5567         * pt.c (check_cv_quals_for_unify): Disable function & method cases.
5568         * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
5569         about ignoring volatile qualifiers.
5570
5571         * search.c (lookup_member): Correct documentation.
5572
5573 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
5574
5575         * cp-tree.h (union lang_tree_node): Add chain_next option.
5576
5577 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
5578
5579         * parse.y (parse_finish_call_expr): Check lookup_member result.
5580
5581         PR c++/7015
5582         * semantic.c (finish_asm_stmt): Fix operand/output_operands
5583         thinko.
5584         * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
5585
5586 2002-09-15  Nathan Sidwell  <nathan@codesourcery.com>
5587
5588         PR c++/7919
5589         * call.c (build_over_call): Convert this pointer for fns found by
5590         using decls.
5591
5592 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
5593
5594         * ChangeLog: Follow spelling conventions.
5595         * ChangeLog.1: Likewise.
5596
5597 2002-09-14  Nathan Sidwell  <nathan@codesourcery.com>
5598
5599         PR c++/7768
5600         * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
5601
5602 2002-09-14  Kazu Hirata  <kazu@cs.umass.edu>
5603
5604         * error.c: Fix comment formatting.
5605         * except.c: Likewise.
5606         * expr.c: Likewise.
5607         * friend.c: Likewise.
5608         * g++spec.c: Likewise.
5609         * init.c: Likewise.
5610         * lex.c: Likewise.
5611         * mangle.c: Likewise.
5612         * method.c: Likewise.
5613         * optimize.c: Likewise.
5614         * pt.c: Likewise.
5615         * rtti.c: Likewise.
5616         * search.c: Likewise.
5617         * semantics.c: Likewise.
5618         * spew.c: Likewise.
5619         * tree.c: Likewise.
5620         * typeck.c: Likewise.
5621         * typeck2.c: Likewise.
5622
5623 2002-09-13  Matt Austern  <austern@apple.com>
5624
5625         PR C++/7828
5626         * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
5627         * cp/call.c: Change call-by-const-reference mechanism to use
5628         non_cast_lvalue_p when deciding whether the create a temporary.
5629         We need a temporary when passing, e.g. (long) x by const ref.
5630
5631 2002-09-13  Nathan Sidwell  <nathan@codesourcery.com>
5632
5633         * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
5634
5635 2002-09-13  Kazu Hirata  <kazu@cs.umass.edu>
5636
5637         * decl.c: Fix comment formatting.
5638         * decl2.c: Likewise.
5639
5640 2002-09-12  Kazu Hirata  <kazu@cs.umass.edu>
5641
5642         * call.c: Fix comment formatting.
5643         * class.c: Likewise.
5644         * cp-lang.c: Likewise.
5645         * cp-tree.h: Likewise.
5646         * cvt.c: Likewise.
5647
5648 2002-09-11  Zack Weinberg  <zack@codesourcery.com>
5649
5650         * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
5651         and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
5652         * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
5653         minor adjustments (use version_string, eliminate yet another
5654         duplicate of xmalloc)
5655
5656 2002-09-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5657
5658         * cp-tree.h (require_complete_eh_spec_types): Add prototype.
5659
5660 2002-09-05  Jason Merrill  <jason@redhat.com>
5661
5662         * typeck2.c (add_exception_specifier): Only pedwarn for an
5663         incomplete type.
5664         (require_complete_eh_spec_types): New fn.
5665         (cxx_incomplete_type_diagnostic): Also support pedwarning.
5666         * typeck.c (complete_type_or_diagnostic): Likewise.
5667         * call.c (build_call): Call require_complete_eh_spec_types.
5668         * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
5669         on an incomplete type.
5670
5671 2002-09-04  Jakub Jelinek  <jakub@redhat.com>
5672
5673         * decl.c (start_cleanup_fn): Clear interface_only before
5674         start_function, restore it afterwards.
5675
5676 2002-09-02  Nathan Sidwell  <nathan@codesourcery.com>
5677
5678         * cp-tree.h (finish_builtin_type): Remove.
5679         * decl2.c (finish_builtin_type): Move to common code.
5680         * decl.c (build_ptrmemfunc_type): Adjust.
5681         * rtti.c (create_pseudo_type_info): Adjust.
5682         (create_tinfo_types): Adjust.
5683
5684 2002-08-31  Jason Merrill  <jason@redhat.com>
5685
5686         * cp-lang.c (cp_expr_size): Allow initialization from a
5687         CONSTRUCTOR.
5688
5689 2002-08-30  Richard Henderson  <rth@redhat.com>
5690
5691         PR opt/7515
5692         * tree.c: Include target.h.
5693         (cp_cannot_inline_tree_fn): Don't auto-inline functions that
5694         don't bind locally.
5695         * Makefile.in (tree.o): Update.
5696
5697 2002-08-27  Mark Mitchell  <mark@codesourcery.com>
5698
5699         * class.c (layout_virtual_bases): Warn about bugs in G++ that
5700         result in incorrect object layouts.
5701         (layout_class_type): Likewise.
5702
5703 2002-08-24  Matt Austern  <austern@apple.com>
5704
5705         * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
5706         are allowable.
5707         (real_lvalue_p): Update caller.
5708         (lvalue_p): Ditto.
5709         (non_cast_lvalue_or_else): New.
5710         * tree.h: Declare it.
5711         * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
5712
5713 2002-08-22  Mark Mitchell  <mark@codesourcery.com>
5714
5715         * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
5716         and COND_EXPR specially; fix error message output.
5717
5718 2002-08-22  Jason Merrill  <jason@redhat.com>
5719
5720         * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
5721         * semantics.c (nullify_returns_r): Likewise.
5722
5723 2002-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5724
5725         Fix PR/7621
5726         * typeck.c (finish_class_member_access_expr): Diagnose cases where
5727         name lookup finds nothing.
5728
5729 2002-08-15  Jason Merrill  <jason@redhat.com>
5730
5731         * semantics.c (finish_then_clause): Remove redundant assignment.
5732         (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
5733         extra binding level outside the if/switch statement.
5734         (finish_while_cond, finish_for_cond): Rewrite complex condition
5735         into the loop body.
5736
5737 2002-08-15  Alexandre Oliva  <aoliva@redhat.com>
5738
5739         * parse.y (sizeof, alignof, typeof): New non-terminals to
5740         increment skip_evaluation.  Replace terminals with them and
5741         decrement skip_evaluation at the end of rules using them.
5742         * decl2.c (mark_used): Don't assemble_external if
5743         skipping evaluation.
5744
5745 2002-08-15  Gabriel Dos Reis  <gdr@nerim.net>
5746
5747         Fix PR/7504
5748         * parse.y (parse_finish_call_expr): Handle incomplete
5749         type used to name a scope.
5750
5751 2002-08-15  Nathan Sidwell  <nathan@codesourcery.com>
5752
5753         PR c++/7598
5754         * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
5755         regression caused by my 2002-08-08 patch.
5756
5757 2002-08-13  Mark Mitchell  <mark@codesourcery.com>
5758
5759         * decl.c (pushdecl_class_level): Honor requests to bind names to
5760         OVERLOADs.
5761
5762 2002-08-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5763
5764         * decl2.c (build_call_from_tree): Fix uninitialized variable.
5765         * parse.y (parse_finish_call_expr): Likewise.
5766         * repo.c (old_args, old_dir, old_main): Const-ify.
5767
5768 2002-08-11  Gabriel Dos Reis  <gdr@nerim.net>
5769
5770         * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
5771         DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
5772         * optimize.c (maybe_clone_body): Likewise.
5773         * pt.c (tsubst_enum): Likewise.
5774         (lookup_template_class): Likewise.
5775         * tree.c (cp_copy_res_decl_for_inlining): Likewise.
5776
5777 2002-08-10  Neil Booth  <neil@daikokuya.co.uk>
5778
5779         * lang-specs.h: Remove -ansi.
5780
5781 2002-08-10  Nathan Sidwell  <nathan@codesourcery.com>
5782
5783         * tree.c (maybe_dummy_object): Replace // with /* */
5784
5785 2002-08-09  Mark Mitchell  <mark@codesourcery.com>
5786
5787         * call.c (standard_conversion): Use build_ptrmem_type.
5788         * cp-tree.h (build_ptrmem_type): New function.
5789         (adjust_result_of_qualified_name_lookup): Likewise.
5790         * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
5791         static data members.
5792         (build_ptrmem_type): New function.
5793         (grokdeclarator): Do not use build_offset_type when encountering a
5794         qualified name.
5795         * parse.y (parse_finish_call_expr): Use
5796         adjust_result_of_qualified_name_lookup.
5797         * search.c (adjust_result_of_qualified_name_lookup): New function.
5798         * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
5799         accessing OFFSET_TYPEs directly.
5800
5801 2002-08-08  Mike Stump  <mrs@apple.com>
5802
5803         * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
5804         (type_decays_to): Likewise.
5805         * class.c (find_final_overrider): Likewise.
5806         (maybe_note_name_used_in_class): Likewise.
5807         * decl.c (current_tmpl_spec_kind): Likewise.
5808         (add_binding): Likewise.
5809         (push_class_binding): Likewise.
5810         (duplicate_decls): Likewise.
5811         (layout_var_decl): Likewise.
5812         (grokfndecl): Likewise.
5813         (grokdeclarator): Likewise.
5814         (check_default_argument): Likewise.
5815         * decl2.c (handle_class_head): Likewise.
5816         * error.c (dump_template_decl): Likewise.
5817         * init.c (build_offset_ref): Likewise.
5818         * pt.c (check_specialization_scope): Likewise.
5819         (determine_specialization): Likewise.
5820         (check_explicit_specialization): Likewise.
5821         (maybe_check_template_type): Likewise.
5822         (process_partial_specialization): Likewise.
5823         (check_default_tmpl_args): Likewise.
5824         (push_template_decl_real): Likewise.
5825         (convert_template_argument): Likewise.
5826         (try_class_unification): Likewise.
5827         (get_bindings_real): Likewise.
5828         (do_decl_instantiation): Likewise.
5829         * semantics.c (begin_function_definition): Likewise.
5830         (finish_member_declaration): Likewise.
5831         (check_multiple_declarators): Likewise.
5832         * typeck.c (comp_array_types): Likewise.
5833         (comptypes): Likewise.
5834         (expr_sizeof): Likewise.
5835         (build_binary_op): Likewise.
5836         (dubious_conversion_warnings): Likewise.
5837         (check_return_expr): Likewise.
5838
5839 2002-08-08  Mark Mitchell  <mark@codesourcery.com>
5840
5841         * typeck.c (build_class_member_access_expr): Do not return
5842         error_mark_node when no error has occurred.
5843
5844 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
5845
5846         * typeck.c (build_component_addr): Remove.
5847         (build_unary_op): Just check it's not a bitfield, and then build
5848         an ADDR_EXPR.
5849
5850 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
5851
5852         * class.c (convert_to_base): Correct check for error_mark_node.
5853         (create_vtable_ptr): Remove unused VFUNS_P parm.
5854
5855 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
5856
5857         * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
5858
5859 2002-08-07  Mark Mitchell  <mark@codesourcery.com>
5860
5861         Rework build_component_ref.
5862         * call.c (build_vfield_ref): Do not go through build_component_ref.
5863         (build_field_call): Use build_class_member_access_expr.
5864         (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
5865         (build_object_call): Likewise.
5866         * class.c (convert_to_base): New function.
5867         (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
5868         (instantiate_type): Handle BASELINKs.
5869         * cp-tree.def (BASELINK): New tree code.
5870         * cp-tree.h (BASELINK_P): Reimplement.
5871         (SET_BASELINK_P): Remove.
5872         (BASELINK_BINFO): Reimplement.
5873         (BASELINK_FUNCTIONS): Likewise.
5874         (BASELINK_ACCESS_BINFO): Likewise.
5875         (BASELINK_OPTYPE): Likewise.
5876         (convert_to_base): New function.
5877         (name_p): Likewise.
5878         (build_object_ref): Remove.
5879         (build_component_ref_1): Likewise.
5880         (build_component_ref): Likewise.
5881         (build_x_component_ref): Likewise.
5882         (build_class_member_access_expr): New function.
5883         (finish_class_member_access_expr): Likewise.
5884         (build_ptrmemfunc_access_expr): Likewise.
5885         * decl.c (grokdeclarator): Handle BASELINKs.
5886         * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
5887         finish_class_member_access_expr.
5888         (arg_assoc): Handle BASELINKs.
5889         (do_class_using_decl): Likewise.
5890         * error.c (dump_decl): Likewise.
5891         (dump_expr): Use build_ptrmemfunc_access_expr.
5892         * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
5893         destructors.
5894         (build_throw): Use BASELINK_FUNCTIONS.
5895         * init.c (perform_member_init): Use
5896         build_class_member_access_expr.
5897         (build_offset_ref): Handle BASELINKs.  Use
5898         build_class_member_access_expr.
5899         * method.c (hack_identifier): Likewise.
5900         * parse.y (do_id): Use BASELINK, not TREE_LIST.
5901         (primary): Remove uses of build_object_ref.
5902         * pt.c (lookup_template_function): Handle BASELINKs.
5903         (resolve_overloaded_unification): Likewise.
5904         * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
5905         (lookup_field): Use BASELINK, not TREE_LIST.
5906         (lookup_fnfiels): Likewise.
5907         (setup_class_bindings): Likewise.
5908         * semantics.c (finish_object_call_expr): Do not use
5909         build_method_call when we already know what function is being
5910         called.
5911         * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
5912         * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
5913         TREE_CHAIN.
5914         (name_p): New function.
5915         * typeck.c (build_object_ref): Remove.
5916         (build_component_ref_1): Likewise.
5917         (build_x_component_ref): Likewise.
5918         (build_class_member_access_expr): New function.
5919         (finish_class_member_access_expr): Likewise.
5920         (build_ptrmemfunc_access_expr): Likewise.
5921         (get_member_function_from_ptrfunc): Use
5922         build_ptrmemfunc_access_expr.
5923         (build_binary_op): Likewise.
5924         (build_unary_op): Likewise.
5925         (build_ptrmemfunc): Likewise.
5926         (pfn_from_ptrmemfunc): Likewise.
5927         * typeck2.c (build_m_component_ref): Adjust comment.
5928
5929 2002-08-07  Neil Booth  <neil@daikokuya.co.uk>
5930
5931         * Make-lang.in (CXX_C_OBJS): Update.
5932         * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
5933         * cp-tree.h (cxx_decode_option): Remove.
5934         * decl2.c (compare_options, lang_f_options, unsupported_options,
5935         cxx_decode_option): Remove.
5936
5937 2002-08-06  Gabriel Dos Reis  <gdr@nerim.net>
5938
5939         * typeck.c (build_x_unary_op): Handle pointer-to-member.
5940
5941 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
5942
5943         * class.c: Don't include obstack.h.
5944         (popclass):
5945         * decl2.c: Delete bogus comment.
5946         * error.c: Don't include obstack.h.
5947         * except.c: Likewise.
5948         (dump_type): Correct comment.
5949         * method.c: Don't include obstack.h.
5950         * tree.c: Likewise.
5951
5952 2002-08-04  Gabriel Dos Reis  <gdr@nerim.net>
5953
5954         Fix PR/2213
5955         * cvt.c (cp_convert_to_pointer): Reject conversions from integral
5956         expressions to pointer-to-data-member of pointer-to-member-functions.
5957
5958 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
5959
5960         * cvt.c (ocp_convert): Delete obsolete code.
5961         * parse.y (permanent_obstack): Delete declaration.
5962         * pt.c (permanent_obstack): Delete declaration.
5963         * repo.c (permanent_obstack): Delete declaration.
5964         (open_repo_file): Use xmalloc instead of permanent_obstack.
5965         (init_repo): Use xstrdup instead of permanent_obstack.
5966
5967 2002-08-04  Nathan Sidwell  <nathan@codesourcery.com>
5968
5969         * cp-tree.h (VF_DERIVED_VALUE): Remove.
5970         * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
5971
5972 2002-08-03  Nathan Sidwell  <nathan@codesourcery.com>
5973
5974         PR 7470.
5975         C++ ABI change - vfunc ordering.
5976         * class.c (add_virtual_function): Remove.
5977         (dfs_modify_all_vtables): Take list of all declared
5978         virtuals. Assign all that are not in primary base.
5979         (check_for_override): Adjust comments.
5980         (create_vtable_ptr): Take single list of virtuals. Build chain
5981         of declared virtuals here.
5982         (layout_class_type): Take single list of virtuals. Adjust.
5983         (finish_struct_1): Keep virtuals on single list. Adjust.
5984
5985 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
5986
5987         * init.c (build_member_call): Use build_new_method_call, not
5988         build_method_call.
5989
5990 2002-08-02  Krister Walfridsson  <cato@df.lth.se>
5991
5992         * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
5993
5994 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
5995
5996         * call.c (build_method_call): Issue a more helpful error message
5997         about ambiguous method names.
5998
5999 2002-08-02  Nathan Sidwell  <nathan@codesourcery.com>
6000
6001         * tree.c (build_shared_int_cst): Make cache file scope, and
6002         GTY it.
6003
6004 2002-08-02  Jason Merrill  <jason@redhat.com>
6005
6006         * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
6007         (cp_expr_size): New fn.
6008         * call.c (build_over_call): Lose empty class hackery.
6009         (convert_arg_to_ellipsis): Promote non-POD warning to error.
6010         * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
6011
6012         * semantics.c (expand_body): Do tree optimization in the function
6013         context, too.
6014
6015 2002-08-01  Neil Booth  <neil@daikokuya.co.uk>
6016
6017         * cp-tree.h: Move all warning and flag declarations to c-common.h.
6018         * decl.c: Move all warning and flag variables to c-common.c.
6019         * decl2.c: Move all warning and flag variables to c-common.c.
6020         * lex.c (flag_digraphs): Remove.
6021         (warn_traditional): Now in c-common.c.
6022
6023 2002-07-31  Mark Mitchell  <mark@codesourcery.com>
6024
6025         * call.c (build_field_call): Do not look up the field by name.
6026         (build_method_call): Simplify.
6027         (struct z_candidate): Add access_path and conversion_path.  Remove
6028         basetype_path.
6029         (convert_class_to_reference): Adjust use of
6030         add_function_candidate.
6031         (add_candidate): Add conversion_path argument.
6032         (add_function_candidate): Use it.
6033         (add_conv_dndidate): Likewise.
6034         (build_builtin_candidate): Likewise.
6035         (add_template_candidate_real): Add conversion_path argument.
6036         (add_template_conv_candidate): Likewise.
6037         (add_template_candidate): Likewise.
6038         (build_user_type_conversion_1): Use it.
6039         (build_new_function_call): Remove name lookup code.  Adjust use of
6040         add_template_candidate and add_function_candidate.
6041         (build_new_op): Likewise.
6042         (convert_like_real): Use build_special_member_call.
6043         (build_over_call): Use cand->conversion_path.
6044         (build_special_member_call): New method.
6045         (build_new_method_call): Remove name lookup code.
6046         * cp-tree.def (OFFSET_REF): Update documentation.
6047         (TEMPLATE_ID_EXPR): Likewise.
6048         * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
6049         (BASELINK_OPTYPE): Likewise.
6050         (build_new_method_call): Adjust prototype.
6051         (build_special_member_call): New method.
6052         (build_baselink): New method.
6053         (build_offset_ref_call_from_tree): Likewise.
6054         (build_call_from_tree): Likewise.
6055         (finish_qualified_call_expr): Remove.
6056         (finish_call_expr): Adjust prototype.
6057         (build_x_function_call): Remove.
6058         * cvt.c (ocp_convert): Use build_special_member_call.
6059         * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
6060         (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
6061         CALL_EXPR.
6062         (build_offset_ref_call_from_tree): New function.
6063         (build_call_from_tree): Likewise.
6064         * init.c (expand_cleanup): Use build_special_member_call.
6065         (expand_default_init): Likewise.
6066         (build_member_call): Use finish_call_expr.
6067         (build_new_1): Use build_special_member_call.
6068         (push_base_cleanups): Likewise.
6069         * method.c (do_build_assign_ref): Likewise.
6070         * parse.y (template_id): Do not pass a COMPONENT_REF to
6071         lookup_template_function.
6072         (primary): Use parse_finish_call_epxr, not finish_call_expr.
6073         (parse_finish_call_expr): New function.
6074         * pt.c (lookup_template_function): Add assertions.
6075         * search.c (lookup_base): Allow T to be a binfo.
6076         (build_baselink): New function.
6077         (lookup_member): Use it.
6078         * semantics.c (finish_call_expr): Do not do name lookup.
6079         (finish_object_call_expr): Remove #if 0'd code.
6080         (finish_qualified_call_expr): Remove.
6081         * typeck.c (build_x_function_call): Remove.
6082         (build_static_case): Use build_special_member_call.
6083         * typeck2.c (build_functional_cast): Likewise.
6084
6085 2002-07-30  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
6086
6087         * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
6088
6089 2002-07-30  Gabriel Dos Reis  <gdr@nerim.net>
6090
6091         * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
6092
6093 2002-07-30  Nathan Sidwell  <nathan@codesourcery.com>
6094
6095         * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
6096         documentation.
6097
6098 2002-07-29  Alan Modra  <amodra@bigpond.net.au>
6099
6100         * cp-tree.h: Comment typo fix.
6101
6102 2002-07-29  Richard Earnshaw  <rearnsha@arm.com>
6103
6104         * spew.c (space_for_token): Allocate zeroed memory for a new token
6105         chunk.
6106
6107 2002-07-27  Roger Sayle  <roger@eyesopen.com>
6108
6109         * decl.c (builtin_function_1): No need to explicitly mark
6110         BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
6111
6112 2002-07-27  Roger Sayle  <roger@eyesopen.com>
6113
6114         * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
6115
6116 2002-07-26  Jason Merrill  <jason@redhat.com>
6117
6118         * call.c (build_over_call): Likewise.
6119         (cp_convert_parm_for_inlining): New fn.
6120         (convert_for_arg_passing): New fn.
6121         (convert_default_arg, build_over_call): Use it.
6122         (type_passed_as): New fn.
6123         * pt.c (tsubst_decl): Use it.
6124         * decl2.c (cp_build_parm_decl): New fn.
6125         (build_artificial_parm): Use it.
6126         (start_static_storage_duration_function): Likewise.
6127         * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
6128         (grokparms): Don't mess with DECL_ARG_TYPE.
6129         * typeck.c (convert_arguments): Use convert_for_arg_passing.
6130         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
6131         Define.
6132         * cp-tree.h: Declare new fns.
6133
6134 2002-07-26  Neil Booth  <neil@daikokuya.co.uk>
6135
6136         * cp-tree.h (flag_operator_names): Remove.
6137         * decl2.c (flag_operator_names): Remove.
6138         (lang_f_options): Remove operator-names.
6139         * lex.c (D_OPNAME): Remove.
6140         (reswords): Remove operator names.
6141         (rid_to_yy): Remove operator names.
6142         (init_reswords): No need to handle D_OPNAME.
6143         * spew.c (read_process_identifier): There are no operator
6144         names.
6145
6146 2002-07-26  Jason Merrill  <jason@redhat.com>
6147
6148         * dump.c (cp_dump_tree): Call c_dump_tree.
6149         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
6150
6151 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
6152
6153         * error.c (print_whitespace): Remove.
6154         * g++spec.c (LIBUNWIND): Move.
6155         * mangle.c (mangled_position, write_signed_number): Remove.
6156
6157 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
6158
6159         * decl2.c (cxx_decode_option): Similarly.
6160
6161 2002-07-25  Gabriel Dos Reis  <gdr@nerim.net>
6162
6163         * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
6164         (cxx_sizeof_or_alignof_type): Take a third argument.
6165         (cxx_sizeof): Adjust definition.
6166         (cxx_alignof): Likewise.
6167         * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
6168         * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
6169         complaining.
6170         (c_sizeof_nowarn): Remove definition.
6171         (build_unary_op): Use cxx_sizeof_nowarn.
6172
6173 2002-07-24  Geoffrey Keating  <geoffk@redhat.com>
6174
6175         * tree.c (cp_build_qualified_type_real): When copying
6176         pointer-to-method types, unshare the record that holds
6177         the cached pointer-to-member-function type.
6178
6179 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
6180
6181         * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
6182
6183 2002-07-23  Gabriel Dos Reis  <gdr@nerim.net>
6184
6185         Fix PR/7363:
6186         * typeck.c (cxx_sizeof_or_alignof_type): New function.
6187         (c_sizeof): Remove definition.
6188         (expr_sizeof): Use cxx_sizeof.
6189         * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
6190         * decl.c (finish_destructor_body): Use cxx_sizeof.
6191         * semantics.c (finish_alignof): Likewise.
6192         (finish_alignof): Use cxx_alignof.
6193         * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
6194         (cxx_sizeof_or_alignof_type): Declare.
6195         (my_friendly_assert): Move to ../c-common.h.
6196
6197 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
6198
6199         * class.c, method.c, pt.c, search.c: Don't define obstack macros.
6200
6201 2002-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6202
6203         PR c++/7347, c++/7348
6204         * cp-tree.h (tsubst_flags_t): Add tf_parsing.
6205         * decl.c (make_typename_type): Use it.
6206         (make_unbound_class_template): Likewise.
6207         (lookup_name_real): Don't call type_access_control if scope is
6208         template parameter dependent.
6209         * parse.y (template_arg): Call make_unbound_class_template with
6210         tf_parsing set.
6211         (nest_name_specifier): Call make_typename_type with tf_parsing set.
6212         (typename_sub0): Likewise.
6213         (typename_sub1): Likewise.
6214         (instantiate_decl): Push class scope.
6215         * pt.c (regenerate_decl_from_template): Call pushclass and popclass
6216         for both static variable and member function template.
6217         (instantiate_decl) Call pushclass and popclass when tsubst'ing type
6218         and arguments.
6219         * search.c (type_access_control): Do type access for TEMPLATE_DECL
6220         too.
6221
6222 2002-07-20  Roger Sayle  <roger@eyesopen.com>
6223
6224         * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
6225         test by using positive_option.  Make whitespace consistent.
6226
6227 2002-07-20  Gabriel Dos Reis  <gdr@nerim.net>
6228
6229         * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
6230         members with 'locus'.  Adjust use throughout.
6231         (struct feed):  Likewise.
6232         (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
6233         Adjust use.
6234         (snarf_defarg): Use error(), not error_with_file_and_line().
6235
6236 2002-07-19  Chris Demetriou  <cgd@broadcom.com>
6237
6238         * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
6239         cpp_options is included.
6240
6241 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6242
6243         PR c++/2862, c++/2863
6244         * pt.c (determine_specialization): Compare the length of
6245         TYPE_ARG_TYPES.  Tidy.
6246
6247 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6248
6249         PR c++/3797
6250         * decl.c (duplicate_decls): Don't propagate inlining parameters from
6251         olddecl to newdecl when newdecl is a specialization of the
6252         instantiation olddecl.
6253
6254 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6255
6256         PR c++/4802, c++/5387
6257         * decl.c (make_typename_type): Use enforce_access.
6258
6259 2002-07-17  Scott Snyder <snyder@fnal.gov>
6260
6261         PR c++/7320
6262         * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
6263
6264 2002-07-12  Mark Mitchell  <mark@codesourcery.com>
6265
6266         * class.c (add_method): Correct handling of conversion operators.
6267
6268 2002-07-11  Mark Mitchell  <mark@codesourcery.com>
6269
6270         PR c++/7224
6271         * class.c (add_method): Simplify.
6272
6273 2002-07-11  Jason Merrill  <jason@redhat.com>
6274
6275         PR c++/7279
6276         * tree.c (cp_copy_res_decl_for_inlining): Also copy
6277         TREE_ADDRESSABLE.
6278
6279 2002-07-10  Graham Stott  <graham.stott@btinternet.com>
6280
6281         * pt.c (template_parm_this_level_p, push_template_decl_real):
6282         Pass depth as int pointer.
6283
6284 2002-07-11  Tim Josling  <tej@melbpc.org.au>
6285
6286         Remove front end hard coding from gengtype.c.
6287
6288         * config-lang.in (gtfiles): Add files needed for this front end.
6289
6290 2002-07-10  Mark Mitchell  <mark@codesourcery.com>
6291
6292         * cp-tree.h (unqualified_name_lookup_error): Declare it.
6293         (begin_function_definition): Adjust prototype.
6294         * lex.c (unqualified_name_lookup_error): New function, split out
6295         from ...
6296         (do_identifier): ... here.
6297         * parse.y (parse_begin_function_definition): New function.
6298         (fn.def1): Use it.
6299         * semantics.c (begin_function_definition): Accept decl-specifiers
6300         and attributes as separate parameters.
6301
6302 2002-07-10  Jason Merrill  <jason@redhat.com>
6303
6304         PR c++/6255
6305         * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
6306         modifying the old one.
6307
6308 2002-07-09  Mark Mitchell  <mark@codesourcery.com>
6309
6310         * cp-tree.h (constructor_name_p): Declare it.
6311         (check_template_template_default_arg): Likewise.
6312         * class.c (handle_using_decl): Use constructor_name_p.
6313         * decl.c (grokdeclarator): Likewise.
6314         * decl2.c (constructor_name_p): Define it.
6315         * init.c (build_member_call): Use constructor_name_p.
6316         * parse.y (template_parm): Use check_template_template_default_arg.
6317         * pt.c (check_explicit_specialization): Use constructor_name_p.
6318         * semantics.c (check_template_template_default_arg): New function.
6319
6320 2002-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6321
6322         * pt.c (can_complete_type_without_circularity): Add static to
6323         function definition.
6324
6325 2002-07-08  Mark Mitchell  <mark@codesourcery.com>
6326
6327         * cp-tree.h (have_extern_spec): Declare it
6328         * decl.c (have_extern_spec): Define it.
6329         (start_decl): Eliminate use of used_extern_spec.
6330         (start_function): Likewise.
6331         * parse.y (have_extern_spec): Remove declaration.
6332         (used_extern_spec): Likewise.
6333         (frob_specs): Eliminate use of used_extern_spec.
6334         (.hush_warning): Likewise.
6335
6336 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
6337
6338         * Make-lang.in (cp/parse.o): Depend on decl.h.
6339         * cp-tree.h (do_decl_instantiation): Change prototype.
6340         * parse.y: Include decl.h.
6341         (parse_decl_instantiation): New function.
6342         (explicit_instantiation): Use it.
6343         * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
6344         and DECLSPECS.
6345
6346 2002-07-07  Roger Sayle  <roger@eyesopen.com>
6347
6348         * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
6349         constructor and destructor tests when passed a TEMPLATE_DECL.
6350
6351 2002-07-05  Jason Merrill  <jason@redhat.com>
6352
6353         * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
6354         pointers.
6355
6356         PR optimization/7145
6357         * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
6358
6359 2002-07-05  Nathan Sidwell  <nathan@codesourcery.com>
6360
6361         Repair damage on weak-impared targets caused by my previous patch.
6362         * cp-tree.h (import_export_tinfo): Add parameter.
6363         * decl2.c (import_export_tinfo): Add parameter, post adjust
6364         DECL_COMDAT.
6365         * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
6366         import_export_tinfo.
6367
6368 2002-07-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6369
6370         PR c++/6944
6371         * init.c (build_aggr_init): Remove qualifiers of init before calling
6372         build_vec_init.
6373         (build_vec_init): Flatten multi-dimensional array during cleanup.
6374         (build_vec_delete_1): Abort if the type of each element is array.
6375
6376 2002-07-03  Graham Stott  <graham.stott@btinternet.com>
6377
6378         * pt.c (instantiate_class_template): Fix typo.
6379
6380 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6381
6382         * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
6383         by CVS conflict in my last patch.
6384
6385 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6386
6387         PR c++/6716
6388         * pt.c (can_complete_type_without_circularity): New function.
6389         (instantiate_class_template): Use it.
6390         * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
6391         message due to incomplete fields.
6392
6393 2002-07-01  Mark Mitchell  <mark@codesourcery.com>
6394
6395         PR c++/7112
6396         * mangle.c (write_expression): Add mangling for sizeof when
6397         applied to a type.
6398         * operators.def: Remove stale comment.
6399
6400 2002-06-30  Nathan Sidwell  <nathan@codesourcery.com>
6401
6402         * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
6403         (CPTI_TYPE_INFO_PTR_TYPE): ... this.
6404         (tinfo_decl_type): Replace with ...
6405         (type_info_ptr_type): ... this.
6406         (import_export_tinfo): Declare.
6407         (tinfo_decl_p): Rename to ...
6408         (unemitted_tinfo_decl_p): ... this.
6409         * decl2.c (import_export_decl): Break out tinfo handling into ...
6410         (import_export_tinfo): ... here. New function.
6411         (finish_file): Adjust.
6412         * rtti.c (TINFO_REAL_NAME): New macro.
6413         (init_rtti_processing): Create the tinfo types.
6414         (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
6415         (get_tinfo_decl): Adjust.
6416         (get_tinfo_ptr): New function.
6417         (get_type_id): Use it.
6418         (tinfo_base_init): Create vtable decl here, if it doesn't exist.
6419         (ptr_initializer): Use get_tinfo_ptr.
6420         (ptm_initializer): Likewise.
6421         (synthesize_tinfo_var): Break into ...
6422         (get_pseudo_ti_init): ... this. Just create the initializer.
6423         (get_pseudo_ti_desc): .. and this.
6424         (create_real_tinfo_var): Remove.
6425         (create_pseudo_type_info): Don't create the vtable decl here.
6426         (get_vmi_pseudo_type_info): Remove.
6427         (create_tinfo_types): Adjust.
6428         (tinfo_decl_p): Rename to ...
6429         (unemitted_tinfo_decl_p): ... here. Adjust.
6430         (emit_tinfo_decl): Adjust. Create the initializer.
6431
6432 2002-06-27  Mark Mitchell  <mark@codesourcery.com>
6433
6434         PR c++/6695
6435         * pt.c (tsubst_friend_class): Substitute into the context of the
6436         friend before using it.
6437
6438 2002-06-26  Mark Mitchell  <mark@codesourcery.com>
6439
6440         * cp-tree.h (xref_tag): Change prototype.
6441         (handle_class_head): Likewise.
6442         (build_x_component_ref): Likewise.
6443         * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
6444         (xref_tag): Take attributes as a separate parameter.
6445         (xref_tag_from_type): Adjust call to xref_tag.
6446         * decl2.c (build_expr_from_tree): Adjust call to
6447         build_x_component_ref.
6448         (handle_class_head): Take attributes as a separate parameter.
6449         * parse.y (parse_xref_tag): New function.
6450         (parse_handle_class_head): Likewise.
6451         (primary): Use parse_xref_tag.
6452         (class_head_decl): Use parse_handle_class_head.
6453         (class_head_defn): Likewise.
6454         * rtti.c (init_rtti_processing): Adjust call to xref_tag.
6455         (build_dynamic_cast_1): Likewise.
6456         (create_pseudo_type_info): Likewise.
6457         (emit_support_tinfos): Likewise.
6458         * typeck.c (build_object_ref): Adjust call to
6459         build_x_component_ref.
6460         (build_x_component_ref): Remove protect parameter.
6461
6462 2002-06-25  Mark Mitchell  <mark@codesourcery.com>
6463
6464         * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
6465         * class.c (handle_using_decl): Likewise.
6466         (instantiate_type): Likewise.
6467         * cp-tree.h (BASELINK_FUNCTIONS): New macro.
6468         (xref_basetypes): Change prototype.
6469         (begin_mem_initializers): New function.
6470         (get_overloaded_fn): Likewise.
6471         * decl.c (xref_basetypes): Simplify.
6472         * error.c (dump_expr): Use BASELINK_FUNCTIONS.
6473         * init.c (build_offset_ref): Likewise.
6474         * parse.y (base_init): Use begin_mem_initializers().
6475         (structsp): Adjust call to xref_basetypes.
6476         * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
6477         (instantiate_class_template): Adjust call to xref_basetypes.
6478         * semantics.c (begin_mem_initializers): New function.
6479         * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
6480         (really_overlaoded_fn): Likewise.
6481         (get_overloaded_fn): New function.'
6482         (get_first_fn): USe BASELINK_FUNCTIONS.
6483
6484 2002-06-24  Mark Mitchell  <mark@codesourcery.com>
6485
6486         * cp-tree.h (SCALAR_TYPE_P): New macro.
6487         (check_for_out_of_scope_variable): New function.
6488         (at_class_scope_p): Likewise.
6489         (finish_fname): Likewise.
6490         * class.c (finish_struct): Use at_function_scope_p.
6491         * decl.c (check_for_out_of_scope_variable): New function, split
6492         out from do_identifier.
6493         (finish_enum): Use at_function_scope_p.
6494         * lex.c (do_identifier): Use check_for_out_of_scope_variable.
6495         * parse.y (VAR_FUNC_NAME): Give it <ttype>.  Use finish_fname.
6496         (primary): Use at_function_scope_p.
6497         * search.c (at_class_scope_p): New function.
6498         * semantics.c (finish_fname): Likewise.
6499         (check_multiple_declarators): Use at_function_scope_p.
6500
6501 2002-06-23  Mark Mitchell  <mark@codesourcery.com>
6502
6503         * parse.y (parse_scoped_id): New function.
6504         (primary): Use it.
6505         * cp-tree.h (do_scoped_id): Adjust declaration.
6506         * lex.c (do_scoped_id): Remove call to yylex.
6507         * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
6508         * typeck2.c (add_exception_specifier): Use tree_cons, rather than
6509         expanding it inline.
6510
6511 2002-06-23  Matt Thomas  <matt@3am-software.com>
6512
6513         * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
6514         "#if VMS_TARGET".
6515
6516 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6517
6518         * mangle.c (integer_type_codes): Const-ify.
6519
6520 2002-06-20  Richard Henderson  <rth@redhat.com>
6521
6522         PR c++/6747
6523         * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
6524         Call put_var_into_stack.
6525
6526 2002-06-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6527
6528         * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
6529         array size calculation.
6530
6531 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6532
6533         PR c++/6892
6534         * pt.c (tsubst_expr): Handle FILE_STMT.
6535
6536 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6537
6538         PR c++/6723
6539         * pt.c (lookup_template_class): Don't build complete argument of
6540         BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
6541         argument.
6542
6543 2002-06-19  Akim Demaille  <akim@epita.fr>
6544
6545         * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
6546         decl.h's TYPENAME.
6547         * spew.c, lex.c: Adjust.
6548         * parse.y (explicit_instantiation): Add empty action to override
6549         the default $$ = $1 where it introduces a type clash.
6550
6551 2002-06-14  Jason Merrill  <jason@redhat.com>
6552
6553         * semantics.c (begin_for_stmt): Push the 'for' scope before
6554         adding the FOR_STMT.
6555
6556         C++ ABI changes.
6557         * class.c (build_base_field): Set DECL_PACKED.
6558         (layout_class_type): Don't use tail padding of PODs.
6559         * mangle.c (write_unqualified_name): Fix template conversion op
6560         mangling.
6561
6562 2002-06-16  Richard Henderson  <rth@redhat.com>
6563
6564         PR opt/6793
6565         * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
6566         after template instantiation.
6567
6568 2002-06-16  Richard Henderson  <rth@redhat.com>
6569
6570         * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
6571
6572 2002-06-15  Gabriel Dos Reis  <gdr@codesourcery.com>
6573
6574         * cp-tree.h (compiler_error): Remove declaration.
6575         * lex.c (compiler_error): Remove definition.
6576
6577 2002-06-14  Steve Ellcey  <sje@cup.hp.com>
6578
6579         * g++spec.c (LIBUNWIND): New.
6580         (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
6581
6582 2002-06-13  Jessica Han  <jessica@cup.hp.com>
6583
6584         * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
6585         (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
6586         (build_vbase_offset_vtbl_entries): Likewise.
6587         * rtti.c (build_headof): Likewise.
6588         (get_tinfo_decl_dynamic): Likewise.
6589         (create_pseudo_type_info): Likewise.
6590
6591 2002-06-12  Stan Shebs  <shebs@apple.com>
6592
6593         * mpw-config.in: Remove file, no longer used.
6594         * mpw-make.sed: Ditto.
6595
6596 2002-06-07  Zack Weinberg  <zack@codesourcery.com>
6597
6598         * decl2.c: Update call to cpp_handle_option.
6599
6600 2002-06-07  H.J. Lu  (hjl@gnu.org)
6601
6602         * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
6603
6604 2002-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
6605
6606         * error.c (cp_error_at): Fix typo.
6607
6608 2002-06-04  Gabriel Dos Reis  <gdr@codesourcery.com>
6609
6610         * error.c (cp_diagnostic_starter): Adjust call.
6611         (maybe_print_instantiation_context): Change prototype to take a
6612         'diagnostic_info *'.
6613         (print_instantiation_full_context): Likewise.
6614         (print_instantiation_partial_context): Likewise.
6615         (cp_diagnostic_starter): Likewise.
6616         (cp_diagnostic_finalizer): Likewise.
6617         (cp_print_error_function): Likewise.
6618         (cp_printer): Take a secondary parameter as a 'text_info *'.
6619         Remove output_state savings.  Adjust calls.
6620
6621 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
6622
6623         * pt.c (inline_parm_levels): Mark for GC.
6624
6625         * mangle.c (start_mangling): Allocate G.substitutions here...
6626         (init_mangle): ... rather than here.
6627         (finish_mangling): Clear the varray pointer when done with it.
6628         * spew.c (yylexstring): Don't use VARRAY_FREE.
6629         * search.c (bfs_walk): Don't use VARRAY_FREE.
6630         * decl2.c (pending_statics): Use gengtype to mark.
6631         (deferred_fns): Likewise.
6632         (ssdf_decls): Likewise.
6633         (init_decl2): Delete.
6634         * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
6635         (cxx_init_decl_processing): Don't call init_decl2.
6636         (cxx_pop_function_context): Don't use VARRAY_FREE.
6637         * cp-tree.h (struct saved_scope): No need for special marking
6638         of varrays.
6639         (struct language_function): Likewise.
6640         (local_classes): Use gengtype to mark.
6641         (init_decl2): Delete prototype.
6642         * class.c (init_class_processing): Don't use
6643         ggc_add_tree_varray_root.
6644         (build_vtbl_initializer): Don't use VARRAY_FREE.
6645
6646         * decl.c (typename_compare): Don't use same_type_p.
6647
6648         * decl.c: Include hashtab.h instead of hash.h.
6649         (typename_hash): Update to use htab_h.
6650         (typename_compare): Likewise.
6651         (typename_htab): Use gengtype to mark.
6652         (build_typename_type): Update to use htab_h.
6653         * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
6654
6655         * Make-lang.in (gt-cp-tree.h): New rule.
6656         (cp/tree.o): Depend on gt-cp-tree.h.
6657         * config-lang.in (gtfiles): Add cp/tree.c.
6658         * tree.c: Include gt-cp-tree.h.
6659         (list_hash_table): Use gengtype to mark.
6660         (init_tree): Use gengtype to mark trees.
6661
6662         * Make-lang.in (cp/decl.o): Add debug.h dependency.
6663         * call.c (struct z_candidate): Use gengtype.
6664         (USER_CONV_CAND): Use WRAPPER_ZC.
6665         (convert_class_to_reference): Use build_zc_wrapper.
6666         (build_type_conversion_1): Likewise.
6667         (build_over_call): Use WRAPPER_ZC.
6668         (add_warning): Use build_zc_wrapper.
6669         * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
6670         * cp-tree.h (struct lang_identifier): Use gengtype.
6671         (struct template_parm_index_s): Likewise.
6672         (struct ptrmem_cst): Likewise.
6673         (struct tree_binding): Likewise.
6674         (struct tree_overload): Likewise.
6675         (struct tree_srcloc): Likewise.
6676         (struct tree_wrapper): Likewise.  Also modify to have a pointer
6677         to struct z_candidate rather than void.
6678         (enum cp_tree_node_structure_enum): New.
6679         (union lang_tree_node): New.
6680         (cxx_mark_tree): Delete prototype.
6681         (cp_tree_node_structure): New prototype.
6682         (build_ptr_wrapper): Delete prototype.
6683         (build_int_wrapper): Delete prototype.
6684         (build_zc_wrapper): New prototype.
6685         * decl.c: Include debug.h
6686         (cxx_mark_tree): Delete.
6687         (cp_tree_node_structure): New.
6688         * tree.c (build_ptr_wrapper): Delete.
6689         (build_int_wrapper): Delete.
6690         (build_zc_wrapper): New.
6691
6692         * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
6693         Correct typo.  Patch from k_fukui@highway.ne.jp.
6694
6695         * semantics.c (current_stmt_tree): Update for change to
6696         struct language_function.
6697         (finish_mem_initializers): Likewise.
6698         * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
6699         * cp-tree.h (struct language_function): Rename from
6700         cp_language_function.  Change all uses.
6701         (cp_function_chain): Don't need to cast.
6702
6703         * class.c (duplicate_tag_error): Reset discriminator.
6704         (check_bases_and_members): Update for data structure changes.
6705         * cp-tree.h (struct lang_id2): Use gengtype.
6706         (flagged_type_tree): Likewise.
6707         (SET_LANG_ID): Use GGC on struct lang_id2.
6708         (struct cp_language_function): Use gengtype.  Remove field
6709         'x_vcalls_possible_p'.
6710         (current_vcalls_possible_p): Delete.
6711         (struct lang_type_header): New.
6712         (struct lang_type_class): Rename from struct lang_type.  Include
6713         struct lang_type_header.
6714         (struct lang_type_ptrmem): New.
6715         (struct lang_type): New.
6716         (LANG_TYPE_CLASS_CHECK): New.  Use it in all the appropriate macros.
6717         (LANG_TYPE_PTRMEM_CHECK): New.  Use it in all the appropriate macros.
6718         (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
6719         (struct lang_decl_flags): Use gengtype.  Add discriminators.
6720         (struct lang_decl): Use gengtype.  Add and use discriminators.
6721         Update the macros that reference moved fields.
6722         (LANG_DECL_U2_CHECK): New function.  Use it when appropriate.
6723         (SET_DECL_THUNK_P): Set discriminator too.
6724         (clear_inline_text_obstack): Delete prototype.
6725         (finish_inline_definitions): Delete prototype.
6726         (mark_pending_inlines): Delete prototype.
6727         (lang_check_failed): New prototype.
6728         * decl.c (struct named_label_use_list): Use gengtype.
6729         (struct named_label_list): Likewise.
6730         (mark_binding_level): Delete.
6731         (mark_named_label_lists): Delete.
6732         (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
6733         (cxx_init_decl_processing): Use generated marker routine.
6734         (begin_destructor_body): Delete dead set to
6735         current_vcalls_possible_p.
6736         (mark_lang_function): Delete.
6737         (mark_cp_function_context): Delete.
6738         (lang_mark_tree): Use generated marker routines.
6739         * decl2.c (start_objects): Set discriminator when setting
6740         GLOBAL_INIT_PRIORITY.
6741         * lex.c (retrofit_lang_decl): Set discriminators.
6742         (copy_lang_type): Update for changes to lang_type structure.
6743         (cp_make_lang_type): Set discriminator.
6744         * parse.y: Use gengtype on YYLVAL.  Don't use dots in identifiers.
6745         * search.c: Include ggc.h.
6746         * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
6747         (finish_inline_definitions): Delete.
6748         * spew.c (struct token): Use gengtype.
6749         (struct token_chunk): New.
6750         (struct unparsed_text): Use gengtype.  Store tokens in chunks.
6751         (struct feed): Use gengtype.
6752         (feed_obstack): Delete.
6753         (feed): Mark as GC root.
6754         (pending_inlines): Mark as GC root.
6755         (pending_inlines_tail): Likewise.
6756         (processing_these_inlines): Likewise.
6757         (token_obstack): Make static.
6758         (first_token): Likewise.
6759         (init_spew): Don't initialize deleted things; use gengtype for roots.
6760         (clear_inline_text_obstack): Delete.
6761         (feed_input): Use GC for struct feed.  Update for changes to
6762         struct unparsed_text.
6763         (mark_pending_inlines): Delete.
6764         (next_token): Rename from add_token.  Change all callers.  Update
6765         for changes to struct unparsed_text.
6766         (space_for_token): New.
6767         (remove_last_token): New.
6768         (alloc_unparsed_text): New.
6769         (snarf_block): Take an unparsed_text.  Update for changes to struct
6770         unparsed_text.
6771         (snarf_method): Update for changes to struct unparsed_text.
6772         (snarf_defarg): Update for changes to struct unparsed_text.
6773         * tree.c (lang_check_failed): New.
6774
6775         * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
6776         gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
6777         (cp/spew.o): Add dependency on gt-<filename>.h.
6778         (cp/decl2.o): Add dependency on gt-<filename>.h.
6779         (cp/call.o): Add dependency on gt-<filename>.h.
6780         (cp/pt.o): Add dependency on gt-<filename>.h.
6781         (cp/repo.o): Add dependency on gt-<filename>.h.
6782         (cp/parse.o): Add dependency on gt-<filename>.h.
6783         * call.c: Use gengtype for roots.
6784         * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
6785         decl2.c parse.y pt.c repo.c spew.c.
6786         * cp-tree.h: Use gengtype for roots.
6787         (struct saved_scope): Use GGC, gengtype.
6788         (cp_parse_init): Delete prototype.
6789         (init_pt): Delete prototype.
6790         * decl.c: Use gengtype for roots.
6791         (mark_saved_scope): Delete.
6792         (cxx_init_decl_processing): Don't call deleted initilisation
6793         routines.
6794         (signed_size_zero_node): Delete, unused.
6795         * decl.h: Use gengtype for roots.
6796         * decl2.c: Use gengtype for roots.
6797         * lex.h: Use gengtype for roots.
6798         * parse.y: Use gengtype for roots.
6799         (cp_parse_init): Delete.
6800         * pt.c: Use gengtype for roots.
6801         (init_pt): Delete.
6802         * repo.c: Use gengtype for roots.
6803         * spew.c: Use gengtype for roots.
6804
6805         * Make-lang.in: Allow for filename changes.  Add gtype-cp.h.
6806         (cp/decl.o): Add dependency on gtype-cp.h.
6807         * decl.c: Remove use of add_deletable_root, use GTY marker instead.
6808         Include gtype-cp.h.  Allow for filename changes.
6809
6810         * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
6811         (cp/decl.o): Add cp/gt-decl.h dependency.
6812         * config-lang.in (gtfiles): New.
6813         * tree.h: Rename struct binding_level to struct cp_binding_level.
6814         * decl.c: Rename struct binding_level to struct cp_binding_level.
6815         Include cp/gt-decl.h.
6816         (struct cp_binding_level): Use gengtype.
6817         (make_binding_level): Use GGC on struct cp_binding_level.
6818         (mark_binding_level): Use gt_ggc_m_cp_binding_level.
6819         (cxx_init_decl_processing): Mark free_binding_level as
6820         deletable.
6821
6822         * decl.c (mark_cp_function_context): Update calling sequence.
6823
6824         * decl.c (start_function): Don't free 'struct
6825         cp_language_function'.
6826         (pop_cp_function_context): Likewise.
6827         (save_function_data): Allocate it using GC.
6828         * semantics.c (genrtl_start_function): Don't free 'struct
6829         cp_language_function'.
6830
6831 2002-05-31  Matthew Woodcraft  <mattheww@chiark.greenend.org.uk>
6832
6833         * lang-specs.h: Use cpp_debug_options.
6834
6835 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
6836
6837         * mangle.c, tree.c: Include real.h.
6838         * Make-lang.in: Update dependency lists.
6839
6840 2002-05-25  Neil Booth  <neil@daikokuya.demon.co.uk>
6841
6842         * lex.c: Don't include c-lex.h.
6843         * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
6844
6845 2002-05-23  Neil Booth  <neil@daikokuya.demon.co.uk>
6846
6847         * spew.c (yyungetc, snarf_block): Remove indent_level handling.
6848
6849 2002-05-22  Richard Henderson  <rth@redhat.com>
6850
6851         * decl.c (obscure_complex_init): Check for VAR_DECL
6852         before using DECL_THREAD_LOCAL.
6853
6854 2002-05-22  Richard Henderson  <rth@redhat.com>
6855
6856         * decl.c (check_tag_decl): Handle RID_THREAD.
6857         (obscure_complex_init): Reject run-time init of tls.
6858         (grokvardecl, grokdeclarator): Handle RID_THREAD.
6859         * lex.c (reswords): Add __thread.
6860         (rid_to_yy): Map RID_THREAD to SCSPEC.
6861
6862 2002-05-22  Neil Booth  <neil@daikokuya.demon.co.uk>
6863
6864         * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
6865         * cp-tree.h (cxx_post_options): Kill.
6866         * cp-lex.c (cxx_post_options): Kill.
6867
6868 2002-05-21  Richard Henderson  <rth@redhat.com>
6869
6870         * lex.c (rid_to_yy): Add RID_THREAD.
6871
6872 2002-05-21  Alexandre Oliva  <aoliva@redhat.com>
6873
6874         * init.c (build_vec_init): Test for trivial copy-assignment when
6875         copy-assigning arrays.
6876
6877 2002-05-20  Andreas Jaeger  <aj@suse.de>
6878
6879         * init.c (build_default_init): Remove unused variable.
6880
6881 2002-05-20  Alexandre Oliva  <aoliva@redhat.com>
6882
6883         * call.c (any_strictly_viable): New.
6884         (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
6885
6886 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6887
6888         * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
6889
6890 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6891
6892         PR c++/186, DR 259
6893         * pt.c (do_decl_instantiation): Don't complain explicit
6894         instantiation after explicit specialization.
6895         (do_type_instantiation): Likewise.
6896
6897 2002-05-19  Alexandre Oliva  <aoliva@redhat.com>
6898
6899         * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
6900         renamed from...
6901         (complete_type_or_else): ... this.  Redefined as macro.
6902         (cxx_incomplete_type_diagnostic): Declare.
6903         (cxx_incomplete_type_error): Define as macro.
6904         * init.c (build_delete): Warn about incomplete types other than
6905         void, and use the built-in operator delete for them.
6906         * typeck.c (complete_type_or_diagnostic): Renamed from
6907         complete_type_or_else.  Added warn_only argument, passed to...
6908         * typeck2.c (cxx_incomplete_type_diagnostic): ... this.  Print
6909         warnings or errors depending on new warn_only argument.  Renamed
6910         from...
6911         (cxx_incomplete_type_error): ... this.  New implementation in
6912         terms of cxx_incomplete_type_diagnostic.
6913
6914 2002-05-18  Jason Merrill  <jason@redhat.com>
6915
6916         PR c++/6611
6917         * decl2.c (import_export_decl): If we clear
6918         DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
6919
6920 2002-05-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6921
6922         PR c++/6620
6923         * pt.c (verify_class_unification): Don't check if PARM is template
6924         parameter dependent.  Simplify.
6925         (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
6926         parameter dependent expression.
6927
6928 2002-05-14  Jason Merrill  <jason@redhat.com>
6929
6930         * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
6931         Do set DECL_COMDAT.
6932         (synthesize_tinfo_var): Take the public decl.
6933         (create_real_tinfo_var): Likewise.  Check DECL_COMDAT.
6934         (emit_tinfo_decl): Adjust.  Call import_export_decl.
6935         * decl2.c (import_export_decl): Simplify tinfo decl handling.
6936
6937 2002-05-14  Alexandre Oliva  <aoliva@redhat.com>
6938
6939         * cp-tree.h (struct lang_type): Added non_zero_init.
6940         (CLASSTYPE_NON_ZERO_INIT_P): New macro.
6941         (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
6942         * class.c (check_field_decls): Test non_zero_init.
6943         * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
6944         zero-to-NULL conversions.
6945         * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
6946         type that needs zero-initialization without zeros.
6947         (check_initializer_decl): Compute zero-initializer for types
6948         that require a non-trivial one.
6949         * init.c (build_forced_zero_init): New function.
6950         (build_default_init): Use it.
6951         * tree.c (zero_init_p): New function.
6952         * typeck2.c (force_store_init_value): New function.
6953         (process_init_constructor): Create non-trivial zero-initializers
6954         for array members and class fields.
6955
6956 2002-05-14  Neil Booth  <neil@daikokuya.demon.co.uk>
6957
6958         * lang-specs.h: Remove redundant -lang-c++.
6959
6960 2002-05-13  Jason Merrill  <jason@redhat.com>
6961
6962         * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
6963         (fixed_type_or_null): See through reference vars.
6964         (build_base_path): Vtable contents are constant.
6965         * typeck.c (get_member_function_from_ptrfunc): Likewise.
6966
6967 2002-05-12  Jason Merrill  <jason@redhat.com>
6968
6969         * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
6970         structs are safe.
6971
6972 2002-05-09  Neil Booth  <neil@daikokuya.demon.co.uk>
6973
6974         * cp-tree.h (flag_ansi): Remove.
6975         * decl2.c (flag_ansi): Remove.
6976         (cxx_decode_option): Set flag_iso and flag_undef.
6977
6978 2002-05-09  Jason Merrill  <jason@redhat.com>
6979
6980         * typeck.c (get_member_function_from_ptrfunc): Reorganize.
6981         Use subtraction rather than a bitmask to get the index.
6982         * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
6983
6984         * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
6985
6986 2002-05-07  Neil Booth  <neil@daikokuya.demon.co.uk>
6987
6988         * Make-lang.in (decl2.o): Update.
6989         * cp-tree.h (warn_multichar): Remove.
6990         * decl2.c: Include c-common.h.
6991         (warn_multichar): Remove.
6992
6993 2002-05-03  Jason Merrill  <jason@redhat.com>
6994
6995         * tree.c (build_cplus_array_type): Only const and volatile get
6996         special handling.
6997
6998         * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
6999
7000 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
7001
7002         ABI change, returning simple classes from functions.
7003         * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
7004         TYPE_HAS_TRIVIAL_INIT_REF is false or
7005         TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
7006
7007 2002-04-30  Jason Merrill  <jason@redhat.com>
7008
7009         PR debug/6436
7010         * decl.c (grokdeclarator): Don't override TYPE_NAME of an
7011         anonymous class with a typedef if there are attributes.
7012
7013 2002-04-29  Paul Eggert  <eggert@twinsun.com>
7014
7015         * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
7016
7017 2002-04-29  Jakub Jelinek  <jakub@redhat.com>
7018
7019         PR c++/6477
7020         * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
7021         non-NULL first.
7022
7023 2002-04-29  Mark Mitchell  <mark@codesourcery.com>
7024
7025         PR c++/6492
7026         * pt.c (tsubst_friend_class): If the friend has an explicit scope,
7027         enter that scope before name lookup.
7028
7029         PR c++/6486
7030         * method.c (do_build_copy_constructor): Avoid building
7031         cv-qualified reference types.
7032
7033 2002-04-29  Nathan Sidwell  <nathan@codesourcery.com>
7034
7035         PR c++/5719
7036         * decl.c (grok_op_properties): Assignment ops don't have to return
7037         by value. operator% should.
7038
7039 2002-04-28  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
7040
7041         PR c/6343
7042         * decl.c (duplicate_decls): Call merge_weak.
7043
7044 2002-04-26  Richard Henderson  <rth@redhat.com>
7045
7046         * parse.y (malloced_yyss, malloced_yyvs): New.
7047         (yyoverflow): Re-add.  Set them.
7048         (free_parser_stacks): New.
7049
7050 2002-04-26  Mark Mitchell  <mark@codesourcery.com>
7051
7052         PR c++/6497
7053         * method.c (do_build_assign_ref): Pass a derivation to
7054         build_method_call when calling base class assignment operators.
7055
7056 2002-04-26  Richard Henderson  <rth@redhat.com>
7057
7058         * parse.y (yyoverflow): Revert.
7059
7060 2002-04-26  Richard Henderson  <rth@redhat.com>
7061
7062         PR c/3581
7063         * parse.y (string): Remove.  Update all uses to use STRING
7064         instead, and not call combine_strings.
7065         * rtti.c (tinfo_name): Use fix_string_type.
7066         * semantics.c (finish_asm_stmt): Don't call combine_strings.
7067         * spew.c (yylexstring): New.
7068         (read_token): Use it.
7069
7070 2002-04-25  Richard Henderson  <rth@redhat.com>
7071
7072         PR c/2161
7073         * parse.y (yyoverflow): New.
7074
7075 2002-04-25  Jason Merrill  <jason@redhat.com>
7076
7077         PR c++/5607
7078         * search.c (check_final_overrider): No longer static.
7079         * class.c (update_vtable_entry_for_fn): Call it.
7080         * cp-tree.h: Adjust.
7081
7082 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
7083
7084         * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
7085         * cp-tree.h (cxx_set_yydebug): Die.
7086         * lex.c (YYDEBUG): Get from c-lex.h.
7087         (cxx_set_yydebug): Remove.
7088         * parse.y: Include c-lex.h.
7089         (YYDEBUG): Get from c-lex.h.
7090
7091 2002-04-24  Mark Mitchell  <mark@codesourcery.com>
7092
7093         PR c++/6438.
7094         * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
7095         void.
7096
7097 2002-04-24  Neil Booth  <neil@daikokuya.demon.co.uk>
7098
7099         * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
7100         LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
7101         Redefine.
7102         * cp-tree.h (cp_attribute_table): Rename.
7103         * decl.c (lang_attribute_table): Remove declaration.
7104         (cxx_init_decl_processing): Don't set it.
7105         * tree.c (cp_attribute_table): Rename.
7106
7107 2002-04-24  Jason Merrill  <jason@redhat.com>
7108
7109         PR c++/6331
7110         * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
7111         * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
7112         The pedwarn for array assignment is now unconditional.
7113         * tree.c (build_cplus_array_type_1): Still process simple array types
7114         normally in templates.
7115
7116         PR c++/6395
7117         * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
7118         stuff for comdats.
7119
7120 2002-04-23  Jakub Jelinek  <jakub@redhat.com>
7121
7122         * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
7123         node with attributes.
7124
7125 2002-2-23  David O'Brien  <obrien@FreeBSD.org>
7126
7127         * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
7128         Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
7129
7130 2002-04-23  Mark Mitchell  <mark@codesourcery.com>
7131
7132         PR c++/6256:
7133         * pt.c (tsubst_friend_class): Handle templates with explicit
7134         nested names.
7135
7136         PR c++/6331:
7137         * typeck.c (merge_types): Remember the cv-qualification of pointer
7138         types when merging them.
7139
7140 2002-04-20  Neil Booth  <neil@daikokuya.demon.co.uk>
7141
7142         * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
7143         LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
7144         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
7145         cxx_mark_function_context): New.
7146         * decl.c (push_cp_function_context, pop_cp_function_context,
7147         mark_cp_function_context): Rename for consistency.
7148         (cxx_init_decl_processing): Don't set old hooks.
7149
7150 2002-04-19  Neil Booth  <neil@daikokuya.demon.co.uk>
7151
7152         * call.c (convert_type_from_ellipsis): Rename, update.
7153         * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
7154         * cp-tree.h (convert_type_from_ellipsis): Rename.
7155         * decl.c (cxx_init_decl_processing): Don't set hook.
7156
7157 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
7158
7159         * call.c (build_new_method_call): Update.
7160         * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
7161         * cp-tree.h (cxx_incomplete_type_error): New.
7162         * decl.c (grokdeclarator, grokparms): Update.
7163         * decl2.c (check_classfn): Update.
7164         * pt.c (tsubst): Update.
7165         * typeck.c (complete_type_or_else, expr_sizeof,
7166         decay_conversion): Update.
7167         * typeck2.c (incomplete_type_error): Rename.
7168         (add_exception_specifier): Update.
7169
7170 2002-04-18  Jason Merrill  <jason@redhat.com>
7171
7172         PR c++/5658
7173         * search.c (setup_class_bindings): A class template qualifies as a
7174         type binding.
7175
7176 2002-04-17  Jakub Jelinek  <jakub@redhat.com>
7177
7178         PR c++/6316
7179         * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
7180         before expanding.
7181
7182 2002-04-16  Mark Mitchell  <mark@codesourcery.com>
7183
7184         * init.c (begin_init_stmts): Remove commented out code.
7185         (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
7186         * semantics.c (begin_gobal_stmt_expr): Adjust call to
7187         expand_start_stmt_expr.
7188
7189 2002-04-15  Mark Mitchell  <mark@codesourcery.com>
7190
7191         * decl.c (register_dtor_fn): Pass the address of dso_handle, not
7192         dso_handle itself, to __cxa_atexit.
7193
7194 2002-04-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
7195
7196         * error.c (cxx_print_error_function): Adjust call to macros.
7197
7198 2002-04-14  Jakub Jelinek  <jakub@redhat.com>
7199
7200         * class.c (layout_virtual_bases): Do all dsize computation on trees.
7201
7202 2002-04-14  Jason Merrill  <jason@redhat.com>
7203
7204         * typeck.c (get_member_function_from_ptrfunc): Don't do
7205         gratuitious division and multiplication on
7206         ptrmemfunc_vbit_in_delta targets.
7207
7208 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
7209
7210         PR c++/5373.
7211         * semantics.c (finish_expr_stmt): Remember the type of the
7212         expression before any conversions are performed.
7213
7214 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
7215
7216         PR c++/5189.
7217         * call.c (add_template_candidate_real): Do not treat member
7218         templates as copy constructors.
7219
7220 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
7221
7222         * decl.c (duplicate_decls): Do not copy the RTL for a variable
7223         declaration if the old variable had an incomplete type and the new
7224         variable does not.
7225         (complete_vars): Do not call layout_decl for completed variables.
7226
7227 2002-04-12  Richard Sandiford  <rsandifo@redhat.com>
7228
7229         * decl.c (duplicate_decls): Don't try to unify an implicit typedef
7230         with an explicit one.
7231         (follow_tag_typedef): New.
7232         (lookup_tag): Use it to extract the tag of an explicit typedef.
7233         (xref_tag): Likewise.
7234
7235 2002-04-11  Andrew Haley  <aph@redhat.com>
7236
7237         * typeck.c (type_after_usual_arithmetic_conversions):
7238         If two types have the same variant, return immediately.
7239         When two floating-point operands are the same precision:
7240           convert to float if one of the operands is float;
7241           if neither operand is one of the standard types, return the type
7242           of the first operand.
7243
7244 2002-04-10  Nathan Sidwell  <nathan@codesourcery.com>
7245
7246         PR c++/5507
7247         * decl.c (make_typename_type): Remove implicit typenameness.
7248
7249 2002-04-09  Jason Merrill  <jason@redhat.com>
7250
7251         PR optimization/6189
7252         * semantics.c (genrtl_start_function): Don't free
7253         DECL_SAVED_FUNCTION_DATA for inline functions.
7254
7255         * init.c (build_member_call): For now, don't convert to
7256         intermediate base if it would cause an error.
7257
7258 2002-04-08  Paolo Carlini  <pcarlini@unitus.it>
7259
7260         * parse.y (namespace_qualifier, maybe_identifier,
7261         begin_explicit_instantiation, end_explicit_instantiation,
7262         apparent_template_type, .finish_template_type,
7263         do_id, maybe_init, defarg_again, component_decl_1):
7264         Add ending ';', in accordance with POSIX.
7265
7266 2002-04-06  Mark Mitchell  <mark@codesourcery.com>
7267
7268         PR c++/5571
7269         * class.c (layout_class_type): Remember incomplete static
7270         variables.
7271         (finish_struct_1): Call complete_vars, not
7272         hack_incomplete_structures.
7273         * cp-tree.h (hack_incomplete_structures): Rename to ...
7274         (complete_vars): ... this.
7275         (struct saved_scope): Remove incomplete.
7276         (namespace_scope_incomplete): Remove.
7277         * decl.c (struct binding_level): Remove incomplete.
7278         (incomplete_vars): New variable.
7279         (mark_binding_level): Don't mark incomplete.
7280         (print_binding_level): Don't print it.
7281         (mark_saved_scope): Don't mark incomplete.
7282         (pushdecl): Use maybe_register_incopmlete_var.
7283         (cxx_init_decl_processing): Register incomplete_vars for GC.
7284         (start_decl_1): Clarify error message.
7285         (hack_incomplete_vars): Remove.
7286         (maybe_register_incomplete_var): New function.
7287         (complete_vars): Likewise.
7288
7289 2002-04-06  Jason Merrill  <jason@redhat.com>
7290
7291         PR c++/4934
7292         * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
7293         set before checking it.
7294
7295         PR c++/525
7296         * init.c (build_member_call): Use build_scoped_ref.
7297         (resolve_offset_ref): Likewise.
7298         * call.c (build_scoped_method_call): Likewise.
7299         * tree.c (maybe_dummy_object): Kludge around current_class_type being
7300         wrong.
7301         * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
7302         * cp-tree.h: Adjust.
7303
7304         * init.c (push_base_cleanups): Just use build_scoped_method_call.
7305
7306         PR c++/6179
7307         * method.c (implicitly_declare_fn): Pass unqualified type to
7308         synthesize_exception_spec.
7309
7310 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
7311
7312         * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
7313         * cvt.c: Update comment.
7314         * init.c (expand_cleanup_for_base): Update.
7315         * semantics.c (finish_parenthesized_expr): Update.
7316         * typeck.c (cp_truthvalue_conversion): Update.
7317
7318 2002-04-04  Jason Merrill  <jason@redhat.com>
7319
7320         * semantics.c (finish_eh_cleanup): New fn.
7321         * cp-tree.h: Add prototype.
7322         * init.c (perform_member_init, expand_cleanup_for_base): Use
7323         finish_eh_cleanup.
7324         * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
7325         * cp-tree.h: Remove references.
7326         * decl.c (begin_constructor_body, end_constructor_body): Likewise.
7327         * dump.c (cp_dump_tree): Likewise.
7328         * pt.c (tsubst_expr): Likewise.
7329         * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
7330         (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
7331         * tree.c (cp_statement_code_p): Likewise.
7332
7333         * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
7334
7335         PR c++/5636
7336         * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
7337         cleanup for nrv.
7338
7339         PR c++/5104
7340         * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
7341         specifiers.
7342         [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
7343
7344 2002-04-03  Richard Henderson  <rth@redhat.com>
7345
7346         * cp-lang.c (cxx_warn_unused_global_decl): New.
7347         (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
7348
7349 2002-04-03  Neil Booth  <neil@daikokuya.demon.co.uk>
7350
7351         * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
7352         * tree.c (init_tree): Don't set hook.
7353
7354 2002-04-03  Roger Sayle  <roger@eyesopen.com>
7355
7356         PR c++/5998:
7357         * decl.c (duplicate_decls): Don't mess with assembler names when
7358         redeclaring builtin functions as static.
7359
7360 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
7361
7362         * call.c (build_addr_func): Update.
7363         * class.c (resolve_address_of_overloaded_function): Update.
7364         * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
7365         * cp-tree.h (cxx_mark_addressable): New.
7366         * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
7367         * decl2.c (build_cleanup): Update.
7368         * except.c (build_throw): Update.
7369         * init.c (resolve_offset_ref): Update.
7370         * pt.c (convert_nontype_argument): Update.
7371         * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
7372         * typeck.c (decay_conversion, build_array_ref, build_unary_op,
7373         unary_complex_lvalue): Update.
7374         (mark_addressable): Rename.
7375
7376 2002-04-01  Roger Sayle  <roger@eyesopen.com>
7377
7378         PR c++/5998:
7379         * decl.c (duplicate_decls):  Overwrite the RTL when (and only
7380         when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
7381         but follow the SET_DECL_RTL idiom used elsewhere in the function.
7382
7383 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
7384
7385         * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
7386         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
7387         * decl.c (grokdeclarator): Update.
7388         * mangle.c (write_integer_cst): Update.
7389         * typeck.c (build_binary_op): Update.
7390
7391 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
7392
7393         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
7394         * lex.c (cxx_init): Don't set hook.
7395
7396 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
7397
7398         * Make-lang.in (error.o): Update.
7399         * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
7400         * cp-tree.h (struct diagnostic_context): Predeclare.
7401         (cxx_print_error_function): New.
7402         * error.c: Include langhooks-def.h.
7403         (lang_print_error_function): Rename.  Update.
7404         (init_error): Don't set hook.
7405
7406 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
7407
7408         * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
7409         Redefine.
7410         * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
7411         * decl.c (finish_enum): Similarly.
7412         * error.c (dump_type): Similarly.
7413         * lex.c (cxx_init): Similarly.
7414         * mangle.c (write_builtin_type): Similarly.
7415         * typeck.c (comptypes): Similarly.
7416
7417 2002-03-28  Roger Sayle  <roger@eyesopen.com>
7418
7419         PR c++/5998:
7420         * decl.c (cxx_init_decl_processing): Re-enable built-in functions
7421         in the g++ front-end.
7422         (duplicate_decl): Allow redefinition of anticipated built-ins.
7423         Fix inlining problem by over-writing the old DECL_RTL.
7424         (lookup_namespace_name): Fail to find an identifier in the
7425         specified namespace if its still anticipated.
7426         (builtin_function_1): New function split out from builtin_function
7427         to create a builtin in the current namespace with given context.
7428         (builtin_function): Call builtin_function_1 to define the
7429         appropriate builtins in both the std and global namespaces.
7430         (select_decl): Don't test for anticipated decls here.
7431         (unqualified_namespace_lookup): Instead ignore them whilst
7432         searching through scopes and namespaces.
7433         * decl2.c (do_nonmember_using_decl): If a using declaration
7434         specifies an anticipated built-in function, mark it as no longer
7435         anticipated in that scope.
7436         (ambiguous_decl):  Avoid resolving to an anticipated decl.
7437         * lex.c (do_scoped_id): Fail to find an identifier in the global
7438         namespace if its still anticipated.
7439
7440 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
7441
7442         * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
7443         * cp-tree.h (cp_make_lang_type): Rename.
7444         * lex.c (cp_make_lang_type): Rename.
7445         (make_aggr_type): Update.
7446         * tree.c (init_tree): Don't set make_lang_type_fn.
7447
7448 2002-03-29  Jakub Jelinek  <jakub@redhat.com>
7449
7450         PR c++/6073
7451         * class.c (finish_struct_1): Update static field's DECL_MODE even
7452         if its type is a variant of t.
7453
7454 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
7455
7456         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
7457         * cp-tree.h (cxx_insert_default_attributes): New.
7458         * decl.c (insert_default_attributes): Rename.
7459
7460 2002-03-27  Mark Mitchell  <mark@codesourcery.com>
7461
7462         PR c++/4884
7463         * call.c (build_op_delete_call): Allow for the fact the placement
7464         may be a COMPOUND_EXPR.
7465
7466 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
7467
7468         * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
7469         * cp-tree.h (init_cplus_expand): Remove.
7470         (cxx_expand_expr): New.
7471         * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
7472         fix prototype.
7473         (init_cplus_expand): Remove.
7474         * lex.c (cxx_init): Don't call init_cplus_expand.
7475
7476 2002-03-26  Mark Mitchell  <mark@codesourcery.com>
7477
7478         PR c++/4884.
7479         * init.c (build_new_1): Allow for the fact the result of
7480         build_function_call may be a COMPOUND_EXPR.
7481
7482 2002-03-26  Nathan Sidwell  <nathan@codesourcery.com>
7483
7484         PR c++/5682
7485         * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
7486         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
7487         (dfs_skip_nonprimary_vbases_markedp): Remove.
7488         * search.c (get_shared_vbase_if_not_primary): Remove.
7489         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
7490         (dfs_skip_nonprimary_vbases_markedp): Remove.
7491         (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
7492         (dfs_marked_real_bases_queue_p): Likewise.
7493
7494 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
7495
7496         * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
7497         * cp-tree.h (cxx_mark_tree): New.
7498         * decl.c (lang_mark_tree): Rename cxx_mark_tree.
7499
7500 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
7501
7502         * cp-tree.h (cxx_maybe_build_cleanup): New.
7503         * decl.c (destroy_local_var, hack_incomplete_structures): Update.
7504         (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
7505         * tree.c (build_target_expr): Update.
7506         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
7507
7508 2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
7509
7510         * decl2.c (cxx_decode_option): Handle -E.
7511         * lang-specs.h (default_compilers): Preprocess with cc1plus.
7512         * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
7513
7514 2002-03-23  Jakub Jelinek  <jakub@redhat.com>
7515
7516         PR c++/6037
7517         * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
7518
7519 2002-03-23  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
7520
7521         * error.c (dump_type): Be careful about implicit typenames.
7522
7523 2002-03-21  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
7524
7525         PR C++/3656
7526         * semantics.c (finish_base_specifier): Handle erronous base
7527         classes.
7528
7529 2002-03-22  Zack Weinberg  <zack@codesourcery.com>
7530
7531         * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
7532         REAL_IS_NOT_DOUBLE.
7533
7534 2002-03-22  Jeff Knaggs  <jknaggs@redhat.com>
7535
7536         * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
7537         an index into the vtable_entry array regardless of
7538         TARGET_PTRMEMFUNC_VBIT_LOCATION.
7539
7540 2002-03-21  Aldy Hernandez  <aldyh@redhat.com>
7541
7542         * tree.c (cp_cannot_inline_tree_fn): Same.
7543
7544 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
7545
7546         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
7547         insert_block, getdecls, global_bindings_p): New.
7548
7549 2002-03-20  Nathan Sidwell  <nathan@codesourcery.com>
7550
7551         PR c++/4361
7552         * mangle.c (struct globals) Add internal_mangling_p member.
7553         (write_template_param): Do internal mangling, if needed.
7554         (mangle_conv_op_name_for_type): Request internal mangling.
7555
7556 2002-03-20  Jason Merrill  <jason@redhat.com>
7557
7558         PR c++/2136
7559         * init.c (build_delete): Check access for a member op delete here.
7560         * decl2.c (delete_sanity): Not here.
7561
7562 2002-03-19  Jason Merrill  <jason@redhat.com>
7563
7564         PR c++/5118
7565         * class.c (get_vfield_name): Use the constructor_name.
7566
7567 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
7568
7569         * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
7570         * cp-tree.h (lang_printable_name): Rename.
7571         * error.c (lang_decl_name): Use new hook.
7572         * lex.c (cxx_init): Remove old hook.
7573         * pt.c (tsubst_decl): Use new hook.
7574         * tree.c (lang_printable_name): Rename.
7575
7576 2002-03-18  Eric Botcazou  <ebotcazou@multimania.com>
7577
7578         PR c++/3882
7579         * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
7580         (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
7581         only after recording the declaration.
7582
7583 2002-03-18  Jason Merrill  <jason@redhat.com>
7584
7585         PR c++/2039
7586         * init.c (resolve_offset_ref): Hand off to build_component_ref.
7587
7588         PR c++/4222, c++/5995
7589         * call.c (build_over_call): Fix empty class logic.
7590
7591         PR c++/3870
7592         * cp-tree.h (struct saved_scope): Add last_parms field.
7593         * decl.c (maybe_push_to_top_level): Save last_function_parms.
7594         (pop_from_top_level): Restore it.
7595
7596         PR c++/4377
7597         * mangle.c (write_expression): Strip NOP_EXPRs sooner.  Also strip
7598         NON_LVALUE_EXPRs.
7599
7600         PR c++/4003
7601         * pt.c (tsubst_friend_function): Use decl_namespace_context.
7602
7603         PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
7604         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
7605         type with a nontrivial destructor.
7606
7607 2002-03-17  Jason Merrill  <jason@redhat.com>
7608
7609         PR c++/4460
7610         * class.c (build_base_path): Virtual base layout is fixed in
7611         in-charge [cd]tors.
7612
7613 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
7614
7615         * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
7616         * parse.y (yyparse): Remove macro.
7617
7618 2002-03-17  Jason Merrill  <jason@redhat.com>
7619
7620         PR c++/5757
7621         * init.c (build_new_1): Pass the right pointer to op delete.
7622
7623 2002-03-16  Nathan Sidwell  <nathan@codesourcery.com>
7624
7625         PR c++/4361
7626         * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
7627         conversion operators go.
7628         (struct lang_decl_flags): Add template_conv_p and unused
7629         bitfields.
7630         (DECL_TEMPLATE_CONV_FN_P): New macro.
7631         * call.c (build_user_type_conversion_1): Don't check second type
7632         conversion of overload set first.
7633         * class.c (add_method): Make sure templated conversion operators
7634         all end up on slot 2.
7635         * lex.c (do_identifier): A conversion operator token might be
7636         satisfied by a templated conversion operator.
7637         * pt.c (check_explicit_specialization): Use
7638         CLASSTYPE_FIRST_CONVERSION_SLOT.
7639         (template_parm_this_level_p): New function.
7640         (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
7641         * search.c (lookup_fnfields_1): Template conversions will be on
7642         the first slot.
7643         * typeck.c (build_component_ref): Preserve the type of an
7644         conversion operator name on the overload type.
7645         (build_x_function_call): Retrieve the conversion operator name.
7646
7647 2002-03-15  Richard Henderson  <rth@redhat.com>
7648
7649         * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
7650
7651 2002-03-15  Mark Mitchell  <mark@codesourcery.com>
7652
7653         * cp-tree.h (CLEANUP_DECL): Remove.
7654         (CLEANUP_EXPR): Likewise.
7655         * decl.c (destroy_local_var): Simplify.
7656         (maybe_build_cleanup): Tidy.
7657         * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
7658         * semantics.c (cp_expand_stmt): Likewise.
7659         * cp/tree.c (cp_statement_code_p): Likewise.
7660
7661 2002-03-15  Jason Merrill  <jason@redhat.com>
7662
7663         PR c++/5857
7664         * decl.c (duplicate_decls): Use merge_types instead of common_type.
7665         * typeck.c (common_type): Just hand off to
7666         type_after_usual_arithmetic_conversions and
7667         composite_pointer_type.
7668         (merge_types): New fn.
7669         (commonparms): Use it instead of common_type.
7670         (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
7671         (composite_pointer_type): Also handle attributes.
7672         * cp-tree.h: Declare merge_types.
7673
7674         * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
7675         variables.
7676         * decl2.c (maybe_make_one_only): Also mark the decl as needed.
7677
7678 2002-03-14  Richard Henderson  <rth@redhat.com>
7679
7680         * decl.c: Include c-pragma.h.
7681         (start_decl, start_function): Invoke maybe_apply_pragma_weak.
7682         * Make-lang.in: Update dependencies.
7683
7684 2002-03-14  Jakub Jelinek  <jakub@redhat.com>
7685
7686         PR c++/5908
7687         * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
7688         * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
7689
7690 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
7691
7692         * mangle.c (write_builtin_type): Handle 128-bit integers even if
7693         they are not a standard integer type.
7694
7695 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
7696
7697         * cp-tree.h (init_init_processing): Remove declaration.
7698         * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
7699         * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
7700
7701 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7702
7703         * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
7704         Define.
7705         * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
7706         tree_code_length.
7707         * lex.c (cplus_tree_code_type, cplus_tree_code_length,
7708         cplus_tree_code_name): Delete.
7709         (cxx_init): Don't call add_c_tree_codes, instead set
7710         lang_unsafe_for_reeval.  Don't try to copy into the various
7711         tree_code arrays.
7712
7713 2002-03-12  Nathan Sidwell  <nathan@codesourcery.com>
7714
7715         PR c++/5659
7716         * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
7717         * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
7718         definitions.
7719
7720 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
7721
7722         Revert 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>,
7723         DR209 is now not a defect.
7724         * cp-tree.h (skip_type_access_control): Remove.
7725         * decl.c (grokdeclarator): Do type access control for friend
7726         declarations.
7727         * semantics.c (decl_type_access_control): Don't reset
7728         current_type_lookups.
7729         (save_type_access_control): Always save the lookups.
7730         (skip_type_access_control): Remove.
7731         (finish_class_definition): Don't change type_lookups.
7732
7733 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
7734
7735         Revert 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>,
7736         It is incorrect.
7737         * typeck.c (build_static_cast): Compare non-qualified types
7738         with pointer to member conversions.
7739
7740 2002-03-11  Dan Nicolaescu  <dann@ics.uci.edu>
7741             Daniel Berlin  <dan@dberlin.org>
7742
7743         * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
7744         (cxx_get_alias_set): Use it.
7745
7746 2002-03-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7747
7748         * cp-tree.h (stabilize_expr): Prototype.
7749
7750 2002-03-08  Craig Rodrigues  <rodrigc@gcc.gnu.org>
7751
7752         * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
7753         conditional return void.
7754
7755 2002-03-08  Neil Booth  <neil@daikokuya.demon.co.uk>
7756
7757         * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
7758         * cp-tree.h (cxx_unsave): New.
7759         * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
7760         (init_tree): Update.
7761
7762 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7763
7764         * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
7765         explicit sizeof/sizeof.
7766         * decl2.c (cxx_decode_option): Likewise.
7767         * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
7768
7769 2002-03-02  Nathan Sidwell  <nathan@codesourcery.com>
7770
7771         PR c++/775
7772         * decl.c (lookup_tag): Only reject enum/class mismatch, not
7773         class/union mismatch.
7774         * parse.y (check_class_key): New function.
7775         (structsp): Call it.
7776
7777 2002-03-01  Michael Matz  <matz@suse.de>
7778
7779         * typeck.c (cp_pointer_int_sum): Complete inner type which is
7780         used later by size_in_bytes().
7781
7782 2002-03-01  Phil Edwards  <pme@gcc.gnu.org>
7783
7784         * cp-tree.h:  Require __GNUC__ to be #defined.
7785         (build_init):  Add missing prototype.
7786
7787 2002-03-01  Jason Merrill  <jason@redhat.com>
7788
7789         * except.c: Don't include decl.h or obstack.h.  Do include
7790         tree-inline.h.
7791         (build_throw): Destroy temporaries from the thrown
7792         expression before calling __cxa_throw.  Construct a thrown
7793         temporary directly into the exception object.
7794         (stabilize_throw_expr): New function.
7795         (wrap_cleanups_r): New function.
7796         * tree.c (stabilize_expr): New function.
7797         * init.c (build_init): New function.
7798         * Make-lang.in (cp/except.o): Adjust .h deps.
7799
7800 2002-02-28  Jason Merrill  <jason@redhat.com>
7801
7802         * search.c (lookup_base_r): Don't clear is_non_public just because
7803         we found a friendly scope.
7804
7805         * decl.c (finish_function): Only warn about missing return
7806         statement with -Wreturn-type.
7807
7808 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
7809
7810         * class.c (build_clone): Update.
7811         * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
7812         * cp-tree.h (cxx_dup_lang_specific_decl): New.
7813         * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
7814         (copy_decl): Update.
7815         * method.c (make_thunk): Update.
7816
7817 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
7818
7819         * decl2.c: Delete traditional-mode-related code copied from
7820         the C front end but not used, or used only to permit the
7821         compiler to link.
7822
7823 2002-02-24 Craig Rodrigues  <rodrigc@gcc.gnu.org>
7824
7825         PR c++/4093
7826         * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
7827         to void.
7828
7829 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
7830
7831         PR other/5746
7832         * semantics.c (finish_switch_cond): Don't call get_unwidened
7833         if error_mark_node.
7834
7835 2002-02-22  Nathan Sidwell  <nathan@codesourcery.com>
7836
7837         PR c++/2645, DR 295
7838         * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
7839         tf_keep_type_decl.
7840         (make_typename_type): Use tsubst_flags_t.
7841         * decl.c (make_typename_type): Adjust. Return non-artificial
7842         TYPE_DECLs, if required.
7843         (grokdeclarator): Simplify CVR qualification handling. Allow bad
7844         qualifiers on typedef types.
7845         * decl2.c (handle_class_head): Adjust make_typename_type call.
7846         * parse.y (nested_name_specifier): Likewise.
7847         (typename_sub0): Likewise.
7848         (typename_sub1): Likewise.
7849         * pt.c (convert_template_argument): Adjust make_typename_type
7850         return value.
7851         (tsubst): Adjust cp_build_qualified_type_real calls.
7852         (check_cv_quals_for_unify): Cope with allowing bad qualifications
7853         on template type parms.
7854         (instantiate_decl): Recheck substitutions to give warnings on bad
7855         qualifications.
7856         * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
7857
7858 2002-02-21  Aldy Hernandez  <aldyh@redhat.com>
7859
7860         * cp/decl.c (duplicate_decls): Merge always_inline attribute.
7861
7862         * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
7863         unless DECL_ALWAYS_INLINE.
7864
7865 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
7866
7867         * typeck.c (cp_pointer_int_sum): Renamed from
7868         pointer_int_sum, call pointer_int_sum.
7869
7870 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
7871
7872         * decl.c (duplicate_decls): Return 0 if issued error about
7873         redeclaration.
7874
7875 2002-02-19  Jason Merrill  <jason@redhat.com>
7876
7877         ABI change: Mangle `void (A::*)() const' as
7878         M1AKFvvE, not MK1AFvvE.
7879         * mangle.c (write_function_type): Write cv-quals for member
7880         function type here.
7881         (write_pointer_to_member_type): Not here.
7882
7883 2002-02-18  Jason Merrill  <jason@redhat.com>
7884
7885         * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
7886         (do_decl_instantiation): Likewise.
7887
7888 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
7889
7890         PR c++/5685
7891         * decl.c (duplicate_decls): Make warning unconditional
7892         if duplicate default argument declarations are present.
7893
7894 2002-02-17  Jakub Jelinek  <jakub@redhat.com>
7895
7896         * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
7897         shortening.
7898
7899 2002-02-15  Nathan Sidwell  <nathan@codesourcery.com>
7900
7901         * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
7902         remove incorrect comment. Move #if 0'd code to common path. Use
7903         IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
7904
7905 2002-02-13  Jason Merrill  <jason@redhat.com>
7906
7907         * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
7908         (finish_function): Don't warn if current_function_returns_null.
7909
7910         * typeck2.c (digest_init): Do handle values of vector type.
7911
7912         * typeck2.c (digest_init, process_init_constructor): Treat vectors
7913         like arrays.
7914
7915 2002-02-11  Jason Merrill  <jason@redhat.com>
7916
7917         * parse.y (reserved_declspecs): Don't handle attributes.
7918         (reserved_typespecquals): Handle them here.
7919         * Make-lang.in (parse.c): Adjust expected conflicts.
7920
7921 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
7922
7923         * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
7924         instead of compstmt.
7925         (compstmt_or_stmtexpr): Renamed from compstmt.
7926         (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
7927
7928 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
7929
7930         Rename instantiate_type_flags to tsubst_flags_t & expand use.
7931         * cp-tree.h (instantiate_type_flags): Rename to ...
7932         (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
7933         add tf_warning flag.
7934         (instantiate_type): Adjust prototype.
7935         (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
7936         do_type_instantiation, cp_build_qualified_type_real): Likewise.
7937         cp_build_qualified_type: Adjust.
7938         * class.c (instantiate_type): Adjust parameter. Rename itf_* to
7939         tf_*.
7940         * call.c (standard_conversion): Rename itf_* to tf_*.
7941         (reference_binding): Likewise.
7942         (convert_like_real): Likewise.
7943         * cvt.c (cp_convert_to_pointer): Likewise.
7944         (convert_to_reference): Likewise.
7945         * decl.c (lookup_namespace_name): Use tf_* flags.
7946         (make_typename_type): Likewise.
7947         (grokdeclarator): Likewise.
7948         * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
7949         (coerce_template_template_parms, convert_template_argument,
7950         coerce_template_parms, maybe_get_template_decl_from_type_decl,
7951         lookup_template_class, tsubst_friend_function, tsubst_friend_class,
7952         instantiate_class_template, tsubst_template_arg_vector,
7953         tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
7954         tsubst_decl, tsubst_arg_types, tsubst_function_type,
7955         tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
7956         instantiate_template, fn_type_unification,
7957         resolve_overloaded_unification, verify_class_unification,
7958         unify, get_bindings_real, do_type_instantiation,
7959         regenerate_decl_from_template, instantiate_decl,
7960         tsubst_initializer_list, tsubst_enum,
7961         get_mostly_instantiated_function_type,
7962         invalid_nontype_parm_type_p): Likewise.
7963         * tree.c (cp_build_qualified_type_real): Likewise.
7964         * typeck.c (build_binary_op): Rename itf_* to tf_*.
7965         (build_ptrmemfunc): Likewise.
7966         (convert_for_assignment): Likewise.
7967
7968 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
7969
7970         PR c++/109
7971         * decl.c (grokdeclarator): Allow friend declarations from
7972         dependent types.
7973         * decl2.c (handle_class_head): Don't push into template parm contexts.
7974         * pt.c (push_template_decl_real): Template parm contexts are never
7975         being defined.
7976
7977 2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
7978
7979         * class.c: Include target.h.
7980         (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
7981         BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
7982         bit-field layout.
7983         * Make-lang.in: Adjust deps.
7984
7985 2002-02-05  Jason Merrill  <jason@redhat.com>
7986
7987         * error.c (dump_type): Be more helpful about VECTOR_TYPE.
7988
7989 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
7990
7991         * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
7992         (finish_switch_cond): Set SWITCH_TYPE.
7993
7994 2002-02-04  Richard Henderson  <rth@redhat.com>
7995
7996         * method.c (use_thunk): Always initialize the block tree.  Reindent.
7997         * semantics.c (expand_body): Emit thunks after function, not before.
7998
7999 2002-02-04  Jason Merrill  <jason@redhat.com>
8000
8001         * decl.c (start_function): Call cplus_decl_attributes immediately
8002         after grokdeclarator.
8003
8004         * decl.c (start_function): Combine DECL_RESULT handling code.
8005
8006 2002-02-03  Jason Merrill  <jason@redhat.com>
8007
8008         * xref.c: Remove.
8009         * Make-lang.in (CXX_OBJS): Remove cp/xref.o
8010         (cp/xref.o): Remove dependencies.
8011         * class.c (finish_struct_1, check_methods): Don't call xref fns.
8012         (finish_struct_1): Likewise.
8013         * friend.c (make_friend_class): Likewise.
8014         * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
8015         * spew.c (read_process_identifier): Likewise.
8016
8017 2002-02-01  Jason Merrill  <jason@redhat.com>
8018
8019         PR c++/4872
8020         * decl.c (finish_function): Warn about a non-void function with
8021         no return statement and no abnormal exit.
8022         * cp-tree.h (struct cp_language_function): Add returns_abnormally.
8023         (current_function_returns_abnormally): New macro.
8024         * call.c (build_call): Set it.
8025
8026         * typeck.c (build_component_ref): Always complain about offsetof
8027         constructs on non-PODs.  Only make it an error for members of
8028         virtual bases.
8029
8030         * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
8031         (dump_function_decl): Always dump parms.
8032
8033         * decl2.c (finish_static_data_member_decl): Complain about a local
8034         class with a static data member.
8035
8036         PR c++/4286
8037         * search.c (lookup_field_1): Don't xref a static data member
8038         just because we looked it up.
8039
8040 2002-01-31  Jason Merrill  <jason@redhat.com>
8041
8042         * Make-lang.in (parse.c): Handle .output file.
8043
8044         PR c++/3395
8045         * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
8046         not TREE_TYPE.
8047         * semantics.c (finish_class_definition): Adjust.
8048
8049         Allow attributes in parms and casts.
8050         * parse.y (named_parm): Don't strip attrs.
8051         (declmods): Remove 'attributes' production.
8052         (nonempty_cv_qualifiers): Accept attributes.
8053         (ATTRIBUTE): Give precedence.
8054         * decl.c (groktypename): Handle attributes.
8055         (grokparms): Likewise.
8056
8057 2002-01-29  Jakub Jelinek  <jakub@redhat.com>
8058
8059         * decl2.c (cxx_decode_option): Pass 0 as last argument to
8060         cpp_handle_option.
8061         * lang-specs.h: Use cpp_unique_options instead of cpp_options
8062         when used together with cc1_options.
8063
8064 2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
8065
8066         PR c++/5132
8067         * typeck2.c (digest_init): Make sure non-array core type is
8068         instantiated.
8069         * decl2.c (reparse_absdcl_as_casts): Just store the type in the
8070         constructor, rather than build a new one.
8071         (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
8072         PURPOSE of constructor elts.
8073
8074 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
8075
8076         * Make-lang.in (parse.c): Adjust expected number of
8077         shift-reduce conflicts.
8078         (decl.o): Depend on diagnostic.h.
8079         * decl.c: Include diagnostic.h.
8080         (grokdeclarator): Check for null pointer.
8081         (finish_function): Don't abort when
8082         current_binding_level->parm_flag != 1, if errors have
8083         occurred; throw away the statement tree and extra binding
8084         levels, and continue.
8085         * lex.c (note_list_got_semicolon): Check for null pointer.
8086         * method.c (hack_identifier): Just return error_mark_node if
8087         value is error_mark_node.
8088         * parse.y (primary: TYPEID(type_id)): No need to use
8089         TYPE_MAIN_VARIANT here.
8090         (handler_seq): Accept an empty list of catch clauses and
8091         generate a fake handler block to avoid later crashes.
8092         (ansi_raise_identifier): Accept the error token too.
8093         * semantics.c (begin_class_definition,
8094         finish_class_definition): Check for error_mark_node.
8095
8096 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
8097
8098         * typeck2.c (friendly_abort): Delete definition.
8099         * cp-tree.h (friendly_abort): Don't prototype.
8100         (my_friendly_assert): Use fancy_abort.
8101
8102 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
8103
8104         * cp-tree.h (my_friendly_abort): Remove.
8105
8106 2002-01-23  Jakub Jelinek  <jakub@redhat.com>
8107
8108         * spew.c (pending_inlines, pending_inlines_tail,
8109         processing_these_inlines): Make static.
8110         (mark_pending_inlines): Remove static.
8111         (begin_parsing_inclass_inline): If in function, save pi
8112         for GC to cp_function_chain->unparsed_inlines instead.
8113         (process_next_inline): Likewise.
8114         * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
8115         (mark_pending_inlines): Add prototype.
8116         * decl.c (spew_debug): Remove unused extern.
8117         (mark_lang_function): Call mark_pending_inlines.
8118
8119 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
8120
8121         * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
8122         init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
8123         semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
8124         Change my_fancy_abort() to abort().
8125
8126 2002-01-23  Jason Merrill  <jason@redhat.com>
8127
8128         PR c++/5453
8129         * class.c (fixed_type_or_null): Fix thinko.
8130
8131         PR c++/3331
8132         * init.c (resolve_offset_ref): Use build_indirect_ref.
8133
8134         * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
8135
8136 2002-01-22  Jason Merrill  <jason@redhat.com>
8137
8138         * parse.y (function_body): Suppress the block for the outermost
8139         curly braces.
8140         * decl.c (pushdecl): Don't try to skip it.
8141         (begin_function_body): Keep the block we create, not the next one.
8142         * init.c (emit_base_init): Don't mess with keep_next_level.
8143
8144         * class.c (build_base_path): Tweak formatting.
8145
8146 2002-01-19  Nathan Sidwell  <nathan@codesourcery.com>
8147
8148         Fix regression introduced with patch for c++/775
8149         * parse.y (class_head_defn): Check for template specializations
8150         with a different class-key.
8151
8152 2002-01-17  Jason Merrill  <jason@redhat.com>
8153
8154         * decl.c (begin_constructor_body, begin_destructor_body): New fns.
8155         (begin_function_body): Call them and keep_next_level.
8156         * init.c (emit_base_init): Call keep_next_level.
8157         * semantics.c (setup_vtbl_ptr): Lose.
8158         * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
8159         (vtbls_set_up_p): Lose.
8160         * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
8161         * method.c (do_build_copy_constructor): Likewise.
8162         (synthesize_method): Call finish_mem_initializers.
8163         * parse.y (nodecls): Likewise.
8164
8165         * error.c (dump_type_suffix): Print the exception specs before
8166         recursing.
8167         (dump_function_decl): Here, too.
8168
8169         * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
8170
8171 2002-01-10  Ira Ruben   <ira@apple.com>
8172
8173         PR c++/907
8174         * decl.c (start_method): Handle attrlist.
8175
8176 2002-01-10  Jakub Jelinek  <jakub@redhat.com>
8177
8178         * decl2.c (max_tinst_depth): Increase default limit to 500.
8179
8180 2002-01-10  Graham Stott  <grahams@redhat.com>
8181
8182         * spew.c (YYCHAR): Uppercase macro parameter and add
8183         parenthesis.
8184         (YYCODE): Likewise.
8185         (NAME): Uppercase macro parameter.
8186
8187 2002-01-09  Graham Stott  <grahams@redhat.com>
8188
8189         * decl.h (grokdeclarator): Wrap long line.
8190
8191         * semantics.c (FINISH_COND): Uppercase macro paramaters and
8192         add parenthesis.
8193
8194 2002-01-08  Graham Stott  <grahams@redhat.com>
8195
8196         * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
8197         (PALLOC): Uppercase macro parameter and whitespace.
8198         (SALLOC): Uppercase macro parameter.
8199         (SFREE): Uppercase macros parameter, add parenthese and
8200         whitespace.
8201         (STREQL): Uppercase macro parameter and whitespace.
8202         (STRNEQ): Likewise.
8203         (STRLSS): Likewise.
8204         (STRLEQ): Likewise.
8205         (STRGTR): Likewise.
8206         (STRGEQ): Likewise.
8207
8208         * call.c (convert_like): Add parenthesis and wrap.
8209         (convert_like_with_context): Likewise.
8210         (ICS_RANK): Whitespace.
8211         (NEED_TEMPORARY_P): Remove parenthesis.
8212
8213         * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
8214         whitespace.
8215         (VTT_MARKED_BINFO_P): Likewise.
8216
8217         * decl.c (BINDING_LEVEL): Add parenthesis.
8218         (DEF_OPERATOR): Likewise.
8219
8220         * mangle.c (MANGLE_TRACE): Add parenthesis.
8221         (MANGLE_TRACE_TREE): Likewise.
8222         (write_signed_number): Likewise.
8223         (write_unsigned_number): Likewise.
8224
8225         * pt.c (ccat): Uppercase macro parameter.
8226         (cat): Likewise
8227
8228         * search.c (SET_BINFO_ACCESS): Add parenthesis.
8229
8230 2002-01-07  Jason Merrill  <jason@redhat.com>
8231
8232         * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
8233         to pedwarn.
8234
8235         PR c++/3536
8236         * method.c (make_thunk): If !flag_weak, give the thunk the
8237         function's linkage.
8238         (use_thunk): Here, too.
8239
8240 2002-01-07  Graham Stott  <grahams@redhat.com>
8241
8242         * error.c: Update copyright date.
8243         (print_scope_operator): Add parenthesis.
8244         (print_left_paren): Likewise.
8245         (print_right_paren): Likewise.
8246         (print_left_bracket): Likewise.
8247         (print_right_bracket): Likewise.
8248         (print_template_argument_list_start): Likewise.
8249         (print_template_argument_list_end): Likewise.
8250         (print_non_consecutive_character): Likewise.
8251         (print_tree_identifier): Likewise.
8252         (print_identifier): Likewise.
8253         (NEXT_CODE): Uppercase macro parameter.
8254         (ident_fndecl): Delete unused.
8255         (GLOBAL_THING): Likewise.
8256
8257 2002-01-06  Graham Stott  <grahams@redhat.com>
8258
8259         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
8260         (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
8261         (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
8262         (RECORD_OR_UNION_TYPE_CHECK): Likewise.
8263         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
8264         (C_IS_RESERVED_WORD): Uppercase macro parameter.
8265         (C_RID_YYCODE) Likewise.
8266         (ptrmem_cst): Use rtx.
8267         (LOCAL_BINDING_P): Add whitespace.
8268         (INHERITED_VALUE_BINDING_P): Likewise.
8269         (BINDING_SCOPE): Wrap long line.
8270         (BINDING_HAS_LEVEL_P): Remove parenthesis.
8271         (BINDING_VALUE): Wrap long line.
8272         (BINDING_TYPE): Whitespace.
8273         (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
8274         (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
8275         (IDENTIFIER_NAMESPACE_VALUE): Likewise.
8276         (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
8277         (same_type_p): Uppercase macro parameters.
8278         (same_type_ignoring_top_level_qualifiers_p): Likewise.
8279         (OVL_FUNCTION): Wrap long line.
8280         (OVL_CHAIN): Whitespace.
8281         (OVL_CURRENT): Add parenthesis and whitespace.
8282         (OVL_NEXT): Whitespace.
8283         (OVL_USED): Likewise.
8284         (IDENTIFIER_TYPE_VALUE): Likewise.
8285         (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
8286         (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
8287         (LANG_ID_FIELD): Whitespace.
8288         (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
8289         (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
8290         (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
8291         (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
8292         (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
8293         (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
8294         (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
8295         (IDENTIFIER_VIRTUAL_P): Likewise.
8296         (IDENTIFIER_OPNAME_P): Likewise.
8297         (IDENTIFIER_TYPENAME_P): Remove parenthesis.
8298         (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
8299         (C_SET_EXP_ORIGINAL_CODE): Likewise.
8300         (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
8301         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
8302         (IS_AGGR_TYPE): Uppercase macro parameter.
8303         (CLASS_TYPE_P): Likewise.
8304         (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
8305         (IS_AGGR_TYPE_2): Whitespace.
8306         (TAGGED_TYPE_P): Uppercase macro parameter.
8307         (TYPE_BUILT_IN): Whitespace.
8308         (TYPE_FOR_JAVA): Likewise.
8309         (FUNCTION_ARG_CHAIN): Remove parenthesis.
8310         (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
8311         (FUNCTION_FIRST_USER_PARAM): Likewise.
8312         (PROMOTES_TO_AGGR_TYPE): Whitespace.
8313         (DERIVED_FROM_P): Add parenthesis and wrap.
8314         (UNIQUELY_DERIVED_FROM_P): Likewise.
8315         (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
8316         (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
8317         (CLASSTYPE_USE_TEMPLATE): Whitespace.
8318         (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
8319         (TYPE_GETS_DELETE): Add parenthesis.
8320         (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
8321         (TYPE_HAS_ASSIGN_REF): Likewise,
8322         (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
8323         (TYPE_HAS_INIT_REF): Likewise.
8324         (TYPE_HAS_CONST_INIT_REF): Likewise.
8325         (TYPE_BEING_DEFINED): Likewise.
8326         (TYPE_LANG_SPECIFIC): Likewise.
8327         (CLASSTYPE_RTTI): Likewise.
8328         (TYPE_OVERLOADS_CALL_EXPR): Likewise.
8329         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
8330         (TYPE_OVERLOADS_ARROW): Likewise.
8331         (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
8332         (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
8333         (CLASSTYPE_METHOD_VEC): Likewise.
8334         (CLASSTYPE_MARKED_N): Likewise.
8335         (CLASSTYPE_MARKED): Likewise.
8336         (CLASSTYPE_MARKED2): Likewise.
8337         (CLASSTYPE_MARKED3): Likewise.
8338         (CLASSTYPE_MARKED4): Likewise.
8339         (CLASSTYPE_MARKED5): Likewise.
8340         (CLASSTYPE_MARKED6): Likewise.
8341         (SET_CLASSTYPE_MARKED): Whitespace.
8342         (CLEAR_CLASSTYPE_MARKED): Likewise.
8343         (SET_CLASSTYPE_MARKED2): Likewise.
8344         (CLEAR_CLASSTYPE_MARKED2): Likewise.
8345         (SET_CLASSTYPE_MARKED3): Likewise.
8346         (CLEAR_CLASSTYPE_MARKED3): Likewise.
8347         (SET_CLASSTYPE_MARKED4): Likewise.
8348         (CLEAR_CLASSTYPE_MARKED4): Likewise.
8349         (SET_CLASSTYPE_MARKED5): Likewise.
8350         (CLEAR_CLASSTYPE_MARKED5): Likewise.
8351         (SET_CLASSTYPE_MARKED6): Likewise.
8352         (CLEAR_CLASSTYPE_MARKED6): Likewise.
8353         (CLASSTYPE_TAGS): Likewise.
8354         (CLASSTYPE_VSIZE): Likewise.
8355         (CLASSTYPE_VBASECLASSES): Likewise.
8356         (CANONICAL_BINFO): Add parenthesis.
8357         (CLASSTYPE_SIZE(NODE): Likewise.
8358         (CLASSTYPE_SIZE_UNIT): Likewise.
8359         (CLASSTYPE_ALIGN(NODE): Likewise.
8360         (CLASSTYPE_USER_ALIGN): Likewise.
8361         (TYPE_JAVA_INTERFACE): Likewise.
8362         (CLASSTYPE_PURE_VIRTUALS): Likewise.
8363         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
8364         (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
8365         (CLASSTYPE_HAS_MUTABLE): Likewise.
8366         (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
8367         (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
8368         (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
8369         (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
8370         (CLASSTYPE_INTERFACE_ONLY): Likewise.
8371         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
8372         (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
8373         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
8374         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
8375         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
8376         (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
8377         (BINFO_UNSHARED_MARKED): Whitespace.
8378         (BINFO_MARKED): Whitespace and wrap.
8379         (SET_BINFO_MARKED): Likewise.
8380         (CLEAR_BINFO_MARKED): Likewise.
8381         (BINFO_VTABLE_PATH_MARKED): Likewise.
8382         (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
8383         (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
8384         (BINFO_SUBVTT_INDEX): Remove parenthesis.
8385         (BINFO_VPTR_INDEX): Likewise.
8386         (BINFO_PRIMARY_BASE_OF): Likewise,
8387         (CLASSTYPE_VFIELDS): Whitespace.
8388         (VF_DERIVED_VALUE): Wrap long line.
8389         (NAMESPACE_LEVEL): Whitespace.
8390         (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
8391         (DEFARG_POINTER): Whitespace.
8392         (DECL_NEEDED_P): Remove parenthesis.
8393         (DECL_LANGUAGE): Whitespace.
8394         (SET_DECL_LANGUAGE): Add parenthesis.
8395         (DECL_CONSTRUCTOR_P): Whitespace and wrap.
8396         (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
8397         (DECL_IN_AGGR_P): Whitespace.
8398         (DECL_FRIEND_P): Likewise.
8399         (DECL_BEFRIENDING_CLASSES): Likewise.
8400         (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
8401         (DECL_NONCONVERTING_P): Whitespace.
8402         (DECL_PURE_VIRTUAL_P): Likewise.
8403         (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
8404         (DECL_PENDING_INLINE_INFO): Whitespace.
8405         (DECL_SORTED_FIELDS): Likewise.
8406         (DECL_DEFERRED_FN): Likewise.
8407         (DECL_TEMPLATE_INFO): Likewise.
8408         (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
8409         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
8410         (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
8411         (TMPL_ARGS_LEVEL): Likewise.
8412         (SET_TMPL_ARGS_LEVEL): Likewise.
8413         (INNERMOST_TEMPLATE_PARMS): Whitespace.
8414         (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
8415         (INTEGRAL_CODE_P(CODE): Add parenthesis.
8416         (CP_INTEGRAL_TYPE_P): Remove parenthesis.
8417         (TYPE_HAS_CONSTRUCTOR): Whitespace.
8418         (TREE_HAS_CONSTRUCTOR): Likewise.
8419         (TYPE_HAS_DESTRUCTOR): Likewise.
8420         (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
8421         (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
8422         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
8423         (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
8424         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
8425         (TYPE_PTRMEMFUNC_P): Likewise.
8426         (TYPE_PTRMEMFUNC_FLAG): Likewise.
8427         (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
8428         (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
8429         (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
8430         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
8431         (DECL_ACCESS): Whitespace.
8432         (DECL_GLOBAL_CTOR_P): Remove parenthesis.
8433         (DECL_GLOBAL_DTOR_P): Likewise.
8434         (GLOBAL_INIT_PRIORITY): Likewise.
8435         (DECL_TEMPLATE_PARMS): Likewise.
8436         (DECL_TEMPLATE_RESULT): Likewise.
8437         (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
8438         (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
8439         (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
8440         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
8441         (PRIMARY_TEMPLATE_P): Add parenthesis.
8442         (DECL_USE_TEMPLATE): Whitespace.
8443         (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
8444         (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
8445         (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
8446         (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
8447         (CALL_DECLARATOR_PARMS): Remove parenthesis.
8448         (CALL_DECLARATOR_QUALS): Likewise.
8449         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
8450         (TEMP_NAME_P): Wrap.
8451         (VFIELD_NAME_P): Likewise.
8452         (B_SET): Uppercase macro parameters and add parenthesis.
8453         (B_CLR): Likewise.
8454         (B_TST): Likewise.
8455         (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
8456         (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
8457         (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
8458         (same_or_base_type_p): Likewise.
8459         (cp_deprecated): Likewise.
8460
8461 2002-01-05  Richard Henderson  <rth@redhat.com>
8462
8463         * semantics.c (expand_body): Revert last change.
8464
8465 2002-01-04  Jason Merrill  <jason@redhat.com>
8466
8467         PR c++/4122
8468         * class.c (update_vtable_entry_for_fn): Set delta to zero for a
8469         lost primary.
8470
8471         * class.c (build_vtbl_initializer): Check for a lost primary
8472         before calculating the vtable entry to throw away.
8473
8474 2002-01-02  Jason Merrill  <jason@redhat.com>
8475
8476         * semantics.c (expand_body): Call outlining_inline_function when
8477         emitting an inline function out of line.
8478
8479 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
8480
8481         PR c++/5116, c++/764 reversion
8482         * call.c (build_new_op): Revert the instantiations. They are
8483         incorrect.
8484
8485 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
8486
8487         PR c++/5089
8488         * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
8489
8490 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
8491
8492         PR c++/3716
8493         * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
8494         (tsubst, case POINTER_TYPE): Handle pmfs here.
8495         (tsubst, case OFFSET_TYPE): Check it is not an offset to
8496         reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
8497
8498 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
8499
8500         PR c++/35
8501         * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
8502         (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
8503         * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
8504         PARM_DECL.
8505         (tsubst_template_parms): Break up loop statements.
8506         (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
8507         parm PARM_DECLs don't get promoted.
8508
8509 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
8510
8511         PR c++/5123
8512         * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
8513         (build_x_function_call): Cope with a COMPONENT_REF containing a
8514         TEMPLATE_ID_EXPR.
8515
8516 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
8517
8518         PR c++/5213
8519         * pt.c (convert_template_argument): Be more careful determining
8520         when RECORD_TYPE templates are or are not templates.
8521
8522 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
8523
8524         PR c++/775
8525         * cp-tree.h (handle_class_head): Adjust prototype.
8526         * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
8527         parameters. Use for all class heads.
8528         * parse.y (named_class_head_sans_basetype, named_class_head,
8529         named_complex_class_head_sans_basetype,
8530         named_class_head_sans_basetype_defn,
8531         unnamed_class_head): Remove.
8532         (class_head, class_head_apparent_template): Recognize class heads
8533         (class_head_decl, class_head_defn): New reductions. Process class
8534         heads.
8535         (structsp): Adjust class definition and class declaration
8536         reductions.
8537         (maybe_base_class_list): Give diagnostic on empty list.
8538
8539 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
8540
8541         PR c++/4379
8542         * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
8543         single non-static member.
8544         (unary_complex_lvalue): If it cannot be a pointer to member, don't
8545         make it so. Check it is not pointer to reference.
8546
8547 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
8548
8549         PR c++/5132
8550         * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
8551         are processing a template decl.
8552
8553 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
8554
8555         PR c++/5116, c++/764
8556         * call.c (build_new_op): Make sure template class operands are
8557         instantiated. Simplify arglist construction.
8558
8559 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
8560
8561         * call.c (build_user_type_conversion_1): Use my_friendly_assert
8562         rather than if ... abort.
8563         * cvt.c (convert_to_reference): Likewise.
8564         * semantics.c (setup_vtbl_ptr): Likewise.
8565         * pt.c (lookup_template_class): Comment typo.
8566
8567 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
8568
8569         PR c++/5125
8570         * pt.c (push_template_decl_real): Make sure DECL has
8571         DECL_LANG_SPECIFIC.
8572
8573 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
8574
8575         PR c++/335
8576         * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
8577         for non-reference fields.
8578         * typeck.c (require_complete_type): Use resolve_offset_ref).
8579
8580 2001-12-26  Nathan Sidwell  <nathan@codesourcery.com>
8581
8582         PR c++/196
8583         * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
8584
8585 2001-12-24  Nathan Sidwell  <nathan@codesourcery.com>
8586
8587         PR c++/160
8588         * typeck.c (build_modify_expr): Remove old unreachable code & tidy
8589         up. Don't stabilize_references when initializing a reference.
8590
8591 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8592
8593         * decl2.c (lang_f_options): Const-ify.
8594
8595 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
8596
8597         * config-lang.in (diff_excludes): Remove.
8598
8599 2001-12-19  Nathan Sidwell  <nathan@codesourcery.com>
8600
8601         PR c++/90
8602         * typeck.c (build_function_call_real): Use original function
8603         expression for errors.
8604
8605 2001-12-18  Jason Merrill  <jason@redhat.com>
8606
8607         PR c++/3242
8608         * class.c (add_method): Do compare 'this' quals when trying to match a
8609         used function.  Don't defer to another used function.
8610
8611 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
8612
8613         * pt.c (instantiate_clone): Remove, fold into ...
8614         (instantiate_template): ... here. Simplify by removing mutual
8615         recursion.
8616         * typeck2.c (build_m_component_ref): Don't cv qualify the function
8617         pointed to by a pointer to function.
8618         * class.c (delete_duplicate_fields_1): Typo.
8619
8620 2001-12-18  Jason Merrill  <jason@redhat.com>
8621
8622         C++ ABI change: destroy value arguments in caller.
8623         * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
8624         create an extra binding level for the parameters.
8625         * decl.c (store_parm_decls): Don't do parameter cleanups.
8626
8627 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
8628
8629         * call.c (build_new_method_call): Use '%#V'.
8630         * error.c (cv_to_string): Use V parameter to determine padding.
8631
8632 2001-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
8633
8634         * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
8635         spellings in messages.
8636
8637 2001-12-17  Zack Weinberg  <zack@codesourcery.com>
8638
8639         * cp-tree.h: Delete #defines for cp_error, cp_warning,
8640         cp_pedwarn, and cp_compiler_error.
8641         * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
8642         except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
8643         rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
8644         typeck2.c: Change calls to the above macros to use their
8645         language-independent equivalents: error, warning, pedwarn, and
8646         internal_error respectively.
8647
8648 2001-12-16  Neil Booth  <neil@daikokuya.demon.co.uk>
8649
8650         * decl2.c (finish_file): Remove back_end_hook.
8651
8652 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
8653
8654         * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
8655         cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
8656         pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
8657
8658 2001-12-15  Joseph S. Myers  <jsm28@cam.ac.uk>
8659
8660         * lang-options.h: Use American spelling in messages.
8661
8662 2001-12-13  Jason Merrill  <jason@redhat.com>
8663
8664         * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
8665
8666         Use cleanups to run base and member destructors.
8667         * init.c (push_base_cleanups): New function, split out from...
8668         (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
8669         * decl.c (finish_destructor_body): Move vbase destruction code to
8670         push_base_cleanups.
8671         (begin_function_body, finish_function_body): New fns.
8672         (finish_function): Move [cd]tor handling and call_poplevel to
8673         finish_function_body.
8674         (pushdecl): Skip the new level.
8675         * semantics.c (genrtl_try_block): Don't call end_protect_partials.
8676         (setup_vtbl_ptr): Call push_base_cleanups.
8677         * method.c (synthesize_method): Call {begin,end}_function_body.
8678         * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
8679         * cp-tree.h: Declare new fns.
8680         * parse.y (function_body, .begin_function_body): New nonterminals.
8681         (fndef, pending_inline, function_try_block): Use function_body.
8682         (ctor_initializer_opt, function_try_block): No longer has a value.
8683         (base_init): Remove .set_base_init token.
8684         (.set_base_init, compstmt_or_error): Remove.
8685         * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
8686
8687         * optimize.c (maybe_clone_body): Fix parameter updating.
8688
8689 2001-12-12  Jason Merrill  <jason@redhat.com>
8690
8691         * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
8692         * semantics.c (genrtl_start_function): Don't pass
8693         parms_have_cleanups or push an extra binding level.
8694         (genrtl_finish_function): Lose cleanup_label cruft.
8695
8696         * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
8697         (ctor_label): Remove.
8698         * semantics.c (finish_return_stmt): Lose ctor_label support.
8699         * decl.c (finish_constructor_body, mark_lang_function): Likewise.
8700         * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
8701         dtor_label.
8702
8703         * call.c (build_new_method_call): Let resolves_to_fixed_type_p
8704         check for [cd]tors.
8705         * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
8706
8707         * decl.c (finish_function): Check VMS_TARGET, not VMS.
8708
8709         * decl.c (start_cleanup_fn): Remove redundant pushlevel.
8710         (end_cleanup_fn): And poplevel.
8711
8712         * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
8713         if we're in a template.
8714
8715 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
8716
8717         * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
8718         ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
8719         THIS_NAME_P): Delete.
8720         * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
8721         THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
8722         with internal naming scheme.
8723         * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
8724
8725 2001-12-12  Nathan Sidwell  <nathan@codesourcery.com>
8726
8727         * decl.c (grokdeclarator): Deprecated implicit typename use.
8728
8729 2001-12-11  Nathan Sidwell  <nathan@codesourcery.com>
8730
8731         PR g++/51
8732         * parse.y (frob_specs): Indicate it is a language linkage which
8733         contained the extern.
8734         * decl.c (grokdeclarator): Allow extern language linkage with
8735         other specifiers.
8736
8737 2001-12-10  Nathan Sidwell  <nathan@codesourcery.com>
8738
8739         PR g++/72
8740         * decl.c (add_binding): Don't reject duplicate typedefs involving
8741         template parameters.
8742
8743 2001-12-10  Neil Booth  <neil@daikokuya.demon.co.uk>
8744
8745         * parse.y, semantics.c: Similarly.
8746
8747 2001-12-09  Nathan Sidwell  <nathan@codesourcery.com>
8748
8749         PR g++/87
8750         * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
8751         (copy_args_p): Rename to ...
8752         (copy_fn_p): ... here.
8753         (grok_special_member_properties): New function.
8754         (grok_op_properties): Lose VIRTUALP parameter.
8755         (copy_assignment_arg_p): Remove.
8756         * call.c (build_over_call): Use copy_fn_p.
8757         * decl.c (grokfndecl): Reformat. Adjust call to
8758         grok_op_properties.
8759         (copy_args_p): Rename to ...
8760         (copy_fn_p): ... here. Reject template functions. Check for pass
8761         by value.
8762         (grok_special_member_properties): Remember special functions.
8763         (grok_ctor_properties): Don't remember them here, just check.
8764         (grok_op_properties): Likewise.
8765         (start_method): Call grok_special_member_properties.
8766         * decl2.c (grokfield): Likewise.
8767         (copy_assignment_arg_p): Remove.
8768         (grok_function_init): Don't remember abstract assignment here.
8769         * pt.c (instantiate_class_template): Call
8770         grok_special_member_properties.
8771         (tsubst_decl): Adjust grok_op_properties call.
8772
8773 2001-12-08  Aldy Hernandez  <aldyh@redhat.com>
8774
8775         * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
8776         RID_TYPES_COMPATIBLE_P.
8777
8778 2001-12-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
8779
8780         * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
8781         call to build_aggr_init.
8782         * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
8783
8784 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
8785
8786         * parse.y: Replace uses of the string non-terminal with STRING.
8787         Don't perform string concatentaion here.
8788         (string): Remove non-terminal.
8789         * semantics.c (finish_asm_stmt): Don't concatenate strings here.
8790
8791 2001-12-05  Jason Merrill  <jason@redhat.com>
8792
8793         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
8794         (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
8795         * tree.c (cp_start_inlining, cp_end_inlining): New fns.
8796         * pt.c (push_tinst_level): No longer static.
8797         * cp-tree.h: Declare them.
8798
8799         * init.c (resolve_offset_ref): Don't check access for the base
8800         conversion to access a FIELD_DECL.
8801
8802         * cp-tree.h (TYPE_REFFN_P): New macro.
8803         * decl.c (bad_specifiers): Check it, too.
8804
8805         * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
8806         on the __*_type_info type if we haven't seen a definition.
8807
8808 2001-12-05  Neil Booth  <neil@daikokuya.demon.co.uk>
8809
8810         * decl.c: Include c-common.h.
8811         (shadow_warning): Move to c-common.c.
8812
8813 2001-12-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8814
8815         * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
8816
8817 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
8818
8819         * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
8820
8821 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
8822
8823         PR g++/164
8824         * init.c (sort_base_init): Allow binfos to be directly specified.
8825         * method.c (do_build_copy_constructor): Explicitly convert to the
8826         base instance.
8827         (do_build_assign_ref): Likewise.
8828
8829 2001-12-03  Hans-Peter Nilsson  <hp@bitrange.com>
8830
8831         * decl.c (xref_basetypes): Don't use C99 construct in tag_code
8832         declaration and initialization.
8833
8834 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
8835
8836         * typeck2.c: Remove leading capital from diagnostic messages, as
8837         per GNU coding standards.
8838
8839 2001-12-03  Mumit Khan  <khan@nanotech.wisc.edu>
8840
8841         PR c++/3394
8842         * decl.c (xref_basetypes): Handle attributes between
8843         'class' and name.
8844
8845 2001-12-03  Nathan Sidwell  <nathan@codesourcery.com>
8846
8847         PR g++/3381
8848         * parse.y (named_complex_class_head_sans_basetype): Add new
8849         reduction.
8850         * Make-lang.in (parse.c): Adjust expected conflict count.
8851
8852 2001-12-03  Jason Merrill  <jason@redhat.com>
8853
8854         * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
8855         immediate binfos for our virtual bases.
8856
8857 2001-12-02  Neil Booth  <neil@daikokuya.demon.co.uk>
8858
8859         * call.c (build_java_interface_fn_ref): Similarly.
8860         * except.c (is_admissible_throw_operand): Similarly.
8861         * init.c (build_java_class_ref): Similarly.
8862         * xref.c (open_xref_file): Similarly.
8863
8864 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
8865
8866         * class.c (finish_struct): Remove trailing periods from messages.
8867         * decl.c (check_tag_decl): Similarly.
8868         * lex.c (cxx_set_yydebug): Similarly.
8869         * typeck2.c (friendly_abort): Similarly.
8870
8871 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
8872
8873         PR c++/3048
8874         * cp-tree.h (ovl_member): Remove.
8875         * decl2.c (merge_functions): Handle extern "C" functions
8876         specially.
8877         * tree.c (ovl_member): Remove.
8878
8879 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
8880
8881         PR c++/4842
8882         * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
8883         FUNCTION_DECL, as input.
8884         (mark_overriders): Remove.
8885         (warn_hidden): Rework for the new ABI.
8886
8887 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
8888
8889         PR c++/3471
8890         * call.c (convert_like_real): Do not build additional temporaries
8891         for rvalues of class type.
8892
8893 2001-11-28  Nathan Sidwell  <nathan@codesourcery.com>
8894
8895         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
8896         (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
8897         (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
8898         (DERIVED_FROM_P): Likewise.
8899         (enum base_access): Renumber, add ba_quiet bit mask.
8900         (get_binfo): Remove.
8901         (get_base_distance): Remove.
8902         (binfo_value): Remove.
8903         (ACCESSIBLY_DERIVED_FROM_P): Remove.
8904         * call.c (standard_conversion): Use lookup_base.
8905         * class.c (strictly_overrides): Likewise.
8906         (layout_virtual_bases): Likewise.
8907         (warn_about_ambiguous_direct_bases): Likewise.
8908         (is_base_of_enclosing_class): Likewise.
8909         (add_vcall_offset_vtbl_entries_1): Likewise.
8910         * cvt.c (build_up_reference): Adjust comment.
8911         * init.c (build_member_call): Reformat.
8912         * search.c (get_binfo): Remove.
8913         (get_base_distance_recursive): Remove.
8914         (get_base_distance): Remove.
8915         (lookup_base_r): Tweak.
8916         (lookup_base): Add ba_quiet control. Complete the types here.
8917         (covariant_return_p): Use lookup_base.
8918         * tree.c (binfo_value): Remove.
8919         (maybe_dummy_object): Use lookup_base.
8920         * typeck.c (build_static_cast): Use lookup_base.
8921         (get_delta_difference): Likewise.
8922         * typeck2.c (binfo_or_else): Use lookup_base.
8923         (build_scoped_ref): Add back error_mark_check.
8924         (build_m_component_ref): Use lookup_base.
8925
8926 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
8927
8928         * Make-lang.in (c++.generated-manpages): New dummy target.
8929
8930 2001-11-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8931
8932         * Make-lang.in (cp-lang.o): Depends on c-common.h.
8933         * cp-lang.c (c-common.h): Include.
8934         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
8935         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
8936         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
8937
8938 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
8939
8940         * decl2.c (c_language): Move to c-common.c.
8941         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
8942         functions.
8943         (cxx_init): Update.
8944
8945 2001-11-26  Jason Merrill  <jason@redhat.com>
8946
8947         * call.c (joust): Remove COND_EXPR hack.
8948
8949 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
8950
8951         * search.c (lookup_base_r): Declare bk in variable declaration
8952         space.
8953
8954 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
8955
8956         PR g++/3145
8957         * class.c (build_vbase_pointer): Remove.
8958         (build_vbase_path): Remove.
8959         (build_base_path): New function.
8960         * cp-tree.h (base_access, base_kind): New enumerations.
8961         (build_base_path): Declare.
8962         (convert_pointer_to_real): Remove.
8963         (convert_pointer_to): Remove.
8964         (lookup_base): Declare.
8965         (convert_pointer_to_vbase): Remove.
8966         * call.c (build_scoped_method_call): Use lookup_base &
8967         build_base_path instead of convert_pointer_to_real,
8968         get_base_distance & get_binfo.
8969         (build_over_call): Likewise.
8970         * cvt.c (cp_convert_to_pointer): Likewise.
8971         (convert_to_pointer_force): Likewise.
8972         (build_up_reference): Likewise.
8973         (convert_pointer_to_real): Remove.
8974         (convert_pointer_to): Remove.
8975         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
8976         instead of convert_pointer_to_vbase & build_vbase_path.
8977         (emit_base_init): Use build_base_path instead of
8978         convert_pointer_to_real.
8979         (expand_virtual_init): Lose unrequired conversions.
8980         (resolve_offset_ref): Use lookup_base and build_base_path
8981         instead of convert_pointer_to.
8982         * rtti.c (build_dynamic_cast_1): Use lookup_base &
8983         build_base_path instead of get_base_distance & build_vbase_path.
8984         * search.c (get_vbase_1): Remove.
8985         (get_vbase): Remove.
8986         (convert_pointer_to_vbase): Remove.
8987         (lookup_base_r): New function.
8988         (lookup_base): New function.
8989         * typeck.c (require_complete_type): Use lookup_base &
8990         build_base_path instead of convert_pointer_to.
8991         (build_component_ref): Likewise.
8992         (build_x_function_call): Likewise.
8993         (get_member_function_from_ptrfunc): Likewise.
8994         (build_component_addr): Likewise.
8995         * typeck2.c (build_scoped_ref): Likewise.
8996
8997 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8998
8999         * cp-tree.h (CP_TYPE_QUALS): Removed.
9000         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
9001         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
9002         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
9003         * dump.c (cp_dump_tree): Use void* dump_info argument to match
9004         lang-hooks prototype.
9005         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
9006         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
9007         CP_TYPE_QUALS changed to cp_type_quals.
9008         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
9009         (CXX_C_OBJS): Remove c-dump.o.
9010
9011 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
9012
9013         PR c++/3637
9014         * pt.c (lookup_template_class): Ensure that all specializations
9015         are registered on the list corresponding to the most general
9016         template.
9017
9018 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
9019
9020         * call.c (non_reference): Add documentation.
9021         (convert_class_to_reference): Do not strip reference types
9022         from conversion operators.
9023         (maybe_handle_ref_bind): Simplify.
9024         (compare_ics): Correct handling of references.
9025
9026 2001-11-19  John Wilkinson <johnw@research.att.com>
9027
9028         * dump.c (dump_op): New function.
9029         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
9030         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
9031         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
9032
9033 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
9034
9035         PR4629
9036         * semantics.c (finish_sizeof): Make sure that expression created
9037         while processing a template do not have a type.
9038         (finish_alignof): Likewise.
9039         * typeck.c (c_sizeof): Likewise.
9040         (expr_sizeof): Likewise.
9041
9042 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
9043
9044         * lex.c (cxx_finish): Call c_common_finish.
9045         (finish_parse): Remove.
9046
9047 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9048
9049         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
9050         when displaying error message about missing array bounds.
9051
9052 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9053
9054         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
9055         CONST_CAST_EXPR.
9056         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
9057
9058 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
9059
9060         * cp-tree.h (print_class_statistics): Restore.
9061
9062 2001-11-15  Jason Merrill  <jason@redhat.com>
9063
9064         * method.c (use_thunk): Don't emit debugging information for thunks.
9065
9066         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
9067         * decl.c (make_typename_type): Handle getting a class template.
9068         * search.c (lookup_field_r): A class template is good enough for
9069         want_type.
9070
9071         * call.c (convert_like_real): Only use cp_convert for the bad part.
9072         (standard_conversion): Also allow bad int->enum.
9073         * typeck.c (ptr_reasonably_similar): Also allow functions to
9074         interconvert.  Pointers to same-size integers are reasonably
9075         similar.
9076
9077         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
9078         give it void type.
9079
9080 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
9081
9082         PR g++/3154
9083         * init.c (sort_base_init): Remove unreachable code.
9084         (expand_member_init): Adjust comment to reflect reality. Simplify
9085         and remove unreachable code.
9086
9087 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
9088
9089         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
9090         (cxx_init): Update prototype.
9091         * decl.c (init_decl_processing): Rename.  Move null node init
9092         to its creation time.
9093         * lex.c (cxx_init_options): Update.
9094         (cxx_init): Combine with old init_parse; also call
9095         cxx_init_decl_processing.
9096
9097 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
9098
9099         * decl.c (check_initializer): Try to complete the type of an
9100         array element before checking whether it's complete.  Don't
9101         complain about arrays with complete element types but an
9102         unknown size.
9103         (cp_finish_decl): Build the hierarchical constructor before
9104         calling maybe_deduce_size_from_array_init.
9105
9106 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
9107
9108         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
9109
9110 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
9111
9112         PR g++/4206
9113         * parse.y (already_scoped_stmt): Remove.
9114         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
9115
9116 2001-11-12  H.J. Lu <hjl@gnu.org>
9117
9118         * cvt.c (ocp_convert): Don't warn the address of a weak
9119         function is always `true'.
9120
9121 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
9122
9123         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
9124         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
9125         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
9126         * cp-tree.h (print_class_statistics): Remove.
9127         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
9128         cxx_print_identifier, cxx_set_yydebug): New.
9129         * lex.c (set_yydebug): Rename c_set_yydebug.
9130         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
9131         lang_print_xnode): Rename.
9132         * tree.c (print_lang_statistics): Rename.
9133
9134 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9135
9136         * class.c (dump_array): Fix format specifier warning.
9137
9138 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
9139
9140         * cp-lang.c (LANG_HOOKS_NAME): Override.
9141         (struct lang_hooks): Constify.
9142         * lex.c (cxx_init_options): Update.
9143         (lang_identify): Remove.
9144         * parse.y (language_string): Remove.
9145
9146 2001-11-08  Andreas Franck  <afranck@gmx.de>
9147
9148         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
9149         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
9150         suggested by autoconf.
9151         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
9152         (c++.install-common): Use the transformed target alias names.
9153
9154 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
9155
9156         * Make-lang.in: Update.
9157         * cp-lang.c: Include langhooks-def.h.
9158
9159 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9160
9161         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
9162
9163 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9164
9165         * lex.c (copy_lang_type): Add static prototype.
9166
9167 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9168
9169         * pt.c (unify): Handle SCOPE_REF.
9170
9171 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
9172
9173         * tree.c (cp_copy_res_decl_for_inlining): Adjust
9174         DECL_ABSTRACT_ORIGIN for the return variable.
9175
9176 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
9177
9178         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
9179
9180 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
9181
9182         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
9183         semantics.c, spew.c: Fix spelling errors.
9184
9185 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9186
9187         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
9188
9189 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
9190
9191         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
9192         pop_everything.
9193
9194 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9195
9196         * cp-lang.c (cxx_get_alias_set): New function.
9197         Point LANG_HOOKS_GET_ALIAS_SET to it.
9198
9199 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9200
9201         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
9202         * cp-tree.h (make_unbound_class_template): Prototype new function.
9203         * decl.c (make_unbound_class_template): New function.
9204         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
9205         * error.c (dump_type): Likewise.
9206         * mangle.c (write_type): Likewise.
9207         * parse.y (template_parm): Likewise.
9208         (template_argument): Use make_unbound_class_template.
9209         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
9210         (tsubst): Likewise.
9211         (tsubst_copy): Likewise.
9212         (unify): Likewise.
9213         * tree.c (walk_tree): Likewise.
9214         * typeck.c (comptypes): Likewise.
9215
9216 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9217
9218         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
9219         extra calls into fewer ones.
9220
9221 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
9222
9223         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
9224         Warn when merging inline with attribute noinline.
9225         (start_decl, start_function): Warn if inline and attribute
9226         noinline appear in the same declaration.
9227
9228 2001-10-16  H.J. Lu <hjl@gnu.org>
9229
9230         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
9231         for tree checking disabled.
9232
9233 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
9234
9235         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
9236         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
9237
9238 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
9239
9240         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
9241         (unify): Only handle MINUS_EXPR specially if the above flag is set
9242         and the subtracted constant is 1.  Clear the flag on recursive calls.
9243         Set it when unifying the maximum value in an INTEGER_TYPE's range.
9244
9245 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
9246
9247         * decl.c (bad_specifiers): Don't allow exception specifications
9248         on any typedefs.
9249
9250 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
9251
9252         * cp/lex.c (init_cp_pragma): Similarly.
9253
9254 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9255
9256         * pt.c (lookup_template_class): Build complete template arguments
9257         for BOUND_TEMPLATE_TEMPLATE_PARM.
9258
9259 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9260
9261         * cp-tree.h (TYPE_BINFO): Update comment.
9262         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
9263         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
9264         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
9265         (copy_type): Prototype new function.
9266         * lex.c (copy_lang_decl): Gather tree node statistics.
9267         (copy_lang_type): New function.
9268         (copy_type): Likewise.
9269         (cp_make_lang_type): Create lang_type for
9270         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
9271         and BOUND_TEMPLATE_TEMPLATE_PARM.
9272         * pt.c (tsubst): Use copy_type instead of copy_node.
9273         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
9274
9275 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9276
9277         * pt.c (determine_specialization): Ignore functions without
9278         DECL_TEMPLATE_INFO.
9279
9280 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
9281
9282         PR g++/4476
9283         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
9284
9285 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
9286
9287         * typeck2.c (store_init_value): Don't re-digest a bracketed
9288         initializer.
9289
9290         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
9291         ANON_AGGR_TYPE_P.
9292
9293 2001-10-11  Richard Henderson  <rth@redhat.com>
9294
9295         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
9296         of an asm statement.
9297         (build_vtbl_ref_1): Split out from build_vtbl_ref.
9298         (build_vfn_ref): Use it to handle vtable descriptors before
9299         calling build_vtable_entry_ref.
9300         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
9301
9302 2001-10-10  Richard Henderson  <rth@redhat.com>
9303
9304         * parse.y (asm_operand): Allow named operands.
9305         * semantics.c (finish_asm_stmt): Tweek for changed location
9306         of the operand constraint.
9307
9308 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
9309
9310         * call.c (standard_conversion): Add bad conversion between
9311         integers and pointers.
9312         (convert_like_real): Don't use convert_for_initialization for bad
9313         conversions; complain here and use cp_convert.
9314         (build_over_call): Don't handle bad conversions specially.
9315         (perform_implicit_conversion): Allow bad conversions.
9316         (can_convert_arg_bad): New fn.
9317         * cp-tree.h: Declare it.
9318         * typeck.c (convert_for_assignment): Use it.
9319         (ptr_reasonably_similar): Any target type is similar to void.
9320
9321 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
9322
9323         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
9324         (cp/cp-lang.o): New rule.
9325         * cp-tree.h: Declare hooks.
9326         * tree.c: Make hooks non-static.
9327         (init_tree): Don't initialize hooks here.
9328         * lex.c: Likewise.  Move definition of lang_hooks to...
9329         * cp-lang.c: ... new file.
9330
9331 2001-10-08  Richard Henderson  <rth@redhat.com>
9332
9333         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
9334         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
9335
9336 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9337
9338         * class.c (build_vtable_entry_ref): Const-ify.
9339         * decl.c (predefined_identifier,
9340         initialize_predefined_identifiers): Likewise.
9341         * init.c (build_new_1): Likewise.
9342         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
9343         Likewise.
9344
9345 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
9346
9347         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
9348         (INSNS_PER_STMT): Likewise.
9349         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
9350         (copy_body, initialize_inlined_parameters): Likewise.
9351         (declare_return_variable, inlinable_function_p): Likewise.
9352         (expand_call_inline, expand_calls_inline): Likewise.
9353         (optimize_inline_calls, clone_body): Likewise.
9354         * tree.c (walk_tree): Moved to ../tree-inline.c.
9355         (walk_tree_without_duplicates): Likewise.
9356         (copy_tree_r, remap_save_expr): Likewise.
9357
9358 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
9359
9360         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
9361         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
9362         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
9363         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
9364         (flag_inline_trees): Moved declaration to ../tree-inline.h.
9365         (walk_tree): Moved declaration to ../tree-inline.h.
9366         (walk_tree_without_duplicates, copy_tree_r): Likewise.
9367         (remap_save_expr): Likewise.
9368         * decl.c: Include tree-inline.h.
9369         (lang_mark_tree): Don't mark inlined_fns.
9370         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
9371         * optimize.c: Include tree-inline.h.
9372         (optimize_inline_calls): Move declaration to ../tree.h, as
9373         non-static.
9374         (remap_decl): Use language-independent constructs and hooks.
9375         (remap_block, copy_body_r, declare_return_variable): Likewise.
9376         (inlinable_function_p): Likewise.  Don't test for
9377         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
9378         no longer language-specific.
9379         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
9380         call of dump_function to...
9381         (optimize_function): Here...
9382         (clone_body): New function, extracted from...
9383         (maybe_clone_body): ... here.  Build decl_map locally and pass
9384         it on to clone_body.
9385         * pt.c, semantics.c: Include tree-inline.h.
9386         * tree.c: Likewise.
9387         (cp_walk_subtrees): New language-specific hook for tree inlining.
9388         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
9389         cp_is_overload_p, cp_auto_var_in_fn_p,
9390         cp_copy_res_decl_for_inlining): Likewise.
9391         (walk_tree): Move language-specific constructs into...
9392         (cp_walk_subtrees): this new function.
9393         (copy_tree_r): Use language-independent constructs and hooks.
9394         (init_tree): Initialize tree inlining hooks.
9395         (remap_save_expr): Adjust prototype so that the declaration
9396         does not require the definition of splay_tree.
9397
9398 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
9399
9400         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
9401         to build the declaration instead of the declaration itself.
9402
9403 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
9404
9405         * decl2.c (cxx_decode_option): Add 'else'.
9406
9407         * spew.c (end_input): No longer static.
9408         * cp-tree.h: Declare it.
9409         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
9410
9411 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
9412
9413         * call.c (build_over_call), typeck.c (build_function_call_real):
9414         Pass type attributes to check_function_format rather than name or
9415         assembler name.  Don't require there to be a name or assembler
9416         name to check formats.
9417
9418 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
9419
9420         * decl.c (init_decl_processing): Don't call
9421         init_function_format_info.  Initialize lang_attribute_table
9422         earlier.
9423         (builtin_function): Call decl_attributes.
9424         (insert_default_attributes): New.
9425
9426 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
9427
9428         * decl.c (grokdeclarator): Copy array typedef handling from C
9429         frontend.
9430
9431         * decl.c (grokdeclarator): Copy too-large array handling from C
9432         frontend.
9433
9434 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
9435
9436         * config-lang.in (target_libs): Added target-gperf, so that we
9437         don't try to build it if C++ is disabled.
9438
9439 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
9440
9441         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
9442         (cp/errfn.o): Delete rule.
9443         (cp/error.o): Depend on flags.h.
9444         * errfn.c: Delete file.
9445         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
9446         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
9447         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
9448         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
9449         internal_error respectively.  Make cp_deprecated into a macro.
9450         Don't define cp_printer typedef or declare cp_printers.
9451         * error.c: Include flags.h.
9452         Delete: struct tree_formatting_info, print_function_argument_list,
9453         print_declaration, print_expression, print_function_declaration,
9454         print_function_parameter, print_type_id, print_cv_qualifier_seq,
9455         print_type_specifier_seq, print_simple_type_specifier,
9456         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
9457         print_parameter_declaration_clause, print_exception_specification,
9458         print_nested_name_specifier, and definition of cp_printers.
9459         (locate_error): New function.
9460         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
9461         rewritten in terms of locate_error and diagnostic.c.
9462         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
9463         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
9464         (init_error): Adjust to match.
9465
9466 2001-09-22  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9467
9468         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
9469
9470 2001-09-21  Richard Henderson  <rth@redhat.com>
9471
9472         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
9473         (build_vtbl_initializer): Likewise.
9474         (build_vfn_ref): New.
9475         * cp-tree.h: Declare it.
9476         * call.c (build_over_call): Use it.
9477         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
9478         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
9479
9480 2001-09-21  J"orn Rennecke <amylaar@redhat.com>
9481
9482         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
9483
9484 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
9485
9486         Table-driven attributes.
9487         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
9488         * decl2.c (cplus_decl_attributes): Only take one attributes
9489         parameter.
9490         * cp-tree.c (cplus_decl_attributes): Update prototype.
9491         * class.c (finish_struct), decl.c (start_decl, start_function),
9492         decl2.c (grokfield), friend.c (do_friend), parse.y
9493         (parse_bitfield): Update calls to cplus_decl_attributes.
9494         * decl.c (grokdeclarator): Take a pointer to a single ordinary
9495         attribute list.
9496         * decl.h (grokdeclarator): Update prototype.
9497         * decl2.c (grokfield): Take a single ordinary attribute list.
9498         * friend.c (do_friend): Likewise.
9499         * decl.c (shadow_tag, groktypename, start_decl,
9500         start_handler_parms, grokdeclarator, grokparms, start_function,
9501         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
9502         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
9503         (process_template_parm, do_decl_instantiation): Pass single
9504         ordinary attribute lists around.
9505         * decl.c (grokdeclarator): Correct handling of nested attributes.
9506         Revert the patch
9507         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
9508                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
9509                 not the left.
9510         .
9511         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
9512         (cp_attribute_table): Declare.
9513         * decl.c (valid_lang_attribute): Don't define.
9514         (lang_attribute_table): Define.
9515         (init_decl_processing): Initialize lang_attribute_table instead of
9516         valid_lang_attribute.
9517         * tree.c (cp_valid_lang_attribute): Remove.
9518         (handle_java_interface_attribute, handle_com_interface_attribute,
9519         handle_init_priority_attribute): New functions.
9520         (cp_attribute_table): New array.
9521         * decl2.c (import_export_class): Don't use
9522         targetm.valid_type_attribute.
9523
9524 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
9525
9526         * Make-lang.in (cp/error.o): Depend on real.h
9527         * error.c: #include "real.h"
9528
9529 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9530
9531         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
9532         xmalloc/strcpy/strcat.
9533
9534 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9535
9536         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
9537         Const-ification.
9538         * pt.c (tsubst_decl): Likewise.
9539
9540 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9541
9542         * decl2.c (lang_f_options): Const-ification.
9543         * lex.c (cplus_tree_code_name): Likewise.
9544         * spew.c (yyerror): Likewise.
9545
9546 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
9547
9548         PR c++/3986
9549         * class.c (force_canonical_binfo_r): Check & move an indirect
9550         primary base first.
9551         (force_canonical_binfo): Check that it's not already
9552         canonical.
9553         (mark_primary_virtual_base): Remove BINFO parameter.
9554         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
9555
9556 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
9557
9558         Remove TYPE_NONCOPIED_PARTS.
9559         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
9560         CLASSTYPE_PURE_VIRTUALS.
9561         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
9562         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
9563         (layout_class_type): Don't call fixup_inline_methods here ...
9564         (finish_struct_1): ... call it here.
9565
9566 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
9567
9568         * decl.c (duplicate_decls): Remove code deadling with
9569         DECL_SAVED_INSNS.
9570         * decl2.c (finish_file): Likewise.
9571         * pt.c (instantiate_decl): Likewise.
9572         * semantics.c (expand_body): Don't defer local functions if
9573         they wouldn't be deferred for some other reason.  Don't
9574         generate RTL for functions that will not be emitted.
9575         (genrtl_start_function): Remove code deadling with
9576         DECL_SAVED_INSNS.
9577         (genrtl_finish_function): Likewise.
9578
9579 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
9580
9581         PR c++/4203
9582         * call.c (build_over_call): Do not optimize any empty base
9583         construction.
9584
9585 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9586
9587         * error.c (dump_template_decl): Output template parameters
9588         together with their specifiers.
9589         Output `class' prefix for template template parameter.
9590         (dump_decl): Fix formatting.
9591
9592 2001-08-30  Kurt Garloff  <garloff@suse.de>
9593
9594         * optimize.c (inlinable_function_p): Allow only smaller single
9595         functions. Halve inline limit after reaching recursive limit.
9596
9597 2001-08-30  Joern Rennecke <amylaar@redhat.com>
9598             Jason Merrill  <jason_merrill@redhat.com>
9599
9600         * class.c (build_vtable_entry_ref): Subtract in char*, not
9601         ptrdiff_t.
9602
9603 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
9604
9605         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
9606         (build_cplus_array_type): Use cp_build_qualified_type, not
9607         TYPE_MAIN_VARIANT, to get an unqualified version.
9608
9609         * decl2.c (grok_alignof): Lose.
9610         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
9611         * typeck.c (c_alignof): Lose.
9612         * semantics.c (finish_sizeof, finish_alignof): New.
9613         * parse.y: Use them.
9614         * cp-tree.h: Declare them.
9615
9616 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
9617
9618         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
9619         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
9620         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
9621
9622 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
9623
9624         * typeck2.c (add_exception_specifier): Only require complete type if
9625         not in processing template declaration.
9626
9627 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9628
9629         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
9630         GNU_xref_start_scope and GNU_xref_end_scope.
9631
9632         * tree.c (TYPE_HASH): Moved to ../tree.h.
9633
9634 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
9635
9636         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
9637         on COMPOUND_EXPRs.
9638
9639 2001-08-14  Richard Henderson  <rth@redhat.com>
9640
9641         * class.c, cp-tree.h (build_vfn_ref): Remove.
9642         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
9643
9644 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
9645
9646         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
9647         empty class assignment as having side-effects to avoid
9648         spurious warnings.
9649
9650 2001-08-13  Zack Weinberg  <zackw@panix.com>
9651
9652         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
9653         * except.c: Include libfuncs.h.
9654
9655 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
9656
9657         * decl.c (grokdeclarator): Clarify diagnostic message.
9658
9659 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9660
9661         * decl2.c (do_nonmember_using_decl): Replace using directive
9662         with using declaration in the error message.
9663
9664 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9665
9666         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
9667         criterion to avoid rebuilding expression tree instead of
9668         processing_template_decl.
9669
9670 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
9671
9672         Support named return value optimization for inlines, too.
9673         * decl.c (finish_function): Nullify returns here.
9674         * semantics.c (genrtl_start_function): Not here.
9675         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
9676         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
9677         Also nullify the CLEANUP_STMT for the nrv.
9678         * cp-tree.h: Declare it.
9679         * optimize.c (declare_return_variable): Replace the nrv with the
9680         return variable.
9681         * typeck.c (check_return_expr): Be more flexible on alignment check.
9682         Ignore cv-quals when checking for a matching type.
9683
9684 2001-08-09  Richard Henderson  <rth@redhat.com>
9685
9686         * decl2.c (finish_objects): Use target hooks instead of
9687         assemble_constructor and assemble_destructor.
9688
9689 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
9690
9691         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
9692
9693 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
9694
9695         PR c++/3820
9696         Stop using TYPE_NONCOPIED_PARTS.
9697         * call.c (build_over_call): Be careful when copy constructing
9698         or assigning to an empty class.
9699         * class.c (check_bases_and_members): It has a
9700         COMPLEX_ASSIGN_REF if it has a vptr.
9701         (layout_class_type): Don't add empty class padding to
9702         TYPE_NONCOPIED_PARTS.
9703         (finish_struct_1): Don't add the VFIELD either.
9704         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
9705         initialization.
9706
9707 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
9708
9709         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
9710
9711 2001-08-06  Richard Henderson  <rth@redhat.com>
9712
9713         * decl2.c (finish_objects): Pass a symbol_ref and priority to
9714         assemble_{constructor,destructor}.  Remove priority handling.
9715
9716 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
9717
9718         Don't allow template-id in using-declaration.
9719         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
9720         (do_class_using_decl): Likewise.
9721
9722 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
9723
9724         * cp/spew.c (read_token): No need to pop buffers.
9725
9726 2001-08-02  Stan Shebs  <shebs@apple.com>
9727
9728         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
9729         (fnaddr_from_vtable_entry): Remove decl.
9730         * method.c (use_thunk): Update comment.
9731
9732 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
9733
9734         * repo.c (get_base_filename): Change return value to const char
9735         pointer.
9736
9737 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
9738
9739         Kill -fhonor-std.
9740         * NEWS: Document.
9741         * cp-tree.h (flag_honor_std): Remove.
9742         (CPTI_FAKE_STD): Remove.
9743         (std_node): Remove comment about it being NULL.
9744         (fake_std_node): Remove.
9745         * decl.c (in_fake_std): Remove.
9746         (walk_namespaces_r): Remove fake_std_node check.
9747         (push_namespace): Remove in_fake_std code.
9748         (pop_namespace): Likewise.
9749         (lookup_name_real): Remove fake_std_node check.
9750         (init_decl_processing): Always create std_node. Always add
9751         std:: things there.
9752         (builtin_function): Always put non '_' fns in std.
9753         * decl2.c (flag_honor_std): Remove.
9754         (lang_f_options): Remove honor-std.
9755         (unsupported_options): Add honor-std.
9756         (set_decl_namespace): Remove fake_std_node check.
9757         (validate_nonmember_using_decl): Likewise.
9758         (do_using_directive): Likewise.
9759         (handle_class_head): Likewise.
9760         * dump.c (cp_dump_tree): Likewise.
9761         * except.c (init_exception_processing): Adjust.
9762         * init.c (build_member_call): Remove fake_std_node check.
9763         (build_offset_ref): Likewise.
9764         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
9765         * rtti.c (init_rtti_processing): Adjust.
9766
9767 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
9768
9769         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
9770         operand while calling cp_tree_equal.
9771
9772 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
9773
9774         The 3.0 ABI no longer has vbase pointer fields.
9775         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
9776         FORMAT_VBASE_NAME): Remove.
9777         * method.c (do_build_copy_constructor): Adjust.
9778         (do_build_assign_ref): Adjust.
9779         * search.c (lookup_field_r): Adjust.
9780         * typeck.c (build_component_ref): Adjust.
9781
9782         The 3.0 ABI always has a vtable pointer at the start of every
9783         polymorphic class.
9784         * rtti.c (build_headof_sub): Remove.
9785         (build_headof): Adjust.
9786         (get_tinfo_decl_dynamic): No need to check flag_rtti
9787         here. Adjust.
9788         (create_real_tinfo_var): Explain why we need a hidden name.
9789
9790 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
9791
9792         PR c++/3631
9793         * class.c (update_vtable_entry_for_fn): The fixed adjustment
9794         of a virtual thunk should be from declaring base.
9795
9796 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
9797
9798         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
9799         the shared virtual base, so preserving inheritance graph order.
9800
9801 2001-07-30  Andreas Jaeger  <aj@suse.de>
9802
9803         * decl2.c: Remove unused var global_temp_name_counter.
9804
9805 2001-07-28  Richard Henderson  <rth@redhat.com>
9806
9807         * method.c (pending_inlines): Remove.
9808
9809 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
9810
9811         * class.c (mark_primary_virtual_base): Don't adjust base
9812         offsets here.
9813         (dfs_unshared_virtual_bases): Adjust them here.
9814         (mark_primary_bases): Explain why we adjust at the end.
9815
9816 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
9817
9818         * class.c (finish_struct_1): When copying the primary base's
9819         VFIELD, make sure we find it is at offset zero.
9820
9821 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9822
9823         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
9824         tsubst_expr for default template arguments.
9825
9826 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
9827
9828         PR c++/3621
9829         * spew.c (yylex): Only copy the token's lineno, if it is
9830         nonzero.
9831
9832 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
9833
9834         PR c++/3624
9835         * call.c (resolve_args): Simplify, call
9836         convert_from_reference.
9837         (build_new_op): Resolve and convert from reference ARG1
9838         earlier. Adjust ARG2 & ARG3 resolve and conversion.
9839
9840 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
9841
9842         * decl.c (last_function_parm_tags): Remove.
9843         (current_function_parm_tags): Remove.
9844         (init_decl_processing): Adjust.
9845         (start_function): Adjust.
9846         (store_parm_decls): Adjust.
9847
9848         PR c++/3152
9849         * decl.c (grokdeclarator): Detect when a function typedef is
9850         declaring a function, and create last_function_parms correctly.
9851
9852 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
9853
9854         * call.c (joust): Only prefer a non-builtin candidate to a builtin
9855         one if they have the same signature.
9856
9857         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
9858         it rather than toplevel_bindings_p.  Give it a mangled name if static.
9859         (convert_to_reference): Adjust.
9860         * decl2.c (get_temp_name): Lose.
9861         * mangle.c (mangle_ref_init_variable): New fn.
9862         (mangle_guard_variable): Strip the ref-init header.
9863         * cp-tree.h: Adjust.
9864         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
9865         initializer.
9866         (grok_reference_init): Always use DECL_INITIAL.
9867
9868 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
9869
9870         PR c++/3416
9871         * call.c (build_conditional_expr): Recheck args after
9872         conversions.
9873         * cp-tree.h (build_conditional_expr): Move to correct file.
9874         * typeck.c (decay_conversion): Diagnose any unknown types
9875         reaching here.
9876         (build_binary_op): Don't do initial decay or default
9877         conversions on overloaded functions.
9878         (build_static_cast): Don't do a decay conversion here.
9879
9880 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
9881
9882         PR c++/3543
9883         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
9884         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
9885
9886 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
9887
9888         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
9889         (create_vtbl_ptr): ... here.
9890
9891 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
9892
9893         * class.c (build_vbase_offset_vbtl_entries): Look for
9894         non-primary base of which we are a sub vtable.
9895
9896 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
9897
9898         * semantics.c (finish_this_expr):  Remove unused code.
9899
9900 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
9901
9902         Simplify rtti, now we've only one ABI.
9903         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
9904         CPTI_TINFO_VAR_ID.
9905         (tinfo_decl_id, tinfo_var_id): Remove.
9906         (get_typeid_1): Remove.
9907         * rtti.c
9908         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
9909         (typeid_ok_p): New function.
9910         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
9911         (get_tinfo_decl): Remove old abi documentation.
9912         (tinfo_from_decl): Remove.
9913         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
9914         (get_typeid_1): Remove.
9915         (get_base_offset): Remove.
9916         (synthesize_tinfo_var): Absorb get_base_offset.
9917         (create_real_tinfo_var): Don't use tinfo_decl_id.
9918
9919 2001-07-23  Graham Stott  <grahams@redhat.com>
9920
9921         * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
9922         variable has_two_argument_delete_p.
9923
9924 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
9925
9926         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
9927         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
9928         (CPTI_INDEX_IDENTIFIER): Remove.
9929         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
9930         (delta2_identifier): Remove.
9931         (index_identifier): Remove.
9932         (pfn_or_delta2_identifier): Remove.
9933         (flag_vtable_thunks): Remove.
9934         (VTABLE_DELTA2_NAME): Remove.
9935         (VTABLE_INDEX_NAME): Remove.
9936         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
9937         (vfunc_ptr_type_node): Adjust.
9938         (VTABLE_NAME_PREFIX): Adjust.
9939         (build_vfn_ref): Lose first parameter.
9940         (fixup_all_virtual_upcast_offsets): Remove.
9941         * decl.c (initialize_predefined_identifiers): Remove
9942         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
9943         (init_decl_processing): Remove no-vtable-thunk code.
9944         * decl2.c (flag_vtable_thunks): Remove.
9945         (mark_vtable_entries): Remove no-vtable-thunk code.
9946         * error.c (dump_decl): Remove no-vtable-thunk code.
9947         (dump_expr): Adjust ptr to member function code.
9948         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
9949         code.
9950         * rtti.c (build_headof): Remove no-vtable-thunk code.
9951         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
9952         * search.c (get_base_distance): Remove expand_upcast_fixups case.
9953         (virtual_context) Remove.
9954         (expand_upcast_fixups): Remove.
9955         (fixup_virtual_upcast_offsets): Remove.
9956         (fixup_all_virtual_upcast_offsets): Remove.
9957         * typeck.c (get_member_function_from_ptrfunc): Remove
9958         no-vtable-thunk code.
9959         * call.c (build_over_call): Adjust call to build_vfn_ref.
9960         * class.c (build_vfn_ref): Lose first parameter. Remove
9961         no-vtable-thunk code.
9962         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
9963         (build_vtable_entry): Remove no-vtable-thunk code.
9964
9965 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
9966
9967         Remove old-abi remnants. Remove comments about old abi
9968         behavior. Remove references to 'new-abi' in comments.
9969         * cp-tree.h: Adjust comments.
9970         (vbase_offsets_in_vtable_p): Delete.
9971         (vcall_offsets_in_vtable_p): Delete.
9972         (vptrs_present_everywhere_p): Delete.
9973         (all_overridden_vfuns_in_vtables_p): Delete.
9974         (merge_primary_and_secondary_vtables_p): Delete.
9975         (TYPE_CONTAINS_VPTR_P): Adjust.
9976         (VTT_NAME_PREFIX): Remove.
9977         (CTOR_VTBL_NAME_PREFIX): Remove.
9978         (init_vbase_pointers): Remove.
9979         * class.c: Adjust coments.
9980         (build_vbase_pointer_fields): Delete.
9981         (build_vbase_pointer): Remove old-abi code.
9982         (build_secondary_vtable): Likewise.
9983         (modify_all_vtables): Likewise.
9984         (create_vtable_ptr): Likewise.
9985         (layout_class_type): Likewise.
9986         (finish_struct_1): Likewise.
9987         (finish_vtbls): Likewise.
9988         (dfs_finish_vtbls): Delete.
9989         (build_vbase_offset_vtbl_entries): Remove old-abi code.
9990         * cvt.c: Adjust comments.
9991         * decl.c: Adjust comments.
9992         * decl2.c: Adjust comments.
9993         * init.c: Adjust comments.
9994         (construct_virtual_bases): Remove old-abi code.
9995         * lang-specs.h: Remove -fno-new-abi.
9996         * mangle.c: Adjust comments.
9997         * rtti.c: Adjust comments.
9998         (get_base_offset): Remove old-abi-code.
9999         * search.c: Adjust comments.
10000         (dfs_init_vbase_pointers): Remove.
10001         (dfs_vtable_path_unmark): Remove.
10002         (init_vbase_pointers): Remove.
10003         * semantics.c: Adjust comments.
10004         (emit_associated_thunks): Remove old-abi code.
10005         * typeck.c: Adjust comments.
10006
10007 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
10008
10009         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
10010         params.h.
10011
10012 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
10013
10014         * class.c (finish_struct_anon): Forbid nested classes.
10015
10016 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
10017
10018         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
10019         * optimize.c: Include debug.h.
10020         (maybe_clone_body): Use debug hook.
10021         * semantics.c: Include debug.h.
10022         (expand_body): Use debug hook.
10023
10024 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
10025
10026         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
10027
10028 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
10029
10030         * class.c (type_requires_array_cookie): New function.
10031         (check_methods): Don't try to figure out whether the type needs a
10032         cookie here.
10033         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
10034         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
10035         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
10036         * pt.c (instantiate_class_template): Don't set
10037         TYPE_VEC_DELETE_TAKES_SIZE.
10038         * NEWS: Document ABI changes from GCC 3.0.
10039
10040 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
10041             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
10042
10043         * NEWS (Changes in GCC 3.0): Fix typo.
10044
10045 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
10046
10047         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
10048         which attributes are to be attached, and a flags argument.  Update
10049         call to decl_attributes.
10050         (grokfield): Update call to decl_attributes.
10051         * class.c (finish_struct): Update call to cplus_decl_attributes.
10052         * cp-tree.h (cplus_decl_attributes): Update prototype.
10053         * decl.c (start_decl, grokdeclarator, start_function): Update
10054         calls to decl_attributes and cplus_decl_attributes.
10055         * friend.c (do_friend): Update call to cplus_decl_attributes.
10056         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
10057
10058 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
10059
10060         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
10061         for `register' variables with an asm-specification.
10062
10063 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
10064
10065         * semantics.c (finish_asm_stmt): Mark the output operands
10066         to an asm addressable, if necessary.
10067
10068 2001-07-11  Ben Elliston  <bje@redhat.com>
10069
10070         * Revert this change -- there is a subtle bug.
10071
10072         PR c++/80
10073         * decl.c (finish_enum): New "attributes" argument; pass it to
10074         cplus_decl_attributes.  Use a narrower type if the enum is packed.
10075         * cp-tree.h (finish_enum): Adjust prototype.
10076         * parse.y (enum_head): New non-terminal.
10077         (structsp): Use it. Enums now may be preceded or followed by
10078         optional attributes -- pass their chained tree to finish_enum().
10079         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
10080
10081 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
10082
10083         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
10084         variables.
10085
10086 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
10087
10088         * semantics.c (cp_expand_stmt): Fix for null
10089         current_function_return_value.
10090
10091 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
10092
10093         * call.c (build_op_delete_call): Initialize fn.
10094         (convert_like_real): Delete conditional.
10095         (joust): Initialize *w and *l.
10096         * class.c: Add prototype for binfo_ctor_vtable.
10097         (get_primary_binfo): Initialize result.
10098         * init.c (build_java_class_ref): Initialize name.
10099
10100 2001-07-09  Erik Rozendaal  <dlr@acm.org>
10101
10102         * typeck.c (unary_complex_lvalue): Do not duplicate the
10103         argument to modify, pre-, or post-increment when used as an
10104         lvalue and when the argument has side-effects.
10105
10106 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
10107
10108         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
10109         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
10110         cplus_decl_attributes even if attrs is NULL.
10111         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
10112
10113 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
10114
10115         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
10116         calls to decl_attributes.
10117
10118 2001-07-06  Ira Ruben   <ira@apple.com>
10119
10120         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
10121         be DECL_TEMPLATE_RESULT.
10122
10123 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10124
10125         * cp-tree.h (copy_template_template_parm): Rename to ...
10126         (bind_template_template_parm): ... here.
10127         * tree.c (copy_template_template_parm): Rename to ...
10128         (bind_template_template_parm): ... here.  Remove the case when
10129         NEWARGS is NULL_TREE.
10130         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
10131         BOUND_TEMPLATE_TEMPLATE_PARM.
10132         * pt.c (lookup_template_class): Adjust.
10133
10134 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
10135
10136         * cvt.c (convert_lvalue): New fn.
10137         * cp-tree.h: Declare it.
10138         * method.c (do_build_assign_ref): Use it.
10139         (do_build_copy_constructor): Convert parm to base types
10140         before calling base constructors.
10141
10142         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
10143         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
10144         optimize.
10145         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
10146
10147 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
10148
10149         * optimize.c (optimize_inline_calls): New function, broken out
10150         of ...
10151         (optimize_function): ... here. Call it. Don't inline if it is
10152         a thunk.
10153         (dump_function): Print name of dump flag causing this dump.
10154         * semantics.c (expand_body): Move thunk inline check to
10155         optimize_function.
10156
10157 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
10158
10159         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
10160         (comptypes): Use target.comp_type_attributes.
10161
10162 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
10163
10164         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
10165
10166 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
10167
10168         * error.c (lang_print_error_function): Add a `diagnostic_context *'
10169         parameter. Tweak.
10170
10171 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
10172
10173         * decl2.c (import_export_class): Update.
10174
10175 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
10176
10177         * error.c (init_error): Adjust settings.
10178
10179 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
10180
10181         * error.c (init_error): Adjust settings.
10182
10183 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
10184
10185         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
10186         return pointers to data members by reference rather than by value.
10187
10188 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
10189
10190         Implement the Named Return Value optimization.
10191         * cp-tree.h (struct cp_language_function): Add x_return_value.
10192         (current_function_return_value): Now a macro.
10193         * decl.c: Don't define it.
10194         (define_label, finish_case_label): Don't clear it.
10195         (init_decl_processing): Don't register it with GC.
10196         * semantics.c (genrtl_finish_function): Don't check it for
10197         no_return_label.  Copy the RTL from the return value to
10198         current_function_return_value and walk, calling...
10199         (nullify_returns_r): ...this new fn.
10200         * typeck.c (check_return_expr): Set current_function_return_value.
10201
10202 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
10203
10204         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
10205         sharing a ctor vtable with.  Merge code for cases 1 and 2.
10206         (binfo_ctor_vtable): New fn.
10207         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
10208
10209 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
10210
10211         * class.c (dfs_find_final_overrider): Fix logic.
10212
10213         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
10214         virtual thunk instead of non-virtual.
10215         (get_matching_virtual): Uncomment.
10216
10217         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
10218         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
10219         PARM, not ARG.
10220
10221 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
10222
10223         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
10224         we've not emerged from the hierarchy of RTTI_BINFO on reaching
10225         a non-virtual base.
10226
10227 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
10228
10229         * NEWS: Update release number.
10230
10231 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
10232
10233         PR c++/3130, c++/3131, c++/3132
10234         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
10235         * class.c (force_canonical_binfo_r): Move
10236         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
10237         virtual bases unless they're primary and what they're primary
10238         too has been moved.
10239         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
10240         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
10241         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
10242         derived binfo.
10243         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
10244         (layout_nonempty_base_or_field): Add most derived type
10245         parameter. Adjust.
10246         (layout_empty_base): Likewise.
10247         (build_base_field): Likewise.
10248         (build_base_fields): Likewise.
10249         (propagate_binfo_offsets): Add most derived type
10250         parameter. Skip non canonical virtual bases too.
10251         (dfs_set_offset_for_unshared_vbases): Don't skip primary
10252         bases. Do skip canonical bases.
10253         (layout_virtual_bases): Adjust.
10254         (layout_class_type): Adjust.
10255         (dfs_get_primary_binfo): Build list of virtual primary base
10256         candidates.
10257         (get_primary_binfo): Check that the shared virtual primary
10258         base candidate was found first.
10259         (accumulate_vtbl_inits): Don't do anything for non-vptr
10260         containing binfos. For case 1 primary virtual bases, keep
10261         checking that we've not emerged from the hierarchy of RTTI_BINFO.
10262
10263 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
10264
10265         PR c++/3089
10266         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
10267         hierarchy looking for primary bases for a ctor
10268         vtable. Recursively call oneself, if we meet our primary via
10269         this route and haven't met it yet via inheritance graph order.
10270
10271 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
10272
10273         * lang-options.h: Emit documentation for -fno-honor-std, not
10274         -fhonor-std.
10275
10276 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
10277
10278         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
10279         Don't clobber delta.
10280         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
10281
10282 2001-06-10  Mark Mitchell <mark@codesourcery.com>
10283             Gabriel Dos Reis  <gdr@codesourcery.com>
10284
10285         * Make-lang.in (cp/call.o): Depend on diagnostic.h
10286         (cp/typeck.o): Depend on diagnostic.h
10287         (cp/typeck2.o): Depend on diagnostic.h
10288         (cp/repo.o): Depend on dignostic.h
10289         * typeck.c: #include diagnostic.h
10290         (convert_for_initialization): Remove extern declaration for
10291         warningcount and errorcount.
10292
10293         * call.c: #include diagnostic.h
10294         (convert_like_real): Remove extern declaration for warnincount and
10295         errorcount.
10296
10297         * repo.c: #include diagnostic.h
10298         * typeck2.c: #include diagnostic.h
10299
10300 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
10301
10302         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
10303         in previous change.
10304
10305 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
10306
10307         PR c++/2929
10308         * friend.c (do_friend): Use push_decl_namespace for classes at
10309         namespace scope.
10310
10311 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
10312             Jason Merrill <jason_merrill@redhat.com>
10313
10314         PR c++/3061
10315         * class.c (build_secondary_vtable): Use assert, rather than an error
10316         message.
10317         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
10318         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
10319         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
10320         Don't set BINFO_VTABLE for a primary virtual base.
10321
10322 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
10323
10324         * decl.c (duplicate_decls): Update source position information
10325         when a template function is defined.
10326
10327 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
10328
10329         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
10330
10331 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
10332
10333         PR c++/2914
10334         * decl.c (pushtag): Don't push into a complete type's scope.
10335
10336 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
10337
10338         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
10339         (struct lang_decl_flags): Lose generate_with_vtable_p.
10340         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
10341         * class.c (copy_virtuals): Adjust.
10342         * decl2.c (mark_vtable_entries): Adjust.
10343         * method.c (make_thunk, build_vtable_entry): Adjust.
10344         * class.c (update_vtable_entry_for_fn): Only look as far as the
10345         first defining class.
10346         (build_vtbl_initializer): Put nothing in the slot for a function only
10347         defined in a lost primary virtual base.
10348         (add_vcall_offset_vtbl_entries_1): Use the same code for
10349         the lost primary case and the normal case.
10350         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
10351         (get_vfield_offset, get_derived_offset): Lose.
10352         (dfs_find_final_overrider): Use look_for_overrides_here.
10353         (get_matching_virtual): New fn.
10354         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
10355         not BV_VCALL_INDEX.
10356         * search.c (look_for_overrides_here): Split out from...
10357         (look_for_overrides_r): Here.
10358
10359         * class.c (find_final_overrider): Return error_mark_node on error.
10360
10361         * decl2.c (key_method): #if 0 accidental change.
10362
10363 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
10364
10365         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
10366         (build_over_call): Likewise.
10367         * decl.c (grokparms): Likewise.
10368         * pt.c (tsubst_decl): Likewise.
10369         * typeck.c (convert_arguments): Likewise.
10370
10371 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
10372
10373         * semantics.c (begin_class_definition): Robustify.
10374
10375         * pt.c (instantiate_decl): Tell the repository code about the
10376         clones, not the cloned functions.
10377         * repo.c (repo_template_used): Explicitly instantiate the cloned
10378         function, not the clones.
10379
10380 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
10381
10382         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
10383         ICS_BAD_FLAG on created conversion.
10384         (compare_ics): Break out rank.
10385
10386 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
10387
10388         * decl.c (xref_tag): Remove extraneous %s on dependent name
10389         lookup warning.
10390
10391 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
10392
10393         * class.c (layout_vtable_decl): Fix off by one error on
10394         build_index_type.
10395         (build_vtt): Likewise.
10396         (build_ctor_vtbl_group): Likewise.
10397
10398 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
10399
10400         * class.c (maybe_indent_hierarchy): New function.
10401         (dump_class_hierarchy_r): Add flags. Dump extra binfo
10402         information, if enabled. Use maybe_indent_hierarchy. Adjust
10403         output format.
10404         (dump_class_hierarchy): Adjust prototype. Adjust output format.
10405         (dump_array, dump_vtable, dump_vtt): New functions.
10406         (finish_struct_1): Adjust hierarchy dumping.
10407         (initialize_vtable): Call dump_vtable.
10408         (build_vtt): Call dump_vtt.
10409         (build_ctor_vtbl_group): Call dump_vtable.
10410         * decl2.c (flag_dump_class_layout): Remove.
10411         (cxx_decode_option): Remove dump translation unit
10412         and dump class hierarchy check. Call dump_switch_p.
10413         (finish_file): Adjust dumping.
10414         (dump.c): Only dump base classes if not TDF_SLIM.
10415         Only dump namespace members if not TDF_SLIM.
10416         * optimize.c (dump_function): New function.
10417         (optimize_function): Call dump_function.
10418         * semantics.c (expand_body): Use dump_enabled_p.
10419
10420 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
10421
10422         PR g++/2936
10423         Part missed from first commit
10424         * decl2.c (finish_anon_union): Copy context.
10425
10426 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
10427
10428         PR g++/2936
10429         * optimize.c (remap_decl): Remap anonymous aggregate members too.
10430
10431 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
10432
10433         PR g++/2823
10434         * semantics.c (expand_body): Don't optimize thunks.
10435
10436 2001-05-25  Sam TH  <sam@uchicago.edu>
10437
10438         * cp-tree.h lex.h: Fix header include guards.
10439
10440 2001-05-25  Mark Mitchell <mark@codesourcery.com>
10441
10442         * decl.c (init_decl_processing): Tweak.
10443
10444 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
10445
10446         * decl.c (duplicate_decls): Tidy.
10447         (init_decl_processing): Always set flag_no_builtin.
10448
10449 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
10450
10451         PR c++/2184
10452         * decl2.c (do_local_using_decl): Push the decls, even in a
10453         template.
10454
10455 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
10456
10457         * optimize.c (initialize_inlined_parameters): Don't set
10458         TREE_READONLY for a VAR_DECL taking the place of an inlined
10459         PARM_DECL.
10460
10461 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
10462
10463         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
10464         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
10465         attribute.
10466
10467 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
10468
10469         * parse.y: Refer to compound literals as such, not as
10470         constructor-expressions.
10471
10472 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
10473
10474         * call.c (build_op_delete_call): Ignore exception-specifications
10475         when looking for matching delete operators.
10476         * init.c (build_new_1): Compute whether or not the allocation
10477         function used is a placement allocation function or not, and
10478         communicate this information to build_op_delete_call.
10479
10480 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
10481
10482         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
10483         (build_vtbl_ref): Adjust.
10484         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
10485         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
10486         Re-add vtable-gc.
10487         (unsupported_options): Correspondingly.
10488
10489         * decl2.c (maybe_make_one_only): Check flag_weak, not
10490         supports_one_only().
10491
10492         * cp-tree.def (START_CATCH_STMT): Lose.
10493         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
10494         * tree.c (cp_statement_code_p): Don't case it.
10495         * semantics.c (cp_expand_stmt): Likewise.
10496         * cp-tree.h (START_CATCH_TYPE): Lose.
10497         (HANDLER_TYPE): New.
10498         * except.c (expand_start_catch_block): Don't start any blocks.
10499         Return the type.
10500         (expand_end_catch_block): Don't end any blocks.
10501         * parse.y (handler): Don't pass anything from finish_handler_parms
10502         to finish_handler.
10503         * pt.c (tsubst_expr): Likewise.
10504         * semantics.c (begin_handler): Call note_level_for_catch here.
10505         (finish_handler_parms): Don't return anything.
10506         (genrtl_catch_block, begin_catch_block): Lose.
10507         (genrtl_handler): Call expand_start_catch here.
10508
10509 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
10510
10511         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
10512         (get_vtable_decl, build_vtt): Not here.
10513
10514 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
10515
10516         PR c++/2781
10517         * optimize.c (update_cloned_parm): Copy addressability and other
10518         flags.
10519
10520 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10521
10522         * pt.c (determine_specialization): Ignore artificial functions.
10523
10524 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
10525
10526         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
10527         (C_RID_CODE): Remove.
10528         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
10529         (init_parse): Don't do it here.
10530
10531 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
10532
10533         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
10534         function declaration to avoid stripping the symbol's attributes.
10535
10536 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
10537
10538         * decl.c (pushdecl): Adjust error string.
10539         (xref_tag): Adjust friend class injection warning. Remove the
10540         inherited name from the class shadowed scope.
10541
10542 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
10543
10544         * except.c (cp_protect_cleanup_actions): New function.
10545         (init_exception_processing): Don't set protect_cleanup_actions
10546         here.  Do set lang_protect_cleanup_actions.
10547
10548 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
10549
10550         * spew.c (read_token): Call yyerror on all unexpected tokens.
10551
10552 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
10553
10554         * init.c (member_init_ok_or_else): Take a tree rather than
10555         string for name.
10556         (expand_member_init): Adjust.
10557
10558 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
10559
10560         * decl.c (duplicate_decls): Suppress warning about duplicate
10561         decls if the first decl is a friend.
10562
10563 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
10564
10565         * except.c (choose_personality_routine): Export.  Add
10566         explanatory comment.  Take an enum languages, not a boolean.
10567         (initialize_handler_parm): Adjust to match.
10568         * cp-tree.h: Prototype choose_personality_routine.
10569         * lex.c (handle_pragma_java_exceptions): New function.
10570         (init_cp_pragma): Register #pragma GCC java_exceptions.
10571
10572 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
10573
10574         * method.c (build_mangled_C99_name): Remove unused prototype.
10575
10576 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
10577
10578         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
10579         * typeck.c (get_member_function_from_ptrfunc,
10580         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
10581         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
10582
10583         Reverted Geoff Keating's 2001-05-03's patch.
10584
10585 2001-05-11  Ira Ruben   <ira@apple.com>
10586
10587         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
10588
10589 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
10590
10591         * cp-tree.h (finish_label_expr, lookup_label): Delete.
10592         * parse.y: Update for '&&'; don't issue warning here.
10593         * semantics.c (finish_label_expr): Delete.
10594
10595 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
10596
10597         * splay-tree.h (splay_tree_max): New function.
10598         (splay_tree_min): Likewise.
10599
10600 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
10601
10602         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
10603         (pfn_vflag_identifier): Define.
10604         Update comment about layout of pointer functions.
10605         (build_ptrmemfunc1): Update prototype.
10606         (expand_ptrmemfunc_cst): Update prototype.
10607         * decl.c (initialize_predefined_identifiers): Initialize
10608         pfn_vflag_identifier.
10609         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
10610         an extra field to the type.
10611         * expr.c (cplus_expand_constant): Pass 'flag' between
10612         expand_ptrmemfunc_cst and build_ptrmemfunc1.
10613         * typeck.c (get_member_function_from_ptrfunc): When
10614         FUNCTION_BOUNDARY < 16, look at additional field to determine
10615         if a pointer-to-member is a real pointer or a vtable offset.
10616         (build_ptrmemfunc1): Add new parameter to contain extra field.
10617         (build_ptrmemfunc): Pass the extra field around.
10618         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
10619         (pfn_from_ptrmemfunc): Ignore the extra field.
10620
10621 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
10622
10623         * cp-tree.h (flag_inline_trees): Update documentation.
10624         * decl.c (init_decl_processing): Adjust handling of
10625         flag_inline_functions and flag_inline_trees to support -O3.
10626         (grokfndecl): Set DECL_INLINE on all functions if that's what
10627         the user requested.
10628         (save_function_data): Clear DECL_INLINE in
10629         current_function_cannot_inline is non-NULL.
10630         * decl2.c (flag_inline_trees): Update documentation.
10631
10632 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
10633
10634         * dump.c (cp_dump_tree, USING_STMT case): New case.
10635         * tree.c (cp_statement_code_p): Add USING_STMT.
10636         * decl2.c (do_using_directive): Add the using directive statement.
10637
10638         * tree.c (walk_tree): Reformat an if block.
10639
10640 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
10641
10642         * decl.c (compute_array_index_type): Don't try to do anything with
10643         the indices when processing a template.
10644
10645 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10646
10647         * call.c: NULL_PTR -> NULL.
10648         * class.c: Likewise.
10649         * cvt.c: Likewise.
10650         * decl.c: Likewise.
10651         * decl2.c: Likewise.
10652         * except.c: Likewise.
10653         * init.c: Likewise.
10654         * rtti.c: Likewise.
10655         * search.c: Likewise.
10656         * tree.c: Likewise.
10657         * typeck.c: Likewise.
10658         * typeck2.c: Likewise.
10659
10660 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
10661
10662         * decl2.c (do_using_directive): Revert previous patch.
10663
10664 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
10665
10666         * cp-tree.def (USING_STMT): New statement node.
10667         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
10668         * decl2.c (do_using_directive): Add USING_STMT to statement
10669         tree. Don't emit errors when processing template decl.
10670         * pt.c (tsubst_expr, USING_STMT case): New case.
10671         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
10672
10673 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
10674
10675         * call.c (build_new_op): Convert args from reference here.
10676         (build_conditional_expr): Don't convert here.
10677
10678 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
10679
10680         * spew.c (last_token_id): New static variable.
10681         (read_token): Set it here.
10682         (yyerror): Use it here.
10683
10684 2001-04-30  Richard Henderson  <rth@redhat.com>
10685
10686         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
10687         * decl.c: Likewise.
10688
10689 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
10690
10691         * gxxint.texi: Remove.
10692         * Make-lang.in: Remove all traces of gxxint.texi.
10693
10694 2001-04-30  Mark P Mitchell  <mark@codesourcery.com>
10695
10696         * decl2.c (start_static_initialization_or_destruction): Correct
10697         logic to handle the -fno-use-cxa-atexit case.
10698
10699 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
10700
10701         * optimize.c (update_cloned_parm): New function.
10702         (maybe_clone_body): Use it.  Update the `this' parameter too.
10703
10704 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
10705
10706         * decl2.c (unsupported_options): Add new-abi.
10707         * lang-options.h: Remove no longer supported options.
10708
10709 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
10710
10711         * except.c (can_convert_eh): Don't check template parms,
10712         typename types etc.
10713
10714 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
10715
10716         * optimize.c (maybe_clone_body): Copy parameter names and locations.
10717
10718 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
10719
10720         * cp-tree.h (adjust_clone_args): Prototype new function.
10721         * class.c (adjust_clone_args): New function.
10722         * decl.c (start_function): Call it for in charge ctors.
10723
10724 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
10725
10726         * method.c (use_thunk): Make sure that thunks really are emitted
10727         when requested.
10728
10729 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
10730
10731         * mangle.c (write_chars): New macro.
10732         (hwint_to_ascii): New function
10733         (write_number): Use it.
10734         (write_integer_cst): Deal with really big numbers.
10735
10736 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
10737
10738         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
10739         the clone.
10740
10741 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
10742
10743         * decl.c (grokdeclarator): Set context of namespace scope
10744         TYPE_DECLS.
10745
10746 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
10747
10748         * cp/optimize.c: Include hashtab.h.
10749         (struct inline_data): Add tree_pruner.
10750         (expand_call_inline, expand_calls_inline): Use it when calling
10751         walk_tree.
10752         (optimize_function): Initialize and free tree_pruner.
10753
10754 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
10755
10756         Lazy __FUNCTION__ generation.
10757         * cp-tree.def (FUNCTION_NAME): Remove.
10758         * cp-tree.h (function_name_declared_p): Remove.
10759         (cp_fname_init): Prototype.
10760         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
10761         don't call declare_function_name. Call start_fname_decls.
10762         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
10763         clobber the line number.
10764         (cp_fname_init): New function.
10765         (start_function): Call start_fname_decls.
10766         (finish_function): Call finish_fname_decls.
10767         * lex.c (reswords): Add slots for __FUNCTION__ et al.
10768         (rid_to_yy): Add mappings for __FUNCTION__ et al.
10769         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
10770         * parse.y (VAR_FUNC_NAME): New token.
10771         (primary): Add VAR_FUNC_NAME.
10772         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
10773         generation.
10774         (tsubst, FUNCTION_NAME case): Remove.
10775         (tsubst_copy, FUNCTION_NAME case): Remove.
10776         (tsubst_expr, DECL_STMT case): Be careful with a
10777         DECL_PRETTY_FUNCTION_P.
10778         (instantiate_decl): Remove function_name_declared_p.
10779         * semantics.c (begin_compound_statement): Don't call
10780         declare_function_name here.
10781         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
10782         (finish_translation_unit): Call finish_fname_decls.
10783         (expand_body): Remove function_name_declared_p.
10784         * typeck2.c (digest_init): Allow any ERROR_MARK.
10785
10786 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
10787
10788         * pt.c (tsubst_decl): Use VOID_TYPE_P.
10789         * semantics.c: Fix some typos.
10790
10791 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
10792
10793         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
10794
10795 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10796
10797         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
10798
10799 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
10800
10801         * except.c (build_throw): Wrap the initialization of the exception
10802         object in a MUST_NOT_THROW_EXPR.
10803         (do_free_exception): #if 0.
10804
10805 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
10806
10807         * cp-tree.h (finish_enum): Change prototype.
10808         * decl.c (finish_enum): Reorganize.
10809         * parse.y (structsp): Adjust calls to finish_enum.
10810
10811 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
10812
10813         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
10814         't' case.
10815
10816 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
10817
10818         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
10819         (layout_empty_base): Return at end flag.
10820         (build_base_field): Likewise.
10821         (build_base_fields): Likewise.
10822         (layout_virtual_bases): Don't add 1 to eoc value.
10823         (end_of_class): Use full size for empty bases.
10824         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
10825         empty bases. Don't add 1 to eoc value. Only add trailing padding
10826         if we're an empty class with no empty bases.
10827         (dump_class_hierarchy): Dump size and alignment.
10828
10829 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
10830
10831         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
10832         ICS_BAD_FLAG.
10833
10834 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
10835
10836         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
10837         is found, look first if name does not match the structure name.
10838
10839 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
10840
10841         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
10842         set.
10843         (SET_DECL_LANGUAGE): New macro.
10844         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
10845         (pushdecl): Likewise.
10846         (build_library_fn_1): Likewise.
10847         (build_cp_library_fn): Likewise.
10848         (grokfndecl): Likewise.
10849         (grokvardecl): Mark `extern "C"' variables as having C linkage.
10850         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
10851         * lex.c (retrofit_lang_decl): Likewise.
10852         * mangle.c (mangle_decl_string): Don't mangle the names of
10853         variables declared with C language linkage.
10854         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
10855
10856 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
10857
10858         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
10859         flag_access_control from uninitialized storage.
10860
10861 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
10862
10863         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
10864         * mangle.c (write_pointer_to_member_type): Fix mangling of
10865         pointers to cv-qualified member function types.
10866
10867         * init.c (build_delete): Create a SAVE_EXPR for the address if
10868         we're going to use it more than once.
10869
10870 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
10871
10872         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
10873         (expand_ptremfunc_cst): Change prototype.
10874         (delta2_from_ptrmemfunc): Remove.
10875         * expr.c (cplus_expand_constant): Adjust call to
10876         expand_ptrmemfunc_cst.
10877         * typeck.c (build_ptrmemfunc1): Simplify.
10878         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
10879         results in a constant.
10880         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
10881         (delta2_from_ptrmemfunc): Remove.
10882         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
10883
10884 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
10885
10886         * cp-tree.h (decl_namespace_list): New macro.
10887         (struct saved_scope): Add decl_ns_list.
10888         * decl.c (mark_saved_scope): Mark it.
10889         * decl2.c: Lose static decl_namespace_list.
10890         (init_decl2): Don't save it.
10891
10892 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10893
10894         * cp-tree.h (warn_return_type, yylex): Delete redundant
10895         declarations.
10896
10897         * decl.c (current_class_depth, global_namespace): Likewise.
10898
10899         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
10900
10901         * repo.c (flag_use_repository): Likewise.
10902
10903 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10904
10905         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
10906         set_block, pushdecl, getdecls, gettags, init_decl_processing,
10907         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
10908         lvalue_or_else, print_lang_statistics, comp_target_types,
10909         unsigned_type, signed_type, signed_or_unsigned_type,
10910         build_function_call, mark_addressable, incomplete_type_error):
10911         Delete redundant declarations.
10912
10913 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
10914
10915         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
10916         (TYPE_ANONYMOUS_P): New macro.
10917         (TAGGED_TYPE_P): New macro.
10918         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
10919         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
10920         * tree.c (no_linkage_helper): Likewise.
10921         * semantics.c (begin_class_definition): Likewise.
10922         * pt.c (convert_template_argument): Likewise.
10923         * lex.c (check_for_missing_semicolon): Likewise.
10924
10925 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
10926
10927         * class.c (dfs_unshared_virtual_bases): New function.
10928         (mark_primary_bases): Call it.
10929         (check_bases): Ignore virtual bases when determining
10930         nearly-emptiness.
10931
10932 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
10933
10934         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
10935
10936 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
10937
10938         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
10939         cloned function to the clone.
10940
10941 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10942
10943         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
10944
10945         * semantics.c: Include expr.h.
10946
10947 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
10948
10949         * method.c (implicitly_declare_fn): Commonize code for copy ctor
10950         and assignment op. Set TREE_USED for parameter.
10951
10952 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
10953
10954         * class.c (find_final_overrider_data): Add `candidates'.
10955         (dfs_find_final_overrider): Don't issue error messages
10956         prematurely.
10957         (find_final_overrider): Issue error messages here.
10958         (build_base_field): Don't warn about amgibuous direct bases here.
10959         (warn_about_ambiguous_direct_bases): New function.
10960         (layout_class_type): Use it.
10961
10962 2001-04-10  Richard Henderson  <rth@redhat.com>
10963
10964         * typeck.c (build_array_ref): Push the array reference inside
10965         COMPOUND_EXPR and COND_EXPR.
10966
10967 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
10968
10969         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
10970         * decl.c (duplicate_decls): Adjust accordingly.
10971         (maybe_commonize_var): Likewise.
10972         (grokfndecl): Likewise.
10973         (start_function): Likewise.
10974         (start_method): Likewise.
10975         * decl2.c (key_method): Likewise.
10976         (import_export_decl): Likewise.
10977         * method.c (implicitly_declare_fn): Likewise.
10978         * optimize.c (maybe_clone_body): Likewise.
10979
10980 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
10981
10982         * lang-specs.h: Add __DEPRECATED.
10983
10984 2001-04-05  J"orn Rennecke <amylaar@redhat.com>
10985
10986         * search.c (get_dynamic_cast_base_type): When building a new
10987         constant, set its type to ssizetype.
10988
10989 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
10990
10991         * optimize.c (expand_call_inline): Only add newly inlined statements
10992         into inlined_stmts.
10993
10994 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
10995
10996         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
10997         (OPERATOR_FORMAT): Likewise.
10998         (OPERATOR_TYPENAME_FORMAT): Likewise.
10999         * operators.def: Remove old name-mangling information.
11000         * decl.c (grok_op_properties): Adjust accordingly.
11001         * lex.c (init_operators): Likewise.
11002         * rtti.c (get_tinfo_decl): Issue error messages about types that
11003         have variable size.
11004
11005 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
11006
11007         * decl2.c (import_export_decl): Don't call import_export_class
11008         when processing an inline member function.
11009         * semantics.c (expand_body): Call import_export_decl before
11010         emitting inline functions.
11011
11012 2001-03-28  Richard Henderson  <rth@redhat.com>
11013
11014         IA-64 ABI Exception Handling:
11015         * cp-tree.def (EH_SPEC_BLOCK): New.
11016         (MUST_NOT_THROW_EXPR): New.
11017         * cp-tree.h: Update changed function declarations.
11018         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
11019         (CPTI_CALL_UNEXPECTED): New.
11020         (struct cp_language_function): Rename x_eh_spec_try_block
11021         to x_eh_spec_block.
11022         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
11023         * decl.c (current_binding_level): If no current function
11024         bindings, revert to scope_chain.
11025         (initialize_predefined_identifiers): Remove __cp_push_exception.
11026         (store_parm_decls): Use begin_eh_spec_block.
11027         (finish_function): Use finish_eh_spec_block.
11028         (mark_lang_function): Update for name changes.
11029         * decl2.c (finish_file): No mark_all_runtime_matches.
11030         * dump.c (cp_dump_tree): Handle new tree codes.
11031         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
11032         * except.c (catch_language_init, catch_language): Remove.
11033         (init_exception_processing): Don't set language code.
11034         Initialize call_unexpected_node, protect_cleanup_actions,
11035         eh_personality_libfunc, lang_eh_runtime_type.
11036         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
11037         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
11038         (prepare_eh_type): Split out type canonicalizations ...
11039         (build_eh_type_type): ... from here.
11040         (build_eh_type_type_ref): Remove.
11041         (mark_all_runtime_matches): Remove.
11042         (build_exc_ptr): New.
11043         (do_begin_catch, do_end_catch): New.
11044         (do_pop_exception): Remove.
11045         (build_terminate_handler): Remove.
11046         (choose_personality_routine): Split out language choice from ...
11047         (initialize_handler_parm): ... here.
11048         Use MUST_NOT_THROW_EXPR.
11049         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
11050         exception object handling.
11051         (expand_start_eh_spec, expand_end_eh_spec): Remove.
11052         (expand_exception_blocks, alloc_eh_object): Remove.
11053         (begin_eh_spec_block, finish_eh_spec_block): New.
11054         (do_allocate_exception, do_free_exception): New.
11055         (expand_throw): Merge into ...
11056         (build_throw): ... here.  Update for abi.
11057         * expr.c (cplus_expand_expr): No expand_internal_throw.
11058         Handle MUST_NOT_THROW_EXPR.
11059         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
11060         * semantics.c (*) Update for except.h name changes.
11061         (genrtl_try_block): No protect_with_terminate.
11062         (genrtl_eh_spec_block): New.
11063         (genrtl_handler): Don't emit the goto here.
11064         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
11065         (genrtl_finish_function): Don't expand_exception_blocks.
11066         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
11067
11068 2001-03-28  Richard Henderson  <rth@redhat.com>
11069
11070         * decl.c (struct named_label_list): Rename eh_region to
11071         in_try_scope, add in_catch_scope.
11072         (struct binding_level): Rename eh_region to is_try_scope,
11073         add is_catch_scope.
11074         (note_level_for_try): Rename from note_level_for_eh.
11075         (note_level_for_catch): New.
11076         (poplevel): Copy both is_try_scope and is_catch_scope to
11077         the named_label_list struct.
11078         (check_previous_goto_1): Don't check for catch block via
11079         DECL_ARTIFICIAL; use in_try_scope instead.
11080         (check_goto): Likewise.
11081         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
11082         * except.c (expand_start_catch_block): Call note_level_for_catch.
11083         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
11084
11085 2001-03-27  Richard Henderson  <rth@redhat.com>
11086
11087         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
11088         exceptions_via_longjmp.
11089
11090 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
11091
11092         * pt.c (check_default_tmpl_args):  Make error messages clearer.
11093
11094 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
11095
11096         * error.c:  Also undefine 'A' macro used for cp_printers definition.
11097
11098 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11099
11100         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
11101
11102 2001-03-26  Mike Yang <yang@research.att.com>
11103             Mark Mitchell  <mark@codesourcery.com>
11104
11105         * dump.c (dump_access): New function.
11106         (cp_dump_tree): Use it.  Dump basetype information for class
11107         types.
11108
11109 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
11110
11111         * Makefile.in (optimize.o): Depend on params.h.
11112         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
11113         (init_decl_processing): Set flag_no_inline when doing
11114         inlining-on-trees.
11115         * optimize.c: Include params.h.
11116         (struct inline_data): Improve documentation of FNS.  Add
11117         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
11118         (INSNS_PER_STMT): New macro.
11119         (remap_block): Use CLONING_P.
11120         (inlinable_function_p): Don't inline big functions.
11121         (expand_call_inline): Keep track of how much inlining we've done.
11122         (optimize_function): Set FIRST_INLINED_FN.
11123         (maybe_clone_body): Set CLONING_P.
11124         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
11125         tree nodes.
11126         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
11127         rest_of_compilation.  Clear DECL_RTL for local variables
11128         afterwards.
11129         (clear_decl_rtl): New function.
11130
11131 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
11132
11133         Implement DR 209
11134         * cp-tree.h (skip_type_access_control,
11135         reset_type_access_control): Prototype.
11136         * decl.c (grokdeclarator): Access of friends is not checked.
11137         * parse.y (component_decl_list): Reset type access control.
11138         * semantics.c (decl_type_access_control): Clear
11139         current_type_lookups.
11140         (save_type_access_control): Don't save if not deferring.
11141         (skip_type_access_control, reset_type_access_control): New
11142         functions.
11143         (begin_class_definition): Do type access control for basetypes.
11144         Start deferred access control.
11145         (finish_class_definition): Resume immediate access control if
11146         this is a local class.
11147
11148 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11149
11150         * class.c (add_method): Use memcpy/memmove, not bcopy.
11151
11152         * decl.c (duplicate_decls): Likewise.
11153
11154 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
11155
11156         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
11157         not `_'.
11158
11159 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
11160
11161         * decl.c (local_names): Define.
11162         (push_local_name): New.
11163         (grok_reference_init): Return init if initializing static reference
11164         variable with non-constant instead of emitting it.
11165         Move expand_static_init call to cp_finish_decl.
11166         (layout_var_decl): Call push_local_name.
11167         (maybe_commonize_var): Allow inlining functions even if they have
11168         static local variables, use comdat_linkage for them if flag_weak.
11169         (check_initializer): Call obscure_complex_init if
11170         grok_reference_init returned nonzero.
11171         (save_function_data): Clear x_local_names.
11172         (pop_cp_function_context): Free x_local_names.
11173         (mark_inlined_fns): Remove.
11174         (mark_lang_function): Mark x_local_names.
11175         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
11176         Mark inlined_fns as tree, remove call to mark_inlined_fns.
11177         * class.c (alter_access): Ensure DECL_ACCESS is never set if
11178         DECL_DISCRIMINATOR_P.
11179         * cp-tree.h (cp_language_function): Add x_local_names.
11180         (lang_decl_flags): Add discriminator into u2.
11181         (lang_decl_inlined_fns): Remove.
11182         (lang_decl): inlined_fns is now a TREE_VEC.
11183         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
11184         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
11185         TREE_VEC, not a custom structure.
11186         (optimize_function): Likewise.
11187         * mangle.c (discriminator_for_local_entity): Discriminate among
11188         VAR_DECL local entities.
11189         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
11190         is not valid.
11191
11192 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
11193
11194         Add support for Java interface method calls.
11195         * cp-tree.h (struct lang_type): Add java_interface flag.
11196         (TYPE_JAVA_INTERFACE): New macro.
11197         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
11198         by setting TYPE_JAVA_INTERFACE.
11199         * call.c (java_iface_lookup_fn): New static.
11200         (build_over_call): If calling a method declared in a
11201         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
11202         expression which resolves the function address.
11203         (build_java_interface_fn_ref): New function.
11204
11205 2001-03-22  Richard Henderson  <rth@redhat.com>
11206
11207         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
11208         * except.c: Don't include it.
11209
11210 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
11211             based on an idea from Joe Buck <jbuck@synopsys.com>
11212
11213         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
11214         New nonterminals.
11215         (data_def, component_decl): Add reductions to bad_decl.
11216
11217 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
11218
11219         * method.c (do_build_assign_ref): Don't use build_modify_expr for
11220         anonymous aggregates, since they don't have assignment operator
11221         method.
11222         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
11223         assignment operators for anonymous structure fields.
11224
11225 2001-03-21  Jason Merrill  <jason@redhat.com>
11226
11227         * pt.c (instantiate_decl): Abort if we see a member constant
11228         instantiation that doesn't already have its initializer.
11229         Downgrade explicit instantiation without definition to pedwarn.
11230
11231         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
11232         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
11233         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
11234
11235         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
11236         (pending_vtables): Remove.
11237         * decl2.c (pending_vtables): Remove.
11238         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
11239         CLASSTYPE_VTABLE_NEEDS_WRITING.
11240         (import_export_class): Likewise.
11241         (init_decl2): Don't mark pending_vtables.
11242         * lex.c (handle_pragma_vtable): Just sorry.
11243         * pt.c (instantiate_class_template): Don't mess with
11244         CLASSTYPE_VTABLE_NEEDS_WRITING.
11245         (mark_class_instantiated): Likewise.
11246         * ptree.c (print_lang_type): Don't print it.
11247         * semantics.c (begin_class_definition): Don't set it.
11248
11249         * pt.c (template_tail): Replace with last_pending_template.
11250         (maybe_templates, maybe_template_tail): Remove.
11251         (add_pending_template): Adjust.
11252         (instantiate_pending_templates): Adjust.
11253
11254         * cp-tree.h (struct saved_scope): Remove lang_stack field.
11255         (current_lang_stack): Remove.
11256         * decl.c (maybe_push_to_top_level): Don't initialize it.
11257         (duplicate_decls): Use current_lang_depth.
11258         (xref_basetypes): Likewise.
11259         * class.c (current_lang_depth): New fn.
11260         (push_lang_context): Use more varray functionality.
11261         (pop_lang_context): Likewise.
11262
11263         * error.c (GLOBAL_THING): Always use '__'.
11264
11265 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
11266
11267         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
11268
11269         * mangle.c (mangle_decl_string): Mangle the names of overloaded
11270         operators, even when they have `extern "C"' linkage.
11271
11272 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
11273
11274         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
11275         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
11276         where it's not necessary.
11277         (add_method): Remove optimization involving comparison of
11278         DECL_ASSEMBLER_NAME.
11279         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
11280         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
11281         where it's not necessary.
11282         (check_methods): Likewise.
11283         (build_clone): Likewise.
11284         (built_vtt): Likewise.
11285         * cp-tree.h (DECL_NEEDED_P): Likewise.
11286         * decl.c (pushtag): Likewise.
11287         (duplicate_decls): Likewise.
11288         (pushdecl): Likewise.
11289         (builtin_function): Likewise.
11290         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
11291         (build_cp_library_fn): Likewise.
11292         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
11293         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
11294         where it's not necessary.
11295         (make_rtl_for_nonlocal_decl): Likewise.
11296         (cp_finish_decl): Likewise.
11297         (grokfndecl): Likewise.
11298         (grokvardecl): Likewise.
11299         (grokdeclarator): Likewise.
11300         (start_function): Likewise.
11301         (cp_missing_return_ok_p): Likewise.
11302         * decl2.c (grokclassfn): Likewise.
11303         (check_classfn): Likewise.
11304         (finish_static_data_member_decl): Likewise.
11305         (grokfield): Likewise.
11306         * error.c (GLOBAL_IORD_P): Remove.
11307         (dump_global_iord): Improve output.
11308         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
11309         * except.c (nothrow_libfn_p): Summarily reject any function not in
11310         namespace-scope.
11311         * init.c (build_java_class_ref): Don't explicitly set
11312         DECL_ASSEMBLER_NAME after calling mangle_decl.
11313         * mangle.c (mangle_decl_string): Handle extern "C" functions.
11314         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
11315         * method.c (set_mangled_name_for_decl): Don't explicitly set
11316         DECL_ASSEMBLER_NAME after calling mangle_decl.
11317         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
11318         IDENTIFIER_GLOBAL_VALUE for the thunk.
11319         * pt.c (set_mangled_name_for_template_decl): Remove.
11320         (check_explicit_specialization): Don't use it.
11321         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
11322         (tsubst_friend_function): Likewise.
11323         (tsubst_decl): Likewise.
11324         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
11325         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
11326         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
11327         where it's not necessary.
11328         (tinfo_base_init): Likewise.
11329         (create_real_tinfo_var): Likewise.
11330         * search.c (looup_field_1): Likewise.
11331         * semantics.c (finish_named_return_value): Likewise.
11332         * tree.c (init_tree): Set lang_set_decl_assembler_name.
11333
11334 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
11335
11336         Correct semantics restrictions checking in throw-expression.
11337         * except.c (is_admissible_throw_operand): New function.
11338         (build_throw): Use it.
11339
11340 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
11341
11342         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
11343         and its ilk.
11344
11345 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
11346
11347         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
11348         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
11349         * decl.c (duplicate_decls): Likewise.
11350         (builtin_function): Likewise.
11351         (build_library_fn): Likewise.
11352         (build_cp_library_fn): Likewise.
11353         (check_initializer): Likewise.
11354         (cp_finish_decl): Likewise.
11355         * decl2.c (grokfield): Likewise.
11356         (grok_function_init): Remove #if 0'd code.
11357         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
11358         * friend.c (do_friend): Likewise.
11359         * init.c (get_temp_regvar): Likewise.
11360         * method.c (make_thunk): Likewise.
11361         * pt.c (tsubst_friend_function): Likewise.
11362         (tsubst_decl): Likewise.
11363         (regenerate_decl_from_template): Likewise.
11364         * semantics.c (genrtl_named_return_value): Likewise.
11365         (expand_body): Likewise.
11366         (genrtl_finish_function): Likewise.
11367         * tree.c (cp_tree_equal): Likewise.
11368
11369 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
11370
11371         * call.c (convert_like_real): Add extra semantics to INNER
11372         parameter. Don't convert to temporary if a user conversion
11373         gives us an lvalue that we're about to bind to a reference.
11374         Set INNER to indicate pending reference binding on recursive
11375         calls.
11376
11377 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
11378
11379         * cp/lex.c: Delete duplicate pending_lang_change.
11380
11381 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
11382
11383         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
11384         Similarly.
11385         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
11386         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
11387
11388 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
11389
11390         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
11391
11392 2001-03-08  Stan Shebs  <shebs@apple.com>
11393
11394         * cp-tree.h (set_identifier_local_value): Remove unused decl.
11395
11396 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
11397
11398         * spew.c: Remove references to CPP_OSTRING.
11399
11400 2001-03-06  Andrew Haley  <aph@redhat.com>
11401
11402         * typeck.c (convert_arguments): Check that we have an fndecl.
11403
11404 2001-03-05  Andrew Haley  <aph@redhat.com>
11405
11406         * typeck.c (convert_arguments): Don't do ellipsis conversion for
11407         __built_in_constant_p.
11408
11409 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
11410
11411         * typeck.c (build_static_cast): Allow enum to enum conversions
11412         as per DR 128.
11413
11414 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
11415
11416         * class.c (check_field_decls): Pointers to member do not a
11417         non-pod struct make, as per DR 148.
11418
11419 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
11420
11421         * call.c (joust): cp_pedwarn when using gnu extension concerning
11422         worst conversion sequences.
11423
11424 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
11425
11426         * decl.c: Replace all uses of 'boolean' with 'bool'.
11427
11428 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
11429
11430         * lang-specs.h: Add zero initializer for cpp_spec field to
11431         all array elements that need one.  Don't put an #ifdef inside
11432         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
11433         use it.
11434
11435 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
11436
11437         Implement using decls inside template functions.
11438         * decl2.c (validate_nonmember_using_decl): Don't special case
11439         fake_std_node in the global namespace. Don't reject early when
11440         processing a template.
11441         (do_local_using_decl): Add to statement tree. Don't do further
11442         processing when building a template.
11443         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
11444
11445 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
11446
11447         * decl2.c (do_nonmember_using_decl): Don't complain if we find
11448         same function. Do complain about ambiguating extern "C"
11449         declarations.
11450
11451 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
11452
11453         Remove floating point and complex type template constant parms.
11454         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
11455         COMPLEX_TYPE extensions.
11456         (invalid_nontype_parm_type_p): Likewise.
11457
11458 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
11459
11460         * except.c (call_eh_info): Revert "match_function"'s type.
11461
11462 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
11463
11464         Fix ctor vtable vcall offsets.
11465         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
11466         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
11467         (get_matching_base): Remove.
11468         (get_original_base): New function.
11469         (build_vtbl_initializer): Initialize vid.rtti_binfo.
11470         Use a virtual thunk for a ctor vtable with an index
11471         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
11472         primary base within a constructor vtable. Only set
11473         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
11474         when primary base has been lost.
11475         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
11476
11477 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
11478
11479         * call.c (joust): Ensure more_specialized()'s argument length
11480         parameter has correct value for constructors.
11481
11482 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
11483
11484         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
11485
11486         * decl.c (mark_inlined_fns): Prototype.
11487
11488 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
11489
11490         * spew.c (yylex): Correct handling of friends.
11491
11492 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
11493
11494         * mangle.c (write_encoding): Pass write_function_type the
11495         FUNCTION_DECL for the function being encoded.
11496         (write_function_type): Pass it along to write_bare_function_type.
11497         (write_bare_function_type): Pass it along to write_method_parms.
11498         (write_method_parms): Don't mangle the compiler-generated
11499         parameters to a constructor or destructor.
11500
11501 2001-02-22  Andreas Jaeger  <aj@suse.de>
11502
11503         * optimize.c: Include toplev.h for
11504         note_deferral_of_defined_inline_function prototype.
11505
11506 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
11507
11508         * cp-tree.h (struct lang_decl_inlined_fns): New.
11509         (struct lang_decls): Add inlined_fns.
11510         (DECL_INLINED_FNS): New macro.
11511         * optimize.c (struct inline_data): Add inlined_fns.
11512         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
11513         (inlinable_function_p): Likewise, fix typo in comment,
11514         function is not inlinable if it already inlined function currently
11515         being optimized.
11516         (expand_call_inline): Add fn to inlined_fns if necessary.
11517         (optimize_function): Initialize inlined_fns.
11518         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
11519         * decl.c (mark_inlined_fns): New function.
11520         (lang_mark_tree): Call it.
11521
11522 2001-02-21  Jason Merrill  <jason@redhat.com>
11523
11524         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
11525         (DECL_UNINLINABLE): Move to middle-end.
11526
11527         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
11528         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
11529         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
11530         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
11531         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
11532
11533         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
11534         second parm of op=.
11535
11536 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
11537
11538         * decl2.c (set_decl_namespace): Allow explicit instantiations in
11539         any namespace.
11540
11541 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11542
11543         * optimize.c (expand_call_inline): Don't walk subtrees of type
11544         nodes.
11545
11546 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
11547
11548         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
11549         for a destructor.
11550
11551 2001-02-18  Jason Merrill  <jason@redhat.com>
11552
11553         Do put the VTT parameter in DECL_ARGUMENTS.
11554         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
11555         (current_vtt_parm): New macro.
11556         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
11557         (DECL_HAS_VTT_PARM_P): New macro.
11558         (DECL_VTT_PARM): Remove.
11559         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
11560         * decl.c (duplicate_decls): Only copy the operator code if
11561         appropriate.
11562         (start_function): Set current_vtt_parm.
11563         (lang_mark_tree): Don't mark vtt_parm.
11564         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
11565         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
11566         * class.c (build_clone): Maybe remove the VTT parm.
11567         * optimize.c (maybe_clone_body): Set up the VTT parm.
11568         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
11569         * call.c (build_over_call): Just allow the VTT arg.
11570         * method.c (make_thunk): Don't set DECL_VTT_PARM.
11571         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
11572         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
11573         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
11574         * error.c (dump_function_decl): Likewise.
11575         * call.c (build_user_type_conversion_1, convert_like_real): Abort
11576         if we try to call a constructor with in-charge or VTT parms.
11577         * method.c (skip_artificial_parms_for): New fn.
11578         * call.c (add_function_candidate, build_over_call): Call it.
11579         * call.c (build_new_method_call): Use current_vtt_parm.
11580         * init.c (expand_virtual_init): Likewise.
11581         * class.c (same_signature_p): No longer static.
11582         * cp-tree.h: Declare it.
11583         * search.c (look_for_overrides_r): Use it.
11584
11585 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
11586
11587         * cp-tree.h (new_abi_rtti_p): Remove.
11588         (name_mangling_version): Likewise.
11589         (flag_do_squangling): Likewise.
11590         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
11591         * decl.c (grokfndecl): Likewise.
11592         * decl2.c (name_mangling_version): Remove.
11593         (flag_do_squangling): Likewise.
11594         (lang_f_options): Remove `squangle'.
11595         (unsupported_options): Add `squangle'.
11596         (cxx_decode_option): Issue a warning about uses of
11597         -fname-mangling-version.
11598         (finish_file): Remove old ABI support.
11599         * pt.c (check_explicit_specialization): Likewise.
11600         (tsubst_decl): Likewise.
11601         * rtti.c (init_rtti_processing): Likewise.
11602         (build_headof): Likewise.
11603         (get_tinfo_decl_dynamic): Likewise.
11604         (tinfo_from_decl): Likewise.
11605         (build_dynamic_cast_1): Likewise.
11606         (synthesize_tinfo_var): Likewise.
11607         * init.c (build_new): Allow enumeration types for the array-bounds
11608         in a direct-new-declarator.
11609
11610         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
11611
11612         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
11613         TREE_PROTECTED from the template being specialized.
11614
11615 2001-02-17  Jason Merrill  <jason@redhat.com>
11616
11617         * decl2.c (build_artificial_parm): Set TREE_READONLY.
11618
11619         * decl.c (bad_specifiers): Allow throw specs on things with
11620         pointer-to-function or -member-function type.
11621         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
11622         a pmf.
11623
11624 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
11625
11626         * call.c (check_dtor_name): Handle template names correctly.
11627
11628 2001-02-16  Jason Merrill  <jason@redhat.com>
11629
11630         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
11631         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
11632         * optimize.c (maybe_clone_body): Don't substitute it.
11633         * call.c (build_new_method_call): Check in_chrg instead.
11634         * init.c (expand_virtual_init): Likewise.
11635
11636 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
11637
11638         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
11639         class-type introduces at least a type-name.
11640
11641 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
11642
11643         * call.c (convert_like_real): Create a temporary for non-lvalue.
11644
11645 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
11646
11647         * cp-tree.h: Fix typos in comments.
11648
11649 2001-02-16  Jason Merrill  <jason@redhat.com>
11650
11651         * optimize.c (remap_block): If we're compiling a clone, pass the
11652         new block to insert_block.
11653
11654 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
11655
11656         * semantics.c (finish_asm_stmt): Robustify.
11657
11658 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
11659
11660         * pt.c (push_template_decl_real): Don't remangle the name of a
11661         class template.
11662
11663 2001-02-15  Jim Meyering  <meyering@lucent.com>
11664
11665         * Make-lang.in (c++.install-common): Depend on installdirs.
11666         (c++.install-info): Likewise.
11667         (c++.install-man): Likewise.
11668
11669 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
11670
11671         * typeck2.c (build_m_component_ref): Robustify.
11672
11673 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
11674
11675         * friend.c (do_friend): Don't take the nested [template] class
11676         into account when deciding whether to warn about the friend
11677         function not referring to a template function.
11678
11679 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
11680
11681         * typeck.c (build_unary_op): Clarify error message.
11682
11683 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
11684
11685         * parse.y (component_constructor_declarator): allow optional
11686         parentheses around constructor class name.
11687
11688 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
11689
11690         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
11691         section.
11692         * init.c (emit_base_init): Remove incorrect comment about
11693         virtual bases.
11694         * method.c (make_thunk): Fix comment alignment.
11695
11696 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
11697
11698         Kill remnants of this is variable.
11699         * cp-tree.h (flag_this_is_variable): Remove.
11700         * decl2.c (flag_this_is_variable): Remove.
11701         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
11702         (build_vbase_path): The path is non-static, even in a cdtor.
11703         (resolves_to_fixed_type_p): Add additional return value.
11704         * search.c (init_vbase_pointers): Adjust.
11705         * tree.c (lvalue_p_1): Adjust.
11706         * typeck.c (mark_addressable): Adjust.
11707
11708 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
11709
11710         * pt.c (unify): Don't check cv quals of array types.
11711
11712 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
11713
11714         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
11715         check whether we already have the type.
11716
11717 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
11718
11719         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
11720         * call.c (build_op_delete_call): Simplify to remove duplicate
11721         code.
11722         * class.c (clone_function_decl): Don't build the deleting variant
11723         of a non-virtual destructor.
11724         * decl.c (finish_destructor_body): Don't call delete if this is a
11725         non-virtual destructor.
11726         * init.c (build_delete): Explicitly call `operator delete' when
11727         deleting an object with a non-virtual destructor.
11728
11729 2001-02-13  Jason Merrill  <jason@redhat.com>
11730
11731         * lang-specs.h: Add more __EXCEPTIONS.
11732
11733 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
11734
11735         * typeck2.c (process_init_constructor): Check
11736         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
11737
11738 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
11739
11740         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
11741         Remove spurious information in comment. Allow further
11742         adjustments of REFERENCE_TYPE args.
11743
11744 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
11745
11746         * errfn.c (cp_deprecated): Tweak diagnostic text.
11747         * parse.y (new_initializer): Deprecate initializer lists
11748         extension.
11749
11750 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
11751
11752         Remove old ABI support.
11753
11754 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
11755
11756         * decl2.c (flag_vtable_thunks): Always set it to 1.
11757         (flag_new_abi): Likewise.
11758         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
11759
11760         * Makefile.in (g++spec.o): Fix typo.
11761
11762 2001-02-09  Jason Merrill  <jason@redhat.com>
11763
11764         * lang-specs.h: Restore definition of __EXCEPTIONS.
11765
11766 2001-02-08  Jason Merrill  <jason@redhat.com>
11767
11768         * search.c (shared_member_p): New function.
11769         (lookup_field_r): Use it.
11770         * cp-tree.h (SHARED_MEMBER_P): Remove.
11771
11772         * method.c (process_overload_item): Handle template-dependent array
11773         bounds.
11774         * pt.c (type_unification_real): If we end up with undeduced nontype
11775         parms, try again.
11776
11777         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
11778         types.
11779
11780         * typeck2.c (friendly_abort): Don't say anything if we have
11781         earlier errors or sorries.
11782
11783         * decl.c (check_tag_decl): Notice attempts to redefine bool and
11784         wchar_t.  Ignore if in_system_header.
11785
11786         * decl.c (maybe_push_cleanup_level): New fn...
11787         (start_decl_1): ...split out from here.
11788         * cvt.c (build_up_reference): Use it.
11789         * cp-tree.h: Declare it.
11790
11791 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
11792
11793         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
11794         spec.
11795
11796 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
11797
11798         * pt.c (lookup_template_class): Make sure it's a primary
11799         template or template_template_parm when called from the parser.
11800         (instantiate_template_class): Add assertion.
11801
11802 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
11803
11804         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
11805         from error_mark_node.
11806
11807 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
11808
11809         Fix specification and implementation bugs in V3 ABI
11810         construction vtables.
11811         * cp-tree.h (flag_dump_class_layout): New flag.
11812         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
11813         (BINFO_LOST_PRIMARY_P): New flag.
11814         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
11815         (BINFO_PRIMARY_MARKED_P): Rename to ...
11816         (BINFO_PRIMARY_P): ... here.
11817         (binfo_via_virtual): New prototype.
11818         * decl2.c (flag_dump_class_layout): New flag.
11819         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
11820         use `=' as a file name separator.
11821         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
11822         bases.
11823         (build_vtbl_address): If this is a virtual primary base, then
11824         get the vtbl of what it is ultimately primary for.
11825         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
11826         for BINFO_PRIMARY_P.
11827         (dfs_skip_nonprimary_vbases_markedp): Likewise.
11828         (get_shared_vbase_if_not_primary): Likewise.
11829         (dfs_get_pure_virtuals): Likewise.
11830         (expand_upcast_fixups): Likewise.
11831         (fixup_virtual_upcast_offsets): Likewise.
11832         (dfs_find_vbase_instance): Likewise.
11833         (find_vbase_instance): Likewise.
11834         (binfo_from_vbase): Adjust comment to reflect reality.
11835         (binfo_via_virtual): New function.
11836         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
11837         for binfo walking during VTT construction.
11838         (dfs_mark_primary_bases): Remove.
11839         (force_canonical_binfo_r): New function.
11840         (force_canonical_binfo): New function.
11841         (mark_primary_virtual_base): New function.
11842         (mark_primary_bases): Walk in inheritance graph order, use
11843         mark_primary_virtual_base.
11844         (determine_primary_base): Use some more intermediate variables.
11845         (dfs_find_final_overrider): Don't check for overriding along a
11846         virtual path.
11847         (dfs_modify_vtables): Walk into primary virtual bases too.
11848         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
11849         (build_base_fields): Likewise.
11850         (dfs_set_offset_for_unshared_vbases): Likewise.
11851         (layout_virtual_bases): Likewise.
11852         (end_of_class): Likewise.
11853         (finish_struct_1): Call dump_class_hierarchy, if requested.
11854         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
11855         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
11856         (dump_class_hierarchy): Add file parameter. Append to file, if
11857         required.
11858         (finish_vtbls): Adjust accumulate_vtbl_inits call.
11859         Use canonical base for virtual bases.
11860         (build_vtt): Add more comments. Adjust build_vtt_inits call.
11861         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
11862         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
11863         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
11864         virtual VTTs.
11865         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
11866         from DATA.  We want virtual primary bases and all bases via virtual.
11867         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
11868         virtual base when not a construction vtable.
11869         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
11870         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
11871         Use canonical bases when processing virtual bases.
11872         (accumulate_vtbl_inits): We're interested in any base via a
11873         virtual path.
11874         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
11875         within a construction vtable, determine what is being overridden.
11876         (build_vtbl_initializer): Add more comments
11877         (add_vcall_offset_vtbl_entries_1): Adjust comment.
11878         (build_rtti_vtbl_entries): Check if the base has lost its
11879         primary.
11880
11881 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
11882
11883         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
11884
11885 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11886
11887         * decl.c (pushdecl): Call abort instead of fatal.
11888         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
11889         * init.c (build_new_1): Likewise.
11890         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
11891         * decl.c (build_typename_type): hash_table_init now returns void.
11892         decl.c (init_decl_processing): Make an error non-fatal.
11893
11894 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
11895
11896         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
11897         Document.
11898         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
11899         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
11900         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
11901         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
11902         * decl.c (maybe_commonize_var): Use the new name-mangling where
11903         appropriate.
11904         * decl2.c (comdat_linkage): Enhance comments.  Make all
11905         compiler-generated things static, if COMDAT is not available.
11906         (get_tinfo_decl): Do not make typeinfo objects that belong in the
11907         library COMDAT.
11908         (tinfo_base_init): Use the correct mangled name for typeinfo
11909         strings, and push them into the global scope.
11910         (typeinfo_in_lib_p): New function.
11911         (synthesize_tinfo_var): Use it.
11912         (create_real_tinfo_var): Likewise.
11913
11914 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
11915
11916         * decl.c (push_class_binding): Use context_for_name_lookup instead
11917         of CP_DECL_CONTEXT.
11918         * search.c (context_for_name_lookup): Remove static.  Check for NULL
11919         context in the loop.
11920         * cp-tree.h (context_for_name_lookup): Add prototype.
11921
11922 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
11923
11924         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
11925         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
11926         Remove.
11927         * call.c (convert_class_to_reference, build_user_type_conversion_1,
11928         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
11929
11930 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
11931
11932         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
11933         of macros used when compiling g++spec.c.
11934         * g++spec.c (lang_specific_driver): Link with the shared
11935         libgcc by default.
11936
11937 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
11938
11939         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
11940         make_reference_declarator, make_call_declarator), method.c
11941         (implicitly_declare_fn), parse.y (namespace_using_decl,
11942         notype_unqualified_id, expr_or_declarator, new_type_id,
11943         after_type_declarator, direct_after_type_declarator,
11944         notype_declarator, complex_notype_declarator,
11945         complex_direct_notype_declarator, qualified_id,
11946         notype_qualified_id, overqualified_id, direct_new_declarator,
11947         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
11948         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
11949         instead of build_parse_node.
11950
11951 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11952
11953         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
11954         (minus_one_node): Moved to top level gcc directory.  Renamed
11955         to integer_minus_one_node.
11956
11957         * init.c (init_init_processing): Don't set minus_one_node.
11958         (build_vec_init): Use integer_minus_one_node.
11959
11960         * rtti.c (get_tinfo_decl_dynamic): Likewise.
11961
11962 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
11963
11964         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
11965         identical and they would be replaced with constant, remove
11966         MODIFY_EXPR from the tree.
11967
11968 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11969
11970         * Make-lang.in: Remove all dependencies on defaults.h.
11971         * call.c: Don't include defaults.h.
11972         * decl.c: Likewise.
11973         * decl2.c: Likewise.
11974         * except.c: Likewise.
11975         * pt.c: Likewise.
11976         * rtti.c: Likewise.
11977         * tree.c: Likewise.
11978         * typeck.c: Likewise.
11979
11980 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
11981
11982         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
11983         operators even in "C" linkage.
11984         * method.c (set_mangled_name_for_decl): Likewise.
11985         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
11986         overloaded operators in "C" linkage.
11987
11988 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
11989
11990         * pt.c (tsubst_decl): Remove IN_DECL parameter.
11991         (tsubst_arg_types): Check parameter is not void.
11992         (tsubst): Adjust tsubst_decl call.
11993
11994 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
11995
11996         * call.c (add_builtin_candidate): Quote std properly, from
11997         previous change.
11998
11999 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12000
12001         * pt.c (check_explicit_specialization): Clone constructors and
12002         destructors.
12003
12004 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
12005
12006         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
12007         indicates anything special about template depth. Make sure we
12008         only count the user visible template classes.
12009
12010 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
12011
12012         * call.c (build_conv): Typo in comment.
12013         (add_builtin_candidate): Add more explanation.
12014         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
12015         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
12016         when we have enumeral types.
12017         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
12018         candidates for relops and eqops.
12019         (joust): Simplify control flow. Allow a non-template user
12020         function to hide a builtin.
12021
12022 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
12023
12024         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
12025         (more_specialized): Add deduction parameter.
12026         * call.c (joust): Adjust more_specialized call.
12027         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
12028         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
12029         (get_bindings_order): Remove.
12030         (get_bindings_real): Add DEDUCE parameter.
12031         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
12032         REFERENCE_TYPE jig for DEDUCE_ORDER.
12033         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
12034         maybe_adjust_types_for_deduction.
12035         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
12036         directly.
12037         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
12038         (check_cv_quals_for_unify): Use new unify qualifier flags.
12039         (unify): Clear new unify qualifier flags.
12040         (get_bindings_real): Add DEDUCE parameter.
12041         (get_bindings): Adjust call to get_bindings_real.
12042         (get_bindings_overload): Likewise.
12043         (most_specialized_instantiation): Adjust call to
12044         more_specialized.
12045
12046 2001-01-19  Jason Merrill  <jason@redhat.com>
12047
12048         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
12049
12050         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
12051         -fnew-abi.
12052
12053 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
12054
12055         * decl2.c (arg_assoc_class): Fix double iteration logic.
12056
12057 2001-01-19  Jason Merrill  <jason@redhat.com>
12058
12059         * init.c (build_delete): Always call convert_force to strip cv-quals.
12060
12061         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
12062         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
12063         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
12064
12065 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
12066
12067         * search.c (get_vbase_1): Count only virtual bases.
12068
12069 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
12070
12071         * class.c (duplicate_tag_error): Robustify flag clearing.
12072
12073 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
12074
12075         * cp-tree.h (lookup_template_class): Add complain parm.
12076         * decl.c (lookup_namespace_name): Adjust call to
12077         lookup_template_class.
12078         (make_typename_type): Likewise.
12079         * semantics.c (finish_template_type): Likewise.
12080         * pt.c (lookup_template_class): Add complain parm. Adjust.
12081         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
12082         (tsubst): Likewise.
12083
12084 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
12085
12086         * pt.c (copy_default_args_to_explicit_spec): Preserve
12087         object's CV quals. Reorganize.
12088
12089 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
12090
12091         * typeck.c (build_modify_expr): Say `initialization' for
12092         INIT_EXPRs.
12093         * init.c (build_default_init): Convert to enumeral type, if
12094         needed.
12095
12096 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
12097
12098         * parse.y (nomods_initdcl0): Properly set things up for
12099         initdcl0_innards.
12100
12101 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
12102
12103         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
12104         (type_unification_real): Set it.
12105         (unify): Use it.
12106
12107 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
12108
12109         * decl.c (finish_destructor_body): Convert to vbase pointer here.
12110
12111 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
12112
12113         * semantics.c (begin_class_definition): Check we're not inside a
12114         template parm list.
12115
12116 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
12117
12118         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
12119         BASELINK_P.
12120
12121 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12122
12123         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
12124         * call.c (build_over_call): Add comment.
12125
12126 2001-01-16 Daniel Berlin <dberlin@redhat.com>
12127
12128         * cvt.c (ocp_convert): Handle vector type conversion
12129         * typeck2.c (digest_init): Handle vector type initializations
12130
12131 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
12132
12133         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
12134           was given.
12135
12136 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
12137
12138         * pt.c (check_nontype_parm): Rename to ...
12139         (invalid_nontype_parm_type_p): ... here.
12140         (process_template_parm): Adjust.
12141         (convert_template_argument): Adjust.
12142
12143 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
12144
12145         * pt.c (check_nontype_parm): New function.
12146         (process_template_parm): Use it.
12147         (convert_template_argument): Use it.
12148         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
12149         member.
12150
12151 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
12152
12153         * tree.c: Add defaults.h
12154         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
12155         * Make-lang.in (cp/tree.o): Add defaults.h.
12156
12157 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
12158
12159         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
12160
12161 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
12162
12163         * g++.1: Change to be ".so man1/gcc.1".
12164
12165 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
12166
12167         * Make-lang.in (c++.info, c++.install-info): Build and install g++
12168         internals info.
12169         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
12170         ($(srcdir)/cp/g++int.info): New target.
12171         * gxxint.texi: Add info directory entry.  Use @@ in email address.
12172         * .cvsignore: Update.
12173
12174 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
12175
12176         * typeck.c (build_c_cast): Do template processing earlier.
12177         Always pedwarn on array casts.
12178
12179 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
12180
12181         * friend.c (make_friend_class): Make sure a templated class is
12182         actually a template.
12183
12184 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
12185
12186         * decl2.c (get_guard): Set linkage from guarded decl.
12187
12188 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
12189
12190         * call.c (convert_default_arg): Check for unprocessed
12191         DEFAULT_ARG.
12192         * cp-tree.h (replace_defarg): Move to spew.c.
12193         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
12194         spew.c, which is where they really are.
12195         (done_pending_defargs): Declare.
12196         (unprocessed_defarg_fn): Declare.
12197         * decl.c (replace_defarg): Move to spew.c
12198         * parse.y (structsp): Call done_pending_defargs.
12199         * spew.c (defarg_fns): Rearrange list structure.
12200         (defarg_fnsdone): New static variable.
12201         (defarg_depfns): New static variable.
12202         (init_spew): Adjust.
12203         (add_defarg_fn): Store the type in TREE_TYPE.
12204         (do_pending_defargs): Detect and deal with ordering constraints
12205         and circularity.
12206         (done_pending_defargs): New function.
12207         (unprocessed_defarg_fn): New function.
12208         (replace_defarg): Moved from decl.c. Robustify. Don't save
12209         if circularity detected.
12210
12211 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
12212
12213         * pt.c (unify): Check array has a domain, before checking
12214         whether it is variable sized.
12215
12216 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
12217
12218         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
12219         parameters with pointers to arrays of unknown bound.
12220
12221 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
12222
12223         * parse.y (template_parm_header, template_spec_header): New
12224         reductions. Split out from ...
12225         (template_header): ... here. Use them.
12226         (template_template_parm): Use template_parm_header.
12227         * semantics.c (finish_template_template_parm): Add assert.
12228
12229 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
12230
12231         * mangle.c (write_builtin_type): Fix thinko.
12232
12233         * pt.c (copy_default_args_to_explicit_spec_1): New function.
12234         (copy_default_args_to_explicit_spec): Likewise.
12235         (check_explicit_specialization): Use it.
12236
12237         * class.c (finish_struct_1):  Remove last argument in call to
12238         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
12239         * decl.c (builtin_function): Likewise.
12240         (build_cp_library_fn): Likewise.
12241         (check_initializer): Likewise.
12242         (make_rtl_for_nonlocal_decl): Likewise.
12243         (cp_finish_decl): Likewise.
12244         (start_function): Likewise.
12245         * decl2.c (finish_anon_union): Likewise.
12246         * friend.c (do_friend): Likewise.
12247         * init.c (build_java_class_ref): Likewise.
12248         * method.c (make_thunk): Likewise.
12249         * pt.c (tsubst_friend_function): Likewise.
12250         * semantics.c (expand_body): Likewise.
12251
12252 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
12253
12254         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
12255         looking at DECL_CLONED_FUNCTION for non-functions.
12256
12257 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
12258
12259         * error.c (dump_template_parameter): Use parm to determine how
12260         to print default value.
12261
12262 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
12263
12264         * class.c (duplicate_tag_error): Clear more flags.
12265
12266 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
12267
12268         * call.c (build_new_method_call): Use binfo_for_vbase.
12269
12270 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
12271
12272         * cp-tree.h (flag_cond_mismatch): Don't declare.
12273         * decl2.c (flag_cond_mismatch): Don't define.
12274         (lang_f_options): Remove cond-mismatch.
12275         (unsupported_options): Add cond-mismatch.
12276
12277 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
12278
12279         * class.c (handle_using_decl): Reject using of constructor name
12280         of sourcing class. Allow injecting of a method with same name as
12281         nested class. Fixup error messages.
12282
12283 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
12284
12285         * decl2.c (lang_decode_option): Handle -Wformat=2.
12286
12287 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
12288
12289         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
12290         initialized_in_class.
12291         (DECL_DEFINED_IN_CLASS_P): Rename to ...
12292         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
12293         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
12294         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
12295         * pt.c (check_default_tmpl_args): Adjust for
12296         DECL_INITIALIZED_IN_CLASS_P.
12297         (instantiate_class_template): Likewise.
12298         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
12299
12300         * class.c (finish_struct): Constify saved_filename.
12301
12302 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
12303
12304         * class.c (duplicate_tag_error): Adjust diagnostic.
12305         (finish_struct): Locally set location to start of struct.
12306         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
12307
12308 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
12309
12310         * decl.c (struct binding_level): Adjust class_shadowed comments
12311         to reflect reality.
12312         (push_class_level_binding): Adjust comments to reflect reality.
12313         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
12314         Don't set TREE_VALUE on the class_shadowed list.
12315
12316 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12317
12318         * decl2.c (acceptable_java_type): Allow references too.
12319         * init.c (build_java_class_ref): When using the new ABI, search
12320         `class$' and have it mangled with `mangle_decl.'
12321         * mangle.c (write_java_integer_type_codes): New function.
12322         (write_builtin_type): Detect and mangle Java integer and real
12323         types.
12324
12325 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
12326
12327         * decl2.c (grokfield): Don't accept `asm' specifiers for
12328         non-static data members.
12329
12330 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12331
12332         * expr.c (cplus_expand_expr): Don't reset `target'.
12333
12334 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
12335
12336         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
12337
12338 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
12339
12340         * parse.y (template_datadef): Check for error_mark_node.
12341
12342 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
12343
12344         * cp-tree.def (DEFAULT_ARG): Make `x' class.
12345
12346 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
12347
12348         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
12349         (record_builtin_type): Make non-static.
12350         (flag_short_double): Don't declare.
12351         (init_decl_processing): Remove the creation of many tree nodes now
12352         in c_common_nodes_and_builtins.
12353         (build_void_list_node): New function.
12354         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
12355         * cp-tree.h (flag_short_wchar): Don't declare.
12356
12357 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
12358
12359         * call.c (build_conv): Don't use build1 for USER_CONV.
12360         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
12361
12362 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
12363
12364         * lex.c (lang_init): Call c_common_lang_init.
12365
12366 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
12367
12368         * search.c (lookup_fnfields_here): Remove.
12369         (look_for_overrides_r): Use lookup_fnfields_1.
12370         Ignore functions from using declarations.
12371
12372 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
12373
12374         Implement exceptions specifiers for implicit member functions.
12375         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
12376         * method.c (synthesize_exception_spec): New function.
12377         (locate_dtor, locate_ctor, locate_copy): New functions.
12378         (implicitly_declare_fn): Generate the exception spec too.
12379         * search.c (check_final_overrider): Check artificial functions
12380         too.
12381         * typeck2.c (merge_exception_specifiers): New function.
12382
12383 2001-01-03  Jason Merrill  <jason@redhat.com>
12384
12385         * init.c (build_default_init): New fn.
12386         (perform_member_init): Split out from here.
12387         (build_new_1): Use it.  Simplify initialization logic.
12388         (build_vec_init): Take an array, rather than a pointer and maxindex.
12389         Speed up simple initializations.  Don't clean up if we're assigning.
12390         * cp-tree.h: Adjust.
12391         * decl2.c (do_static_initialization): Remove TREE_VEC case.
12392         * parse.y (new_initializer): Return void_zero_node for ().
12393         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
12394         * typeck2.c (digest_init): Only complain about user-written
12395         CONSTRUCTORs.
12396
12397 2000-12-22  Mike Stump  <mrs@wrs.com>
12398
12399         * decl2.c: (max_tinst_depth): Increase to 50.
12400
12401 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
12402
12403         * class.c (invalidate_class_lookup_cache): Zero the
12404         previous_class_values.
12405         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
12406         TREE_INT_CST_HIGH.
12407         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
12408         * decl.c (free_bindings): New variable.
12409         (push_binding): Don't create a new binding if we have one on the
12410         free list.
12411         (pop_binding): Put old bindings on the free list.
12412         (init_decl_processing): Use size_int, not build_int_2.
12413         Register free_bindings as a GC root.
12414         (cp_make_fname_decl): Use size_int, not build_int_2.
12415         (push_inline_template_parms_recursive): Likewise.
12416         (end_template_parm_list): Likewise.
12417         (for_each_template_parm): Do not use walk_tree_without_duplicates.
12418         (tsubst_template_parms): Use size_int, not build_int_2.
12419         (tsubst): Likewise.
12420         * rtti.c (get_vmi_pseudo_type_info): Likewise.
12421
12422 2001-01-02  Richard Henderson  <rth@redhat.com>
12423
12424         * parse.y (asm): Set ASM_INPUT_P.
12425
12426 2001-01-02  Jason Merrill  <jason@redhat.com>
12427
12428         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
12429         for v3 ABI.
12430
12431         * typeck.c (cp_truthvalue_conversion): New fn.
12432         * cvt.c (ocp_convert): Use it.
12433
12434         * cp-tree.h: Lose c-common.c decls.
12435
12436         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
12437         * cvt.c (convert_to_void): Use type_unknown_p.
12438
12439         * typeck.c (strip_all_pointer_quals): Also strip quals from
12440         pointer-to-member types.
12441
12442         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
12443         parse.y as C.
12444
12445         * call.c (build_new_method_call): Do evaluate the object parameter
12446         when accessing a static member.
12447         * typeck.c (build_component_ref): Likewise.
12448
12449 2001-01-02  Andreas Jaeger  <aj@suse.de>
12450
12451         * decl.c (cp_missing_noreturn_ok_p): New.
12452         (init_decl_processing): Set lang_missing_noreturn_ok_p.
12453
12454 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
12455
12456         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
12457
12458 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
12459
12460         * class.c (pushclass): Remove #if 0'd code.
12461         * cp-tree.h (overload_template_name): Remove.
12462         * decl.c (store_bindings): Simplify.
12463         (pop_from_top_level): Likewise.
12464         * pt.c (overload_template_name): Remove.
12465         (instantiate_decl): Don't call push_to_top_level if it's not
12466         needed.
12467
12468 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
12469
12470         * pt.c (register_local_specialization): Don't return a value.
12471         (lookup_template_class): Use move-to-front heuristic when looking
12472         up template instantiations.
12473         (instantiate_decl): Only push_to_top_level when we're actually
12474         going to instantiate the template.
12475
12476 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
12477
12478         * search.c (binfo_for_vtable): Return least derived class, not
12479         most.  Handle secondary vtables.
12480
12481 2000-12-22  Jason Merrill  <jason@redhat.com>
12482
12483         * pt.c (more_specialized): Don't optimize len==0.
12484         (fn_type_unification): If we're adding the return type, increase len.
12485
12486         * typeck.c (build_binary_op): Fix pmf comparison logic.
12487
12488         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
12489         DECL_STATIC_FUNCTION_P.
12490
12491         * semantics.c (genrtl_finish_function): Don't try to jump to
12492         return_label unless it exists.
12493
12494         In partial ordering for a call, ignore parms for which we don't have
12495         a real argument.
12496         * call.c (joust): Pass len to more_specialized.
12497         (add_template_candidate_real): Strip 'this', pass len.
12498         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
12499         (get_bindings_order): New fn.  Pass len down.
12500         (get_bindings_real): Strip 'this', pass len.
12501         (fn_type_unification): Likewise.
12502         (type_unification_real): Succeed after checking 'len' args.
12503         (most_specialized_instantiation): Lose explicit_args parm.
12504         * class.c (resolve_address_of_overloaded_function): Strip 'this',
12505         pass len.
12506
12507 2000-12-21  Jason Merrill  <jason@redhat.com>
12508
12509         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
12510         DECL_TEMPLATE_RESULT.
12511
12512         * search.c (lookup_field_r): Call lookup_fnfields_1, not
12513         lookup_fnfields_here.
12514
12515         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
12516
12517         * call.c (build_object_call): Also allow conversions that return
12518         reference to pointer to function.
12519         (add_conv_candidate): Handle totype being ref to ptr to fn.
12520         (build_field_call): Also allow members of type reference to function.
12521         Lose support for calling pointer to METHOD_TYPE fields.
12522
12523         * error.c (dump_expr): Handle *_CAST_EXPR.
12524
12525         * typeck2.c (build_scoped_ref): Always convert to the naming class.
12526
12527         * tree.c (break_out_cleanups): Lose.
12528         * cp-tree.h: Remove prototype.
12529         * typeck.c (build_component_ref): Don't break_out_cleanups.
12530         (build_compound_expr): Likewise.
12531         * semantics.c (finish_expr_stmt): Likewise.
12532
12533 2000-12-20  Richard Henderson  <rth@redhat.com>
12534
12535         * cp-tree.h: Update declarations.
12536         * decl.c (finish_case_label): Return the new stmt node.
12537         * semantics.c (finish_goto_stmt): Likewise.
12538         (finish_expr_stmt, finish_return_stmt): Likewise.
12539         (finish_break_stmt, finish_continue_stmt): Likewise.
12540         (finish_asm_stmt): Likewise.
12541         * parse.y (already_scoped_stmt): Set STMT_LINENO.
12542         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
12543         (simple_if, simple_stmt): Return the new stmt node.
12544         (save_lineno): New.
12545
12546 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
12547
12548         * cp-tree.h: Don't declare warn_long_long.
12549
12550 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12551
12552         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
12553         IS_AGGR_TYPE.
12554
12555 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12556
12557         * pt.c (unify): Handle when both ARG and PARM are
12558         BOUND_TEMPLATE_TEMPLATE_PARM.
12559
12560 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12561
12562         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
12563         DECL_TEMPLATE_PARM_P.
12564
12565 2000-12-15  Jason Merrill  <jason@redhat.com>
12566
12567         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
12568
12569         * init.c (build_new_1): Don't strip quals from type.
12570
12571         * decl.c (pushdecl): Don't check for linkage on a non-decl.
12572
12573         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
12574
12575         * call.c (build_new_function_call): Lose space before paren in
12576         error message.
12577         (build_new_method_call): Likewise.
12578
12579         * typeck2.c (build_m_component_ref): Propagate quals from datum.
12580
12581 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12582
12583         * pt.c (check_explicit_specialization): Propagate default
12584         function arguments to explicit specializations.
12585
12586 2000-12-13  DJ Delorie  <dj@redhat.com>
12587
12588         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
12589         and <? operators.
12590
12591 2000-12-08  Jason Merrill  <jason@redhat.com>
12592
12593         * error.c (dump_function_name): Don't let the user see __comp_ctor.
12594
12595         Clean up copy-initialization in overloading code.
12596         * call.c (build_user_type_conversion_1): Die if we are asked to
12597         convert to the same or a base type.
12598         (implicit_conversion): Avoid doing so.  Lose reference binding code.
12599         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
12600         direct-initialization.  Also do direct-init part of copy-init.
12601         (build_user_type_conversion): Don't provide context to convert_like.
12602         * cvt.c (ocp_convert): build_user_type_conversion will now provide
12603         the constructor call for copy-init.
12604
12605         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
12606         instantiation of a member template.
12607         (do_decl_instantiation): Not here.
12608
12609 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
12610
12611         * class.c (check_field_decls): Don't special case anonymous
12612         fields in error messages.
12613         (note_name_declared_in_class): Use %D on diagnostic.
12614
12615         * tree.c (pod_type_p): Use strip_array_types.
12616         (cp_valid_lang_attribute): Likewise.
12617         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
12618         multiple evaluations.
12619         (cp_has_mutable_p): Use strip_array_types.
12620
12621 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
12622
12623         * cp-tree.h (sufficient_parms_p): Declare new function.
12624         * call.c (sufficient_parms_p): New function, broken out of ...
12625         (add_function_candidate): ... here. Use it.
12626         (add_conv_candidate): Use it.
12627         * decl.c (grok_ctor_properties): Use it.
12628
12629 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
12630
12631         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
12632
12633 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
12634
12635         * decl2.c (lang_decode_option): Handle -Wformat-security.
12636
12637 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12638
12639         * pt.c (verify_class_unification): New function.
12640         (get_class_bindings): Use it.
12641         (try_class_unification): Tidy.
12642         (unify): Handle when argument of a template-id is not
12643         template parameter dependent.
12644         (template_args_equal): Handle when TREE_CODE's do not match.
12645
12646 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
12647
12648         * lang-specs.h (c++): When invoking the stand-alone preprocessor
12649         for -save-temps, pass all relevant -Defines to it, and then don't
12650         pass them to cc1plus.
12651
12652 2000-12-05  Will Cohen  <wcohen@redhat.com>
12653
12654         * decl.c (finish_case_label): Cleared
12655         more_cleanups_ok in surrounding function scopes.
12656         (define_label): Likewise.
12657
12658 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
12659
12660         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
12661         (get_matching_virtual): Remove.
12662         (look_for_overrides): Declare new function.
12663         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
12664         DECL_VINDEX here.
12665         * class.c (check_for_override): Move base class iteration code
12666         to look_for_overrides.
12667         * search.c (next_baselink): Remove.
12668         (get_virtuals_named_this): Remove.
12669         (get_virtual_destructor): Remove.
12670         (tree_has_any_destructors_p): Remove.
12671         (struct gvnt_info): Remove.
12672         (check_final_overrider): Remove `virtual' from error messages.
12673         (get_matching_virtuals): Remove. Move functionality to ...
12674         (look_for_overrides): ... here, and ...
12675         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
12676         to be overriding.
12677
12678 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
12679
12680         * typeck.c (get_delta_difference): If via a virtual base,
12681         return zero.
12682         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
12683         adjustment.
12684
12685 2000-12-04  Richard Henderson  <rth@redhat.com>
12686
12687         * error.c (dump_tree): Use output_add_string not OB_PUTS.
12688
12689 2000-12-04  Jason Merrill  <jason@redhat.com>
12690
12691         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
12692         (write_builtin_type): Pass intSI_type_node and the like through
12693         type_for_mode.
12694         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
12695         Pass intSI_type_node and the like through type_for_mode.
12696         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
12697         * pt.c (tsubst, unify): Likewise.
12698         * tree.c (walk_tree): Likewise.
12699         * error.c (dump_type): Likewise.
12700         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
12701
12702         * Make-lang.in: Tweak top comment for emacs.
12703         (cp/TAGS): Restore.
12704
12705         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
12706
12707         * class.c (clone_function_decl): Robustify.
12708
12709 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
12710
12711         * decl.c (store_bindings): Only search in the non modified
12712         old_bindings for duplicates.
12713
12714 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
12715
12716         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
12717         TYPE_POLYMORPHIC_P.
12718
12719         * typeck.c (build_static_cast): Remove unused variable.
12720
12721 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12722
12723         * pt.c: Fix typo in comment.
12724
12725 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
12726
12727         * decl2.c (warn_format): Remove definition.
12728         (lang_decode_option): Handle -Wformat-nonliteral,
12729         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
12730
12731 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
12732
12733         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
12734         (init_decl_processing): Don't create string_type_node,
12735         const_string_type_node, wint_type_node, intmax_type_node,
12736         uintmax_type_node, default_function_type, ptrdiff_type_node and
12737         unsigned_ptrdiff_type_node.  Adjust position of call to
12738         c_common_nodes_and_builtins.
12739         (identifier_global_value): New function.
12740
12741 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
12742
12743         * call.c (standard_conversion): Reject pointer to member
12744         conversions from ambiguous, inaccessible or virtual bases.
12745         * typeck.c (build_static_cast): Don't check pointers to members
12746         specially.
12747
12748 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
12749
12750         * method.c (do_build_copy_constructor): Preserve cv
12751         qualifications when accessing source object members.
12752         (do_build_assign_ref): Likewise. Remove separate diagnostics for
12753         unnamed fields.
12754
12755 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
12756
12757         * method.c (do_build_assign_ref): Construct appropriately
12758         CV-qualified base reference. Don't allow const casts in base
12759         conversion.
12760
12761 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
12762
12763         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
12764         incomplete return type.
12765
12766 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
12767
12768         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
12769         * semantics.c (finish_base_specifier): Accept a _TYPE not a
12770         _DECL.
12771
12772 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
12773
12774         * spew.c (yyerror): Cope if yylval.ttype is NULL.
12775
12776 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
12777
12778         * decl.c (grokdeclarator): Diagnose undefined template contexts.
12779
12780 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
12781
12782         * decl.c (grokdeclarator): Do type access control on friend
12783         class.
12784
12785 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
12786
12787         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
12788         bison parser ickiness.
12789         * pt.c (tsubst_friend_function): Enter namespace scope when
12790         tsubsting the function name.
12791         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
12792
12793 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
12794
12795         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
12796         * cvt.c (cp_convert_to_pointer): Add force parameter.
12797         Allow conversions via virtual base if forced.
12798         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
12799         (ocp_convert): Likewise.
12800         * search.c (binfo_from_vbase): Return the virtual base's binfo.
12801         * typeck.c (get_delta_difference): Adjust handling of virtual
12802         bases.
12803
12804 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
12805
12806         * tree.c (struct list_hash): Remove.
12807         (list_hash_table): Make it be an htab.
12808         (struct list_proxy): New type.
12809         (list_hash_eq): New function.
12810         (list_hash_pieces): Renamed from ...
12811         (list_hash): ... this.
12812         (list_hash_lookup): Remove.
12813         (list_hash_add): Remove.
12814         (hash_tree_cons): Use the generic hashtable.
12815         (mark_list_hash): Remove.
12816         (init_tree): Create the hashtable.
12817
12818 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
12819
12820         * method.c (build_mangled_C9x_name): Rename to
12821         build_mangled_C99_name.  Change C9X references in comments to
12822         refer to C99.
12823
12824 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
12825
12826         * parse.y (unary_expr): Move VA_ARG from here ...
12827         (primary): ... to here.
12828
12829 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
12830
12831         * semantics.c (finish_id_expr): If type is error_mark, return
12832         error_mark.
12833
12834 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
12835
12836         * pt.c (lookup_template_class): Simplify loop exit constructs.
12837         Cope when there is no partial instantiation of a template
12838         template member.
12839
12840 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
12841
12842         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
12843
12844 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
12845
12846         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
12847         prefix.
12848
12849         * pt.c (do_decl_instantiate): Explicitly clone constructors and
12850         destructors that haven't already been cloned.
12851
12852 2000-11-20  Richard Henderson  <rth@redhat.com>
12853
12854         * parse.y (yyparse_1): Rename the parser entry point.
12855
12856 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
12857
12858         * mangle.c (write_name): Use <unscoped-name> for names directly in
12859         function scope.
12860         (write_unscoped_name): Accept names directly in function scope.
12861
12862 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
12863
12864         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
12865         * parse.y (extdef): Add EXPORT reduction.
12866         * spew.c (yylex): Don't skip export here.
12867
12868 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
12869
12870         * decl.c (init_decl_processing): Correct name of pure virtual
12871         function under the new ABI.
12872         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
12873         (throw_bad_typeid): Likewise for bad typeid function.
12874
12875 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
12876
12877         * decl.c (grokparms): Don't even function types of `void' type,
12878         either.
12879         * mangle.c (write_type): Don't crash when confronted with the
12880         error_mark_node.
12881
12882         * decl.c (grokparms): Don't create parameters of `void' type.
12883
12884 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
12885
12886         * lex.c (mark_impl_file_chain): Delete.
12887         (init_parse): Remove call to ggc_add_string_root.  No need to
12888         ggc_strdup a string constant.  Do not add impl_file_chain to GC
12889         roots.
12890         (handle_pragma_implementation): No need to ggc_strdup main_filename.
12891
12892 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
12893
12894         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
12895
12896 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
12897
12898         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
12899         * decl.c (grokdeclarator): Don't reject void parms here.
12900         (require_complete_types_for_parms): Simplify, use
12901         complete_type_or_else.
12902         (grokparms): Remove bitrot. Remove funcdef parm.
12903         Deal with ellipsis parm lists here.
12904         * semantics.c (finish_parmlist): Don't append void_list_node
12905         here. Set PARMLIST_ELLIPSIS_P.
12906
12907 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
12908
12909         * typeck2.c (incomplete_type_error): Reorganize to avoid
12910         excessive diagnostics.
12911
12912 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
12913
12914         * lex.c (struct impl_files, internal_filename): Constify a char *.
12915
12916 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
12917
12918         * mangle.c (write_special_name_constructor): Don't generate
12919         assembler junk when confronted with an old-style constructor.
12920         (write_special_name_destructor): Likewise.
12921         (mangle_decl_string): Do it here instead.
12922
12923 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
12924
12925         * call.c (op_error): Make error messages clearer.
12926
12927 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
12928
12929         * decl.c (wrapup_globals_for_namespace): Don't mark things
12930         TREE_ASM_WRITTEN when they're not.
12931
12932 2000-11-15  Jason Merrill  <jason@redhat.com>
12933
12934         * typeck2.c (friendly_abort): Uncount the error before handing
12935         off to fancy_abort.
12936
12937 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
12938
12939         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
12940
12941 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
12942
12943         * class.c (build_vtbl_initializer): Fix typo in comment.
12944         * typeck.c (expr_sizeof): Don't crash on errors.
12945
12946 2000-11-14  Jim Wilson  <wilson@redhat.com>
12947
12948         * lang-specs.h: Add %2 after %(cc1_options).
12949
12950 2000-11-14  Richard Henderson  <rth@redhat.com>
12951
12952         * typeck.c (c_sizeof): Be strict about casting result value
12953         back to c_size_type_node.
12954         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
12955
12956 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
12957
12958         * typeck.c (build_unary_op): Use boolean_increment from
12959         c-common.c, moving the relevant code there.
12960
12961 2000-11-11  Jason Merrill  <jason@redhat.com>
12962
12963         * typeck.c (mark_addressable): Don't call put_var_into_stack.
12964
12965         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
12966         in inlines.
12967
12968 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12969
12970         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
12971         * lex.c (copy_lang_decl): Likewise.
12972
12973 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
12974
12975         * dump.c (cp_dump_tree): Don't dump function bodies here.
12976
12977         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
12978         (dump.o): Update dependency list.
12979         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
12980         (flag_dump_translation_unit): Likewise.
12981         (CP_TYPE_QUALS): Adjust definition.
12982         (DECL_C_BIT_FIELD): Remove.
12983         (SET_DECL_C_BIT_FIELD): Likewise.
12984         (CLEAR_DECL_C_BIT_FIELD): Likewise.
12985         (add_maybe_template): Likewise.
12986         (strip_array_types): Likewise.
12987         (dump_node_to_file): Likewise.
12988         (cp_dump_tree): New function.
12989         * decl.c (init_decl_processing): Set lang_dump_tree.
12990         * decl2.c (flag_dump_translation_unit): Remove.
12991         * dump.c: Move most of it to ../c-dump.c.
12992         (cp_dump_tree): New function.
12993         * pt.c (add_maybe_template): Remove.
12994         * typeck.c (strip_array_types): Likewise.
12995
12996 2000-11-07  Eric Christopher  <echristo@redhat.com>
12997
12998         * decl.c (init_decl_processing): Change definition of
12999         __wchar_t to wchar_t.  Remove artificial declaration of
13000         wchar_t.
13001         * lex.c: Change instances of __wchar_t to wchar_t.
13002
13003 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
13004
13005         * lex.c (do_identifier): Don't lookup_name for operators.
13006         * parse.y (operator): Save looking_for_typename.
13007         (unoperator): Restore it.
13008         * spew.c (frob_opname): Use nth_token for lookahead.
13009
13010 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
13011
13012         * decl.c (grok_op_properties): Always use coerce_new_type and
13013         coerce_delete_type.
13014         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
13015         exception specification. Tidy up.
13016         (coerce_delete_type): Preserve exception specification. Tidy up.
13017
13018 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
13019
13020         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
13021         (push_binding_level), error.c (cp_tree_printer), pt.c
13022         (process_partial_specialization, tsubst_template_arg_vector),
13023         search.c (lookup_member): Use memset () instead of bzero ().
13024
13025 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
13026
13027         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
13028
13029 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
13030
13031         * Make-lang.in (c++.distdir): Remove.
13032
13033 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
13034
13035         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
13036         declarations from different namespaces to be combined.
13037
13038 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
13039
13040         * decl.c: Include tm_p.h.
13041
13042 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
13043
13044         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
13045
13046 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
13047
13048         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
13049         (build_overload_value), repo.c (open_repo_file), xref.c
13050         (open_xref_file): Use strchr () and strrchr () instead of index ()
13051         and rindex ().
13052
13053 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
13054
13055         * call.c (build_over_call): Call fold on the CALL_EXPR.
13056
13057 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
13058
13059         * error.c (dump_template_decl): Separate template hearders with
13060         space not comma.
13061
13062 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
13063
13064         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
13065         TS_* flags with corresponding TFF_*.  Adjust prototypes of
13066         functions (which used to take a tree_string_flags) to take an int.
13067
13068         * cp-tree.h (enum tree_string_flags): Remove
13069         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
13070         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
13071         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
13072         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
13073         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
13074         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
13075         (type_as_string, decl_as_string, expr_as_string,
13076         context_as_string): Adjust prototype.
13077
13078         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
13079         instead of TS_PLAIN.
13080
13081         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
13082         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
13083         plain `0'.
13084
13085 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
13086
13087         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
13088         (linkage_kind): New enumeration.
13089         (decl_linkage): New function.
13090         * decl2.c (comdat_linkage): Extend comment.
13091         * error.c (dump_function_decl): Print the arguments used to
13092         instantiate a template, even when not printing the type of the
13093         function.
13094         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
13095         not TREE_PUBLIC, to test for external linkage.
13096         * tree.c (decl_linkage): New function.
13097
13098 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
13099
13100         * pt.c (instantiate_decl): Always instantiate static data members
13101         initialized in-class.
13102
13103 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
13104
13105         * Make-lang.in: Move all build rules here from Makefile.in,
13106         adapt to new context.  Wrap all rules that change the current
13107         directory in parentheses.  Expunge all references to $(P).
13108         When one command depends on another and they're run all at
13109         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
13110         all object-file generation rules.  Delete obsolete variables.
13111
13112         * Makefile.in: Delete.
13113         * config-lang.in: Delete outputs= line.
13114
13115 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
13116
13117         * error.c (dump_function_decl): Print no space between
13118         `ptr-operator' the `type-specifier' of the return type.
13119         (dump_type_prefix): Make sure we put space at the appropriate
13120         place.
13121
13122 2000-10-23  Jason Merrill  <jason@redhat.com>
13123
13124         * call.c (equal_functions): Also call decls_match for extern "C" fns.
13125
13126 2000-10-22  Jason Merrill  <jason@redhat.com>
13127
13128         * call.c (build_conditional_expr): Use ocp_convert to force
13129         rvalue conversion.
13130
13131 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
13132
13133         * call.c (standard_conversion): Use RVALUE_CONVs for all
13134         expressions that satisfy lvalue_p, not just those that satisfy
13135         real_lvalue_p.
13136
13137         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
13138
13139         * typeck.c (c_sizeof): Return an expression of `size_t' type,
13140         not one with TYPE_IS_SIZETYPE set.
13141         (dubious_conversion_warnings): Remove special-case code.
13142
13143 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
13144
13145         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
13146         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
13147         (dump_type_prefix): Print vector-of-int as 'int vector'.
13148         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
13149         * tree.c (walk_tree): Handle VECTOR_TYPE.
13150
13151         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
13152
13153 2000-10-21  Jason Merrill  <jason@redhat.com>
13154
13155         * parse.y (operator): Set got_object from got_scope.
13156         Set looking_for_typename.
13157         * decl.c (lookup_name_real): Clear val after setting from_obj.
13158         Reorganize diagnostic.
13159
13160 2000-10-20  Jason Merrill  <jason@redhat.com>
13161
13162         * tree.c (walk_tree): Don't walk into default args.
13163
13164         * error.c (dump_expr): Use host_integerp.
13165
13166 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
13167
13168         * typeck2.c (abstract_virtuals_error): Use "because" instead of
13169         "since" in error message.
13170
13171 2000-10-20  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13172
13173         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
13174
13175 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
13176
13177         * decl.c (revert_static_member_fn): Fixed typo.
13178
13179 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
13180
13181         * class.c (subobject_offset_fn): New type.
13182         (dfs_record_base_offsets): Remove.
13183         (record_base_offsets): Likewise.
13184         (dfs_search_base_offsets): Likewise.
13185         (record_subobject_offset): New function.
13186         (check_subobject_offset): Likewise.
13187         (walk_subobject_offsets): Likewise.
13188         (record_subobject_offsets): Likewise.
13189         (layout_conflict_p): Reimplement.
13190         (layout_nonempty_base_or_field): Correct handling of type
13191         conflicts during layout.
13192         (layout_empty_base): Likewise.
13193         (build_base_field): Adjust to handle new representation of empty
13194         base offset table.
13195         (build_base_fields): Likewise.
13196         (layout_virtual_bases): Likewise.
13197         (splay_tree_compare_integer_csts): New function.
13198         (layout_class_type): Use a splay_tree, rather than a varray, to
13199         represent the offsets of empty bases.
13200
13201         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
13202         * decl.c (select_decl): Don't return declarations that are
13203         DECL_ANTICIPATED.
13204
13205 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
13206
13207         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
13208         (fake_std_node): New macro.
13209         * decl.c (in_std): Rename to ...
13210         (in_fake_std): ... this.
13211         (flag_no_builtin): Remove.
13212         (flag_no_nonansi_builtin): Likewise.
13213         (walk_namespaces_r): Use fake_std_node.
13214         (push_namespace): Use std_identifier.
13215         (pop_namespace): Use in_fake_std.
13216         (lookup_name_real): Use fake_std_node.
13217         (init_decl_processing): When -fhonor-std, create the `std'
13218         namespace.  Don't create a dummy fake_std_node in that case.
13219         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
13220         (builtin_function): Put builtins whose names don't begin
13221         with `_' in the std namespace.
13222         * decl2.c (flag_no_builtin): Remove.
13223         (flag_no_nonansi_builtin): Likewise.
13224         (set_decl_namespace): Use fake_std_node.
13225         (validate_nonmember_using_decl): Likewise.
13226         (do_using_directive): Likewise.
13227         (handle_class_head): Likewise.
13228         * dump.c (dequeue_and_dump): Likewise.
13229         * except.c (init_exception_processing): Use std_identifier.
13230         * init.c (build_member_call): Use fake_std_node.
13231         * rtti.c (init_rtti_processing): Use std_identifier.
13232
13233 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
13234
13235         * cp-tree.h (back_end_hook): Remove declaration.
13236         * decl2.c (back_end_hook): Remove definition.
13237
13238         * dump.c (dequeue_and_dump): Dump TREE_USED.
13239
13240 2000-10-17  Brad Lucier <lucier@math.purdue.edu>
13241
13242         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
13243
13244 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
13245
13246         * decl.c (WINT_TYPE): Define.
13247         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
13248         c_size_type_node, signed_size_type_node and wint_type_node.
13249
13250 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
13251
13252         * decl2.c (warn_missing_format_attribute): New variable.
13253         (lang_decode_option): Decode -Wmissing-format-attribute.
13254
13255 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
13256
13257         * typeck.c (qualify_type): Remove.
13258         (composite_pointer_type): Fix handling of conversions to `cv void*'.
13259
13260 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13261
13262         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
13263
13264 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13265
13266         * Makefile.in (parse.c, parse.h): Create atomically.
13267
13268 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
13269
13270         * class.c (current_obstack): Remove.
13271         * decl.c (ggc_p): Remove.
13272         (start_decl): Don't use decl_tree_cons.
13273         (grokdeclarator): Don't use build_decl_list.
13274         (start_function): Don't use decl_tree_cons.
13275         (finish_function): Don't mess with obstacks.
13276         * decl2.c (grok_x_components): Don't use build_decl_list.
13277         * lex.c (make_call_declarator): Don't call decl_tree_cons.
13278         (implicitly_declare_fn): Don't call build_decl_list.
13279         * parse.y (frob_specs): Don't call build_decl_list or
13280         decl_tree_cons.
13281         (expr_or_declarator_intern): Don't call decl_tree_cons.
13282         (primary): Don't call build_decl_list.
13283         (fcast_or_absdcl): Likewise.
13284         (typed_declspecs): Don't call decl_tree_cons.
13285         (reserved_declspecs): Don't call build_decl_list.
13286         (declmods): Likewise.
13287         (reserved_typespecquals): Likewise.
13288         (aggr): Likewise.
13289         (new_type_id): Likewise.
13290         (cv_qualifiers): Likewise.
13291         (after_type_declarator_intern): Likewise.
13292         (notype_declarator_intern): Likewise.
13293         (absdcl_intern): Likewise.
13294         (named_parm): Likewise.
13295         * pt.c (most_specialized_class): Likewise.
13296         * repo.c (temporary_obstack): Make it a structure, not a pointer.
13297         (init_repo): Initialize it.
13298         * search.c (current_obstack): Remove.
13299         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
13300
13301 2000-10-09  Richard Henderson  <rth@cygnus.com>
13302
13303         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
13304         (c++ language support bits for libgcc): Remove.
13305         (c++.clean): Remove cplib2.txt cleanup.
13306         * config-lang.in (headers, lib2funcs): Remove.
13307
13308         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
13309         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
13310         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
13311         * inc/new.h, inc/typeinfo: Remove files.
13312
13313 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
13314
13315         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
13316         defined.
13317         (init_decl_processing): Initialize intmax_type_node and
13318         uintmax_type_node.
13319
13320 2000-10-06  Richard Henderson  <rth@cygnus.com>
13321
13322         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
13323         (original_result_rtx): Remove.
13324         * decl.c (save_function_data): Don't clear x_result_rtx.
13325         (mark_lang_function): Don't mark it either.
13326         * expr.c (fixup_result_decl): Remove.
13327         * semantics.c (genrtl_named_return_value): Frob the return decl
13328         before calling emit_local_var.
13329         (genrtl_finish_function): Don't call fixup_result_decl.
13330         Always emit the jump to return_label.
13331
13332 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
13333
13334         * pt.c (lookup_template_class): Set current access for enum.
13335         (tsubst_enum): Set file & line for enum decl.
13336
13337         * spew.c (yylex): Remove unused variable.
13338
13339 2000-10-05  Richard Henderson  <rth@cygnus.com>
13340
13341         * semantics.c (genrtl_finish_function): Don't init or check
13342         can_reach_end; remove noreturn and return value checks.
13343
13344 2000-10-05  Tom Tromey  <tromey@cygnus.com>
13345
13346         * init.c (build_java_class_ref): Use `build_static_name' with a
13347         suffix, not a prefix, to build the class object's name.
13348
13349 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
13350
13351         * cp-tree.h (access_kind): Fix comment typo.
13352         * decl2.c (grokfield): Fix diagnostic typo.
13353         * semantics.c (finish_template_type): Fix comment typo.
13354         (finish_qualified_object_call_expr): Likewise.
13355
13356 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
13357
13358         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
13359         tsubsting fails.
13360
13361 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
13362
13363         * spew.c (frob_id): New static function.
13364         (frob_opname): Use it.
13365         (yylex): Use it.
13366
13367 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
13368
13369         * decl.c (lang_mark_false_label_stack): Remove.
13370         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
13371
13372 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
13373
13374         * gxxint.texi: Use @email for formatting email addresses.
13375
13376 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
13377
13378         * error.c: Remove direct obstack manipulation.  Replace with
13379         output_buffer-based formatting.  Adjust calls to removed macros.
13380         (obstack_chunk_alloc, obstack_chunk_free): Remove.
13381         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
13382         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
13383
13384 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
13385
13386         * ir.texi: Move to ../c-tree.texi.
13387
13388 2000-09-20  Jason Merrill  <jason@redhat.com>
13389
13390         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
13391
13392 2000-09-21  Andreas Jaeger  <aj@suse.de>
13393
13394         * errfn.c: Move declaration of cp_printer and cp_printers to ...
13395         * cp-tree.h: ... here.
13396
13397         * error.c: Remove declaration of cp_printer.
13398
13399 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
13400
13401         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
13402
13403 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
13404
13405         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
13406         users.
13407
13408 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
13409
13410         * decl.c (start_function): Robustify.
13411
13412 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13413
13414         * cp-tree.h (check_function_format): Accept a `status' parameter.
13415
13416         * call.c, typeck.c: Updates calls to `check_function_format'.
13417
13418 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
13419
13420         * decl2.c (handle_class_head): Always push some scope even
13421         in the error case.
13422
13423 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
13424
13425         * cp-tree.h (struct cp_language_function): Remove
13426         x_scope_stmt_stack and name_declared.
13427         (current_scope_stmt_stack): Remove.
13428         (function_name_declared_p): New macro.
13429         (struct lang_decl_flags): Use c_lang_decl as a base class.
13430         (context): Remove.
13431         (struct lang_decl): Replace saved_tree with context.
13432         (DECL_FRIEND_CONTEXT): Adjust accordingly.
13433         (SET_DECL_FRIEND_CONTEXT): Likewise.
13434         (DECL_VIRTUAL_CONTEXT): Likewise.
13435         (DECL_SAVED_TREE): Remove.
13436         (C_DECLARED_LABEL_FLAG): Likewise.
13437         (cplus_expand_expr_stmt): Don't declare.
13438         (add_decl_stmt): Likewise.
13439         (add_scope_stmt): Likewise.
13440         * decl.c (mark_stmt_tree): Remove.
13441         (case_compare): Likewise.
13442         (finish_case_label): Use c_add_case_label.
13443         (init_decl_processing): Set more language-specific hooks.
13444         (build_enumerator): Fix typo in comment.
13445         (cplus_expand_expr_stmt): Remove.
13446         (mark_lang_function): Use mark_c_language_function.
13447         (lang_mark_tree): Use c_mark_lang_decl.
13448         * decl2.c: Change order of inclusion.
13449         * except.c: Likewise.
13450         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
13451         back on c_expand_expr.
13452         * friend.c: Include expr.h.
13453         * init.c: Change order of inclusion.
13454         * Makefile.in: Update dependencies.
13455         * lex.h (free_lang_decl_chain): Remove.
13456         * optimize.c (maybe_clone_body): Use function_name_declared_p.
13457         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
13458         it doesn't exist.
13459         (instantiate_decl): Use function_name_declared_p.
13460         * semantics.c (lang_expand_expr_stmt): Remove.
13461         (set_current_function_name_declared): Likewise.
13462         (current_function_name_declared): Likewise.
13463         (begin_compound_stmt): Use function_name_declared_p.
13464         (add_decl_stmt): Remove.
13465         (setup_vtbl_ptr): Use function_name_declared_p.
13466         (add_scope_stmt): Remove.
13467         (current_scope_stmt_stack): New function.
13468         (cp_expand_stmt): Don't handle SCOPE_STMTs.
13469         (expand_body): Use function_name_declared_p.
13470         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
13471         * typeck.c: Change order of includes.
13472         (convert_sequence): Remove.
13473
13474 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
13475
13476         * lex.c (reswords): Add _Complex.
13477
13478 2000-09-14  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13479
13480         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
13481
13482 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
13483
13484         * init.c (begin_init_stmts): Don't use // comments.
13485
13486 2000-09-12  Jason Merrill  <jason@redhat.com>
13487
13488         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
13489         all non-extern arrays.
13490
13491         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
13492         typenames, too.  Downgrade complaint to pedwarn.
13493         (xref_tag): Warn about surprising behavior of 'friend struct T'.
13494         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
13495         'class This::Inherited'.
13496
13497 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
13498
13499         * decl.c (finish_case_label): Given the LABEL_DECL a
13500         DECL_CONTEXT.
13501
13502 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
13503
13504         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
13505         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
13506         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
13507         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
13508         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
13509         New macros.
13510         (sorry_for_unsupported_tree, print_scope_operator,
13511         print_left_paren, print_right_paren, print_left_bracket,
13512         print_right_bracket, print_whitespace): Likewise.
13513         (aggr_variety): Rename to class_key_or_enum.
13514         (print_type): Rename to print_type_id.
13515         (print_type_specifier_seq, print_simple_type_specifier,
13516         print_elaborated_type_specifier,
13517         print_rest_of_abstract_declarator,
13518         print_parameter_declaration_clause, print_exception_specification,
13519         print_nested_name_specifier, print_template_id,
13520         typedef_original_name,  print_template_argument_list_start,
13521         print_template_argument_list_end): New functions.
13522
13523 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
13524
13525         * ir.texi: Add more documentation.
13526
13527 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
13528
13529         * cp-tree.h (struct saved_scope): Remove x_function_parms.
13530         (current_function_parms): Don't define.
13531         (struct cp_language_function): Remove parms_stored.
13532         (current_function_just_assigned_this): Don't define.
13533         (current_function_parms_stored): Likewise.
13534         (static_ctors): Declare.
13535         (static_dtors): Likewise.
13536         (SF_EXPAND): Don't define.
13537         (expand_start_early_try_stmts): Remove declaration.
13538         (store_parm_decls): Likewise.
13539         * decl.c (static_ctors): Don't declare.
13540         (static_dtors): Likewise.
13541         (struct binding_level): Remove this_block.
13542         (poplevel): Remove dead code.
13543         (set_block): Likewise.
13544         (mark_binding_level): Don't mark this_block.
13545         (mark_saved_scope): Don't mark x_function_parms.
13546         (init_decl_processing): Don't add current_function_parms as a GC
13547         root.
13548         (check_function_type): Change prototype.
13549         (start_function): Remove RTL-generation code.
13550         (expand_start_early_try_stmts): Remove.
13551         (store_parm_decls): Give it internal linkage.  Remove
13552         RTL-generation code.
13553         (finish_function): Remove RTL-generation code.
13554         * decl2.c (static_ctors): Fix formatting.
13555         (static_dtors): Likewise.
13556         * method.c (use_thunk): Don't call store_parm_decls.
13557         (synthesize_method): Likewise.
13558         * optimize.c (maybe_clone_body): Likewise.
13559         * parse.y (fn.def2): Likewise.
13560         (.set_base_init): Likewise.
13561         (nodecls): Likewise.
13562         * pt.c (instantiate_decl): Likewise.
13563         * rtti.c (synthesize_tinfo_fn): Likewise.
13564         * semantics.c (genrtl_try_block): Simplify.
13565         (expand_body): Use genrtl_start_function and
13566         genrtl_finish_function.
13567         (genrtl_start_function): New function.
13568         (genrtl_finish_function): Likewise.
13569
13570 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
13571
13572         * error.c (cp_tree_printer, case 'P'): Append break.
13573
13574 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
13575
13576         * cp-tree.h (frob_opname): Declare.
13577         * parse.y (saved_scopes): New static variable.
13578         (cp_parse_init): Adjust.
13579         (do_id): If lastiddecl is NULL, do do_identifier.
13580         (operator): Save scope information.
13581         (unoperator): New reduction. Restore scope information.
13582         (operator_name): Append unoperator. Call frob_opname.
13583         * spew.c (frob_opname): Define.
13584
13585 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
13586
13587         * decl.c, rtti.c: Include defaults.h if not already included.
13588         Don't define the *_TYPE_SIZE macros.
13589
13590 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
13591
13592         * cp-tree.h (push_switch): Change prototype.
13593         (check_cp_case_value): Remove declaration.
13594         (decl_constant_value): Likewise.
13595         * decl.c (struct cp_switch): Add switch_stmt and cases.
13596         (case_compare): New function.
13597         (push_switch): Set switch_stmt.  Initialize cases.
13598         (pop_switch): Clean up cases.
13599         (define_case_label): Rename to ...
13600         (finish_case_label): ... this.  Do semantic analysis for case
13601         labels here.
13602         (start_function): Correct comment.
13603         * decl2.c (check_cp_case_value): Remove.
13604         * expr.c (do_case): Remove.
13605         * pt.c (tsubst_expr): Adjust call to finish_case_label.
13606         * semantics.c (genrtl_do_poplevel): Remove declaration.
13607         (RECHAIN_STMTS): Remove.
13608         (finish_break_stmt): Use build_break_stmt.
13609         (finish_continue_stmt): Use build_continue_stmt.
13610         (finish_switch_cond): Adjust condition here, rater than in
13611         c_expand_start_case.
13612         (finish_case_label): Remove.
13613         * typeck.c (c_expand_return): Remove.
13614         (c_expand_start_case): Likewise.
13615
13616 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
13617
13618         * ir.texi: Document type nodes.
13619
13620 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
13621
13622         * cp-tree.h (init_cp_semantics): Declare.
13623         (genrtl_try_block): Don't declare.
13624         (genrtl_handler): Likewise.
13625         (genrtl_catch_block): Likewise.
13626         (genrtl_ctor_stmt): Likewise.
13627         (genrtl_subobject): Likewise.
13628         (genrtl_do_poplevel): Likewise.
13629         (genrtl_named_return_value): Likewise.
13630         * lex.c (init_parse): Call init_cp_semantics.
13631         * semantics.c (genrtl_try_block): Give it internal linkage.
13632         (genrtl_handler): Likewise.
13633         (genrtl_catch_block): Likewise.
13634         (genrtl_ctor_stmt): Likewise.
13635         (genrtl_subobject): Likewise.
13636         (genrtl_do_poplevel): Likewise.
13637         (genrtl_named_return_value): Likewise.
13638         (lang_expand_stmt): Rename to ...
13639         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
13640         (init_cp_semantics): Define.
13641
13642         * decl.c (initialize_local_var): Remove RTL-generating code.
13643         * semantics.c (genrtl_try_block): Fix formatting.
13644
13645         Move statement-tree facilities from C++ to C front-end.
13646         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
13647         (void_zero_node): Remove.
13648         (stmt_tree): Likewise.
13649         (scope_chain): Adjust.
13650         (language_function): Rename to cp_language_function.
13651         (cp_function_chain): Adjust.
13652         (current_stmt_tree): Remove.
13653         (last_tree): Likewise.
13654         (last_expr_type): Likewise.
13655         (struct lang_decl): Adjust.
13656         (STMT_IS_FULL_EXPR_P): Remove.
13657         (add_tree): Remove.
13658         (begin_stmt_tree): Likewise.
13659         (finish_stmt_tree): Likewise.
13660         (walk_tree_fn): Likewise.
13661         (walk_stmt_tree): Likewise.
13662         * class.c (finish_struct): Replace use of add_tree with add_stmt.
13663         * decl.c (mark_stmt_tree): Adjust type.
13664         (init_decl_processing): Don't build void_zero_node.
13665         (initialize_local_var): Adjust usage of current_stmt_tree.
13666         (finish_enum): Use add_stmt, not add_tree.
13667         (save_function_data): Adjust use of language_function.
13668         (finish_constructor_body): Use add_stmt, not add_tree.
13669         (finish_destructor_body): Likewise.
13670         (push_cp_function_context): Adjust use of language_function.
13671         (pop_cp_function_context): Likewise.
13672         (mark_lang_function): Likewise.
13673         (mark_cp_function_context): Likewise.
13674         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
13675         (build_vec_init): Likewise.
13676         * semantics.c (SET_LAST_STMT): Remove.
13677         (RECHAIN_STMTS): Don't use it.
13678         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
13679         (current_stmt_tree): Define.
13680         (add_tree): Remove.
13681         (finish_goto_stmt): Use add_stmt, not add_tree.
13682         (finish_expr_stmt): Likewise.
13683         (begin_if_stmt): Likewise.
13684         (finish_then_clause): Likewise.
13685         (begin_while_stmt): Likewise.
13686         (begin_do_stmt): Likewise.
13687         (finish_return_stmt): Likewise.
13688         (begin_for_stmt): Likewise.
13689         (finish_break_stmt): Likewise.
13690         (finish_continue_stmt): Likewise.
13691         (begin_switch_stmt): Likewise.
13692         (finish_case_label): Likewise.
13693         (begin_try_block): Likewise.
13694         (begin_function_try_block): Likewise.
13695         (begin_handler): Likewise.
13696         (begin_catch_block): Likewise.
13697         (begin_compound_stmt): Likewise.
13698         (begin_asm_stmt): Likewise.
13699         (finish_asm_stmt): Likewise.
13700         (finish_label_stmt): Likewise.
13701         (add_decl_stmt): Likewise.
13702         (finish_subobject): Likewise.
13703         (finish_decl_cleanup): Likewise.
13704         (finish_named_return_value): Likewise.
13705         (setup_vtbl_ptr): Likewise.
13706         (add_scope_stmt): Likewise.
13707         (finish_stmt_expr): Likewise.
13708         (prune_unused_decls): Remove.
13709         (begin_stmt_tree): Likewise.
13710         (finish_stmt_tree): Likewise.
13711         (prep_stmt): Adjust use of current_stmt_tree.
13712         (lang_expand_stmt): Likewise.
13713         * tree.c (statement_code_p): Remove.
13714         (cp_statement_code_p): New function.
13715         (walk_stmt_tree): Remove.
13716         (init_tree): Set lang_statement_code_p.
13717
13718 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
13719
13720         Integrated preprocessor.
13721
13722         * Make-lang.in, Makefile.in: Remove all references to input.c,
13723         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
13724         * gxx.gperf, hash.h, input.c: Delete.
13725         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
13726         initialized properly.
13727
13728         * class.c (fixup_pending_inline): Take a tree, not a
13729         struct pending_inline *.  All callers changed.
13730         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
13731         RID_PROTECTED entries in ridpointers[] array here.
13732         * decl.c (duplicate_decls): Do not refer to struct
13733         pending_inline.
13734         (record_builtin_type, init_decl_processing): Use RID_MAX not
13735         CP_RID_MAX.
13736         (grokdeclarator): Use C_IS_RESERVED_WORD.
13737         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
13738         cpplib.
13739         (grok_x_components): Do not inspect pending_inlines chain.
13740
13741         * cp-tree.h (struct lang_identifier): Add rid_code entry.
13742         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
13743         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
13744         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
13745         TIME_IDENTIFIER_FILEINFO): Kill.
13746         Update prototypes.
13747         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
13748         single 32-bit word.
13749         * parse.y: Call do_pending_inlines unconditionally.
13750         reinit_parse_for_method is now snarf_method.  fn.defpen is no
13751         longer necessary.  Remove unnecessary <itype> annotation on
13752         SCOPE.  Do not refer to end_of_file or struct pending_inline.
13753         * semantics.c (begin_inline_definitions): Call
13754         do_pending_inlines unconditionally.
13755
13756         * lex.c: Remove all code now shared with C front end.
13757         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
13758         into the get_identifier table.  Rewrite pragma handling to
13759         work with the registry.  Move code to save tokens for later
13760         processing to spew.c.
13761
13762         * spew.c: Rewrite everything in terms of token streams instead
13763         of text.  Move routines here from lex.c / input.c as
13764         appropriate.  GC-mark trees hanging off the pending inlines
13765         chain.
13766
13767 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
13768
13769         * NEWS: Mention that the named return value extension has been
13770         deprecated.
13771         * cp-tree.h (original_result_rtx): Define.
13772         (TREE_REFERENCE_EXPR): Remove.
13773         (DECL_VPARENT): Likewise.
13774         (pushdecl_nonclass_level): Likewise.
13775         (store_return_init): Likewise.
13776         (reinit_lang_specific): Likewise.
13777         (genrtl_named_return_value): Change prototype.
13778         * decl.c (original_result_rtx): Remove.
13779         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
13780         Do not generate RTL for local variables here.
13781         (store_return_init): Remove.
13782         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
13783         store_return_init.
13784         (finish_named_return_value): Adjust accordingly.  Warn that this
13785         extension is deprecated.
13786         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
13787
13788 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
13789
13790         * pt.c (type_unification_real): Replace switch with if.
13791         (unify): Tsubst non-type parms before comparing.
13792
13793 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
13794
13795         * error.c (dump_typename): New function, broken out of ...
13796         (dump_type): ... here. Use it.
13797         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
13798
13799 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
13800
13801         * init.c (build_offset_ref): Deal with namespace scoped
13802         TEMPLATE_ID_EXPRs.
13803
13804 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
13805
13806         * class.c (resolve_address_of_overloaded_function): Add
13807         explanation message.
13808         * decl.c (define_case_label): Reformat explanation.
13809         * decl2.c (finish_static_data_member_decl): Likewise.
13810         (grokfield): Likewise.
13811         * friend.c (do_friend): Likewise.
13812
13813 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
13814
13815         * tree.c (walk_tree): Expose tail recursion.
13816         (walk_stmt_tree): New function.
13817         * cp-tree.h: Prototype walk_stmt_tree.
13818         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
13819         the BLOCKs directly.  If a BLOCK has no variables after
13820         pruning, discard it.
13821         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
13822         restore the line number.
13823
13824 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
13825
13826         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
13827         (pt.o): Remove dependency on HTAB_H.
13828         * cp-tree.h: Include hashtab.h.
13829         (walk_tree): Change prototype.
13830         (walk_tree_without_duplicates): New function.
13831         * decl.c (check_default_argument): Use it.
13832         * optimize.c (remap_decl): Adjust calls to walk_tree.
13833         (copy_body): Likewise.
13834         (expand_calls_inline): Likewise.
13835         (calls_setjmp_p): Use walk_tree_without_duplicates.
13836         * pt.c: Don't include hashtab.h.
13837         (for_each_template_parm): Use walk_tree_without_duplicates.
13838         * semantics.c (finish-stmt_tree): Likewise.
13839         (expand_body): Likewise.
13840         * tree.c (walk_tree): Add additional parameter.
13841         (walk_tree_without_duplicates): New function.
13842         (count_trees): Use it.
13843         (verify_stmt_tree): Adjust call to walk_tree.
13844         (find_tree): Use walk_tree_without_duplicates.
13845         (no_linkage_check): Likewise.
13846         (break_out_target_exprs): Adjust call to walk_tree.
13847         (cp_unsave): Likewise.
13848
13849 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
13850
13851         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
13852         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
13853         * cp-tree.h (TYPE_BINFO): Adjust comment.
13854         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
13855         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
13856         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
13857         (TYPE_TEMPLATE_INFO): Likewise.
13858         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
13859         * class.c (push_nested_class): Likewise.
13860         * decl.c (lookup_name_real): Likewise.
13861         (grokdeclarator): Likewise.
13862         (grok_op_properties): Likewise.
13863         (xref_tag): Likewise.
13864         (xref_basetypes): Likewise.
13865         * decl2.c (constructor_name_full): Likewise.
13866         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
13867         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
13868         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
13869         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
13870         (dump_type_suffix): Likewise.
13871         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
13872         instead.
13873         (get_aggr_from_typedef): Likewise.
13874         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
13875         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
13876         (write_template_parm): Likewise.
13877         (write_template_template_parm): Check tree code instead of
13878         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
13879         * method.c (build_overload_nested_name): Add
13880         BOUND_TEMPLATE_TEMPLATE_PARM.
13881         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
13882         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
13883         * pt.c (convert_template_argument): Check tree code instead of
13884         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
13885         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
13886         (for_each_template_parm): Adjust comment.
13887         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
13888         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
13889         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
13890         template_args_equal to compare template template parameter cases.
13891         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
13892         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
13893         instead.
13894         * tree.c (copy_template_template_parm): Decide whether to create
13895         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
13896         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
13897         (copy_tree_r): Likewise.
13898         * typeck.c (comptypes): Likewise.  Check tree code instead of
13899         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
13900
13901 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
13902
13903         * decl.c (finish_function): Move the code for handling functions
13904         marked with the constructor and destructor attributes inside the
13905         expand_p block.
13906
13907 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
13908
13909         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
13910
13911 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
13912
13913         * pt.c (lookup_template_class): Remove abort.
13914         * tree.c (get_type_decl): Allow error_mark_node.
13915
13916 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
13917
13918         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
13919         TEMPLATE_ID_EXPRs.
13920
13921 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
13922
13923         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
13924         new ABI mangling.
13925
13926 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
13927
13928         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
13929         union tag mismatch error reporting.
13930
13931 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
13932
13933         * call.c (build_scoped_method_call): Check it is not a namespace.
13934
13935 2000-08-30  Jason Merrill  <jason@redhat.com>
13936
13937         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
13938
13939         * tree.c (bot_manip): Check TREE_CONSTANT rather than
13940         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
13941         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
13942
13943         * decl.c (start_function): Always call make_function_rtl.
13944
13945 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
13946
13947         * semantics.c (prune_unused_decls): New function.
13948         (finish_stmt_tree): Call it via walk_tree.
13949
13950 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
13951
13952         * class.c (build_secondary_vtable): Constify a char *.
13953         * decl.c (init_decl_processing): Initialize function_id_node,
13954         pretty_function_id_node, and func_id_node.
13955         * input.c (struct input_source): Constify 'str'.
13956         (feed_input): Constify first argument.
13957         * mangle.c (write_identifier): Constify argument.
13958         * pt.c (mangle_class_name_for_template): Constify argument.
13959
13960 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
13961
13962         * typeck.c (mark_addressable): Remove code that pokes around in
13963         RTL.
13964
13965 2000-08-28  Jason Merrill  <jason@redhat.com>
13966
13967         * lex.c (file_name_nondirectory): Move to toplev.c.
13968
13969         * cp-tree.h (LOCAL_CLASS_P): New macro.
13970         * class.c (finish_struct_1): Use it.
13971
13972 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
13973
13974         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
13975         (write_encoding): Pass another argument to write_name.
13976         (write_name): Add ignore_local_scope parameter.  Fix handling of
13977         local names.
13978         (write_nested_name): Use write_unqualified_name.
13979         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
13980         (write_template_prefix): Use write_unqualified_name.
13981         (write_component): Remove.
13982         (write_local_name): Add parameter.  Use direct local entity to
13983         discriminator calculation.
13984         (write_class_enum_type): Pass another argument to write_name.
13985         (write_template_template_arg): Likewise.
13986         (make_guard_variable): Likewise.
13987
13988 2000-08-27  Jason Merrill  <jason@redhat.com>
13989
13990         * decl.c (pushdecl): Matching decls for local externs are found in
13991         the current level.  Propagate linkage information from previous
13992         declarations.
13993
13994 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
13995
13996         * ir.texi (Expressions): Fix typo.
13997
13998 2000-08-25  Greg McGary  <greg@mcgary.org>
13999
14000         * tree.c (init_tree): Use ARRAY_SIZE.
14001
14002 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
14003
14004         * error.c (cp_tree_printer): Rework.
14005
14006 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
14007
14008         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
14009         dyn-string.o.
14010         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
14011         (cp-demangle.o): Remove target.
14012         (dyn-string.o): Likewise.
14013
14014         * decl.c (grokfndecl): Require that `main' return an `int'.
14015         * mangle.c (write_encoding): Don't mangle return types for
14016         conversion functions.
14017
14018 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
14019
14020         * error.c (tree_formatting_info): New data type.
14021         (tree_being_formatted): New macro.
14022         (tree_formatting_flags): Likewise.
14023         (put_whitespace): Likewise.
14024         (print_tree_identifier): Likewise.
14025         (print_identifier): Likewise.
14026         (cp_tree_printer, print_function_argument_list, print_declaration,
14027         print_expression, print_function_declaration,
14028         print_function_parameter, print_type, print_cv_qualifier): New
14029         functions.
14030         (init_error): Initialize lang_printer.
14031
14032 2000-08-24  Jason Merrill  <jason@redhat.com>
14033
14034         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
14035         adjustment necessary.
14036
14037 2000-08-24  Greg McGary  <greg@mcgary.org>
14038
14039         * cp-tree.h (MAIN_NAME_P): Remove macro.
14040
14041 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
14042
14043         * error.c (print_instantiation_context): Don't forget to flush the
14044         buffer.
14045
14046 2000-08-23  Jason Merrill  <jason@redhat.com>
14047
14048         * typeck.c (build_ptrmemfunc): Save the input pmf.
14049
14050         * method.c (process_modifiers): Use same_type_p.
14051
14052 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
14053
14054         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
14055         * mangle.c (write_function_type): Change prototype.
14056         (write_encoding): Don't mangle return types for
14057         constructors or destructors.
14058         (write_type): Adjust call to write_function_type.
14059         * pt.c (instantiate_template): Instantiate alternate entry points
14060         when instantiating the main function.
14061
14062 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
14063
14064         * error.c (cp_print_error_function): Don't use embedded '\n' in
14065         output_printf.
14066
14067 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
14068
14069         * decl.c (init_decl_processing): Remove bogus initialization.
14070         * error.c (lang_print_error_function): Restore here.
14071         (init_error): Initialize print_error_function.
14072
14073 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
14074
14075         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
14076
14077 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
14078
14079         * Makefile.in (error.o): Depends on diagnostic.h
14080
14081         * cp-tree.h (problematic_instantiation_changed,
14082         record_last_problematic_instantiation, current_instantiation,
14083         print_instantiation_context): Declare.
14084         (maybe_print_template_context): Remove.
14085
14086         * decl.c (init_decl_processing): Set print_error_function to NULL.
14087         (lang_print_error_function): Remove, since we're using a new
14088         machinery.
14089
14090         * error.c: #include diagnostic.h
14091         (function_category): New function.
14092         (cp_diagnostic_starter): Likewise.
14093         (cp_diagnostic_finalizer): Likewise.
14094         (cp_print_error_function): Likewise.
14095         (maybe_print_instantiation_context): Likewise.
14096         (print_instantiation_full_context): Likewise.
14097         (print_instantiation_partial_context): Likewise.
14098         (print_instantiation_context): Define.
14099         (init_error): Initialize diagnostic pager and finalizer.
14100
14101         * pt.c (problematic_instantiation_changed): Define.
14102         (record_last_problematic_instantiation): Likewise.
14103         (current_instantiation): Likewise.
14104         (maybe_print_template_context): Remove.
14105         (print_template_context): Likewise.
14106         (current_tinst_level): Make static to reflect Brendan Kehoe's
14107         change of 1995-04-13.
14108         (push_tinst_level): Call print_instantiation_context.
14109
14110 2000-08-21  Nix  <nix@esperi.demon.co.uk>
14111
14112         * lang-specs.h: Do not process -o or run the assembler if
14113         -fsyntax-only.
14114
14115 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
14116
14117         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
14118         variables.
14119         * decl2.c (lang_decode_option): Disable gettext attributes for
14120         -ansi.
14121
14122 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
14123
14124         * lex.c (lang_init_options): Default diagnostic message maximum
14125         length to 80, when line-wrapping.
14126
14127 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
14128
14129         * class.c (build_vtbl_initializer): Clear the entire
14130         vtbl_init_data.  Start keeping track of the functions for which we
14131         have created vcall offsets here.
14132         (dfs_build_vcall_offset_vtbl_entries): Remove.
14133         (build_vcall_offset_vtbl_entries): Reimplement.
14134         (add_vcall_offset_vtbl_entries_r): New function.
14135         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
14136         computing when vcall offsets are necessary.
14137
14138 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
14139
14140         * decl.c (member_function_or_else): Use cp_error ... %T.
14141         (grokdeclarator): Likewise.
14142         (start_method): Likewise.
14143         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
14144
14145 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
14146
14147         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
14148         TYPE_DECLs.
14149
14150 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
14151
14152         * cp-tree.h (PTRMEM_OK_P): New macro.
14153         (itf_ptrmem_ok): New enumeration value.
14154         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
14155         argument. Diagnose implicit pointer to member.
14156         (instantiate_type): Don't diagnose implicit pointer to member
14157         here. Pass itf_ptrmem_ok if ok. Adjust calls to
14158         resolve_address_of_overloaded_function.
14159         * init.c (build_offset_ref): Set PTRMEM_OK_P.
14160         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
14161         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
14162         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
14163         (build_unary_op): Deal with single non-static member in
14164         microsoft-land.
14165
14166 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
14167
14168         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
14169
14170 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
14171
14172         * cp-tree.h (enum_name_string): Remove prototype.
14173         (report_case_error): Remove prototype.
14174         * cp/typeck2.c (enum_name_string): Remove.
14175         (report_case_error): Remove.
14176         * error.c (dump_expr): Deal with enum values directly.
14177         Correctly negate integer constant.
14178
14179 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
14180
14181         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
14182         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
14183         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
14184         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
14185         (__cxa_vec_new): Use __cxa_vec_new2.
14186         (__cxa_vec_delete): Use __cxa_vec_delete2.
14187
14188 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
14189
14190         * vec.cc (__cxa_vec_new): Set "C" linkage.
14191         (__cxa_vec_ctor): Likewise.
14192         (__cxa_vec_cctor): Likewise.
14193         (__cxa_vec_dtor): Likewise.
14194         (__cxa_vec_delete): Likewise.
14195         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
14196         (__cxa_vec_ctor): Likewise.
14197         (__cxa_vec_cctor): Likewise.
14198         (__cxa_vec_dtor): Likewise.
14199         (__cxa_vec_delete): Likewise.
14200
14201 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
14202
14203         * class.c (instantiate_type): Reinstate local variable
14204         deleted in previous change.
14205
14206         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
14207         itf_no_attributes.
14208
14209 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
14210
14211         * cp-tree.h (instantiate_type_flags): New enumeration.
14212         (instantiate_type): Change parameter.
14213         * class.c (instantiate_type): Adjust prototype. Adjust.
14214         * call.c (standard_conversion): Adjust instantiate_type call.
14215         (reference_binding): Likewise.
14216         (build_op_delete_call): Likewise.
14217         (convert_like_real): Likewise.
14218         * cvt.c (cp_convert_to_pointer): Likewise.
14219         (convert_to_reference): Likewise.
14220         * pt.c (convert_nontype_argument): Likewise.
14221         * typeck.c (build_binary_op): Likewise.
14222         (build_ptrmemfunc): Likewise.
14223         (convert_for_assignment): Likewise.
14224
14225 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
14226
14227         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
14228         (current_aggr): Define.
14229         * decl.c (grokdeclarator): Make sure a friend class is an
14230         elaborated type specifier.
14231         * parse.y (current_aggr): Remove static definition.
14232         (cp_parse_init): Adjust.
14233         (structsp): Clear and restore current_aggr.
14234         (component_decl_list): Clear current_aggr.
14235
14236         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
14237         aggregate tag on the typename's context.
14238
14239         * pt.c (tsubst_friend_class): Return error_mark_node, if
14240         parms becomes NULL.
14241         (instantiate_class_template): Ignore error_mark_node friend types.
14242
14243 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
14244
14245         * cvt.c (warn_ref_binding): New static function, broken out of ...
14246         (convert_to_reference): ... here. Use it.
14247
14248 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
14249
14250         * parse.y (template_arg): Add rule for template qualified with
14251         global scope.
14252
14253 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
14254
14255         * decl2.c (add_function): Reorganize.
14256         (arg_assoc): Do not consider function template decls.
14257
14258 2000-08-11  Jason Merrill  <jason@redhat.com>
14259
14260         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
14261         looking inside.
14262
14263 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
14264
14265         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
14266         (lookup_nested_tag): Likewise.
14267
14268         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
14269         can be produced.
14270
14271 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
14272
14273         * parse.y (named_complex_class_head_sans_basetype): Remove
14274         always true if.
14275
14276 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
14277
14278         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
14279         explicit TEMPLATE_ID_EXPR args.
14280         (build_expr_from_tree, case CALL_EXPR): Likewise.
14281
14282 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
14283
14284         * decl.c (check_tag_decl): Diagnose typename's which don't
14285         declare anything.
14286
14287 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
14288
14289         * init.c (build_aggr_init): Reject bogus array initializers
14290         early.
14291
14292 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
14293
14294         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
14295         runtime.
14296         * cp/tinfo.cc (__dynamic_cast): Likewise.
14297         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
14298
14299 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
14300
14301         * cvt.c (convert_to_pointer_force): Fix error message when
14302         attempting to cast from ambiguous base.
14303
14304 2000-08-08  Jason Merrill  <jason@redhat.com>
14305
14306         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
14307         (tsubst_template_arg_vector): Likewise.
14308
14309         * decl2.c (build_anon_union_vars): Choose the largest field; don't
14310         assume that one will be as large as the union.
14311
14312 2000-08-07  Kazu Hirata  <kazu@hxi.com>
14313
14314         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
14315         * decl.c (pop_labels): Likewise.
14316
14317 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
14318
14319         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
14320         specifications.
14321         (__pointer_to_member_type_info): Likewise.
14322         (__base_class_info): Likewise.
14323         (__class_type_info): Likewise.
14324         (__si_class_type_info): Likewise.
14325         (__vmi_class_type_info): Likewise.
14326         * tinfo.cc (__si_class_type_info::__do_find_public_src):
14327         Changed member names to match specifications.
14328         (__vmi_class_type_info::__do_find_public_src): Likewise.
14329         (__si_class_type_info::__do_dyncast): Likewise.
14330         (__vmi_class_type_info::__do_dyncast): Likewise.
14331         (__si_class_type_info::__do_upcast): Likewise.
14332         (__vmi_class_type_info::__do_upcast): Likewise.
14333         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
14334         (__pbase_type_info::__pointer_catch): Likewise.
14335         (__pointer_type_info::__pointer_catch): Likewise.
14336         (__pointer_to_member_type_info::__pointer_catch): Likewise.
14337
14338 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
14339
14340         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
14341         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
14342         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
14343
14344 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
14345
14346         * cp-tree.h (add_method): Change prototype.
14347         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
14348         Don't double the size of the method vector in the error case.
14349         (handle_using_decl): Adjust call to add_method.
14350         (add_implicitly_declared_members): Likewise.
14351         (clone_function_decl): Likewise.
14352         * decl2.c (check_classfn): Likewise.
14353         * semantics.c (finish_member_declaration): Likewise.
14354
14355 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
14356
14357         * decl.c (flag_isoc94): New variable.
14358
14359 2000-08-02  Jason Merrill  <jason@redhat.com>
14360
14361         * pt.c (do_type_instantiation): Add complain parm; don't complain
14362         if called recursively.
14363         * cp-tree.h, parse.y: Adjust.
14364
14365 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
14366
14367         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
14368         -Wno-strict-prototypes.
14369
14370         * g++spec.c: Adjust type of second argument to
14371         lang_specific_driver, and update code as necessary.
14372
14373         * cp-tree.h: Don't prototype min_precision here.
14374         (my_friendly_assert): Cast expression to void.
14375         * semantics.c (do_poplevel): Initialize scope_stmts.
14376
14377 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
14378
14379         * cp-tree.h (DECL_NEEDED_P): Tweak.
14380
14381 2000-07-28  Jason Merrill  <jason@redhat.com>
14382
14383         * lang-specs.h: Use %i in rule for .ii files.
14384
14385 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
14386
14387         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
14388
14389 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
14390
14391         Allow indirect primary bases.
14392         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
14393         primary_base.
14394         (CLASSTYPE_VFIELD_PARENT): Remove.
14395         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
14396         (BINFO_PRIMARY_BINFO): Remove.
14397         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
14398         (BINFO_VBASE_PRIMARY_P): Likewise.
14399         (BINFO_PRIMARY_BASE_OF): New macro.
14400         (BINFO_INDIRECT_PRIMARY_P): Likewise.
14401         (get_primary_binfo): New function.
14402         * decl.c (lang_mark_tree): Make lang_type::primary_base.
14403         * class.c (vcall_offset_data_s): Rename to ...
14404         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
14405         and add ctor_vtbl_p.
14406         (get_derived_offset): Use get_primary_binfo.
14407         (dfs_mark_primary_bases): Adjust handling of virtual primary
14408         bases.
14409         (mark_primary_bases): Likewise.
14410         (set_primary_base): Take a binfo, not an integer, as a
14411         representation of the primary base.
14412         (indirect_primary_base_p): Remove.
14413         (determine_primary_base): Adjust for indirect primary bases.
14414         (dfs_find_final_overrider): Fix typo in coment.
14415         (update_vtable_entry_for_fn): Use get_primary_binfo.
14416         (layout_nonempty_base_or_field): Tweak.
14417         (build_base_fields): Adjust for new primary base semantics.
14418         (dfs_propagate_binfo_offsets): Remove.
14419         (propagate_binfo_offsets): Rewrite.
14420         (dfs_set_offset_for_shared_vbases): Remove.
14421         (layout_virtual_bases): Don't use it.
14422         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
14423         ABI.
14424         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
14425         CLASSTYPE_VFIELD_PARENT.
14426         (dfs_get_primary_binfo): New function.
14427         (get_primary_binfo): Likewise.
14428         (dump_class_hierarchy_r): Tweak printing of primary bases.
14429         (build_vtbl_initializer): Fix typo in comments.  Use
14430         vtbl_init_data.
14431         (build_vcall_and_vbase_vtbl_entries): Likewise.
14432         (build_vbaes_offset_vtbl_entries): Likewise.
14433         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
14434         BV_VCALL_INDEX to handle indirect primary bases.
14435         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
14436         (build_rtti_vtbl_entries): Likewise.
14437         * search.c (get_shared_vbase_if_not_primary): Tweak.
14438         (find_vbase_instance): Likewise.
14439         (binfo_for_vtable): Simplify.
14440         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
14441         (make_binfo): Make it have 11 entries.
14442
14443 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
14444
14445         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
14446         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
14447         ascertaining primaryness.
14448         (G): Remove template_args.
14449         (decl_is_template_id): New function.
14450         (write_encoding): Use decl_is_template_id.
14451         (write_name): Likewise.  Handle type_decls.  Get main variant of
14452         type decls.
14453         (write_nested_name): Likewise.
14454         (write_prefix): Likewise.
14455         (write_template_prefix): Likewise.
14456         (write_special_name_constructor): Remove defunct production from
14457         comment.
14458         (write_bare_function_type): Remove comment about absent parameter.
14459         (write_template_template_arg): Add missing grammar production to
14460         comment.
14461
14462 2000-07-27  Jason Merrill  <jason@redhat.com>
14463
14464         * decl.c (duplicate_decls): If common_type produces a non-typedef
14465         type for a typedef, just use the old type.
14466
14467 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
14468
14469         * cp-tree.h (function_depth): Declare.
14470         (verify_stmt_tree): Likewise.
14471         (find_tree): Likewise.
14472         * decl.c (function_depth): Give it external linkage.
14473         * optimize.c (optimize_function): Increment and decrement it.
14474         * tree.c (verify_stmt_tree_r): New function.
14475         (verify_stmt_tree): Likewise.
14476         (find_tree_r): Likewise.
14477         (find_tree): Likewise.
14478
14479 2000-07-27  Jason Merrill  <jason@redhat.com>
14480
14481         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
14482         TYPE_PTRMEMFUNC_P.
14483         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
14484
14485 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
14486
14487         * decl.c (start_cleanup_fn): Mark the function as `inline'.
14488         * decl2.c (get_guard): Call cp_finish_decl, not
14489         rest_of_decl_compilation, for local guards.
14490         * lex.c (do_identifier): Remove unused variable.
14491
14492 2000-07-26      Marc Espie <espie@cvs.openbsd.org>
14493
14494         * parse.y:  Add missing ';'.
14495
14496 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
14497
14498         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
14499         of `extern "C++"'.
14500
14501 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
14502
14503         Kill strict_prototype. Backwards compatibility only for
14504         non NO_IMPLICIT_EXTERN_C systems.
14505         * cp-tree.h (flag_strict_prototype): Remove.
14506         (strict_prototype): Remove.
14507         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
14508         * decl.c (maybe_push_to_top_level): Adjust.
14509         (pop_from_top_level): Adjust.
14510         (decls_match): Only allow sloppy parm matching for ancient
14511         system headers.
14512         (init_decl_processing): Adjust.
14513         (grokdeclarator): Adjust.
14514         * decl2.c (flag_strict_prototype): Remove.
14515         (strict_prototype): Remove.
14516         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
14517         (lang_f_options): Remove "strict-prototype".
14518         (unsupported-options): Add "strict-prototype".
14519         * lex.c (do_identifier): Adjust.
14520         (do_scoped_id): Adjust.
14521         * parse.y (empty_parms): Adjust.
14522         * class.c (push_lang_context): Adjust.
14523         (pop_lang_context): Adjust.
14524         * typeck.c (comp_target_parms): Adjust.
14525
14526 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
14527
14528         * decl.c (poplevel): Deal with anonymous variables at for scope.
14529         (maybe_inject_for_scope_var): Likewise.
14530
14531 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
14532
14533         * decl.c: Remove all signal handling code, now done in toplev.c.
14534
14535 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
14536
14537         * decl.c (make_rtl_for_nonlocal_decl): Rework.
14538
14539         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
14540         correctly.
14541
14542 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
14543
14544         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
14545         Define my_friendly_assert and my_friendly_abort as macros
14546         which may call friendly_abort.  Prototype friendly abort, not
14547         my_friendly_abort or my_friendly_assert.
14548         * decl.c (signal_catch): Report the signal caught in the error
14549         message.  Call fatal directly.
14550         * typeck2.c (ack, my_friendly_assert): Delete.
14551         (my_friendly_abort): Rename to friendly_abort.  Expect file,
14552         line, and function parameters.  Report the abort code, then
14553         call fancy_abort.  Do not mask an abort if errors have
14554         already occurred.
14555
14556 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
14557
14558         * typeck.c (comp_target_parms): Remove obsolete parameter.
14559         (comp_target_types): Adjust.
14560
14561 2000-07-17  Jason Merrill  <jason@redhat.com>
14562
14563         * typeck.c (mark_addressable): Never set TREE_USED.
14564         * call.c (build_call): Don't abort on calls to library functions
14565         that have been declared normally.
14566
14567         * typeck.c (build_binary_op): Fix grammar in warning.
14568
14569         * exception.cc (__eh_free): Fix prototype.
14570
14571         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
14572
14573         * decl.c (pushdecl): Handle seeing an OVERLOAD in
14574         IDENTIFIER_NAMESPACE_VALUE.
14575
14576 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
14577
14578         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
14579         * method.c (use_thunk): Correct handling of vcall offsets.
14580
14581 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
14582
14583         * .cvsignore: parse.h and parse.c have no cp- prefix.
14584
14585 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
14586
14587         * .cvsignore: New file.
14588
14589 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
14590
14591         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
14592
14593 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
14594
14595         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
14596         * parse.c: Remove.
14597         * parse.h: Likewise.
14598
14599 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
14600
14601         * class.c (layout_class_type): Add pointers to virtual bases after
14602         base classes under the old ABI.
14603
14604 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
14605
14606         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
14607         (finish_continue_stmt): Likewise.
14608         (begin_for_stmt): Remove call to note_level_for_for.
14609         (finish_goto_stmt): Change call from build_min_nt
14610         to build_stmt.
14611         (finish_expr_stmt): Likewise.
14612         (begin_if_stmt): Likewise.
14613         (begin_while_stmt): Likewise.
14614         (finish_while_stmt): Likewise.
14615         (finish_return_stmt): Likewise.
14616         (begin_for_stmt): Likewise.
14617         (finish_for_stmt): Likewise.
14618         (finish_break_stmt): Likewise.
14619         (begin_switch_stmt): Likewise.
14620         (finish_case_label): Likewise.
14621         (genrtl_try_block): Likewise.
14622         (begin_try_block): Likewise.
14623         (begin_handler): Likewise.
14624         (begin_compound_stmt): Likewise.
14625         (finish_asm_stmt): Likewise.
14626         (finish_label_stmt): Likewise.
14627         (add_decl_stmt): Likewise.
14628         (finish_subobject): Likewise.
14629         (finish_decl_cleanup): Likewise.
14630         (finish_named_return_value): Likewise.
14631         (setup_vtbl_ptr): Likewise.
14632         (add_scope_stmt): Likewise.
14633         * decl.c (finish_constructor_body): Likewise.
14634         (finish_destructor_body): Likewise.
14635         * optimize.c (copy_body_r): Likewise.
14636         (initialize_inlined_parameters): Likewise.
14637         (declare_return_variable): Likewise.
14638         (expand_call_inline): Likewise.
14639
14640 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
14641
14642         * semantics.c (expand_body): Sync interface information
14643         at the end of function body expansion.
14644
14645 2000-07-09  Jason Merrill  <jason@redhat.com>
14646
14647         * init.c (build_new_1): Bail early if the call to new fails.
14648
14649         * decl.c (compute_array_index_type): Check specifically for
14650         an INTEGER_CST, not just TREE_CONSTANT.
14651
14652         * decl.c (duplicate_decls): Don't call duplicate_decls on
14653         the DECL_TEMPLATE_RESULT.
14654         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
14655         codes.
14656
14657         * error.c (dump_template_bindings): Don't crash if we had an
14658         invalid argument list.
14659
14660         * typeck.c (c_expand_start_case): Do narrowing here.
14661         * semantics.c (finish_switch_cond): Not here.
14662
14663 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
14664
14665         * parse.y (asm_clobbers): Do string concatenation.
14666
14667 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
14668
14669         * decl.c (pushtag): Don't put local classes in template functions
14670         on the local_classes list.
14671
14672 2000-07-04  Scott Snyder  <snyder@fnal.gov>
14673
14674         * decl2.c (get_guard): Add missing return for old ABI local
14675         variable case.
14676
14677 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
14678
14679         * cp-tree.h (char_type_p): New function.
14680         * decl.c (init_decl_processing): Don't initialize
14681         signed_wchar_type_node or unsigned_wchar_type_node.
14682         (complete_array_type): Handle brace-enclosed string-constants.
14683         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
14684         * tree.c (char_type_p): New function.
14685         * typeck2.c (digest_init): Use char_type_p.
14686
14687 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
14688
14689         * pt.c (tsubst): Don't layout type, if it's error_mark.
14690
14691 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
14692
14693         * pt.c (instantiate_pending_templates): Reset template level.
14694
14695 2000-07-05  Jason Merrill  <jason@redhat.com>
14696
14697         * call.c (joust): Don't complain about `operator char *()' beating
14698         `operator const char *() const'.
14699
14700 2000-07-04  scott snyder  <snyder@fnal.gov>
14701             Jason Merrill  <jason@redhat.com>
14702
14703         * repo.c (repo_get_id): Handle the case where a class with virtual
14704         bases has a null TYPE_BINFO_VTABLE.
14705
14706 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
14707             Jason Merrill  <jason@redhat.com>
14708
14709         * parse.y (member_init): Just pass in the type.
14710         * init.c (expand_member_init): Handle getting a type.
14711
14712 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14713             Jason Merrill  <jason@redhat.com>
14714
14715         * decl.c (finish_function): Warn if a function has no return
14716         statement.
14717         Suggested by Andrew Koenig.
14718         * typeck.c (check_return_expr): Do set current_function_returns_value
14719         if we got an error_mark_node.
14720
14721 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
14722
14723         * decl2.c (push_decl_namespace): Push the original namespace.
14724
14725 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
14726
14727         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
14728         * semantics.c (begin_class_definition): Clear it.
14729
14730 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
14731
14732         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
14733         (genrtl_expr_stmt): Likewise.
14734         (genrtl_decl_stmt): Likewise.
14735         (genrtl_if_stmt): Likewise.
14736         (genrtl_while_stmt): Likewise.
14737         (genrtl_do_stmt): Likewise.
14738         (genrtl_return_stmt): Likewise.
14739         (genrtl_for_stmt): Likewise.
14740         (genrtl_break_stmt): Likewise.
14741         (genrtl_continue_stmt): Likewise.
14742         (genrtl_scope_stmt): Likewise.
14743         (genrtl_switch_stmt): Likewise.
14744         (genrtl_case_label): Likewise.
14745         (genrtl_begin_compound_stmt): Likewise.
14746         (genrtl_finish_compound_stmt): Likewise.
14747         (genrtl_compound_stmt): Likewise.
14748         (genrtl_asm_stmt): Likewise.
14749
14750         * init.c (begin_init_stmts): Remove call to
14751         genrtl_begin_compound_stmt.
14752         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
14753
14754         * semantics.c (lang_expand_stmt): Changed call to
14755         genrtl_compound_stmt to ignore return value.
14756
14757 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
14758
14759         * mangle.c (canonicalize_for_substitution): Return the canonical
14760         variant of a type.
14761
14762         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
14763         TYPE_DECL.
14764         * typeck.c (commonparms): Remove obstack manipulations.
14765
14766 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
14767
14768         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
14769
14770         * Makefile.in (OBJS): Added ../c-semantics.o.
14771         (OBJDEPS): Likewise.
14772
14773         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
14774         ../c-common.h.
14775         (struct stmt_tree): Added comment.
14776         (current_function_name_declared): Removed.
14777         (stmts_are_full_exprs_p): Likewise.
14778         (genrtl_do_pushlevel): Likewise.
14779         (genrtl_clear_out_block): Likewise.
14780         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
14781         (DECL_ANON_UNION_ELEMS): Likewise.
14782         (emit_local_var): Likewise.
14783         (make_rtl_for_local_static): Likewise.
14784         (do_case): Likewise.
14785         (expand_stmt): Likewise.
14786         (genrtl_decl_cleanup): Likewise.
14787         (c_expand_asm_operands): Likewise.
14788         (c_expand_return): Likewise.
14789         (c_expand_start_case): Likewise.
14790
14791         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
14792         (emit_local_var): Likewise.
14793         (initialize_local_var): Change reference to
14794         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
14795         Change reference to stmts_are_full_exprs_p to
14796         current_stmt_tree->stmts_are_full_exprs_p.
14797         (push_cp_function_context): Likewise.
14798
14799         * expect.c (expand_throw): Change reference to
14800         stmts_are_full_exprs_p.
14801
14802         * init.c (build_aggr_init): Change reference to
14803         stmts_are_full_exprs_p.
14804         (build_vec_init): Likewise.
14805
14806         * optimize.c (maybe_clone_body): Change reference to
14807         current_function_name_declared to
14808         cp_function_chain->name_declared.
14809
14810         * pt.c (instantiate_decl): Change reference to
14811         current_function_name_declared to
14812         cp_function_chain->name_declared.
14813
14814         * semantics.c (expand_cond): Moved declaration to c-common.h.
14815         (genrtl_do_pushlevel): Moved to c-semantics.c.
14816         (genrtl_clear_out_block): Likewise.
14817         (genrtl_goto_stmt): Likewise.
14818         (genrtl_expr_stmt): Likewise.
14819         (genrtl_decl_stmt): Likewise.
14820         (gerntl_if_stmt): Likewise.
14821         (genrtl_while_stmt): Likewise.
14822         (genrtl_do_stmt): Likewise.
14823         (genrtl_return_stmt): Likewise.
14824         (genrtl_for_stmt): Likewise.
14825         (genrtl_break_stmt): Likewise.
14826         (genrtl_continue_stmt): Likewise.
14827         (genrtl_scope_stmt): Likewise.
14828         (genrtl_switch_stmt): Likewise.
14829         (genrtl_case_label): Likewise.
14830         (genrtl_begin_compound_stmt): Likewise.
14831         (genrtl_finish_compound_stmt): Likewise.
14832         (genrtl_compound_stmt): Likewise.
14833         (genrtl_asm_stmt): Likewise.
14834         (genrtl_decl_cleanup): Likewise.
14835         (expand_cond): Likewise.
14836         (expand_stmt): Renamed to ...
14837         (lang_expand_stmt): ... this.
14838         (lang_expand_expr_stmt): Initialize.
14839         (set_current_function_name_declared): Likewise.
14840         (stmts_are_full_exprs_p): Likewise.
14841         (current_function_name_declared): Likewise.
14842         (anon_aggr_type_p): Likewise.
14843         (do_poplevel): Change reference to
14844         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
14845         Change reference to stmts_are_full_exprs_p to
14846         current_stmt_tree->stmts_are_full_exprs_p.
14847         (add_tree): Likewise.
14848         (finish_expr_stmt): Likewise.
14849         (prep_stmt): Likewise.
14850         (lang_expand_stmt): Likewise.
14851         (begin_compound_stmt): Change reference to
14852         current_function_name_declared to
14853         cp_function_chain->name_declared and call to
14854         current_function_name_declared().
14855         (setup_vtbl_ptr): Likewise.
14856         (genrtl_do_poplevel): Removed.
14857
14858 2000-06-30  Jason Merrill  <jason@redhat.com>
14859
14860         * init.c (init_init_processing): Go back to aligning like
14861         double_type_node for old ABI.
14862         (get_cookie_size): Make cookie larger if we get a type that needs
14863         more alignment.
14864         (build_vec_delete): Call it.
14865
14866         * typeck.c (qualify_type_recursive): New fn.
14867         (composite_pointer_type): Use it.
14868         (build_binary_op): Use composite_pointer_type.
14869
14870 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
14871             Jason Merrill  <jason@redhat.com>
14872
14873         * typeck.c (check_return_expr): Don't complain about returning
14874         NULL from operator new if -fcheck-new.
14875         * cp-tree.h: Declare flag_check_new here.
14876         * init.c: Not here.
14877
14878 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
14879
14880         * mangle.c (find_substitution): Use same_type_p.
14881         (write_encoding): Don't check for substitutions.
14882
14883 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
14884
14885         * parse.y (expr_no_comma_rangle): New non-terminal.
14886         (template_parm): Use it for default parameter case.
14887         (template_arg): Use it.
14888         (expr_no_commas): Remove commented out undefined extensions.
14889         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
14890         * parse.h, parse.c: Rebuilt.
14891
14892 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
14893
14894         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
14895         (finish_asm_stmt): Do it here, instead.
14896
14897         * cp-tree.h (ridpointers): Don't declare.
14898         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
14899         (record_builtin_java_type): Likewise.
14900         (init_decl_processing): Likewise.
14901         * lex.c: Move inclusion of lex.h.
14902         (ridpointers): Don't define.
14903         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
14904         RID_MAX.
14905         * lex.h (enum rid): Rename to ...
14906         (enum cp_rid): ... this.
14907         (ridpointers): Don't declare.
14908         * parse.y: Move inclusion of lex.h.
14909         * parse.c: Regenerated.
14910         * spew.c: Move inclusion of lex.h.
14911
14912         * cp-tree.h (struct language_function): Remove temp_name_counter.
14913         (temp_name_counter): Remove.
14914         (get_temp_name): Change prototype.
14915         (get_guard): New function.
14916         (get_guard_cond): Likewise.
14917         (set_guard): Likewise.
14918         * cvt.c (build_up_reference): Adjust call to get_temp_name.
14919         * decl.c (expand_static_init): Use get_guard and friends to
14920         implement guard variables.
14921         * decl2.c (get_temp_name): Assume that the variables created are
14922         always static.
14923         (get_sentry): Rename to ...
14924         (get_guard): ... this.  Implement new ABI guard variables.
14925         (get_guard_bits): New function.
14926         (get_guard_cond): Likewise.
14927         (set_guard): Likewise.
14928         (start_static_initialization_or_destruction): Use them.
14929         (do_static_initialization): Replace sentry with guard throughout.
14930         (do_static_destruction): Likewise.
14931         * init.c (create_temporary_var): Add comment.
14932
14933 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
14934
14935         * mangle.c (find_substitution): Use same_type_p.
14936         (write_encoding): Don't check for substitutions.
14937
14938 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
14939
14940         * parse.y (expr_no_comma_rangle): New non-terminal.
14941         (template_parm): Use it for default parameter case.
14942         (template_arg): Use it.
14943         (expr_no_commas): Remove commented out undefined extensions.
14944         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
14945         * parse.h, parse.c: Rebuilt.
14946
14947 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
14948
14949         * cp-tree.h (flag_const_strings): Remove.
14950         (warn_parentheses): Likewise.
14951         (warn_format): Likewise.
14952         (common_type): Likewise.
14953         (default_conversion): Likewise.
14954         (build_binary_op): Likewise.
14955         (cp_build_binary_op): New macro.
14956         * call.c (build_new_op): Use cp_build_binary_op instead of
14957         build_binary_op.
14958         * class.c (build_vtable_entry_ref): Likewise.
14959         * decl.c (expand_static_init): Likewise.
14960         (compute_array_index_type): Likewise.
14961         (build_enumerator): Likewise.
14962         * decl2.c (delete_sanity): Likewise.
14963         (start_static_initialization_or_destruction): Likewise.
14964         * error.c (dump_type_suffix): Likewise.
14965         * init.c (resolve_offset_ref): Likewise.
14966         (build_new): Likewise.
14967         (build_new_1): Likewise.
14968         (build_vec_delete_1): Likewise.
14969         (build_vec_init): Likewise.
14970         (build_delete): Likewise.
14971         * rtti.c (synthesize_tinfo_fn): Likewise.
14972         (synthesize_tinfo_var): Likewise.
14973         * search.c (expand_upcast_fixups): Likewise.
14974         (fixup_all_virtual_upcast_offsets): Likewise.
14975         * typeck.c (build_array_ref): Likewise.
14976         (get_member_function_from_ptrfunc): Likewise.
14977         (build_binary_op): Add parameter.
14978         (pointer_int_sum): Use cp_build_binary_op.
14979         (pointer_diff): Likewise.
14980         (build_modify_expr): Likewise.
14981         (get_delta_difference): Likewise.
14982         (build_ptrmemfunc): Likewise.
14983
14984 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
14985
14986         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
14987         * decl.c (create_implicit_typedef): Adjust.
14988         * decl2.c (build_artificial_parm): Adjust.
14989         * method.c (implicitly_declare_fn): Adjust.
14990         * pt.c (push_inline_template_parms_recursive): Adjust.
14991         (process_template_parm): Adjust.
14992         (overloaded_template_name): Adjust.
14993         * semantics.c (finish_template_template_parm): Adjust.
14994
14995 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
14996
14997         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
14998         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
14999         where to emit thunks.
15000         (build_vtt): Adjust call to build_vtt_inits.
15001         (build_vtt_inits): Add parameter to indicate whether or not
15002         sub-VTTs for virtual bases should be included.  Adjust handling of
15003         construction vtables.
15004         (get_matching_base): New function.
15005         (dfs_build_vtt_inits): Rename to ...
15006         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
15007         construction vtables.
15008         (dfs_fixup_binfo_vtbls): Likewise.
15009         (build_ctor_vtbl_groups): Build construction vtables for virtual
15010         bases, too.
15011         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
15012         to build construction vtbls.
15013         (dfs_accumulate_vtbl_inits): Adjust handling of
15014         construction vtables.
15015
15016         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
15017         types correctly.
15018
15019 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
15020
15021         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
15022
15023 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
15024
15025         * search.c (hides): Remove.
15026         (is_subobject_of_p): Add most_derived parameter. Use
15027         CANONICAL_BINFO.
15028         (lookup_field_queue_p): Adjust.
15029         (lookup_field_r): Adjust.
15030
15031 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
15032
15033         * decl2.c (handle_class_head): Bash typedefs to the type's main
15034         decl.
15035
15036 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
15037
15038         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
15039         (begin_global_stmt_expr): ... this.
15040         (genrtl_finish_stmt_expr): Rename to ...
15041         (finish_global_stmt_expr): ... this.
15042         * init.c (begin_init_stmts): Adjust calls.
15043         (finish_init_stmts): Likewise.
15044         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
15045         (begin_global_stmt_expr): ... this.
15046         (genrtl_finish_stmt_expr): Rename to ...
15047         (finish_global_stmt_expr): ... this.
15048
15049 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
15050
15051         * search.c (lookup_member): Fix typo in comment.
15052
15053 2000-06-24  Jason Merrill  <jason@redhat.com>
15054
15055         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
15056         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
15057
15058 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15059
15060         * parse.y (complex_direct_notype_declarator): Support global_scope.
15061         * Makefile.in: Adjust conflict count.
15062
15063 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
15064
15065         * parse.y (template_arg): Convert TEMPLATE_DECL
15066         that is a template template parameter to
15067         TEMPLATE_TEMPLATE_PARM here.
15068
15069         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
15070         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
15071         (copy_template_template_parm): Adjust prototype.
15072         * decl.c (grokdeclarator): Remove dead code.
15073         * pt.c (process_template_parm): Tidy.
15074         (lookup_template_class): Construct nodes in
15075         copy_template_template_parm.
15076         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
15077         lookup_template_class.  Use TYPE_TI_TEMPLATE.
15078         * tree.c (copy_template_template_parm): Add NEWARGS
15079         parameter.
15080         (mapcar): Adjust call to copy_template_template_parm.
15081         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
15082         * method.c (build_template_template_parm_names): Change error
15083         code to avoid compilation warning.
15084
15085         * gxxint.texi: Document template template parameter
15086         name mangling.
15087
15088 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
15089
15090         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
15091         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
15092         (cp-demangle.o): New rule.
15093         (dyn-string.o): Likewise.
15094         * inc/cxxabi.h (__cxa_demangle): New declaration.
15095
15096 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
15097
15098         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
15099         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
15100         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
15101         a tree, not an int.
15102         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
15103         (make_thunk): Change prototype.
15104         (emit_thunk): Rename to use_thunk.
15105         (mangle_thunk): Change prototype.
15106         * class.c (get_derived_offset): Simplify.
15107         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
15108         BV_GENERATE_THUNK_WITH_VTABLE_P.
15109         (build_primary_vtable): Simplify.
15110         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
15111         (dfs_find_base): Remove.
15112         (update_vtable_entry_for_fn): Correct bug in finding the base
15113         where a virtual function was first declared.  Figure out whether
15114         or not to emit a vcall-thunk with the vtables in which it appears.
15115         Correct logic for deciding whether to use an ordinary thunk, or a
15116         vcall thunk.
15117         (finish_struct_1): Remove unnecssary code.
15118         (build_vtbl_initializer): Use ssize_int for the running counter of
15119         negative indices.
15120         (build_vtbl_initializer): Only use vcall thunks where necessary.
15121         Mark thunks as needing to be emitted with their vtables, or not.
15122         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
15123         indices.  Use size_binop.
15124         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
15125         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
15126         size_binop.
15127         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
15128         (build_vtable_entry): Mark thunks as needing to be emitted with
15129         their vtables, or not.
15130         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
15131         * decl2.c (mark_vtable_entries): Use use_thunk instead of
15132         emit_thunk.
15133         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
15134         information.
15135         * error.c (dump_expr): Use BV_FN.
15136         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
15137         not an int.
15138         * method.c (make_thunk): Likewise.
15139         (emit_thunk): Rename to use_thunk.  Allow callers to decide
15140         whether or not to actually emit the thunk.  Adjust for changes in
15141         representation of vcall offsets.
15142         * search.c (dfs_get_pure_virtuals): Use BV_FN.
15143         * semantics.c (emit_associated_thunks): New function.
15144         (expand_body): Use it.
15145         * ir.texi: Adjust decriptions of thunks.
15146
15147 2000-06-22  Jason Merrill  <jason@redhat.com>
15148
15149         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
15150         (tsubst_friend_function): Copy it here.
15151
15152         * decl.c (grok_op_properties): Fix typo.
15153
15154         * decl2.c (delete_sanity): Clarify warning, avoid failure on
15155         deleting void*.
15156
15157         * pt.c (check_explicit_specialization): Clarify error.
15158
15159         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
15160         an old OVERLOAD when we're declaring a non-function.
15161         (pushdecl, destroy_local_var): Check for error_mark_node.
15162         (warn_extern_redeclared_static): Also bail early if
15163         we're a CONST_DECL.
15164         (push_overloaded_decl): Ignore an old error_mark_node.
15165
15166 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
15167
15168         * call.c (build_x_va_arg): Check if in a template decl.
15169         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
15170
15171 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15172
15173         * class.c (push_lang_context): TYPE_NAME gets you to the Java
15174         types DECLs.
15175         * decl.c (check_goto): Computed gotos assumed OK.
15176
15177 2000-06-20  Jason Merrill  <jason@redhat.com>
15178
15179         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
15180         for which we don't need to look for instantiations.
15181
15182 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
15183
15184         * parse.y (program): Always call finish_translation_unit.
15185         * parse.c, parse.h: Rebuilt.
15186
15187 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
15188
15189         * method.c: Don't include hard-reg-set.h.
15190
15191 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
15192
15193         * rtti.c (get_base_offset): Cope when vbase field is in a base.
15194
15195 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
15196
15197         * call.c (build_conditional_expr): Use VOID_TYPE_P.
15198         * cvt.c (cp_convert_to_pointer): Likewise.
15199         (convert_to_void): Likewise.
15200         * error.c (dump_expr): Likewise.
15201         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
15202         * init.c (build_delete): Likewise.
15203         * method.c (emit_thunk): Likewise.
15204         * optmize.c (declare_return_variable): Likewise.
15205         * rtti.c (get_tinfo_decl_dynamic): Likewise.
15206         (get_typeid): Likewise.
15207         (build_dynamic_cast_1): Likewise.
15208         * typeck.c (composite_pointer_type): Likewise.
15209         (common_type): Likewise.
15210         (build_indirect_ref): Likewise.
15211         (build_binary_op): Likewise.
15212         (build_x_compound_expr): Likewise.
15213         (check_return_expr): Likewise.
15214         * typeck2.c (add_exception_specifier): Likewise.
15215
15216         * mangle.c (write_method_parms): Use direct comparison for end
15217         of parmlist.
15218
15219 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
15220
15221         * cp-tree.h (genrtl_try_block): Declare function.
15222         (genrtl_handler): Likewise.
15223         (genrtl_catch_block): Likewise.
15224         (genrtl_ctor_stmt): Likewise.
15225         (genrtl_subobject): Likewise.
15226         (genrtl_decl_cleanup): Likewise.
15227         (genrtl_do_poplevel): Likewise.
15228         (genrtl_do_pushlevel): Likewise.
15229         (genrtl_clear_out_block): Likewise.
15230         (genrtl_goto_stmt): Likewise.
15231         (genrtl_expr_stmt): Likewise.
15232         (genrtl_decl_stmt): Likewise.
15233         (genrtl_if_stmt): Likewise.
15234         (genrtl_while_stmt): Likewise.
15235         (genrtl_do_stmt): Likewise.
15236         (genrtl_return_stmt): Likewise.
15237         (genrtl_for_stmt): Likewise.
15238         (genrtl_break_stmt): Likewise.
15239         (genrtl_continue_stmt): Likewise.
15240         (genrtl_scope_stmt): Likewise.
15241         (genrtl_switch_stmt): Likewise.
15242         (genrtl_case_label): Likewise.
15243         (genrtl_begin_compound_stmt): Likewise.
15244         (genrtl_finish_compound_stmt): Likewise.
15245         (genrtl_compound_stmt): Likewise.
15246         (genrtl_asm_stmt): Likewise.
15247         (genrtl_named_return_value): Likewise.
15248         (genrtl_begin_stmt_expr): Likewise.
15249         (genrtl_finish_stmt_expr): Likewise.
15250         (finish_for_stmt): Removed first argument.
15251         (finish_switch_stmt): Likewise.
15252
15253         * semantics.c (genrtl_try_block): Define function.
15254         (genrtl_handler): Likewise.
15255         (genrtl_catch_block): Likewise.
15256         (genrtl_ctor_stmt): Likewise.
15257         (genrtl_subobject): Likewise.
15258         (genrtl_decl_cleanup): Likewise.
15259         (genrtl_do_poplevel): Likewise.
15260         (genrtl_do_pushlevel): Likewise.
15261         (genrtl_clear_out_block): Likewise.
15262         (genrtl_goto_stmt): Likewise.
15263         (genrtl_expr_stmt): Likewise.
15264         (genrtl_decl_stmt): Likewise.
15265         (genrtl_if_stmt): Likewise.
15266         (genrtl_while_stmt): Likewise.
15267         (genrtl_do_stmt): Likewise.
15268         (genrtl_return_stmt): Likewise.
15269         (genrtl_for_stmt): Likewise.
15270         (genrtl_break_stmt): Likewise.
15271         (genrtl_continue_stmt): Likewise.
15272         (genrtl_scope_stmt): Likewise.
15273         (genrtl_switch_stmt): Likewise.
15274         (genrtl_case_label): Likewise.
15275         (genrtl_begin_compound_stmt): Likewise.
15276         (genrtl_finish_compound_stmt): Likewise.
15277         (genrtl_compound_stmt): Likewise.
15278         (genrtl_asm_stmt): Likewise.
15279         (genrtl_named_return_value): Likewise.
15280         (genrtl_begin_stmt_expr): Likewise.
15281         (genrtl_finish_stmt_expr): Likewise.
15282         (finish_for_stmt): Removed first argument and generate rtl
15283         specific code.
15284         (finish_switch_stmt): Likewise.
15285         (do_poplevel): Removed generate rtl specific code.
15286         (do_pushlevel): Likewise.
15287         (add_tree): Likewise.
15288         (finish_goto_stmt): Likewise.
15289         (finish_expr_stmt): Likewise.
15290         (begin_if_stmt): Likewise.
15291         (finish_if_stmt_cond): Likewise.
15292         (finish_then_clause): Likewise.
15293         (begin_else_clause): Likewise.
15294         (finish_else_clause): Likewise.
15295         (finish_if_stmt): Likewise.
15296         (clear_out_block): Likewise.
15297         (begin_while_stmt): Likewise.
15298         (finish_while_stmt_cond): Likewise.
15299         (finish_while_stmt): Likewise.
15300         (begin_do_stmt): Likewise.
15301         (finish_do_body): Likewise.
15302         (finish_do_stmt): Likewise.
15303         (finish_return_stmt): Likewise.
15304         (begin_for_stmt): Likewise.
15305         (finish_for_init_stmt): Likewise.
15306         (finish_for_cond): Likewise.
15307         (finish_for_expr): Likewise.
15308         (finish_break_stmt): Likewise.
15309         (finish_continue_stmt): Likewise.
15310         (begin_switch_stmt): Likewise.
15311         (finish_switch_cond): Likewise.
15312         (finish_case_label): Likewise.
15313         (begin_try_block): Likewise.
15314         (begin_function_try_block): Likewise.
15315         (finish_try_block): Likewise.
15316         (finish_cleanup_try_block): Likewise.
15317         (finish_cleanup): Likewise.
15318         (finish_function_try_block): Likewise.
15319         (finish_handler_sequence): Likewise.
15320         (finish_function_handler_sequence): Likewise.
15321         (begin_handler): Likewise.
15322         (finish_handler_parms): Likewise.
15323         (begin_catch_block): Likewise.
15324         (finish_handler): Likewise.
15325         (begin_compound_stmt): Likewise.
15326         (finish_compound_stmt): Likewise.
15327         (finish_asm_stmt): Likewise.
15328         (finish_label_stmt): Likewise.
15329         (finish_label_decl): Likewise.
15330         (finish_subobject): Likewise.
15331         (finish_decl_cleanup): Likewise.
15332         (finish_named_return_value): Likewise.
15333         (begin_stmt_expr): Likewise.
15334         (finish_stmt_expr): Likewise.
15335
15336         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
15337         to call genrtl_expr_stmt when appropriate.
15338
15339         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
15340         begin_compound_expr to call genrtl_begin_stmt_expr and
15341         genrtl_begin_compound_expr when appropriate.
15342         (finish_init_stmts): Changed calls to finish_compound_expr and
15343         finish_stmt_expr to call genrtl_finish_compound_expr and
15344         genrtl_finish_stmt_expr when appropriate.
15345         (expand_default_init): Changed call to finish_expr_stmt to call
15346         genrtl_expr_stmt when appropriate.
15347         (build_vec_init): Likewise.
15348
15349         * parse.y (simple_stmt): Removed first argument from call to
15350         finish_for_stmt. Removed first argument from call to
15351         finish_switch_stmt.
15352
15353         * parse.c: Regenerated.
15354
15355         * pt.c (tsubst_expr): Removed first argument from call to
15356         finish_for_stmt. Removed first argument from call to
15357         finish_switch_stmt.
15358
15359 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
15360
15361         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
15362         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
15363
15364         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
15365         (cplus_tree_code_length[]): Likewise.
15366         (cplus_tree_code_name[]): Likewise.
15367         (init_parse): Added call to add_c_tree_codes. Changed
15368         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
15369
15370 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
15371
15372         * cp-tree.h (finish_mem_initializers): Declare.
15373         (count_trees): Likewise.
15374         * parse.y (base_init): Use finish_mem_initializers.
15375         * semantics.c (finish_mem_initializers): New function.
15376
15377         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
15378         the number of trees.
15379         (n_trees): Remove.
15380         (count_trees): Don't use it.
15381
15382 2000-06-15  Jason Merrill  <jason@redhat.com>
15383
15384         * tree.c (count_trees): New debugging function.
15385
15386         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
15387         * init.c (build_member_call): Pull out the name of a DECL.
15388
15389         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
15390         * semantics.c (expand_body): Push to TV_INTEGRATION here.
15391         * optimize.c (optimize_function): Not here.
15392         * pt.c (instantiate_decl): Push to TV_PARSE.
15393
15394 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
15395
15396         * cp-tree.h (struct language_function): Remove x_base_init_list
15397         and x_member_init_list.
15398         (current_base_init_list): Remove.
15399         (current_member_init_list): Likewise.
15400         (setup_vtbl_ptr): Change prototype.
15401         (emit_base_init): Likewise.
15402         (expand_member_init): Likewise.
15403         (reinit_parse_for_function): Remove.
15404         * decl.c (save_function_data): Don't clear x_base_init_list and
15405         x_member_init_list.
15406         (mark_language_function): Don't mark them.
15407         * init.c (perform_member_init): Tweak comment.
15408         (sort_member_init): Take the list of initializers as an argument.
15409         (sort_base_init): Likewise.
15410         (emit_base_init): Likewise.
15411         (expand_member_init): Return the initializer.  Don't use global
15412         variables.
15413         * lex.c (reinit_parse_for_function): Remove.
15414         * method.c (build_template_parm_names): Correct substitution.
15415         (do_build_copy_constructor): Don't use current_member_init_list
15416         and current_base_init_list.
15417         (synthesize_method): Likewise.
15418         * parse.y (base_init): Split mem-initializers into
15419         base-initializers and field-initializers.
15420         (member_init_list): Build up the list here.
15421         (member_init): Return the initializer.
15422         (fn.depfn): Don't use reinit_parse_for_function.
15423         * parse.c: Regenerated.
15424         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
15425         ERROR_MARK.
15426         (tsubst_expr): Don't use current_member_init_list
15427         and current_base_init_list.
15428         (tsubst_expr_values): Rename to ...
15429         (tsubst_initializer_list): ... this.  Use convert_from_reference.
15430         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
15431         and current_base_init_list.
15432         (begin_function_definition): Don't call reinit_parse_for_function.
15433
15434         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
15435
15436         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
15437         correctly.
15438
15439         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
15440
15441 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
15442
15443         * cp-tree.h (IF_COND): Move to c-common.h.
15444         (THEN_CLAUSE): Likewise.
15445         (ELSE_CLAUSE): Likewise.
15446         (WHILE_COND): Likewise.
15447         (WHILE_BODY): Likewise.
15448         (DO_COND): Likewise.
15449         (DO_BODY): Likewise.
15450         (RETURN_EXPR): Likewise.
15451         (EXPR_STMT_EXPR): Likewise.
15452         (FOR_INIT_STMT): Likewise.
15453         (FOR_COND): Likewise.
15454         (FOR_EXPR): Likewise.
15455         (FOR_BODY): Likewise.
15456         (SWITCH_COND): Likewise.
15457         (SWITCH_BODY): Likewise.
15458         (CASE_LOW): Likewise.
15459         (CASE_HIGH): Likewise.
15460         (GOTO_DESTINATION): Likewise.
15461         (COMPOUND_BODY): Likewise.
15462         (ASM_CV_QUAL): Likewise.
15463         (ASM_STRING): Likewise.
15464         (ASM_OUTPUTS): Likewise.
15465         (ASM_INPUTS): Likewise.
15466         (ASM_CLOBBERS): Likewise.
15467         (DECL_STMT_DECL): Likewise.
15468         (STMT_EXPR_STMT): Likewise.
15469         (LABEL_STMT_LABEL): Likewise.
15470         (SCOPE_BEGIN_P): Likewise.
15471         (SCOPE_END_P): Likewise.
15472         (SCOPE_STMT_BLOCK): Likewise.
15473         (SCOPE_NULLIFIED_P): Likewise.
15474         (SCOPE_NO_CLEANUPS_P): Likewise.
15475         (SCOPE_PARTIAL_P): Likewise.
15476         (ASM_VOLATILE_P): Likewise.
15477         (STMT_LINENO): Likewise.
15478         (STMT_LINENO_FOR_FN_P): Likewise.
15479
15480         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
15481         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
15482         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
15483         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
15484         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
15485
15486         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
15487
15488         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
15489         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
15490
15491         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
15492         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
15493         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
15494
15495 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
15496
15497         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
15498         * class.c (dfs_find_final_overrider): Set it appropriately.
15499         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
15500         avoid unneeded secondary vptrs.
15501
15502 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
15503
15504         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
15505         (check_bitfield_decl, check_field_decl): Likewise.
15506         (build_vtbl_or_vbase_field, build_base_field): Likewise.
15507         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
15508         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
15509         (xfer_tag, finish_enum): Likewise.
15510         * decl2.c (finish_builtin_type): Likewise.
15511         * init.c (init_init_processing): Likewise.
15512         * pt.c (instantiate_class_template): Likewise.
15513         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
15514         * cp-tree.h (struct lang_type): Add user_align member.
15515         (CLASSTYPE_USER_ALIGN): Define.
15516
15517 2000-06-13  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
15518
15519         * Make-lang.in (c++.install-common): Install g++-cross in
15520         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
15521         $(target_alias)-g++ and $(target_alias)-c++.
15522
15523 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
15524
15525         * class.c (vcall_offset_data_s): Add last_init and fns.
15526         (overrides): Rename to same_signature_p.
15527         (dfs_find_final_overrider): Adjust accordingly.
15528         (mark_overriders): Likewise.
15529         (warn_hidden): Likewise.
15530         (build_vtbl_initializer): Reorganize machinery for building things
15531         at negative offsets.
15532         (build_vcall_and_vbase_vtbl_entries): Likewise.
15533         (build_vbase_offset_vtbl_entries): Likewise.
15534         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
15535         offset entries.  Do not create two entries for functions with the
15536         same signature.
15537         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
15538         (build_rtti_vtbl_entries): Reorganize machinery for building things
15539         at negative offsets.
15540
15541         * optimize.c (expand_call_inline): Don't recurse into the code
15542         used to initialize the parameters more than once.
15543
15544 2000-06-11  Mark Mitchell <mark@codesourcery.com>
15545
15546         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
15547         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
15548         (find_substitution): Only use the `Sa' substitution for
15549         std::allocator, not instantiations of it.
15550         (write_template_prefix): Move comment.  Only use a TREE_LIST to
15551         represent substitutions for a member template.
15552         (write_array_type): Mangle array dimensions correctly.
15553         * optimize.c (maybe_clone_body): Copy more information from the
15554         cloned function.
15555         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
15556         on the regenerated declaration.
15557
15558 2000-06-11  Chip Salzenberg  <chip@valinux.com>
15559             Mark Mitchell <mark@codesourcery.com>
15560
15561         * class.c (build_vtable): Clarify comment.
15562         (build_ctor_vtbl_group): Pass the most derived type to
15563         build_vtable.
15564
15565 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15566
15567         * decl2.c (compare_options): Don't needlessly cast away const-ness.
15568
15569 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
15570
15571         * decl.c (add_binding): Handle duplicate declarations of external
15572         variables.
15573
15574 2000-06-09  Chip Salzenberg  <chip@valinux.com>
15575             Mark Mitchell <mark@codesourcery.com>
15576
15577         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
15578         argument.
15579         (write_signed_number): New macro.
15580         (write_unsigned_number): Likewise.
15581         (write_source_name): Use them.
15582         (write_number): Handle signed and unsigned values.
15583         (write_integer_cst): Use tree_int_cst_sgn, and use
15584         write_unsigned_number or write_signed_number as appropriate.
15585         (write_discriminator): Use write_unsigned_number or
15586         write_signed_number as appropriate.
15587         (write_template_arg_literal): Likewise.
15588         (write_array_type): Use tree_low_cst.
15589         (write_template_parm):  Use write_unsigned_number or
15590         write_signed_number as appropriate.
15591         (write_substitution): Adjust call to write_number.
15592         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
15593         (write_expression): Handle non-type template arguments of
15594         reference type correctly.
15595         (mangle_thunk): Use write_signed_number.
15596
15597 2000-06-09  Chip Salzenberg  <chip@valinux.com>
15598
15599         * mangle.c (find_substition): Don't mangle objects with typename
15600         substitutions (e.g. "cin" as "Si").
15601
15602 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
15603
15604         * call.c (add_candidate): Use ggc_alloc_cleared.
15605         * decl.c (lookup_label): Likewise.
15606         * lex.c (retrofit_lang_decl): Likewise.
15607
15608 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
15609
15610         * semantics.c (expand_body): Push to TV_EXPAND.
15611         * optimize.c (optimize_function): Push to TV_INTEGRATION.
15612         * decl.c (start_function): Always call announce_function.
15613
15614         * tinfo2.cc: Just declare abort.
15615
15616 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
15617
15618         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
15619         whenever @ is a symbolic name.
15620
15621 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
15622
15623         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
15624
15625 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
15626
15627         * decl.c (pushdecl): Look up functions by DECL_NAME, not
15628         DECL_ASSEMBLER_NAME.
15629
15630 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
15631
15632         * decl2.c (c_language): Define.
15633
15634 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
15635
15636         * lex.c (lang_init_options): Tweak.
15637
15638         * decl2.c: Remove #inclusion of diagnostic.h
15639         (lang_decode_option): Move diagnostic formatting options to
15640         toplevel.
15641
15642         * lang-options.h: Remove documentation for diagnostic options.
15643
15644         * Makefile.in (lex.o): Depends upon diagnostic.h
15645
15646 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
15647
15648         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
15649         the same DECL_RESULT, it's not a redefinition.
15650         * pt.c (tsubst_decl): Remove code to handle illegal
15651         specializations.
15652
15653 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
15654
15655         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
15656
15657 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
15658
15659         * search.c (maybe_suppress_debug_info): Don't check
15660         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
15661
15662         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
15663         here if extern_p.
15664
15665         Remember instantiation context in deferred instantiations.
15666         * cp-tree.h (struct tinst_level): Remove.
15667         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
15668         * pt.c (current_tinst_level): Now a tree.
15669         (print_template_context, push_tinst_level, pop_tinst_level,
15670         tinst_for_decl): Adjust.
15671         (reopen_tinst_level): New fn.
15672         (init_pt): Register current_tinst_level as a root.
15673         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
15674         of the pending templates list.
15675         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
15676         * lex.c (extract_interface_info): Adjust.
15677         * decl2.c (warn_if_unknown_interface): Adjust.
15678
15679 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
15680
15681         * class.c (indirect_primary_base_p): New function.
15682         (determine_primary_base): Use it.
15683
15684 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
15685
15686         Update new-abi dynamic cast algorithm.
15687         * tinfo.cc (__class_type_info::__dyncast_result): Add
15688         whole_details. Adjust constructor.
15689         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
15690         Avoid unnecessary searching.
15691         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
15692
15693 2000-06-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15694
15695         * decl.c (init_decl_processing): Don't call record_component_aliases.
15696         * tree.c (build_cplus_array_type_1): Likewise.
15697
15698 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
15699
15700         * ir.texi: Correct typo.
15701         * mangle.c (write_expression): Handle non-type template arguments
15702         with reference type.
15703         * method.c (build_overload_value): Likewise.
15704         * pt.c (convert_nontype_argument): Explicitly represent conversion
15705         to a reference with an ADDR_EXPR.
15706         (unify): Always unify arguments in left-to-right order.
15707
15708 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
15709             Mark Mitchell  <mark@codesourcery.com>
15710
15711         * Make-lang.in (CXX_SRCS): Add mangle.c.
15712         * Makefile.in (CXX_OBJS): Add mangle.o.
15713         (mangle.o): New rule.
15714
15715         * class.c (local_classes): New variable.
15716         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
15717         (get_vtt_name): Use mangle_vtt_name for new ABI.
15718         (init_class_processing): Initialize local_classes.
15719         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
15720         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
15721         (std_identifier): New macro.
15722         (DECL_VOLATILE_MEMFUNC_P): New macro.
15723         (DECL_NAMESPACE_STD_P): Likewise.
15724         (local_classes): Declare.
15725         (get_mostly_instantiated_function_type): Declare.
15726         (init_mangle): Declare.
15727         (mangle_decl): Likewise.
15728         (mangle_type_string): Likewise.
15729         (mangle_type): Likewise.
15730         (mangle_typeinfo_for_type): Likewise.
15731         (mangle_typeinfo_string_for_type): Likewise.
15732         (mangle_vtbl_for_type): Likewise.
15733         (mangle_vtt_for_type): Likewise.
15734         (mangle_ctor_vtbl_for_type): Likewise.
15735         (mangle_thunk): Likewise.
15736         (mangle_conv_op_name_for_type): Likewise.
15737         (mangle_guard_variable): Likewise.
15738         * decl.c (pushtag): Keep track of local classes.
15739         (initialize_predefined_identifiers): Initialize std_identifier.
15740         (init_decl_processing): Use std_identifier.
15741         (start_decl): Don't treat instantiations as specializations.
15742         (grokdeclarator): Likewise.
15743         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
15744         name for fully-instantiated templates.
15745         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
15746         destructors with the new ABI.
15747         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
15748         (grokfield): Use mangle_type for new ABI.
15749         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
15750         (get_sentry): Use mangle_guard_variable for new ABI.
15751         (start_static_initialization_or_destruction): Likewise.
15752         * expr.c (extract_aggr_init): Remove.
15753         (extract_scalar_init): Likewise.
15754         (extract_init): Remove #if 0'd code.
15755         * mangle.c: New function.
15756         * method.c (build_mangled_name): Assert not flag_new_abi.
15757         (build_static_name): Likewise.
15758         (build_decl_overload_real): Likewise.
15759         (build_typename_overload): Likewise.
15760         (build_overload_with_type): Likewise.
15761         (build_overload_name): Likewise.
15762         (get_ctor_vtbl_name): Likewise.
15763         (start_squangling): Likewise.
15764         (get_id_2): Likewise.
15765         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
15766         (init_method): Call init_mangle for new ABI.
15767         (make_thunk): Call mangle_thunk for new ABI.
15768         * operators.def: Correct new ABI manglings for the `%' operator.
15769         Add `::' operator.
15770         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
15771         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
15772         (lookup_template_class): Call mangle_decl for new ABI.
15773         (get_mostly_instantiated_function_type): New function.
15774         (set_mangled_name_for_template_decl): Use it.
15775         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
15776         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
15777         conversion op names.
15778         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
15779         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
15780         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
15781         mangle_typeinfo_string_for_type.
15782
15783 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
15784
15785         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
15786         (INNERMOST_TEMPLATE_ARGS): New macro.
15787         (innermost_args): Remove.
15788         (get_innermost_template_args): New function.
15789         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
15790         * error.c (dump_function_decl): Be caution when using
15791         most_general_template.
15792         * method.c (build_template_parm_names):  Use
15793         INNERMOST_TEMPLATE_ARGS.
15794         * pt.c (add_to_template_args): Tidy comment
15795         (get_innermost_template_args): New function.
15796         (check_explicit_specialization): Clear DECL_INITIAL for a new
15797         specialization.
15798         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
15799         Tidy.
15800         (push_template_decl): Always register specializations of the most
15801         general template.
15802         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
15803         (coerce_template_parms): Likewise.
15804         (lookup_template_class): Likewise.
15805         (innermost_args): Remove.
15806         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
15807         (tsubst_decl): Handle tricky specializations.  Use
15808         get_innermost_template_args.
15809         (instantiate_template): Simplify handling of partial
15810         instantiations.
15811         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
15812         (most_general_template): Reimplement, in a more straightforward
15813         manner.
15814         (regenerate_decl_from_template): Tweak formatting.  Use
15815         TMPL_ARGS_DEPTH for clarity.
15816         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
15817
15818         * dump.c (dequeue_and_dump): Dump information about thunks.
15819
15820 2000-06-01  Richard Henderson  <rth@cygnus.com>
15821
15822         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
15823
15824 2000-06-01  Richard Henderson  <rth@cygnus.com>
15825
15826         * decl2.c (unsupported_options): Fix typo, make const.
15827         (lang_decode_option): Fix bsearch argument order.
15828
15829 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
15830
15831         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
15832         on FIELD_DECLs.
15833
15834 2000-05-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15835
15836         * cp-tree.h (c_get_alias_set): Deleted.
15837         * Makefile.in (decl.o): Include ../expr.h.
15838         * decl.c (expr.h): Include.
15839         (init_decl_processing): Call record_component_aliases for arrays.
15840         (grokdeclarator): Likewise.
15841         Set TREE_ADDRESSABLE for fields that aren't bitfields.
15842         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
15843
15844 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
15845
15846         Remove guiding declaration support.
15847         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
15848         (flag_guiding_decls): Remove.
15849         * call.c (build_user_type_conversion_1): Remove support for
15850         guiding decls.
15851         (build_new_function_call): Likewise.
15852         (build_new_op): Likewise.
15853         (build_new_method_call): Likewise.
15854         * decl.c (start_function): Likewise.
15855         * friend.c (is_friend): Likewise.
15856         (do_friend): Likewise.
15857         * decl2.c ((flag_dump_translation_unit): Make it const.
15858         (flag_guiding_decls): Remove.
15859         (unsupported_options): New variable
15860         (compare_options): New function.
15861         (lang_decode_option): Use them.
15862
15863         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
15864
15865         * method.c (mangle_expression): Adjust test for legal expression
15866         operators.
15867
15868         * pt.c (instantiate_decl): Save and restore the local
15869         specializations list.
15870
15871 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
15872
15873         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
15874
15875 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
15876
15877         * call.c (add_template_candidate_real): Handle member template
15878         constructors for classes with virtual bases.
15879         (build_user_type_conversion_1): Use in_charge_arg_for_name.
15880         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
15881
15882         * ir.texi: Update thunk documentation.
15883
15884         * call.c (joust): Fix handling of overloaded builtin operators.
15885
15886 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
15887
15888         * cp-tree.h (DECL_ANTICIPATED): New macro.
15889         Document new use of DECL_LANG_FLAG_7.
15890         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
15891         in the user namespace.
15892         * lex.c (do_identifier): If the identifier's declaration has
15893         DECL_ANTICIPATED on, it has not yet been declared.  But do not
15894         replace it with an ordinary implicit declaration.
15895
15896         * tinfo2.cc: Include stdlib.h.
15897
15898 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
15899
15900         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
15901         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
15902         CLASSTYPE_ALIGN.
15903
15904 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
15905
15906         * decl2.c (lang_decode_option): Use skip_leading_substring instead
15907         of plain strncmp.
15908
15909 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
15910
15911         * operators.def (<?): Duplicated, should have been...
15912         (>?): this.  Fixed.
15913
15914 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
15915             Mark Mitchell  <mark@codesourcery.com>
15916
15917         * cp-tree.h (ansi_opname): Make it a macro.
15918         (ansi_assopname): Likewise.
15919         (struct lang_decl_flags): Add assignment_operator_p.
15920         (struct lang_decl): Add operator_code.
15921         (DECL_VTT_PARM): Adjust.
15922         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
15923         overloaded operator.
15924         (SET_OVERLOADED_OPERATOR_CODE): New macro.
15925         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
15926         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
15927         (opname_tab): Remove.
15928         (assignop_tab): Likewise.
15929         (operator_name_info_t): New type.
15930         (operator_name_info): New variable.
15931         (assignment_operator_name_info): Likewise.
15932         (build_cp_library_fn): Remove declaration.
15933         (push_cp_library_fn): Likewise.
15934         (operator_name_string): Likewise.
15935         (build_decl_overload): Likewise.
15936         * call.c (print_z_candidates): Simplify.
15937         (build_object_call): Adjust usage of ansi_opname.  Use
15938         DECL_OVERLOADED_OPERATOR_P.
15939         (op_error): Adjust operator name lookup.
15940         (build_conditional_expr): Adjust usage of ansi_opname.
15941         (build_new_op): Likewise.
15942         (build_op_delete_call): Likewise.
15943         (build_over_call): Likewise.
15944         (joust): Use DECL_OVERLOADED_OPERATOR_P.
15945         * decl.c (duplicate_decls): Copy operator_code.
15946         (init_decl_processing): Adjust parameters to push_cp_library_fn.
15947         (builtin_function): Adjust parameters to build_library_fn_1.
15948         (build_library_fn_1): Accept an overloaded operator code.
15949         (build_library_fn): Pass ERROR_MARK.
15950         (build_cp_library_fn): Accept an overloaded operator code.
15951         (push_cp_library_fn): Likewise.
15952         (grokfndecl): Tweak.
15953         (grokdeclarator): Simplify code to compute names of overloaded
15954         operators.  Adjust use of ansi_opname.
15955         (ambi_op_p): Work on tree_codes, not identifiers.
15956         (unary_op_p): Likewise.
15957         (grok_op_properties): Likewise.
15958         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
15959         (lang_mark_tree): Don't try to mark the operator_code.
15960         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
15961         * error.c (dump_decl): Remove special handling for operator
15962         names.
15963         (dump_function_name): Likewise.
15964         (dump_expr): Adjust name lookup of operators.
15965         (op_to_string): Simplify.
15966         (assop_to_string): Likewise.
15967         * init.c (build_new_1): Adjust use of ansi_opname.
15968         * lex.c (opname_tab): Remove.
15969         (assignop_tab): Likewise.
15970         (ansi_opname): Likewise.
15971         (ansi_assopname): Likewise.
15972         (operator_name_string): Likewise.
15973         (reinit_lang_specific): Likewise.
15974         (operator_name_info): New variable.
15975         (assignment_operator_name_info): Likewise.
15976         (init_operators): New function.
15977         (init_parse): Use it.
15978         (do_identifier): Adjust use of ansi_opname.
15979         * method.c (mangle_expression): Don't use ansi_opname for
15980         mangling.
15981         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
15982         (build_decl_overload): Remove.
15983         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
15984         (do_build_assign_ref): Adjust use of ansi_opname.
15985         (synthesize_method): Likewise.
15986         (implicitly_declare_fn): Likewise.
15987         * operators.def: New file.
15988         * parse.y (operator): Adjust use of ansi_opname.
15989         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
15990         (set_mangled_name_for_template_decl): Don't play games with
15991         current_namespace.
15992         (special_function_p): Adjust use of ansi_opname.
15993         * typeck.c (check_return_expr): Likewise.
15994         * Make-lang.in (cc1plus): Depend on operators.def.
15995         * Makefile.in (lex.o): Likewise.
15996         (decl.o): Likewise.
15997
15998 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
15999
16000         * Make-lang.in (cplib2.ready): Eradicate.
16001
16002 2000-05-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16003
16004         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
16005         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
16006         (built_min, cp_tree_equal): Likewise.
16007
16008 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
16009
16010         * class.c (layout_nonempty_base_or_field): Replace
16011         `record_layout_info' with `record_layout_info_s'.
16012
16013 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
16014
16015         Fix goto checking.
16016         * cp-tree.h (struct language_function): x_named_labels is now
16017         a struct named_label_list*.
16018         * decl.c (struct named_label_use_list): Renamed from...
16019         (struct named_label_list): ...this.  New struct.
16020         (push_binding_level): Don't set eh_region.
16021         (note_level_for_eh): New fn.
16022         (pop_label): Take label and old value directly.
16023         (pop_labels): Adjust for new named_labels format.
16024         (lookup_label): Likewise.
16025         (poplevel): Note characteristics of a binding level containing a
16026         named label.  Mess with named label lists earlier.
16027         (mark_named_label_lists): New fn.
16028         (mark_lang_function): Call it.
16029         (use_label): New fn, split out from...
16030         (make_label_decl): ...here.  Don't call it.
16031         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
16032         check_previous_gotos): New fns, split out from...
16033         (define_label): ...here.
16034         (check_switch_goto): New fn.
16035         (define_case_label): Call it.
16036         (check_goto): New fn.
16037         * semantics.c (finish_goto_stmt): Call it and use_label.
16038         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
16039         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
16040
16041 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
16042
16043         * class.c (build_vtable_entry_ref): Correct usage of
16044         get_vtbl_decl_for_binfo.
16045
16046         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
16047         * method.c (implicitly_declare_fn): Not here.
16048
16049 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
16050
16051         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
16052         (CPTI_PTMD_DESC_TYPE): ... here.
16053         (ptmd_desc_type_node): Rename to ...
16054         (ptm_desc_type_node): ... here.
16055         * decl.c: Likewise.
16056         * rtti.c (ptmd_initializer): Rename to ...
16057         (ptm_initializer): ... here.
16058         (sythesize_tinfo_var): Adjust. Deal with pointer to member
16059         function.
16060         (create_tinfo_types): Adjust.
16061
16062 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
16063
16064         Finish implementation of VTTs.
16065         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
16066         CPTI_VTT_PARM_IDENTIFIER.
16067         (vtt_parm_identifier): New macro.
16068         (vtt_parm_type): Likewise.
16069         (BINFO_SUBVTT_INDEX): Likewise.
16070         (BINFO_VPTR_INDEX): Likewise.
16071         (struct lang_decl): Add vtt_parm.
16072         (DECL_VTT_PARM): New macro.
16073         (DECL_USE_VTT_PARM): Likewise.
16074         (DECL_NEEDS_VTT_PARM_P): Likewise.
16075         (get_vtt_name): Declare.
16076         (build_artificial_parm): Likewise.
16077         (fixup_all_virtual_upcast_offsets): Likewise.
16078         (expand_indirect_vtbls_init): Remove.
16079         * call.c (build_new_method_call): Pass the vtt to subobject
16080         constructors and destructors.
16081         * class.c (get_vtt_name): Give it external linkage.
16082         (build_clone): Handle the magic VTT parameters for clones.
16083         (clone_function_decl): Fix typo in comment.
16084         (build_vtt): Keep track of the indices in the VTTs where various
16085         entities are stored.
16086         (build_vtt_inits): Likewise.
16087         (dfs_build_vtt_inits): Likewise.
16088         (build_ctor_vtbl_group): Tweak type of construction vtables.
16089         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
16090         primary bases, when building construction vtables.
16091         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
16092         (initialize_predefined_identifiers): Add vtt_parm_identifier.
16093         (init_decl_processing): Initialize vtt_parm_type.
16094         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
16095         (lang_mark_tree): Make vtt_parm.
16096         * decl2.c (build_artificial_parm): New function.
16097         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
16098         (grokclassfn): Use build_artificial_parm.
16099         * init.c (initialize_vtbl_ptrs): Call
16100         fixup_all_virtual_upcast_offsets directly.
16101         (perform_member_init): Use the complete subobject destructor for
16102         member cleanups.
16103         (build_vtbl_address): New function.
16104         (expand_virtual_init): Handle VTTs.
16105         * optimize (maybe_clone_body): Likewise.
16106         * search.c (fixup_all_virtual_upcast_offsets): Give it external
16107         linkage.
16108         (expand_indirect_vtbls_init): Remove.
16109         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
16110         * tree.c (make_binfo): Make them bigger.
16111
16112 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
16113
16114         * inc/cxxabi.h (__pbase_type_info): Define, based on
16115         __pointer_type_info.
16116         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
16117         (__pointer_to_member_type_info): Likewise.
16118         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
16119         (__pointer_to_member_type_info::__is_pointer_p): Remove.
16120         (__pointer_type_info::__do_catch): Rename to ...
16121         (__pbase_type_info::__do_catch): ... here. Adjust.
16122         (__pbase_type_info::__pointer_catch): Implement.
16123         (__pointer_type_info::__pointer_catch): Adjust.
16124         (__pointer_to_member_type_info::__pointer_catch): Adjust.
16125
16126 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
16127
16128         * tinfo.h (__user_type_info::contained_virtual_p): New
16129         predicate.
16130         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
16131         shaped hierarchy.
16132         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
16133         diamond shaped hierarchy. Add early out for mixed diamond and
16134         duplicate shaped hierarchy.
16135
16136 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
16137
16138         * cp-tree.h (build_delete): Change prototype.
16139         (build_vec_delete): Likewise.
16140         * call.c (build_scoped_method_call): Use special_function_kind
16141         values to indicate the kind of destruction to be done.
16142         (build_method_call): Likewise.
16143         * decl.c (finish_destructor_body): Likewise.
16144         (maybe_build_cleanup_1): Likewise.  Rename to ...
16145         (maybe_build_cleanup): ... this.
16146         * decl2.c (delete_sanity): Use special_function_kind
16147         values to indicate the kind of destruction to be done.
16148         (build_cleanup): Likewise.
16149         * init.c (perform_member_init): Likewise.
16150         (build_vec_delete_1): Likewise.
16151         (build_dtor_call): Simplify.
16152         (build_delete): Use special_function_kind
16153         values to indicate the kind of destruction to be done.
16154         (build_vbase_delete): Likewise.
16155         (build_vec_delete): Likewise.
16156
16157         * init.c (sort_member_init): Fix typo in error message generation
16158         code.
16159
16160 2000-05-15  Donald Lindsay  <dlindsay@cygnus.com>
16161
16162         * semantics.c (begin_class_definition): make the packed
16163         attribute be sensitive to the "-fpack-struct" command line flag
16164
16165 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
16166
16167         Update new-abi upcast algorithm.
16168         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
16169         prototype and meaning of return value.
16170         (__si_class_type_info::__do_upcast): Likewise.
16171         (__vmi_class_type_info::__do_upcast): Likewise.
16172         * tinfo.cc (__class_type_info::__upcast_result): Replace
16173         whole2dst with part2dst. Adjust ctor.
16174         (__class_type_info::__do_upcast): Adjust call of worker function.
16175         (__class_type_info::__do_upcast): Adjust.
16176         (__si_class_type_info::__do_upcast): Adjust. Use parent's
16177         __do_upcast.
16178         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
16179         virtual base in diamond hierarchy bug.
16180
16181 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
16182
16183         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
16184         and bitfield to tinfo_fn_p.
16185         (DECL_TINFO_FN_P): Adjust.
16186         (SET_DECL_TINFO_FN_P): Likewise.
16187         (DECL_MUTABLE_P): Likewise.
16188         (DECL_C_BIT_FIELD): Likewise.
16189         (SET_DECL_C_BIT_FIELD): Likewise.
16190         (CLEAR_DECL_C_BIT_FIELD): Likewise.
16191         (DECL_UNINLINABLE): Likewise.
16192         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
16193         (handle_using_decl): Remove assertion.
16194         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
16195         to build FIELD_DECLs.
16196         (build_base_field): Likewise.
16197         (layout_class_type): Likewise.
16198         * decl.c (init_decl_processing): Likewise.
16199         (build_ptrmemfunc_type): Likewise.
16200         (grokdeclarator): Likewise.
16201         * decl2.c (grok_x_components): Likewise.
16202         * except.c (call_eh_info): Likewise.
16203         * init.c (init_init_processing): Likewise.
16204         * rtti.c (expand_class_desc): Likewise.
16205         (create_pseudo_type_info): Likewise.
16206         (get_vmi_pseudo_type_info): Likewise.
16207         (create_tinfo_types): Likewise.
16208         * ptree.c (print_lang_decl): Adjust.
16209         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
16210         before checking DECL_MUTABLE_P.
16211
16212         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
16213         parameters for template functions.
16214         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
16215         destructors as well as constructors.
16216
16217 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
16218
16219         * class.c (build_ctor_vtbl_group): Set inits.
16220         * optimize.c (maybe_clone_body): Set DECL_INLINE and
16221         DECL_THIS_INLINE appropriately for clones.
16222
16223         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
16224         (DECL_CONV_FN_P): Simplify.
16225         (DECL_OPERATOR): Remove.
16226         (language_to_string): Declare.
16227         * decl.c (duplicate_decls): Fix typo in comment.
16228         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
16229         (grok_op_properties): Use DECL_CONV_FN_P instead of
16230         IDENTIFIER_TYPENAME_P.
16231         * dump.c (dequeue_and_dump): Dump the language linkage of
16232         declarations.
16233         * error.c (language_to_string): Give it external linkage.
16234         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
16235         (implicitly_declare_fn): Set DECL_LANGUAGE.
16236         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
16237         IDENTIFIER_TYPENAME_P.
16238         (tsubst_decl): Likewise.
16239         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
16240         * semantics.c (finish_member_declaration): Don't mark members of
16241         classes declared in an extern "C" region as extern "C".
16242
16243 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16244
16245         * decl2.c (qualified_lookup_using_namespace): Look through
16246         namespace aliases.
16247
16248         * decl.c (push_using_decl): Return the old decl on namespace level.
16249
16250 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
16251
16252         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
16253         (VTT_NAME_PREFIX): New macro.
16254         (CTOR_VTBL_NAME_PREFIX): Likewise.
16255         (get_ctor_vtbl_name): New function.
16256         * class.c (get_vtable_name): Simplify.
16257         (get_vtt_name): New function.
16258         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
16259         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
16260         when a virtual base becomes primary.
16261         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
16262         VTTs.
16263         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
16264         additional parameters.
16265         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
16266         (initialize_array): New function.
16267         (build_vtt): Likewise.
16268         (build_vtt_inits): Likewise.
16269         (dfs_build_vtt_inits): Likewise.
16270         (dfs_fixup_binfo_vtbls): Likewise.
16271         (build_ctor_vtbl_group): Likewise.
16272         (initialize_vtable): Use initialize_array.
16273         (accumulate_vtbl_inits): Reimplement to handle construction
16274         vtables.
16275         (dfs_accumulate_vtbl_inits): Likewise.
16276         (bulid_vtbl_initializer): Adjust parameter name.
16277         * method.c (build_typename_overload): Remove #if 0'd code.
16278         (get_ctor_vtbl_name): New function.
16279         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
16280         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
16281
16282         * cp-tree.h (struct lang_type): Remove search_slot.
16283         (CLASSTYPE_SEARCH_SLOT): Remove.
16284         (emit_base_init): Change prototype.
16285         (initialize_vtbl_ptrs): Likewise.
16286         (expand_indirect_vtbls_init): Likewise.
16287         (clear_search_slots): Remove.
16288         * decl.c (lang_mark_tree): Don't mark search_slot.
16289         * init.c (initialize_vtbl_ptrs): Simplify.
16290         (emit_base_init): Likewise.
16291         * search.c (struct vbase_info): Document decl_ptr.
16292         (convert_pointer_to_single_level): Remove.
16293         (dfs_find_vbases): Remove.
16294         (dfs_init_base_pointers): Simplify.
16295         (dfs_clear_vbase_slots): Remove.
16296         (dfs_vtable_path_unmark): New function.
16297         (init_vbase_pointers): Simplify.
16298         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
16299         (expand_indirect_vtbls_init): Simplify.  Don't call
16300         mark_all_temps_used.
16301         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
16302         initialize_vtbl_ptrs.
16303
16304 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
16305
16306         * except.c: Add static prototypes.
16307
16308 2000-05-20  H.J. Lu  <hjl@gnu.org>
16309
16310         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
16311
16312 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
16313
16314         Don't create a separate copy of virtual bases for the
16315         CLASSTYPE_VBASECLASSES list.
16316         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
16317         (BINFO_FOR_VBASE): Remove.
16318         (CANONICAL_BINFO): Adjust.
16319         (binfo_for_vbase): New function.
16320         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
16321         instead of BINFO_FOR_VBASE.
16322         (build_vbase_pointer): Likewise.
16323         (build_secondary_vtable): Likewise.
16324         (dfs_mark_primary_bases): Likewise.
16325         (mark_primary_bases): Likewise.
16326         (layout_nonempty_base_or_field): Likewise.
16327         (dfs_set_offset_for_shared_vbases): Likewise.
16328         (dfs_set_offset_for_unshared_vbases): Likewise.
16329         (layout_virtual_bases): Likewise.  Adjust for changes to the
16330         CLASSTYPE_VBASECLASSES list.
16331         (dump_class_hierarchy_r): Use binfo_for_vbase
16332         instead of BINFO_FOR_VBASE.
16333         (dump_class_hierarchy): Likewise.
16334         (finish_vtbls): Likewise.
16335         (build_vtbl_initializer): Adjust for changes to the
16336         CLASSTYPE_VBASECLASSES list.
16337         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
16338         * decl.c (finish_destructor_body): Adjust for changes to the
16339         CLASSTYPE_VBASECLASSES list.
16340         * init.c (sort_base_init): Use binfo_for_vbase.
16341         (construct_virtual_bases): Adjust for changes to the
16342         CLASSTYPE_VBASECLASSES list.
16343         (expand_member_init): Use binfo_for_vbase.
16344         (build_vbase_delete):  Adjust for changes to the
16345         CLASSTYPE_VBASECLASSES list.
16346         * method.c (do_build_copy_constructor): Likewise.
16347         * rtti.c (get_base_offset): Use binfo_for_vbase.
16348         (expand_class_desc): Remove #if 0'd code.
16349         * search.c (struct vbase_info): Remove vbase_types.
16350         (get_base_distance):  Use binfo_for_vbase.
16351         (lookup_field_queue_p): Use CANONICAL_BINFO.
16352         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
16353         (get_pure_virtuals): Adjust for changes to the
16354         CLASSTYPE_VBASECLASSES list.
16355         (dfs_find_vbases): Use binfo_for_vbase.
16356         (dfs_init_vbase_pointers): Likewise.
16357         (init_vbase_pointers): Don't initialize vi.vbase_types.
16358         (virtual_context): Use binfo_for_vbase.
16359         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
16360         CLASSTYPE_VBASECLASSES list.
16361         (expand_indirect_vtbls_init): Simplify.
16362         (dfs_get_vbase_types): Don't replicate virtual bases.
16363         (find_vbase_instance): Use binfo_for_vbase.
16364         (binfo_for_vbase): New function.
16365         * typeck.c (get_delta_difference): Use binfo_for_vbase.
16366
16367 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
16368
16369         * decl2.c (finish_anon_union): Generalize error messages to handle
16370         anonymous structures.
16371         * init.c (perform_member_init): Remove `name' parameter.
16372         (build_field_list): New function.
16373         (sort_member_init): Handle anonymous union initialization order
16374         correctly.  Check for multiple initializations of the same union.
16375         (emit_base_init): Don't look up fields by name here.
16376         (expand_member_init): Record the result of name lookup for future
16377         reference.
16378         * typeck.c (build_component_ref): Fix formatting.
16379
16380 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
16381
16382         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
16383         * typeck.c (build_x_compound_expr): Replace warn_unused with
16384         warn_unused_value.
16385
16386         * decl2.c (lang_decode_option): Update -Wall unused flags by
16387         calling set_Wunused.
16388
16389 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
16390
16391         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
16392         * init.c (dfs_vtable_path_unmark): Remove.
16393         * search.c (marked_new_vtable_p): Likewise.
16394         (unmarked_new_vtable_p): Likewise.
16395         (dfs_search_slot_nonempty_p): Likewise.
16396         (dfs_mark): Likewise.
16397         (dfs_vtable_path_unmark): Likewise.
16398         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
16399         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
16400         (dfs_init_vbase_pointers): Remove special-case new ABI code.
16401         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
16402         (init_vbase_pointers): Simplify.
16403         (expand_indirect_vtbls_init): Likewise.
16404
16405         * class.c (copy_virtuals): New function.
16406         (build_primary_table): Use it.
16407         (build_secondary_vtable): Likewise.
16408         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
16409         indicate that no vcall offset is required.
16410         (add_virtual_function): Likewise.
16411         (modify_all_vtables): Likewise.
16412         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
16413         (dfs_accumulate_vtbl_inits): Likewise.
16414         (build_vtbl_initializer): Make changes to handle construction
16415         vtables.
16416         (dfs_build_vcall_offset_vtbl_entries): Likewise.
16417         (build_rtti_vtbl_entries): Likewise.
16418         (build_vtable_entries): Handle a NULL vcall_index.
16419
16420 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
16421
16422         * decl2.c (lang_decode_option): Fix thinko.
16423
16424 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
16425
16426         * except.c (check_handlers): New fn.
16427         * cp-tree.h: Declare it.
16428         * semantics.c (finish_handler_sequence): Call it.
16429         (finish_function_handler_sequence): Likewise.
16430         (finish_handler_parms): Set TREE_TYPE on the handler.
16431         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
16432         * search.c (get_base_distance_recursive): If protect>1, ignore
16433         special access.
16434         (get_base_distance): Don't reduce watch_access.
16435
16436 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
16437
16438         * lex.c: #include diagnostic.h.
16439         (lang_init_options): Set default prefixing rules.
16440
16441         * lang-options.h: Add -fdiagnostics-show-location=.
16442
16443         * decl2.c: #include diagnostic.h.
16444         (lang_decode_option): Handle -fdiagnostics-show-location=.
16445
16446 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
16447
16448         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
16449         * vec.cc: Revert my 2000-05-07 change.
16450
16451 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
16452
16453         * class.c (check_field_decls): Complain about non-static data
16454         members with same name as class in class with constructor.
16455
16456 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
16457
16458         * decl.c (grokdeclarator): Allow non-static data members with
16459         same name as class.
16460
16461 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
16462
16463         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
16464         and pending_inline.filename.  Update prototypes.
16465         * decl.c (define_label): Constify filename parameter.
16466         * decl2.c (warn_if_unknown_interface): Constify local char *.
16467         * input.c Constify input_source.filename. Don't declare
16468         input_filename or lineno.  Constify filename parameter to feed_input.
16469         * lex.c (init_parse): Constify parameter and return value.
16470         (cp_pragma_interface, cp_pragma_implementation): Constify
16471         filename argument.
16472         (reinit_parse_for_method, reinit_parse_for_block,
16473         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
16474         Constify local char *.
16475         * pt.c: Don't declare lineno or input_filename.
16476         (print_template_context, tsubst_friend_function, tsubst_decl,
16477         tsubst, instantiate_decl): Constify local char *.
16478         * semantics.c (expand_body): Constify local char *.
16479         * tree.c (build_srcloc): Constify filename parameter.
16480         * typeck.c (c_expand_asm_operands): Constify filename
16481         parameter.
16482
16483 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
16484
16485         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
16486         offsetof expansion.
16487
16488 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
16489
16490         * inc/cxxabi.h:  Fix typos in comment.
16491         (__base_class_info::__offset): Use a static_cast.
16492
16493 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
16494
16495         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
16496         of std::size_t and std::ptrdiff_t respectively.
16497         * tinfo.cc: Likewise.
16498         * vec.cc: Likewise.
16499
16500 2000-05-06  Richard Henderson  <rth@cygnus.com>
16501
16502         * typeck.c (build_c_cast): Don't warn integer->pointer size
16503         mismatch for constants.
16504
16505 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
16506
16507         * rtti.c (ptmd_initializer): Set non-public, if class is
16508         incomplete.
16509
16510         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
16511         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
16512         __cxa_vec_delete): Likewise.
16513         * tinfo.cc (__dynamic_cast): Likewise.
16514         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
16515         __cxa_vec_delete): Likewise.
16516
16517 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
16518
16519         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
16520         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
16521         (lang_decl_flags): Add vcall_offset.
16522         (THUNK_VCALL_OFFSET): Use it.
16523         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
16524         * method.c (make_thunk): Create the lang_decl here, not in
16525         emit_thunk.
16526         (emit_thunk): Make generic thunks into ordinary functions once
16527         they have been fed to expand_body.
16528         * semantics.c (expand_body): Set current_function_is_thunk here.
16529
16530 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16531
16532         * class.c (update_vtable_entry_for_fn): Prototype.
16533
16534         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
16535         and `tmpl'.
16536
16537         * search.c (dfs_build_inheritance_graph_order): Prototype.
16538
16539 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
16540
16541         * cp-tree.h (special_function_kind): Add various kinds of
16542         destructors.
16543         (special_function_p): New function.
16544         * class.c (overrides): Don't let one kind of destructor override
16545         another.
16546         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
16547         whether or not to instantiate a template.
16548         * tree.c (special_function_p): Define.
16549
16550 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
16551
16552         * cp-tree.def (THUNK_DECL): Remove.
16553         * cp-tree.h (DECL_THUNK_P): New macro.
16554         (DECL_NON_THUNK_FUNCTION_P): Likewise.
16555         (DECL_EXTERN_C_FUNCTION_P): Likewise.
16556         (SET_DECL_THUNK_P): Likewise.
16557         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
16558         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
16559         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
16560         * decl.c (decls_match): Use DECL_EXTERN_C_P.
16561         (duplicate_decls): Likewise.
16562         (pushdecl): Likewise.  Adjust thunk handling.
16563         (grokfndecl): Use DECL_EXTERN_C_P.
16564         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
16565         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
16566         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
16567         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
16568         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
16569         DECL_NO_STATIC_CHAIN.
16570         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
16571         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
16572         * search.c (covariant_return_p): Remove THUNK_DECL handling.
16573         * ir.texi: Update.
16574
16575 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
16576
16577         * tree.c (walk_tree): Set lineno.
16578
16579 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
16580
16581         * exception.cc: Update license notice.
16582         * new.cc: Likewise.
16583         * new1.cc: Likewise.
16584         * new2.cc: Likewise.
16585         * tinfo.cc: Likewise.
16586         * tinfo2.cc: Likewise.
16587         * vec.cc: Likewise.
16588         * inc/cxxabi.h: Likewise.
16589         * inc/exception: Likewise.
16590         * inc/new: Likewise.
16591         * inc/new.h: Likewise.
16592         * inc/typeinfo: Likewise.
16593
16594 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
16595
16596         * tree.c (build_target_expr_with_type): If we already have a
16597         TARGET_EXPR, just return it.
16598
16599         * optimize.c (initialize_inlined_parameters): Don't generate an
16600         EXPR_STMT if we can just use DECL_INITIAL.
16601         * decl.c (emit_local_var): Only make the initialization a
16602         full-expression if stmts_are_full_exprs_p.
16603
16604 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
16605
16606         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
16607         macro.
16608         * call.c (standard_conversion): Use it.
16609         (direct_reference_binding): Likewise.
16610         (build_over_call): Likewise.
16611         (is_properly_derived_from): Likewise.
16612         (compare_ics): Likewise.
16613         * class.c (resolves_to_fixed_type_p): Likewise.
16614         * optimize.c (declare_return_variable): Likewise.
16615         * pt.c (is_specialization_of): Likewise.
16616         (unify): Likewise.
16617         * typeck.c (comp_target_parms): Likeiwse.
16618         (build_static_cast): Likewise.
16619         (build_reinterpret_cast): Likewise.
16620         (build_const_cast): Likewise.
16621         (comp_ptr_ttypes_real): Likewise.
16622         (comp_ptr_ttypes_const): Likewise.
16623         * typeck2.c (process_init_constructor): Likewise.
16624
16625 2000-04-30  Scott Snyder <snyder@fnal.gov>
16626
16627         * decl.c (finish_destructor_body): Use the base destructor when
16628         destroying virtual bases.
16629
16630 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
16631
16632         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
16633         STMT_EXPRs.
16634         * optimize.c (struct inline_data): Add target_exprs field.
16635         (declare_return_variable): When a function returns an aggregate,
16636         use the variable declared in the TARGET_EXPR as the remapped
16637         DECL_RESULT.
16638         (expand_call_inline): Update the pending target_exprs stack.
16639         (optimize_function): Initialize the stack.
16640
16641         * decl2.c (finish_file): Fix typo in comment.
16642
16643         * method.c (emit_thunk): Don't try to return a `void' value.
16644
16645         * optimize.c (initialize_inlined_parameters): If the parameter is
16646         addressable, we need to make a new VAR_DECL, even if the
16647         initializer is constant.
16648
16649 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
16650
16651         * decl.c (grok_op_properties): Add an extra check of argtypes.
16652
16653 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
16654
16655         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
16656         variables.
16657         (initialize_inlined_parameters): Try to avoid creating new
16658         VAR_DECLs.
16659
16660 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
16661
16662         * lex.c (my_get_run_time): Remove.
16663         (init_filename_times): Use get_run_time instead of my_get_run_time.
16664         (check_newline): Likewise.
16665         (dump_time_statistics): Likewise.
16666         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
16667         of computing elapsed time explicitly.
16668
16669 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
16670
16671         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
16672         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
16673         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
16674         before calling decl_constant_value.
16675         * class.c (check_bitfield_decl): Likewise.
16676         * cvt.c (ocp_convert): Likewise.
16677         (convert): Likewise.
16678         * decl.c (compute_array_index_type): Likewise.
16679         (build_enumerator): Likewise.
16680         * decl2.c (check_cp_case_value): Likewise.
16681         * pt.c (convert_nontype_argument): Likewise.
16682         (tsubst): Likewise.
16683         * typeck.c (decay_conversion): Likewise.
16684         (build_compound_expr): Likewise.
16685         (build_reinterpret_cast): Likewise.
16686         (build_c_cast): Likewise.
16687         (convert_for_assignment): Likewise.
16688
16689 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
16690
16691         * decl.c (finish_function): Don't play games with DECL_INLINE.
16692
16693 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
16694
16695         * ir.texi: Correct typo.
16696
16697 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16698
16699         * decl.c (grokdeclarator): Reject VLAs as members.
16700
16701 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
16702
16703         * call.c (standard_conversion): Accept conversion between
16704         COMPLEX_TYPEs.
16705
16706         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
16707
16708 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
16709
16710         * decl2.c (finish_file): Remove double setup for accounting
16711         compile time.
16712
16713 2000-04-24  Robert Lipe <robertlipe@usa.net>
16714
16715         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
16716
16717 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
16718
16719         * new.cc (set_new_handler): Needs to be in std::.
16720
16721 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
16722
16723         * cp-tree.h (lang_decl): Remove pretty_function_p.
16724         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
16725         language-specific node.
16726         * decl.c (cp_make_fname_decl): Use build_decl, not
16727         build_lang_decl, to build the variables.
16728         (grokvardecl): Don't call build_lang_decl for local variables in
16729         templates.
16730         (grokdeclarator): Don't call build_lang_decl for local type
16731         declarations in templates.
16732         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
16733         zero'd memory, rather than calling memset.
16734         * pt.c: Include hashtab.h.
16735         (local_specializations): New variable.
16736         (retrieve_local_specialization): Use it.
16737         (register_local_specialization): Likewise.
16738         (tsubst_decl): Don't assume local variables have
16739         DECL_LANG_SPECIFIC.
16740         (instantiate_decl): Set up local_specializations.
16741         * Makefile.in (HTAB_H): New variable.
16742
16743 2000-04-23  Richard Henderson  <rth@cygnus.com>
16744
16745         * typeck.c (c_expand_asm_operands): Restore the original
16746         contents of the output list.
16747
16748 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
16749
16750         * ir.texi:  Document complex number representation.
16751
16752 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
16753
16754         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
16755         (target_incomplete_p): New function.
16756         (tinfo_base_init): Create comdat NTBS name variable.
16757         (ptr_initializer): Add non_public parameter. Calculate it.
16758         (ptmd_initializer): Likewise.
16759         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
16760         (create_real_tinfo_var): Add non_public parameter. Use it.
16761         Push proxy into global namespace.
16762         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
16763         New enumeration.
16764         * inc/typeinfo (type_info::before, type_info::operator==):
16765         Compare __name addresses.
16766
16767         * tinfo2.cc: Remove new-abi builtins comment.
16768
16769 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
16770
16771         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
16772
16773         * call.c (joust): Exit early if we get the same function, too.
16774
16775         * decl2.c (key_method): Return NULL_TREE for template classes.
16776         (import_export_class): Don't need to check for template classes.
16777
16778 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
16779
16780         * lex.c: Remove references to cccp.c.
16781
16782 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
16783
16784         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
16785         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
16786         (DECL_DESTRUCTOR_P): Use destructor_attr.
16787         (DECL_CONST_MEMFUNC_P): Reimplement.
16788         (DECL_VOLATILE_MEMFUNC_P): Remove.
16789         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
16790         (overrides): Use DECL_DESTRUCTOR_P.
16791         (check_for_override): Likewise.
16792         * decl.c (start_function): Likewise.
16793         * decl2.c (grokfclassfn): Likewise.
16794         (check_classfn): Likewise.
16795         (grok_function_init): Likewise.
16796
16797 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
16798
16799         * decl2.c (grokfield): Issue error on illegal data member
16800         declaration.
16801
16802 2000-04-17  Mark P Mitchell  <mark@codesourcery.com>
16803
16804         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
16805
16806 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
16807
16808         * class.c (build_vtable_entry): Don't build thunks for type-info
16809         functions.
16810
16811 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
16812
16813         * decl.c (decls_match): Allow a redeclaration of a builtin to
16814         specify args while the builtin did not.
16815
16816 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
16817
16818         * cp-tree.def (THUNK_DECL): Add to documentation.
16819         * cp-tree.h (flag_huge_objects): Declare.
16820         * class.c (modify_vtable_entry): Tidy.
16821         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
16822         Calculate delta appropriately for the new ABI.
16823         (dfs_modify_vtables): Use it.
16824         (modify_all_vtables): Fix thinko in code to add overriding copies
16825         of functions to primary vtables.
16826         (build_clone): Fix typo in comment.
16827         (clone_function_decl): Correct order of destructors in vtable.
16828         (build_vbase_offset_vtbl_entries): Adjust comment.
16829         (dfs_vcall_offset_queue_p): Remove.
16830         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
16831         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
16832         (build_vtable_entry): Correct check for pure virtual functions.
16833         Don't declare flag_huge_objects.
16834         * decl.c (flag_huge_objects): Remove declaration.
16835         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
16836         Use int_size_in_bytes.
16837         (emit_thunk): Handle vcall offset thunks.
16838
16839 2000-04-15  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16840
16841         * decl2.c (parse_time, varconst_time): Delete declarations.
16842         (finish_file): Delete LINENO declaration.
16843         START_TIME and THIS_TIME now long.
16844
16845 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
16846
16847         * class.c (build_base_field): Reformat comment.
16848
16849         * inc/cxxabi.h (stddef.h): Comment inclusion.
16850         (__base_class_info::__offset): Comment shift.
16851
16852 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
16853
16854         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
16855         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
16856         (cp_push_exception_identifier): New macro.
16857         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
16858         (DECL_BASE_DESTRUCTOR_P): Likewise.
16859         (DECL_DELETING_DESTRUCTOR_P): Likewise.
16860         (get_vtbl_decl_for_binfo): Fix formatting.
16861         (in_charge_arg_for_name): New macro.
16862         (maybe_build_cleanup_and_delete): Remove declaration.
16863         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
16864         (in_charge_arg_for_name): New function.
16865         (build_new_method_call): Use it.  Handle cloned destructors.
16866         (build_clone): Don't make the base constructor virtual.
16867         Automatically defer generated functions.
16868         (clone_function_decl): Handle destructors, too.
16869         (clone_constructors_and_destructors): Likewise.
16870         (create_vtable_ptr): Don't create a vtable entry for a cloned
16871         function.
16872         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
16873         (initialize_predefined_identifiers): Update appropriately.
16874         (finish_destructor_body): Simplify.
16875         (maybe_build_cleanup_and_delete): Remove.
16876         * except.c (expand_throw): Handle new-ABI destructors.
16877         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
16878         (build_dtor_call): New function.
16879         (build_delete): Use it.  Simplify.
16880         * optimize.c (maybe_clone_body): Handle destructors.
16881         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
16882
16883         * exception.cc (cleanup_fn): New typedef.
16884         (CALL_CLEANUP): New macro.
16885         (cp_eh_info): Use them.
16886         (__cp_push_exception): Likewise.
16887         (__cp_pop_exception): Likewise.
16888
16889 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
16890
16891         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
16892         (complete_dtor_identifier): New macro.
16893         (CLASSTYPE_FIRST_CONVERSION): Remove.
16894         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
16895         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
16896         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
16897         (CLASSTYPE_CONSTRUCTORS): Likewise.
16898         (CLASSTYPE_DESTRUCTORS): Likewise.
16899         (lang_decl): Add cloned_function.
16900         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
16901         (DECL_BASE_CONSTRUCTOR_P): Likewise.
16902         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
16903         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
16904         (DECL_CLONED_FUNCTION_P): Likewise.
16905         (DECL_CLONED_FUNCTION): Likewise.
16906         (clone_function_decl): Declare.
16907         (maybe_clone_body): Likewise.
16908         * call.c (build_user_type_conversion_1): Call complete object
16909         constructors in the new ABI.
16910         (build_new_method_call): Don't add in-charge parameters under the
16911         new ABI.
16912         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
16913         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
16914         CLASSTYPE_DESTRUCTOR_SLOT.
16915         (build_clone): New function.
16916         (clone_function_decl): Likewise.
16917         (clone_constructors_and_destructors): Likewise.
16918         (check_bases_and_members): Use it.
16919         * decl.c (iniitialize_predefined_identifiers): Initialize
16920         complete_dtor_identifier.
16921         (finish_function): Don't add extra code to a clone.
16922         (lang_mark_tree): Mark cloned_function.
16923         * decl2.c (mark_used): Don't bother trying to instantiate things
16924         we synthesized.
16925         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
16926         * method.c (set_mangled_name_for_decl): Don't treat clones as
16927         constructors.
16928         (synthesize_method): Sythesize cloned functions, not the clones.
16929         * optimize.c (inline_data): Update comment on ret_label.
16930         (remap_block): Don't assume DECL_INITIAL exists.
16931         (copy_body_r): Allow ret_label to be NULL.
16932         (maybe_clone_body): Define.
16933         * pt.c (tsubst_decl): Handle clones.
16934         (instantiate_clone): New function.
16935         (instantiate_template): Use it.
16936         (set_mangled_name_for_template_decl): Don't treat clones as
16937         constructors.
16938         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
16939         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
16940         * semantics.c (expand_body): Clone function bodies as necessary.
16941
16942         * optimize.c (remap_decl): Avoid sharing structure for arrays
16943         whose size is only known at run-time.
16944         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
16945
16946         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
16947         to has_in_charge_parm_p.
16948         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
16949         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
16950         (DECL_COPY_CONSTRUCTOR_P): New macro.
16951         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
16952         (build_user_type_conversion_1): Likewise.
16953         (convert_like_real): Likewise.
16954         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
16955         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
16956         (copy_args_p): Likewise.
16957         (grok_ctor_properties): Likewise.
16958         (start_function): Likewise.
16959         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
16960         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
16961         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
16962         * method.c (do_build_copy_constructor): Use
16963         DECL_HAS_IN_CHARGE_PARM_P.
16964         (synthesize_method): Likewise.
16965         * pt.c (instantiate_template): Remove goto.
16966         * tree.c (build_cplus_method_type): Remove mention of obstacks in
16967         comment.
16968
16969         * cp-tre.h (finish_function): Change prototype.
16970         * decl.c (end_cleanup_fn): Adjust caller.
16971         (finish_function): Take only one parameter.
16972         * decl2.c (finish_objects): Adjust caller.
16973         (finish_static_storage_duration_function): Likewise.
16974         * method.c (emit_thunk): Likewise.
16975         * parse.y: Likewise.
16976         * parse.c: Regenerated.
16977         * pt.c (instantiate_decl): Likewise.
16978         * rtti.c (synthesize_tinfo_fn): Likewise.
16979         * semantics.c (expand_body): Likewise.
16980
16981         * cp-tree.h (copy_decl): New function.
16982         * class.c (finish_struct_1): Use it.
16983         * lex.c (copy_decl): Define it.
16984         * pt.c (tsubst_decl): Likewise.
16985         * tree.c (copy_template_template_parm): Likewise.
16986
16987         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
16988         has_nonpublic_assign_ref.
16989         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
16990         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
16991         * class.c (finish_struct_methods): Don't set
16992         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
16993         (interface_only): Don't declare.
16994         (interface_unknown): Likewise.
16995
16996 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16997
16998         * tree.h (HAVE_TEMPLATES): Remove definition.
16999         * lang-options.h (-fthis-is-variable): Remove documentation.
17000
17001 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
17002
17003         * class.c (instantiate_type): Handle object-relative template-id.
17004
17005         * semantics.c (finish_expr_stmt): Call convert_to_void here.
17006         * decl.c (cplus_expand_expr_stmt): Not here.
17007
17008         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
17009         Initialize exprtype earlier.
17010
17011         * parse.y (fn.def1): Check for defining types in return types.
17012
17013         * decl.c (check_tag_decl): Notice extra fundamental types.
17014         Diagnose empty decls in classes, too.
17015
17016         * decl.c (grokdeclarator): Don't override an anonymous name if no
17017         declarator was given.
17018
17019         * cvt.c (convert_to_void): Call resolve_offset_ref.
17020
17021         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
17022
17023         * decl2.c (decl_namespace): Handle getting a type.
17024
17025         * typeck.c (build_c_cast): Re-enable warning for cast between
17026         pointer and integer of different size.
17027
17028 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
17029
17030         * inc/cxxabi.h (__pointer_type_info): Add restrict and
17031         incomplete flags.
17032         (__pointer_type_info::__pointer_catch): New virtual function.
17033         (__pointer_to_member_type_info): Derive from
17034         __pointer_type_info. Adjust.
17035         (__pointer_to_member_type_info::__do_catch): Remove.
17036         (__pointer_to_member_type_info::__is_pointer_p): Declare.
17037         (__pointer_to_member_type_info::__pointer_catch): Declare.
17038         * rtti.c (qualifier_flags): Add restrict flag.
17039         (ptmd_initializer): Reorder members.
17040         (create_tinfo_types): Expand comments. Reorder
17041         ptmd_desc_type_node members.
17042         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
17043         Implement.
17044         (__pointer_type_info::__do_catch): Move specific code into
17045         __pointer_catch. Call it.
17046         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
17047         specific catch checking. Fix void conversion check.
17048         (__pointer_to_member_type_info::__do_catch): Remove.
17049         (__pointer_to_member_type_info::__pointer_catch): Implement.
17050
17051 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17052
17053         * lex.c (init_parse): Remove traces of classof and headof.
17054         * decl2.c (flag_operator_names): Default to 1.
17055         (lang_decode_option): Do not set it for -ansi.
17056
17057 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
17058
17059         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
17060         (DECL_MAIN_VARIANT): Remove.
17061         * decl.c (duplicate_decls): Don't set it.
17062         (start_function): Likewise.
17063         (lang_mark_tree): Don't mark it.
17064         * decl2.c (defer_fn): Don't use it.
17065         * lex.c (retrofit_lang_decl): Don't set it.
17066         * pt.c (tsubst_decl): Likewise.
17067         * ptree.c (print_lang_decl): Don't print it.
17068         * typeck.c (mark_addressable): Don't use it.
17069
17070 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
17071
17072         * vec.cc: Include <new> and <exception>.
17073         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
17074         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
17075         terminate.
17076         (__cxa_vec_delete): Catch dtor exceptions.
17077
17078 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
17079
17080         Prepend __ to implementation defined names.
17081         * inc/typeinfo (type_info): Rename _name to __name.
17082         (type_info::type_info): Rename parameter.
17083         (type_info::operator==, type_info::operator!=,
17084         type_info::before): Likewise.
17085         (type_info::is_pointer_p, type_info::is_function_p,
17086         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
17087         parameters.
17088         * inc/cxxabi.h
17089         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
17090         (__pointer_type_info::__pointer_type_info): Likewise.
17091         (__pointer_type_info::is_pointer_p,
17092         __pointer_type_info::do_catch): Prepend __. Rename parameters.
17093         (__array_type_info::__array_type_info): Rename parameters.
17094         (__function_type_info::__function_type_info): Likewise.
17095         (__function_type_info::is_function_p): Prepend __.
17096         (__enum_type_info::__enum_type_info): Rename parameters.
17097         (__pointer_to_member_type_info::__pointer_to_member_type_info):
17098         Likewise.
17099         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
17100         parameters.
17101         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
17102         (__class_type_info::__class_type_info): Rename parameters.
17103         (__class_type_info::sub_kind): Prepend __. Adjust member names.
17104         (__class_type_info::upcast_result,
17105         __class_type_info::dyncast_result): Prepend __. Move definition
17106         into tinfo.cc.
17107         (__class_type_info::do_upcast, __class_type_info::do_catch,
17108         __class_type_info::find_public_src,
17109         __class_type_info::do_dyncast,
17110         __class_type_info::do_find_public_src): Prepend __. Rename
17111         parameters.
17112         (__si_class_type_info::__si_class_type_info): Rename parameters.
17113         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
17114         __si_class_type_info::do_find_public_src): Prepent __. Rename
17115         parameters.
17116         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
17117         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
17118         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
17119         parameters.
17120         (__dynamic_cast): Rename parameters.
17121         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
17122         type_info::do_catch, type_info::do_upcast): Prepend __.
17123         (contained_p, public_p, virtual_p, contained_public_p,
17124         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
17125         (__class_type_info::do_catch,
17126         __class_type_info::do_upcast): Prepend __. Adjust.
17127         (__class_type_info::__upcast_result,
17128         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
17129         Adjust.
17130         (__class_type_info::find_public_src): Prepend __. Adjust.
17131         (__class_type_info::do_find_public_src,
17132         __si_class_type_info::do_find_public_src,
17133         __vmi_class_type_info::do_find_public_src): Likewise.
17134         (__class_type_info::do_dyncast,
17135         __si_class_type_info::do_dyncast,
17136         __vmi_class_type_info::do_dyncast): Likewise.
17137         (__class_type_info::do_upcast,
17138         __si_class_type_info::do_upcast,
17139         __vmi_class_type_info::do_upcast): Likewise.
17140         (__dynamic_cast): Adjust.
17141         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
17142         (__function_type_info::is_function_p): Likewise.
17143         (__pointer_type_info::do_catch): Likewise. Adjust.
17144         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
17145         (__throw_type_match_rtti_2): Adjust.
17146         (__is_pointer): Adjust.
17147
17148 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
17149
17150         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
17151         (complete_ctor_identifier): New macro.
17152         (special_function_kind): Add sfk_copy_constructor and
17153         sfk_assignment_operator.
17154         (LOOKUP_HAS_IN_CHARGE): Remove.
17155         (cons_up_default_function): Rename to ...
17156         (implicitly_declare_fn): ... this.
17157         * call.c (build_new_method_call): Add in-charge parameters for
17158         constructors here.
17159         * class.c (add_implicitly_declared_members): Change parameter name
17160         from cant_have_assignment to cant_have_const_assignment.
17161         Replace calls to cons_up_default_function to implicitly_declare_fn.
17162         * cvt.c (ocp_convert): Use complete_ctor_identifier.
17163         * decl.c (initialize_predefined_identifiers): Initialize it.
17164         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
17165         complex expression.
17166         * init.c (expand_default_init): Don't calculate the in-charge
17167         parameter here.
17168         (build_new_1): Likewise.
17169         * lex.c (cons_up_default_function): Move to method.c.
17170         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
17171         (implicitly_declare_fn): New function.
17172         * typeck.c (build_static_cast): Use complete_ctor_identifier.
17173         (build_modify_expr): Likewise.
17174         * typeck2.c (build_functional_cast): Likewise.
17175
17176         Under the new ABI, constructors don't return `this'.
17177         * cp-tree.h (warn_reorder): Declare.
17178         (special_function_kind): New enum.
17179         (global_base_init_list): Remove declaration.
17180         (emit_base_init): Don't return a value.
17181         (check_base_init): Don't declare.
17182         (is_aggr_typedef): Likewise.
17183         * decl.c (check_special_function_return_type): New function.
17184         (return_types): Remove.
17185         (grokdeclarator): Use check_special_function_return_type.
17186         (start_function): Don't initialize ctor_label under the new ABI.
17187         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
17188         * init.c (begin_init_stmts): Move to top of file.
17189         (finish_init_stmts): Likewise.
17190         (warn_reorder): Don't declare.
17191         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
17192         value.
17193         (check_base_init): Remove.
17194         (is_aggr_typedef): Likewise.
17195         (build_new_1): Don't use the return value of a constructor.
17196         * semantics.c (setup_vtbl_ptr): Don't use the return value
17197         of emit_base_init.
17198         * typeck.c (check_return_expr): Don't magically convert return
17199         statements into `return this' in constructors under the new ABI.
17200
17201         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
17202         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
17203         (base_ctor_identifier): New macro.
17204         (base_dtor_identifier): Likewise.
17205         (deleting_dtor_identifier): Likewise.
17206         * decl.c: Don't include obstack.h.
17207         (obstack_chunk_alloc): Don't define.
17208         (obstack_chunk_free): Likewise.
17209         (struct predefined_identifier): New type.
17210         (initialize_predefined_identifiers): New function.
17211         (init_decl_processing): Use it.
17212         (debug_temp_inits): Remove.
17213         (start_method): Don't call preserve_data.
17214         (hack_incomplete_structures): Update comment.
17215         * init.c (init_init_processing): Don't initialize
17216         nelts_identifier.
17217         (build_offset_rf): Remove dead code.
17218         (build_delete): Use CLASSTYPE_N_BASECLASSES.
17219         * search.c (init_search_processing): Don't initialize
17220         vptr_identifier.
17221
17222 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17223
17224         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
17225         some sign_compare warnings.
17226
17227 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
17228
17229         Rename abi::__vmi_class_type_info members.
17230         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
17231         base_list, detail_masks members to vmi_flags, vmi_base_count,
17232         vmi_bases and vmi_flags_masks respectively.
17233         (__vmi_class_type_info::vmi_flags_masks): Rename
17234         details_unknown_mask to flags_unknown_mask.
17235         * tinfo.cc (__class_type_info::do_upcast): Adjust.
17236         (__vmi_class_type_info::do_find_public_src): Adjust.
17237         (__vmi_class_type_info::do_dyncast): Adjust.
17238         (__vmi_class_type_info::do_upcast): Adjust.
17239
17240 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
17241
17242         * tinfo.cc (convert_to_base): New function.
17243         (get_vbase_offset): Remove. Move into convert_to_base.
17244         (__vmi_class_type_info::do_find_public_src): Adjust.
17245         (__vmi_class_type_info::do_dyncast): Adjust.
17246         (__vmi_class_type_info::do_upcast): Adjust.
17247
17248 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
17249
17250         * tinfo.cc (operator=): Use __builtin_strcmp.
17251         * tinfo2.cc (before): Likewise.
17252
17253 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
17254
17255         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
17256         (DECL_SAVED_INLINE): Rename to ...
17257         (DECL_DEFERRED_FN): ... this.
17258         (in_function_p): Remove declaration.
17259         (mark_inline_for_output): Rename to ...
17260         (defer_fn): ... this.
17261         * decl.c (finish_function): Adjust call to mark_inline_for_output.
17262         (in_function_p): Remove definition.
17263         * decl2.c (saved_inlines): Rename to ...
17264         (deferred_fns): ... this.
17265         (saved_inlines_used): Rename to ...
17266         (deferred_fns_used): ... this.
17267         (mark_inline_for_output): Rename to ...
17268         (defer_fn): ... this.
17269         (finish_file): Adjust accordingly.
17270         (init_decl2): Likewise.
17271         * lex.c (cons_up_default_function): Likewise.
17272         * pt.c (mark_decl_instantiated): Likewise.
17273         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
17274         circumstances.
17275         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
17276         * semantics.c (expand_body): Defer more functions.
17277
17278 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
17279
17280         * vec.cc: New file.
17281         * Make-lang.in (CXX_LIB2FUNCS): Add it.
17282         (vec.o): Build it.
17283         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
17284         __cxa_vec_delete): Declare.
17285
17286 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
17287
17288         * rtti.c (dfs_class_hint_mark): New static function.
17289         (dfs_class_hint_unmark): New static function.
17290         (class_hint_flags): Use them.
17291
17292 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
17293
17294         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
17295
17296 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
17297
17298         * cp-tree.h (instantiate_decl): Change prototype.
17299         * decl2.c (mark_used): Adjust call.
17300         * optimize.c (inlinable_function_p): Adjust handling of templates.
17301         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
17302         (do_type_instantiation): Likewise.
17303         (instantiate_decl): Defer more templates.
17304         (instantiate_pending_templates): Adjust logic to handle inline
17305         friend functions.
17306
17307         * Makefile.in (GGC_H): New variable.  Use it throughout in place
17308         of ggc.h.
17309
17310         * call.c: Don't include obstack.h.  Include ggc.h.
17311         (obstack_chunk_alloc): Don't define.
17312         (obstack_chunk_free): Likewise.
17313         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
17314         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
17315         (pop_switch): Free it.
17316
17317         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
17318
17319         * dump.c (dequeue_and_dump): Don't try to print the bit_position
17320         if we don't have a DECL_FIELD_OFFSET.
17321
17322 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
17323
17324         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
17325         special_function_p.
17326
17327 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17328
17329         * cfns.gperf (hash, libc_name_p): Prototype.
17330
17331         * rtti.c (build_dynamic_cast_1): Constification.
17332
17333         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
17334
17335         * semantics.c (deferred_type_access_control): Prototype.
17336
17337 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
17338
17339         Correct many new ABI issues regarding vbase and vcall offset
17340         layout.
17341         * cp-tree.h (BINFO_VTABLE): Document.
17342         (struct lang_type): Tweak formatting.
17343         (BINFO_PRIMARY_BINFO): Add to documentation.
17344         (CLASSTYPE_VSIZE): Fix typo in comment.
17345         (CLASSTYPE_VBASECLASSES): Update documentation.
17346         (BINFO_VBASE_MARKED): Remove.
17347         (SET_BINFO_VBASE_MARKED): Likewise.
17348         (CLEAR_BINFO_VBASE_MARKED): Likewise.
17349         (BINFO_FIELDS_MARKED): Remove.
17350         (SET_BINFO_FIELDS_MARKED): Likewise.
17351         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
17352         (enum access_kind): New enumeration.
17353         (num_extra_vtbl_entries): Remove declaration.
17354         (size_extra_vtbl_entries): Likewise.
17355         (get_vtbl_decl_for_binfo): New function.
17356         (dfs_vbase_unmark): Remove declaration.
17357         (mark_primary_bases): Likewise.
17358         * class.c (SAME_FN): Remove.
17359         (struct vcall_offset_data_s): Move definition.
17360         (build_vbase_pointer): Use `build', not `build_binary_op', to
17361         access the vbase pointer under the new ABI.
17362         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
17363         (build_primary_vtable): Likewise.
17364         (dfs_mark_primary_bases): Move here from search.c.
17365         (mark_primary_bases): Likewise.
17366         (determine_primary_bases): Under the new ABI, don't make a base
17367         class a primary base just because we don't yet have any virtual
17368         functions.
17369         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
17370         (num_vfun_entries): Remove.
17371         (dfs_count_virtuals): Likewise.
17372         (num_extra_vtbl_entries): Likewise.
17373         (size_extra_vtbl_entries): Likewise.
17374         (layout_virtual_bases): Iterate in inheritance graph order under
17375         the new ABI.
17376         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
17377         indicate that a vfield is present.
17378         (init_class_processing): Initialize access_public_node, etc., from
17379         ak_public, etc.
17380         (get_vtbl_decl_for_binfo): New function.
17381         (dump_class_hierarchy_r): Likewise.
17382         (dump_class_hierarchy): Use it.
17383         (finish_vtbls): Build the vtbls in inheritance graph order.
17384         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
17385         (initialize_vtable): Use get_vtbl_decl_for_binfo.
17386         (accumulate_vtbl_inits): Add comments explaining why a pre-order
17387         walk is required.
17388         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
17389         where the vptr points, even for primary vtables.
17390         (build_vtbl_initializer): Adjust handling of vbase and vcall
17391         offsets.
17392         (build_vcall_and_vbase_vtable_entries): New function.
17393         (dfs_build_vbase_offset_vtbl_entries): Remove.
17394         (build_vbase_offset_vtbl_entries): Reimplement.
17395         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
17396         were already handled in a primary base class vtable.
17397         (build_vcall_offset_vtbl_entries): Adjust.
17398         (build_rtti_vtbl_entries): Adjust.
17399         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
17400         * init.c (expand_virtual_init): Simplify.
17401         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
17402         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
17403         * search.c (BINFO_ACCESS): New macro.
17404         (SET_BINFO_ACCESS): Likewise.
17405         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
17406         (access_in_type): Likewise.
17407         (dfs_accessible_p): Likewise.
17408         (protected_accessible_p): Likewise.
17409         (lookup_fnfields_1): Adjust documentation.
17410         (dfs_mark_primary_bases): Move to class.c
17411         (mark_primary_bases): Likewise.
17412         (dfs_vbase_unmark): Remove.
17413         (virtual_context): Use BINFO_FOR_VBASE.
17414         (dfs_get_vbase_types): Simplify.
17415         (dfs_build_inheritance_graph_order): New function.
17416         (get_vbase_types): Use it.
17417         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
17418
17419         * tinfo.cc (get_vbase_offset): New function.
17420         (__vmi_class_type_info::do_find_public_src): Use it.
17421         (__vmi_class_type_info::do_dyncast): Likewise.
17422         (__vmi_class_type_info::do_upcast): Likewise.
17423
17424 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
17425
17426         * lang-specs.h: Pass -fno-show-column to the preprocessor.
17427
17428 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
17429
17430         * rtti.c (class_hint_flags): Rename flags.
17431         (class_initializer): Remove flags.
17432         (synthesize_tinfo_var): Combine offset and flags. Add flags
17433         for __vmi_class_type_info.
17434         (create_tinfo_types): Remove flags from __class_type_info and
17435         __si_class_type_info. Merge flags and offset from
17436         base_class_type_info.
17437         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
17438         (__base_class_info::is_virtual_p): Adjust.
17439         (__base_class_info::is_public_p): Adjust.
17440         (__base_class_info::offset): New accessor.
17441         (__class_type_info::details): Remove member.
17442         (__class_type_info::__class_type_info): Lose details.
17443         (__class_type_info::detail_masks): Remove.
17444         (__si_class_type_info::__si_class_type_info): Lose details.
17445         (__vmi_class_type_info::details): New member.
17446         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
17447         (__vmi_class_type_info::detail_masks): New member.
17448         * tinfo.cc (__class_type_info::do_upcast): Initialize result
17449         with unknown_details_mask.
17450         (__vmi_class_type_info::do_find_public_src): Adjust
17451         (__vmi_class_type_info::do_dyncast): Adjust.
17452         (__vmi_class_type_info::do_upcast): Set result details, if
17453         needed. Adjust.
17454         (__dynamic_cast): Temporarily #if out optimization.
17455
17456 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
17457
17458         * rtti.c (get_tinfo_decl): Mark used.
17459         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
17460         mark as dealt with, if we output it.
17461
17462 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
17463
17464         * class.c: Reorganize to put virtual function table initialization
17465         machinery at the end of the file.
17466
17467 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
17468
17469         * class.c (finish_struct): Use bitsize_zero_node.
17470         * pt.c (instantiate_class_template): Likewise.
17471
17472 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
17473
17474         Put RTTI entries at negative offsets in new ABI.
17475         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
17476         vbase offset at index -3, not -1.
17477         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
17478         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
17479         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
17480         (build_rtti_vtbl_entries): New function.
17481         (set_rtti_entry): Remove.
17482         (build_primary_vtable): Don't use it.
17483         (build_secondary_vtable): Likewise.
17484         (start_vtable): Remove.
17485         (first_vfun_index): New function.
17486         (set_vindex): Likewise.
17487         (add_virtual_function): Don't call start_vtable.  Do call
17488         set_vindex.
17489         (set_primary_base): Rename parameter.
17490         (determine_primary_base): Likewise.
17491         (num_vfun_entries): Don't use skip_rtti_stuff.
17492         (num_extra_vtbl_entries): Include RTTI information.
17493         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
17494         (skip_rtti_stuff): Remove.
17495         (dfs_modify_vtables): Don't use it.
17496         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
17497         (layout_nonempty_base_or_field): Update size handling.
17498         (create_vtable_ptr): Tweak.
17499         (layout_class_type): Adjust parameter names.
17500         (finish_struct_1): Simplify.
17501         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
17502         (skip_rtti_stuff): Remove.
17503         (first_vfun_index): New function.
17504         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
17505         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
17506         (marked_vtable_pathp): Declare.
17507         (unmarked_vtable_pathp): Likewise.
17508         * error.c (dump_expr): Use first_vfun_index to calculate vtable
17509         offsets.
17510         * rtti.c (build_headof): Look for RTTI at negative offsets.
17511         (get_tinfo_decl_dynamic): Likewise.
17512         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
17513         here.
17514         (create_pseudo_type_info): Do it here instead.  Adjust so that
17515         vptr points at first virtual function.
17516         * search.c (marked_vtable_pathp): Make it global.
17517         (unmarked_vtable_pathp): Likewise.
17518         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
17519         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
17520         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
17521         (get_pure_virtuals): Likewise.
17522         (expand_upcast_fixups): Likewise.
17523         * tree.c (debug_binfo): Likewise.
17524         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
17525         negative offset.
17526
17527 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17528
17529         * class.c (check_field_decl): Fix typo.
17530         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
17531         (check_methods): Likewise.
17532         (check_field_decls): Likewise.
17533         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
17534         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
17535         Use DECL_RESULT_FLD, not DECL_RESULT.
17536         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
17537         * lex.c (identifier_type): Likewise.
17538         * pt.c (determine_specialization, lookup_template_class): Likewise.
17539         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
17540         (resolve_overloaded_unification, more_specialized): Likewise.
17541         * semantics.c (finish_member_declaration): Likewise.
17542         * typeck.c (build_x_function_call): Likewise.
17543
17544 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
17545
17546         * class.c (layout_empty_base): Handle empty bases with non-byte
17547         alignment.
17548         (build_base_field): Likewise.
17549         (layout_virtual_bases): Likewise.
17550
17551         * class.c (finish_struct_1): Fix typo in this change:
17552
17553         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17554
17555 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
17556
17557         * decl.c (grokdeclarator): Count partial specializations when
17558         keeping track of how many template classes have been seen.
17559
17560         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
17561
17562 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17563
17564         * class.c (build_vbase_pointer_fields): layout_field now place_field.
17565         (get_vfield_offset): Use byte_position.
17566         (set_rtti_entry): Set OFFSET to ssizetype zero.
17567         (get_binfo_offset_as_int): Deleted.
17568         (dfs_record_base_offsets): Use tree_low_cst.
17569         (dfs_search_base_offsets): Likewise.
17570         (layout_nonempty_base_or_field): Reflect changes in RLI format
17571         and call byte_position.
17572         (layout_empty_base): Convert offset to ssizetype.
17573         (build_base_field): use rli_size_unit_so_far.
17574         (dfs_propagate_binfo_offsets): Do computation in proper type.
17575         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
17576         (layout_class_type): Reflect changes in RLI names and fields.
17577         (finish_struct_1): Set DECL_FIELD_OFFSET.
17578         * dump.c (dequeue_and_dump): Call bit_position.
17579         * expr.c (cplus_expand_constant): Use byte_position.
17580         * rtti.c (expand_class_desc): Use bitsize_one_node.
17581         * typeck.c (build_component_addr): Use byte_position and don't
17582         special case for zero offset.
17583
17584 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
17585
17586         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
17587
17588         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
17589         tinfo object.
17590         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
17591         vtable.
17592
17593 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
17594
17595         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
17596         DECL_P macros.
17597         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
17598         make_typename_type, check_initializer, cp_finish_decl,
17599         xref_tag): Likewise.
17600         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
17601         decl_namespace, arg_assoc_template_arg, arg_assoc,
17602         validate_nonmember_using_decl, do_class_using_decl): Likewise.
17603         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
17604         args_to_string): Likewise.
17605         * friend.c (is_friend): Likewise.
17606         * lex.c (note_got_semicolon, note_list_got_semicolon,
17607         is_global): Likewise.
17608         * method.c (build_overload_nested_name, build_overload_value,
17609         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
17610         * parse.y (typename_sub, typename_sub1): Likewise.
17611         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
17612         process_partial_specialization, convert_template_argument,
17613         template_args_equal, add_pending_template, lookup_template_class,
17614         for_each_template_parm_r, maybe_fold_nontype_arg,
17615         tsubst, instantiate_template, type_unification_real, unify,
17616         instantiate_pending_templates, set_mangled_name_for_template_decl):
17617         Likewise.
17618         * repo.c (repo_get_id, repo_template_used): Likewise.
17619         * search.c (lookup_field_1): Likewise.
17620         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
17621         * xref.c (classname): Likewise.
17622
17623 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
17624
17625         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
17626         (CANONICAL_BINFO): New macro.
17627         (BINFO_NEW_VTABLE_MARKED): Use it.
17628         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
17629         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
17630         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
17631         not TREE_TYPE.
17632         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
17633         (build_secondary_vtable): Likewise.
17634         (dfs_finish_vtbls): Likewise.
17635         (dfs_accumulate_vtbl_inits): Likewise.
17636         (accumulate_vtbl_inits): New function.
17637         (finish_vtbls): Make sure that virtual bases come after
17638         non-virtual bases in the vtable group.
17639         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
17640         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
17641         * search.c (struct vbase_info): Move definition.
17642         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
17643         (unmarked_new_vtable_p): Likewise.
17644         (dfs_mark_vtable_path): Remove.
17645         (dfs_mark_new_vtable): Remove.
17646         (dfs_unmark_new_vtable): Likewise.
17647         (dfs_clear_search_slot): Likewise.
17648         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
17649         (dfs_clear_vbase_slots): Likewise.
17650         (init_vbase_pointers): LIkewise.
17651
17652 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
17653
17654         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
17655         SIZETYPE to a non-SIZETYPE.
17656
17657 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
17658
17659         * class.c (layout_virtual_bases): Adjust names in conditionally
17660         compiled code.
17661
17662         * class.c (record_base_offsets): New function.
17663         (layout_conflict_p): Likewise.
17664         (layout_nonempty_base_or_field): Use it.
17665         (layout_empty_base): New function.
17666         (build_base_field): Use it.
17667         (build_base_fields): Update comment.
17668         (layout_virtual_bases): Fold in a little code form
17669         layout_basetypes.  Use layout_empty_base.
17670         (layout_basetypes): Remove.
17671         (end_of_class): New function.
17672         (layout_class_type): Use it.  Adjust.
17673
17674         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
17675         (fntype_p): Remove.
17676         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
17677         comment.
17678         (dfs_skip_nonprimary_vbases_markedp): Likewise.
17679         * typeck.c (fntype_p): Remove.
17680
17681         * cp-tree.h (TI_SPEC_INFO): Remove.
17682         (CLASSTYPE_TI_SPEC_INFO): Likewise.
17683         * pt.c (process_partial_specialization): Likewise.
17684
17685         * class.c (build_base_field): Fix thinko in computation of binfo
17686         offsets.
17687
17688         * tree.c (mark_local_for_remap_p): Mark variables declared in
17689         TARGET_EXPRs as well.
17690
17691 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
17692
17693         * typeck.c (require_complete_type, complete_type,
17694         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
17695         build_array_ref, convert_arguments, pointer_diff,
17696         build_x_unary_op, build_unary_op, build_c_cast,
17697         build_modify_expr): Use COMPLETE_TYPE_P etc.
17698         * call.c (is_complete, convert_like_real,
17699         build_new_method_call): Likewise.
17700         * class.c (build_vbase_pointer_fields, check_bases,
17701         build_base_field, finish_struct_1, pushclass): Likewise.
17702         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
17703         * decl.c (maybe_process_template_type_declaration, pushtag,
17704         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
17705         layout_var_decl, check_initializer, cp_finish_decl,
17706         grokdeclarator, require_complete_types_for_parms,
17707         grok_op_properties, xref_tag, xref_basetypes,
17708         check_function_type): Likewise.
17709         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
17710         * friend.c (do_friend): Likewise.
17711         * init.c (build_offset_ref): Likewise.
17712         * parse.y (structsp): Likewise.
17713         * pt.c (maybe_process_partial_specialization,
17714         tsubst_friend_function, instantiate_class_template, tsubst,
17715         do_type_instantiation, instantiate_pending_templates): Likewise.
17716         * repo.c (repo_get_id): Likewise.
17717         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
17718         synthesize_tinfo_var, emit_support_tinfos): Likewise.
17719         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
17720         * semantics.c (begin_class_definition): Likewise.
17721         * tree.c (build_cplus_method_type): Likewise.
17722         * typeck2.c (digest_init, build_functional_cast,
17723         add_exception_specifier): Likewise.
17724         * parse.h, parse.c: Regenerated.
17725
17726 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
17727
17728         * inc/cxxabi.h: New header file. Define new-abi entry points.
17729         (__pointer_type_info::target): Rename member to ...
17730         (__pointer_type_info::type): ... here.
17731         (__base_class_info::type): Rename member to ...
17732         (__base_class_info::base): ... here.
17733         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
17734         * cp-tree.h (CPTI_ABI): New global tree enumeration.
17735         (abi_node): New global tree node.
17736         * decl.c (abi_node): Document.
17737         (init_decl_processing): Initialize abi_node.
17738         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
17739         (get_vmi_pseudo_type_info): Likewise.
17740         (create_tinfo_types): Likewise.
17741         (emit_support_tinfos): Likewise.
17742         * tinfo.h (cxxabi.h): Include for new-abi.
17743         Move rtti class definitions to new header file.
17744         * tinfo.cc (abi): Use the namespace.
17745         (std): Move new abi rtti classes from here ...
17746         (__cxxabiv1): ... to here.
17747         * tinfo2.cc (cxxabi.h): Include for new-abi.
17748         Move rtti class definitions to new header file.
17749         (std): Move new abi rtti classes from here ...
17750         (__cxxabiv1): ... to here.
17751         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
17752         namespace.
17753
17754 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
17755             Jason Merrill  <jason@casey.cygnus.com>
17756
17757         * method.c (build_overload_int): Use host_integerp.
17758
17759 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
17760
17761         * init.c (build_offset_ref): Handle the case of a templated member
17762         function.
17763
17764 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17765
17766         * except.c (expand_exception_blocks): Clear catch_clauses_last.
17767
17768 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
17769
17770         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
17771         * class.c (check_bitfield_decl): Turn illegal bitfields into
17772         non-bitfields.
17773         (dfs_propagate_binfo_offsets): Adjust for new size_binop
17774         semantics.
17775         (dfs_offset_for_unshared_vbases): Likewise.
17776         * cvt.c (cp_convert_to_pointer): Convert NULL to a
17777         pointer-to-member correctly under the new ABI.
17778         * expr.c (cplus_expand_constant): Don't use cp_convert when
17779         turning an offset into a pointer-to-member.
17780         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
17781         when dereferencing them under the new ABI.
17782         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
17783         of pointers-to-members under the new ABI.
17784
17785         * class.c (check_bitfield_decl): Remove restriction on really long
17786         bitfields.
17787         (layout_class_type): Implement new ABI handling of bitfields
17788         longer than their types.
17789
17790 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17791
17792         * parse.y (extdefs): Call ggc_collect.
17793         * parse.c: Regenerated.
17794
17795 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
17796
17797         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
17798         (note_name_declared_in_class): Use OVL_CURRENT to get at a
17799         potential overload.
17800
17801 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17802
17803         * class.c (build_vbase_path): Use integer_zerop.
17804         (build_vtable_entry): Use tree_low_cst.
17805         (get_vfield_offset): Use bit_position.
17806         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
17807         Use tree_low_cst.
17808         (check_bitfield_decl): Set DECL_SIZE using convert.
17809         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
17810         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
17811         Use tree_low_cst.
17812         (finish_struct_1): Use bit_position.
17813         (dump_class_hierarchy): Use tree_low_cst.
17814         * cp-tree.h (min_precision): Add declaration.
17815         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
17816         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
17817         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
17818         * expr.c (cplus_expand_constant): Use bit_position.
17819         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
17820         * rtti.c (get_base_offset): Use bit_position.
17821         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
17822         host_integerp, and tree_low_cst.
17823         (pointer_int_sum): Use integer_zerop.
17824         (build_component_addr): Use bit_position.
17825
17826 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
17827
17828         * typeck.c (require_complete_type): Don't assume size_zero_node.
17829         (complete_type_or_else): Likewise.
17830
17831 2000-03-16  Steven Grady <grady@digitaldeck.com>
17832             Jason Merrill  <jason@casey.cygnus.com>
17833
17834         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
17835
17836 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
17837
17838         * decl2.c (grokfield): Bail out if type is error_mark_node.
17839
17840 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
17841
17842         * tinfo2.cc (__ptr_to_member_data): Rename to ...
17843         (__pointer_to_member_data): ... here. Adjust.
17844         * rtti.c (create_tinfo_types): Adjust.
17845
17846 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
17847
17848         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
17849         * decl.c (ref_desc_type_node): Undocument.
17850         * rtti.c (ptr_ref_initializer): Rename to ...
17851         (ptr_initializer): ... here. Adjust comments.
17852         (ptmd_initializer): Fix comment thinko.
17853         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
17854         (create_tinfo_types): Remove ref_desc_type_node init.
17855         * tinfo2.cc (__reference_type_info): Remove.
17856
17857 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
17858
17859         * decl.c (cp_finish_decl): Remove obsolete comment.
17860
17861         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
17862
17863 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
17864
17865         * cp-tree.h: Tweak documentation.
17866         * class.c (build_vbase_pointer_fields): Layout the fields, too.
17867         (avoid_overlap): Remove.
17868         (get_binfo_offset_as_int): New function.
17869         (dfs_serach_base_offsets): Likewise.
17870         (layout_nonempty_base_or_field): Likewise.
17871         (build_base_field): Layout fields here.  Avoid placing two objects
17872         of the same type at the same address, under the new ABI.
17873         (build_base_fields): Adjust accordingly.
17874         (create_vtable_ptr): Return the new field, but don't attach it to
17875         TYPE_FIELDS.
17876         (remove_base_field): Remove.
17877         (remove_base_fields): Remove.
17878         (layout_basetypes): Adjust accordingly.
17879         (layout_class_type): Call layout_field for each field, rather than
17880         just making a wholesale call to layout_type.
17881
17882 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
17883
17884         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
17885
17886 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
17887
17888         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
17889
17890         * except.c (dtor_nothrow): New fn.
17891         (do_pop_exception): Use it.  Take type parm.
17892         (push_eh_cleanup): Take type parm.
17893         (expand_start_catch_block): Pass it.
17894         (build_eh_type_type_ref): Accept null type.
17895
17896 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
17897
17898         * cp-tree.h (revert_static_member_fn): Change prototype.
17899         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
17900         (grok_op_properties): Likewise.
17901         (start_function): Likewise.
17902         (revert_static_member_fn): Simplify.
17903         * pt.c (check_explicit_specialization): Adjust call to
17904         revert_static_member_fn.
17905
17906 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
17907
17908         * cp-tree.h (scope_kind): New type.
17909         (tmpl_spec_kind): Likewise.
17910         (declare_pseudo_global_level): Remove.
17911         (pseudo_global_level_p): Rename to template_parm_scope_p.
17912         (pushlevel): Remove declaration.
17913         (begin_scope): New function.
17914         (finish_scope): Likewise.
17915         (current_tmpl_spec_kind): Likewise.
17916         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
17917         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
17918         Add template_spec_p.
17919         (toplevel_bindings_p): Adjust.
17920         (declare_pseudo_global_level): Remove.
17921         (pseudo_global_level_p): Rename to template_parm_scope_p.
17922         (current_tmpl_spec_kind): New function.
17923         (begin_scope): Likewise.
17924         (finish_scope): Likewise.
17925         (maybe_push_to_top_level): Adjust.
17926         (maybe_process_template_type_declaration): Likewise.
17927         (pushtag): Likewise.
17928         (pushdecl_nonclass_level): Likewise.
17929         (lookup_tag): Likewise.
17930         (grokfndecl): Handle member template specializations.  Share
17931         constructor and non-constructor code.
17932         * decl2.c (check_classfn): Handle member template specializations.
17933         * pt.c (begin_template_parm_list): Use begin_scope.
17934         (begin_specialization): Likewise.
17935         (end_specialization): Likewise.
17936         (check_explicit_specialization): Use current_tmpl_spec_kind.
17937         Handle member template specializations.
17938         (end_template_decl): Use finish_scope.  Remove call to
17939         get_pending_sizes.
17940         (push_template_decl_real): Remove bogus error message.
17941         (tsubst_decl): Fix typo in code contained in comment.
17942         (instantiate_template): Handle member template specializations.
17943         (most_general_template): Likewise.
17944
17945 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
17946
17947         * lex.c (whitespace_cr): Compress consecutive calls to warning().
17948         (do_identifier): Ditto for error().
17949
17950         * pt.c (convert_nontype_argument): Ditto for cp_error().
17951         (convert_template_argument): Ditto for cp_pedwarn().
17952
17953 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
17954
17955         * exception.cc (__check_null_eh_spec): New fn.
17956         * except.c (expand_end_eh_spec): Call it if the spec is throw().
17957
17958 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
17959
17960         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
17961         * except.c (expand_end_eh_spec): Add the return type.
17962         * rtti.c (throw_bad_cast): Add the parmtypes.
17963         (throw_bad_typeid): Likewise.
17964
17965         * semantics.c (expand_stmt): Only leave out rtl for unused
17966         artificials, and set DECL_IGNORED_P on them as well.
17967         * decl.c (wrapup_globals_for_namespace): Likewise.
17968
17969 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
17970
17971         * decl.c (maybe_commonize_var): Skip all artificial decls.
17972         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
17973
17974 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
17975
17976         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
17977         * cp-tree.h: Declare flag_enforce_eh_specs.
17978         * decl.c (store_parm_decls, finish_function): Check it.
17979
17980         C library functions don't throw.
17981         * Makefile.in (cfns.h): New target.
17982         (except.o): Depend on it.
17983         * Make-lang.in (cc1plus): Depend on cfns.gperf.
17984         * cfns.gperf: New file.
17985         * cfns.h: Generated.
17986         * except.c: Include it.
17987         (nothrow_libfn_p): New fn.
17988         * decl.c (grokfndecl): Use it.
17989         * cp-tree.h: Declare it.
17990
17991         * decl.c (push_overloaded_decl_1, auto_function,
17992         define_function): Lose.
17993         (build_library_fn_1): New static fn.
17994         (builtin_function): Use it.
17995         (get_atexit_node): Use build_library_fn_ptr.
17996         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
17997         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
17998         push_void_library_fn, push_throw_library_fn): New fns.
17999         * cp-tree.h: Declare them.
18000         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
18001         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
18002         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
18003         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
18004         * rtti.c (build_runtime_decl): Lose.
18005         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
18006         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
18007         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
18008
18009         * call.c (build_call): Remove result_type parm.
18010         Call mark_used on unused artificial fns.
18011         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
18012
18013 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
18014
18015         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
18016         appropriate.
18017         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
18018         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
18019         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
18020         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
18021         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
18022         expand_generic_desc): Likewise.
18023
18024 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
18025
18026         * exception.cc (__cp_pop_exception): Cleanup the original object.
18027
18028 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
18029
18030         * decl.c (grok_op_properties): Merge conversion to void warning
18031         with other silly op warnings.
18032
18033 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
18034
18035         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
18036         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
18037
18038 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
18039
18040         * decl.c (cp_make_fname_decl): New function.
18041         (wrapup_globals_for_namespace): Don't emit unused static vars.
18042         (init_decl_processing): Remove comment about use of
18043         array_domain_type. Set make_fname_decl.
18044         (cp_finish_decl): Remove __FUNCTION__ nadgering.
18045         * semantics.c (begin_compound_stmt): Remove
18046         current_function_name_declared flagging.
18047         (expand_stmt): Don't emit unused local statics.
18048         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
18049         specially.
18050
18051 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
18052
18053         * typeck.c (convert_for_assignment): Don't look at array
18054         initializer.
18055         * call.c (convert_like_real): Likewise.
18056
18057 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
18058
18059         Add initial support for '\uNNNN' specifier.
18060         * lex.c (read_ucs): New fn.
18061         (readescape, skip_white_space): Call it.
18062         (is_extended_char, is_extended_char_1): New fns.
18063         (utf8_extend_token): New fn, #if 0'd out.
18064         (real_yylex): Treat extended chars like letters.
18065
18066         * search.c (note_debug_info_needed): Walk the bases even if we
18067         weren't deferring the type itself.
18068
18069 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18070
18071         * decl2.c (finish_objects): Constify a char*.
18072
18073         * method.c (emit_thunk): Likewise.
18074
18075 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
18076
18077         * typeck.c (dubious_conversion_warnings): Look through
18078         REFERENCE_TYPE.
18079
18080 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18081
18082         * class.c (dfs_modify_vtables): I is now unsigned.
18083         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
18084         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
18085         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
18086         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
18087         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
18088         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
18089         Call integer_all_onesp.
18090         * typeck2.c (process_init_constructor): Use compare_tree_int.
18091
18092         * lang-specs.h (as): Don't call if -syntax-only.
18093
18094 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
18095
18096         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
18097         RTL_EXPR_HAS_NO_SCOPE after all.
18098
18099 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
18100
18101         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
18102         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
18103         RTL_EXPR_HAS_NO_SCOPE.
18104
18105         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
18106         later.
18107
18108         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
18109
18110 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
18111
18112         * call.c (convert_like): Macrofy.
18113         (convert_like_with_context): New macro.
18114         (convert_like_real): Renamed from convert_like.  Add calling
18115         context parameters, for diagnostics. Add recursive flag.  Call
18116         dubious_conversion_warnings for outer conversion.
18117         (build_user_type_conversion): Use convert_like_with_context.
18118         (build_over_call): Likewise. Don't warn about dubious
18119         conversions here. Adjust convert_default_arg calls.
18120         (convert_default_arg): Add context parameters for diagnostics.
18121         Pass through to convert_like_with_context.
18122         * cp-tree.h (convert_default_arg): Add context parameters.
18123         (dubious_conversion_warnings): Prototype new function.
18124         * typeck.c (convert_arguments): Adjust convert_default_arg call.
18125         (dubious_conversion_warnings): New function, broken
18126         out of convert_for_assignment.
18127         (convert_for_assignment): Adjust.
18128
18129 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
18130
18131         * decl2.c (key_method): Break out from...
18132         (import_export_vtable, import_export_class): ...here.
18133
18134         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
18135         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
18136
18137         * search.c (note_debug_info_needed, dfs_debug_mark,
18138         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
18139         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
18140
18141 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
18142
18143         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
18144         typos.
18145
18146 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
18147
18148         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
18149         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
18150         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
18151         (lang_type): Split gets_new into has_new and has_array_new.
18152         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
18153         (TYPE_GETS_NEW): Split into ...
18154         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
18155         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
18156         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
18157         (build_op_new_call): Don't declare.
18158         (build_new_1): Likewise.
18159         * call.c (build_op_new_call): Remove.
18160         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
18161         instead of TYPE_NEEDS_DESTRUCTOR.
18162         (finish_struct_bits): Likewise.
18163         (add_implicitly_declared_members): Likewise.
18164         (check_field_decl): Likewise.
18165         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
18166         correctly under the new ABI.
18167         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
18168         instead of TYPE_NEEDS_DESTRUCTOR.
18169         (initialize_local_var): Likewise.
18170         (destroy_local_var): Likewise.
18171         (cp_finish_decl): Likewise.
18172         (register_dtor_fn): Likewise.
18173         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
18174         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
18175         TYPE_VEC_DELETE_TAKES_SIZE here.
18176         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
18177         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
18178         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
18179         (finish_destructor_body): Likewise.
18180         (maybe_build_cleanup_1): Likewise.
18181         * decl2.c (do_static_destruction): Likewise.
18182         * init.c (build_new_1): Make it static.
18183         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
18184         (expand_cleanup_for_base): Likewise.
18185         (get_cookie_size): New function.
18186         (build_new_1): Handle array-new cookies correctly under the new
18187         ABI.
18188         (build_vec_delete_1): Likewise.
18189         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
18190         (build_delete): Likewise.
18191         (build_vec_delete): Handle array-new cookies correctly under the new
18192         ABI.
18193         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
18194         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
18195         TYPE_HAS_ARRAY_NEW_OPERATOR.
18196         * ptree.c (print_lang_type): Check them.
18197         * search.c (context_for_name_lookup): Fix typo in comment.
18198         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
18199         * tree.c (break_out_cleanups): Likewise.
18200         (build_cplus_array_test_1): Likewise.
18201         (cp_build_qualified_type_real): Likewise.
18202         * typeck.c (complete_type): Likewise.
18203
18204         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
18205         the command-line, not the end.
18206
18207 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
18208
18209         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
18210
18211 2000-03-02  Tom Tromey  <tromey@cygnus.com>
18212
18213         * cp-tree.h (build_java_class_ref): Declare.
18214         * init.c (build_java_class_ref): No longer static.
18215         * except.c (expand_throw): Generate a Java-style `throw' if the
18216         thrown object is a "Java" object.
18217         (initialize_handler_parm): Generate a Java-style lookup of
18218         exception info if the caught object is a "Java" object.
18219         (catch_language, catch_language_init): New globals.
18220         (decl_is_java_type): New function.
18221         (expand_start_catch_block): Don't call push_eh_info() or
18222         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
18223         class reference to build_catch_block.
18224
18225 2000-03-02  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18226
18227         * typeck.c (comptypes): Treat sizetype like its language equivalent.
18228
18229 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
18230
18231         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
18232         to merge reference/pointer code and fix incorrect warnings.
18233
18234 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
18235
18236         * search.c (protected_accessible_p): Use context_for_name_lookup.
18237
18238         * init.c (construct_virtual_bases): Fix thinko.
18239         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
18240
18241 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
18242
18243         * decl.c (current_function_decl): Move to toplev.c.
18244
18245 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
18246
18247         * pt.c (fn_type_unification): Unify return type, whenever
18248         provided.
18249         (get_bindings_real): Only pass return type when necessary.
18250         Remove explicit return type check.
18251         * class.c (resolve_address_of_overloaded_function): Pass desired
18252         return type to fn_type_unification.
18253
18254 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18255
18256         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
18257         DECL_FIELD_SIZE.
18258         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
18259         DECL_FIELD_SIZE.
18260         * rtti.c (expand_class_desc): Likewise.
18261         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
18262         (THUNK_VCALL_OFFSET): Likewise.
18263         (THUNK_DELTA): Reflect changes in ../tree.h.
18264
18265 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
18266
18267         * search.c (protected_accessible_p): Also allow the access if
18268         the member is public in DERIVED.  Lose TYPE parm.
18269         (friend_accessible_p): Lose TYPE parm.
18270         (accessible_p): Adjust.
18271
18272 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18273
18274         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
18275         on things that are not sizes; ssize_binop deleted.
18276         Call size_diffop when appropriate.
18277         (dfs_build_vcall_offset_vtbl_entries): Likewise.
18278         (build_primary_vtable, build_secondary_vtable): Likewise.
18279         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
18280         Variable I is HOST_WIDE_INT.
18281         (get_vfield_offset): Pass proper types to size_binop.
18282         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
18283         (finish_struct_1): Likewise.
18284         (skip_rtti_stuff): Arg N is now pointer to signed.
18285         (layout_class_type): Use size_zero_node.
18286         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
18287         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
18288         * decl.c (complete_arry_type): Pass proper types to size_binop.
18289         (xref_basetypes): BINFO_OFFSET is sizetype.
18290         * error.c (dump_expr): Don't use size_binop non-sizes.
18291         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
18292         * init.c (construct_virtual_bases): Fix type error.
18293         (build_vec_delete_1): Pass proper type to size_binop and don't
18294         fold result.
18295         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
18296         * rtti.c (get_base_offset): Pass proper type to size_binop.
18297         * search.c (dfs_find_vbases): Fix type error.
18298         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
18299         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
18300         * tree.c (debug_binfo): Variable N is signed.
18301         Use HOST_WIDE_INT_PRINT_DEC.
18302         * typeck.c (comptypes): sizetype is same as equivalent integer type.
18303         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
18304         size_one_node and size_zero_node.
18305         (c_alignof): Use size_one_node.
18306         (build_component_addr): Pass proper types to size_binop.
18307         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
18308
18309 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
18310
18311         Implement class scope using-declarations for functions.
18312         * class.c (handle_using_decl): Call add_method for used functions.
18313         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
18314         (add_method): Used functions are hidden by local functions.
18315         (check_bases_and_members): Handle using-decls before finalizing
18316         CLASSTYPE_METHOD_VEC.
18317         * call.c (add_function_candidate): Add ctype parm; if nonzero,
18318         override the type of 'this' accordingly.
18319         (add_template_candidate, add_template_candidate_real): Add ctype parm.
18320         (convert_class_to_reference, build_user_type_conversion_1,
18321         build_new_function_call, build_object_call, build_new_op,
18322         build_new_method_call): Pass ctype parm.
18323
18324         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
18325         the baselink.
18326         * call.c (convert_class_to_reference, build_user_type_conversion_1,
18327         build_new_function_call, build_object_call, build_new_op,
18328         build_new_method_call, build_op_delete_call): Don't get basetype_path
18329         from a baselink.
18330         * typeck.c (build_component_ref): Likewise.
18331         * init.c (build_offset_ref): Likewise.
18332         (resolve_offset_ref): Don't call enforce_access.
18333         Call build_scoped_ref.
18334         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
18335         would cause an error or if -pedantic.
18336         * class.c (alter_access): Lose binfo parm.
18337
18338 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
18339
18340         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
18341         types.
18342
18343 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
18344
18345         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
18346         pseudo_type_info creation into the std namespace
18347
18348 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
18349
18350         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
18351         (import_export_class): Remove declaration.
18352         * decl2.c (import_export_class): Make it static.
18353         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
18354         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
18355         EXPR_WITH_FILE_LOCATION.
18356         * lex.c (check_newline): Tweak filename/lineno setting.
18357         * semantics.c (begin_while_stmt): Fix typo in comment.
18358
18359 2000-02-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18360
18361         * lang-options.h (-fmessage-length=): Add missing option.
18362
18363         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
18364
18365 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
18366
18367         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
18368
18369 2000-02-25  Jim Wilson  <wilson@cygnus.com>
18370
18371         * optimize.c (expand_call_inline): Emit the return label before
18372         evaluating the return value.
18373
18374 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
18375
18376         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
18377         than duplicating functionality here.
18378         * optimize.c: Include input.h.
18379         (expand_call_inline): Use push_srcloc and pop_srcloc.
18380         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
18381         * parse.c: Regenerated.
18382         * Makefile.in (lex.o): Depend on input.h.
18383         (optimize.o): Likewise.
18384
18385 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
18386
18387         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
18388         function type, rather than ICE.
18389
18390 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
18391
18392         * decl.c (grokdeclarator): Call decl_type_access_control.
18393         * parse.y (parse_end_decl): Don't call decl_type_access_control if
18394         decl is null.
18395
18396 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
18397
18398         * decl.c (decls_match): Remove obsolete static member nadgering.
18399
18400 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
18401
18402         * decl.c (grokdeclarator): Change ANSI to ISO.
18403         * lex.c (consume_string, readescape, do_identifier): Likewise.
18404         (parse_float, real_yylex): Likewise.
18405         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
18406         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
18407         new_type_id, maybe_label_decls, simple_stmt,
18408         for.init.statement): Likewise.
18409         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
18410         * semantics.c (finish_named_return_value): Likewise.
18411         * parse.c: Regenerate.
18412
18413 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
18414
18415         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
18416         (CPTI_CLASS_STAR_TYPE): Remove.
18417         (vtable_index_type): Likewise.
18418         (class_star_type_node): Remove.
18419         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
18420         (build_binary_op_nodefault): Remove.
18421         * call.c (build_new_op): Use build_binary_op instead of
18422         build_binary_op_nodefault.
18423         * decl.c (init_decl_processing): Remove class_star_type_node
18424         initialization.  Make delta_type_node ptrdiff_type_node under the
18425         new ABI.  Initialize vtable_index_type.
18426         (build_ptrmemfunc_type): Build different structures for the new
18427         ABI.
18428         (build_enumerator): Use build_binary_op instead of
18429         build_binary_op_nodefault.
18430         * method.c (build_overload_value): Mangle pointers-to-members
18431         appropriately under the new ABI.
18432         * typeck.c (build_array_ref): Use build_binary_op instead of
18433         build_binary_op_nodefault.
18434         (get_member_function_from_ptrfunc): Adjust for the new ABI.
18435         (build_binary_op_nodefault): Rename to ...
18436         (build_binary_op): ... this.  Remove old version.  Adjust for
18437         pointer-to-member comparisons under the new ABI.
18438         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
18439         (build_ptrmemfunc): Adjust for the new ABI.
18440         (expand_ptrmemfunc_cst): Likewise.
18441         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
18442         (pfn_from_ptrmemfunc): Adjust for the new ABI.
18443
18444 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
18445
18446         * call.c (build_object_call): Compress consecutive calls to
18447         cp_error.
18448         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
18449         (build_op_delete_call): Adjust message formatting.
18450
18451         * class.c (check_bases): Compress consecutive calls to
18452         cp_pedwarn.
18453         (finish_struct_anon): Say 'ISO C++'.
18454
18455         * decl.c (start_decl): Same here.
18456         (grok_reference_init): Likewise.
18457         (grokfndecl): Correct message formatting.
18458         (grokfndecl): Improve diagnostic.
18459         (check_static_variable_definition): Likewise. Say 'ISO C++'
18460         (compute_array_index_type): Say 'ISO C++'
18461         (create_array_type_for_decl): Compress consecutive calls to
18462         cp_error.
18463         (grokdeclarator): Say 'ISO C++'
18464         (grok_op_properties): Likewise.
18465
18466         * decl2.c (delete_sanity): Clairify diagnostic.
18467         (check_member_template): Same here.
18468         (grok_function_init): Use consistent terminology.
18469
18470         * expr.c (do_case): Say 'ISO C++'
18471
18472         * friend.c (do_friend): Compress consecutive calls to warning.
18473
18474 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
18475
18476         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
18477         * class.c (build_secondary_vtable): Reorganize.  Don't create a
18478         new vtable under the new ABI.
18479         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
18480         computing the size.
18481         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
18482         the initializing elements.
18483         (initialize_vtable): New function.
18484         (dfs_finish_vtbls): Use it.
18485         (dfs_accumulate_vtbl_inits): New function.
18486         (finish_vtbls): Merge primary and secondary vtables under the new
18487         ABI.
18488         (finish_struct_1): Remove redundant call to layout_vtable_decl.
18489         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
18490         aren't VAR_DECLs.
18491
18492         * class.c (build_vtable): New function, split out from ...
18493         (get_vtable_decl): ... here, and ...
18494         (build_secondary_vtable): ... here.
18495
18496         * pt.c (tsubst_decl): Fix formatting.
18497
18498 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18499
18500         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
18501         (avoid_overlap, build_base_field): Likewise.
18502         (build_base_field, build_base_fields, is_empty_class):
18503         Test DECL_SIZE with integer_zero.
18504         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
18505         * cp-tree.h (struct lang_type): New field size_unit.
18506         (CLASSTYPE_SIZE_UNIT): New macro.
18507         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
18508         (cp_finish_decl): Delete -Wlarger-than processing.
18509         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
18510         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
18511         * tree.c (make_binfo): binfo vector is one entry longer.
18512         (walk_tree): Walk DECL_SIZE_UNIT.
18513
18514 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
18515
18516         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
18517         comment.
18518         (build_vtable_entry): Don't assume all vtable entries are
18519         functions.
18520         (build_vtbl_initializer): Adjust accordingly.
18521         (get_vtable_decl): Fix formatting.
18522
18523 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
18524
18525         * semantics.c (deferred_type_access_control): Walk the entire
18526         type_lookups list.
18527         (save_type_access_control): Rename from
18528         initial_deferred_type_access_control.  Just remember the value.
18529         (decl_type_access_control): New fn.
18530         (begin_function_definition): Use deferred_type_access_control, after
18531         we've started the function.  Set type_lookups to error_mark_node.
18532         * parse.y (frob_specs, fn.def1): Adjust.
18533         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
18534         (parse_end_decl, parse_bitfield0, parse_method): New fns.
18535         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
18536         (after_type_component_declarator0): Likewise.
18537         (after_type_component_declarator): Likewise.
18538         (notype_component_declarator): Likewise.
18539         * cp-tree.h: Adjust.
18540
18541         * decl.c (redeclaration_error_message): Allow redeclaration of
18542         namespace-scope decls.
18543
18544 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
18545
18546         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
18547
18548 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
18549
18550         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
18551         * decl2.c (grokclassfn): Likewise.
18552
18553         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
18554
18555         * decl2.c (lang_decode_option): Don't set default message length
18556         here.
18557         * lex.c (lang_init_options): Set it here.
18558
18559 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
18560
18561         Make DECL_CONTEXT mean the class in which a member function was
18562         declared, even for a virtual function.
18563         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
18564         (DECL_FRIEND_CONTEXT): New macro.
18565         (DECL_REAL_CONTEXT): Remove.
18566         (SET_DECL_FRIEND_CONTEXT): Likewise.
18567         (DECL_VIRTUAL_CONTEXT): Adjust.
18568         (DECL_CLASS_SCOPE_P): Use TYPE_P.
18569         (add_friends): Remove.
18570         (hack_decl_function_context): Likewise.
18571         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
18572         CP_DECL_CONTEXT.
18573         (build_over_call): Fix indentation.  Use DECL_CONTEXT
18574         instead of DECL_CLASS_CONTEXT.
18575         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
18576         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
18577         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
18578         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
18579         (build_base_field): Likewise.
18580         (finish_struct_1): Likewise.
18581         (build_self_reference): Likewise.
18582         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
18583         DECL_REAL_CONTEXT.
18584         (pushtag): Use decl_function_context, not
18585         hack_decl_function_context.
18586         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
18587         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
18588         (pushdecl): Remove bogus code.
18589         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
18590         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
18591         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
18592         Use decl_function_context, nothack_decl_function_context.
18593         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
18594         (grokdeclarator): Likewise.  Use decl_function_context, not
18595         hack_decl_function_context.
18596         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
18597         (start_function): Use DECL_FRIEND_CONTEXT, not
18598         DECL_CLASS_CONTEXT.  Use decl_function_context, not
18599         hack_decl_function_context.
18600         (finish_function): Use decl_function_context, not
18601         hack_decl_function_context.
18602         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
18603         DECL_CLASS_CONTEXT.
18604         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
18605         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
18606         (grokfield): Likewise.
18607         (finish_builtin_type): Likewise.
18608         (finish_vtable_vardec): Use decl_function_context, not
18609         hack_decl_function_context.
18610         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
18611         (start_static_initialization_or_destruction): Likewise.
18612         (finish_static_initialization_or_destruction): Likewise.
18613         (mark_used): Adjust logic for deciding when to synthesize methods.
18614         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
18615         DECL_REAL_CONTEXT.
18616         * error.c (dump_function_decl): Use DECL_CONTEXT, not
18617         DECL_CLASS_CONTEXT.
18618         * friend.c (is_friend): Likewise.
18619         (add_friends): Remove.
18620         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
18621         * lex.c (begin_definition_of_inclass_inline): Use
18622         decl_function_context, not hack_decl_function_context.
18623         (process_next_inline): Likewise.
18624         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
18625         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
18626         DECL_CLASSS_CONTEXT.
18627         (hack_identifier): Likewise.
18628         (synthesize_method):  Use decl_function_context, not
18629         hack_decl_function_context.
18630         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
18631         DECL_REAL_CONTEXT.
18632         (is_member_template): Use decl_function_context, not
18633         hack_decl_function_context.  Use DECL_CONTEXT, not
18634         DECL_CLASS_CONTEXT.
18635         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
18636         DECL_CLASS_CONTEXT.
18637         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
18638         DECL_REAL_CONTEXT.
18639         (push_template_decl_real): Likewise.
18640         (instantiate_class_template): Don't call add_friends.
18641         (tsubst_default_argument): Use DECL_CONTEXT, not
18642         DECL_REAL_CONTEXT.
18643         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
18644         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
18645         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
18646         DECL_CLASS_CONTEXT.
18647         * repo.c (repo_inline_used): Likewise.
18648         * search.c (current_scope): Adjust for new _CONTEXT macros.
18649         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
18650         DECL_REAL_CONTEXT.
18651         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
18652         (lookup_fnfields_here):Likewise.
18653         (check_final_overrider): Likewise.
18654         (init_vbase_pointers): Likewise.
18655         (virtual_context): Likewise.
18656         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
18657         (expand_body): Use decl_function_context, not
18658         hack_decl_function_context.
18659         * tree.c (hack_decl_function_context): Remove.
18660         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
18661         DECL_CLASS_CONTEXT.
18662         * typeck2.c (error_not_base_type): Likewise.
18663
18664 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
18665
18666         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
18667
18668 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18669
18670         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
18671
18672 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
18673
18674         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
18675
18676 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
18677
18678         * decl2.c (lang_decode_option): Enable automatic line wrapping.
18679
18680 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
18681
18682         * parse.y (frob_specs): Split out...
18683         (parse_decl): From here.
18684         (fn.def2): Call initial_deferred_type_access_control.
18685         (after_type_component_declarator0): Call frob_specs.
18686         (notype_component_declarator0): Likewise.
18687         * search.c (friend_accessible_p): Nested classes are friends of their
18688         enclosing classes.
18689
18690 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
18691
18692         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
18693         used to create an implicit temporary.
18694
18695         * class.c (dfs_modify_vtables): Tweak calculation of functions to
18696         override.
18697
18698 2000-02-08  Nathan Sidwell  <nathan@acm.org>
18699
18700         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
18701         strip array element qualifiers too.
18702
18703 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
18704
18705         * decl.c (store_parm_decls): Don't build cleanups for parameters
18706         while processing_template_decl.
18707
18708 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
18709
18710         * cp-tree.h (struct saved_scope): Add incomplete field.
18711         (namespace_scope_incomplete): New macro.
18712         * decl.c (pushdecl): Use it.
18713         (hack_incomplete_structures): Use it.  See through artificial
18714         binding levels.
18715         (mark_saved_scope): Mark it.
18716
18717         Implement access control for nested types.
18718         * search.c (type_access_control): New fn.
18719         (accessible_p): Now we do perform access control for types.
18720         * semantics.c (deferred_type_access_control): New fn.
18721         (initial_deferred_type_access_control): New fn.
18722         (begin_function_definition): Call it.  Add lookups parm.
18723         * decl.c (struct binding_level): Add this_class field.
18724         (pushlevel_class): Set it.
18725         (mark_binding_level): Mark it.
18726         (lookup_name_real): Use it.  Call type_access_control.
18727         (mark_saved_scope): Mark lookups field.
18728         * cp-tree.h (flagged_type_tree): Add lookups field.
18729         (struct saved_scope): Add lookups field.
18730         (type_lookups): New macro.
18731         * parse.y (declmods): Now <ftype>.
18732         (parse_decl): Add lookups parm.  Call
18733         initial_deferred_type_access_control.
18734         (lang_extdef): Clear type_lookups.
18735         (typed_declspecs, declmods, typespec): Set lookups field.
18736         (initdcl): Call deferred_type_access_control.
18737         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
18738         component_decl_1, named_parm): Adjust.
18739         * friend.c (is_friend): Nested classes are friends of their
18740         enclosing classes.
18741
18742         * class.c (currently_open_derived_class): New fn.
18743         * method.c (hack_identifier): Use it.
18744
18745         * lex.c (do_identifier): Remove obsolete code.
18746
18747         * parse.y (typed_typespecs): Propagate new_type_flag properly.
18748
18749 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
18750
18751         * tinfo.h: Remove apostrophes from C++ comment (xgettext
18752         thinks this file is plain C).
18753
18754 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18755
18756         * Makefile.in (call.o): Depend on $(EXPR_H).
18757
18758         * call.c: Include "expr.h".
18759
18760         * class.c (dump_class_hierarchy): Add prototype.
18761
18762         * search.c (dfs_get_pure_virtuals): Likewise.
18763
18764 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
18765
18766         * parse.y (simple_stmt): Allow :: token in asm parameter list.
18767         * parse.c: Rebuilt.
18768
18769 2000-01-31  Jim Wilson  <wilson@cygnus.com>
18770
18771         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
18772         Store it in DECL_FCONTEXT.
18773         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
18774
18775 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
18776
18777         * tinfo.h (old abi): #include "tconfig.h".
18778         * tinfo.cc (convert_to_base): Move into old abi section.
18779
18780 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
18781
18782         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
18783         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
18784         (BINFO_PRIMARY_BINFO): New macro.
18785         (BF_DELTA): Rename to ...
18786         (BV_DELTA): ... this.
18787         (BF_VCALL_INDEX): Rename to ...
18788         (BV_VCALL_INDEX): ... this.
18789         (BF_FN): Rename to ...
18790         (BV_FN): ... this.
18791         * class.c (build_vbase_path): Adjust for changes to reverse_path.
18792         (set_rtti_entry): Rename BF_ macros to BV_ variants.
18793         (modify_vtable_entry): Simplify.
18794         (add_virtual_function): Rename BF_ macros to BV_ variants.
18795         (build_vtable_initializer): Likewise.
18796         (get_class_offset_1): Remove.
18797         (dfs_get_class_offset): Likewise.
18798         (get_class_offset): Likewise.
18799         (dfs_find_final_overrider): New function.
18800         (find_final_overrider): Likewise.
18801         (modify_one_vtable): Remove.
18802         (dfs_find_base): New function.
18803         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
18804         find_final_overrider.
18805         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
18806         virtuals.
18807         (dfs_fixup_vtable_deltas): Remove.
18808         (override_one_vtable): Remove.
18809         (merge_overrides): Likewise.
18810         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
18811         unreal chilren of virtual bases.
18812         (finish_struct_1): Don't use merge_overrides.  Don't use
18813         dfs_fixup_vtable_deltas.
18814         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
18815         BINFOs.
18816
18817 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
18818             Jason Merrill  <jason@yorick.cygnus.com>
18819
18820         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
18821
18822 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
18823
18824         * exception.cc (__throw_bad_typeid): Add missing std::.
18825
18826 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18827
18828         * cp-tree.h (make_thunk): PROTO -> PARAMS.
18829
18830 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
18831
18832         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
18833
18834         Runtime support for new-abi rtti.
18835         * inc/typeinfo (type_info::operator!=): Define in class.
18836         (type_info::before, type_info::name, type_info::operator==,
18837         type_info::operator!=): Define new ABI implementations.
18838         (type_info::is_pointer_p, type_info::is_function_p): Declare
18839         new virtual functions.
18840         (type_info::do_catch, type_info::do_upcast): Likewise.
18841
18842         * tinfo.h (__base_class_info): Define new class.
18843         (__class_type_info): Likewise.
18844         (__si_class_type_info): Likewise.
18845         (__vmi_class_type_info): Likewise.
18846         (__dynamic_cast): Prototype.
18847
18848         * tinfo.cc: Conditionalize old and new rtti mechanisms.
18849         (type_info::is_pointer_p): Define new function.
18850         (type_info::is_function_p): Likewise.
18851         (type_info::do_catch): Likewise.
18852         (type_info::do_upcast): Likewise.
18853         (vtable_prefix): New structure for vtable access.
18854         (adjust_pointer): Define new template function.
18855         (contained_p, public_p, virtual_p, contained_public_p,
18856         contained_nonpublic_p, contained_nonvirtual_p): Define new
18857         functions.
18858         (nonvirtual_base_type): New local variable.
18859         (__class_type_info::~__class_type_info): Define.
18860         (__si_class_type_info::~__si_class_type_info): Likewise.
18861         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
18862         (__class_type_info::do_catch): Define new function.
18863         (__class_type_info::do_upcast): Likewise.
18864         (__class_type_info::find_public_src): Likewise.
18865         (__class_type_info::do_find_public_src): Likewise.
18866         (__si_class_type_info::do_find_public_src): Likewise.
18867         (__vmi_class_type_info::do_find_public_src): Likewise.
18868         (__class_type_info::do_dyncast): Likewise.
18869         (__si_class_type_info::do_dyncast): Likewise.
18870         (__vmi_class_type_info::do_dyncast): Likewise.
18871         (__class_type_info::do_upcast): Likewise.
18872         (__si_class_type_info::do_upcast): Likewise.
18873         (__vmi_class_type_info::do_upcast): Likewise.
18874         (__dynamic_cast): Likewise.
18875
18876         * tinfo2.cc (__fundamental_type_info): Define new class.
18877         (__pointer_type_info): Likewise.
18878         (__reference_type_info): Likewise.
18879         (__array_type_info): Likewise.
18880         (__function_type_info): Likewise.
18881         (__enum_type_info): Likewise.
18882         (__ptr_to_member_type_info): Likewise.
18883         (__fundamental_type_info::~__fundamental_type_info): Define.
18884         (__pointer_type_info::~__pointer_type_info): Likewise.
18885         (__reference_type_info::~__reference_type_info): Likewise.
18886         (__array_type_info::~__array_type_info): Likewise.
18887         (__function_type_info::~__function_type_info): Likewise.
18888         (__enum_type_info::~__enum_type_info): Likewise.
18889         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
18890         (__pointer_type_info::do_catch): Define new function.
18891         (__ptr_to_member_type_info::do_catch): Define new function.
18892
18893         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
18894         (__is_pointer): Likewise.
18895
18896         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
18897
18898 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
18899
18900         * cp/class.c (build_vtable): Rename to build_primary_vtable.
18901         (prepare_fresh_vtable): Rename to build_secondary_vtable.
18902         (make_new_vtable): New function.
18903         (modify_vtable_entry): Handle generation of new vtables correctly.
18904         (modify_one_vtable): Remove unused parameter.
18905         (dfs_fixup_vtable_deltas): Likewise.
18906         (override_one_vtable): Use build_secondary_vtable.
18907         (finish_struct_1): Use build_primary_vtable and
18908         build_secondary_vtable.
18909
18910 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
18911
18912         * cp/decl.c: Adjust variable names, comments, help strings.
18913
18914 2000-01-29  Nathan Sidwell  <nathan@acm.org>
18915
18916         * new2.cc (operator delete[]): Use operator delete, don't assume
18917         implementation.
18918
18919 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
18920
18921         * class.c (build_vtbl_initializer): Add argument to
18922         build_vtable_entry call.
18923
18924 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
18925
18926         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
18927         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
18928         (BF_DELTA): New macro.
18929         (BF_VCALL_INDEX): Likewise.
18930         (BF_FN): Likewise.
18931         (THUNK_VCALL_OFFSET): Likewise.
18932         (make_thunk): Change prototype.
18933         * class.c (build_vtable_entry): Integrate
18934         build_vtable_entry_for_fn.  Handle vcall indices.
18935         (build_vtable_entry_for_fn): Remove.
18936         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
18937         BF_VCALL_INDEX, BF_FN.
18938         (modify_vtable_entry): Integrate common code from
18939         modify_one_vtable and dfs_fixup_vtable_deltas.
18940         (add_virtual_function): Set BF_VCALL_INDEX.
18941         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
18942         and BF_FN.
18943         (modify_one_vtable): Simplify.
18944         (dfs_fixup_vtable_deltas): Likewise.
18945         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
18946         * method.c (make_thunk): Handle vcall indices.
18947
18948 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
18949
18950         Compiler side new abi rtti (not enabled).
18951         * cp-tree.h (new_abi_rtti_p): New macro.
18952         (emit_support_tinfos): Prototype new function.
18953         (tinfo_decl_p): Likewise.
18954         (emit_tinfo_decl): Likwise.
18955         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
18956         macros.
18957         (doing_runtime): New local static.
18958         (init_rtti_processing): Add new-abi initializer.
18959         (get_tinfo_decl): Add new-abi logic.
18960         (tinfo_from_decl): Likewise.
18961         (build_dynamic_cast_1): Likewise.
18962         (qualifier_flags): New static function.
18963         (tinfo_base_init): Likewise.
18964         (generic_initializer): Likewise.
18965         (ptr_ref_initializer): Likewise.
18966         (ptmd_initializer): Likewise.
18967         (class_hint_flags): Likewise.
18968         (class_initializer): Likewise.
18969         (synthesize_tinfo_var): Likewise.
18970         (create_real_tinfo_var): Likewise.
18971         (create_pseudo_type_info): Likewise.
18972         (get_vmi_pseudo_type_info): Likewise.
18973         (create_tinfo_types): Likewise.
18974         (emit_support_tinfos): New global function.
18975         (tinfo_decl_p): New global predicate.
18976         (emit_tinfo_decl): New global function.
18977         * class.c (set_rtti_entry): Generalize for old and new rtti.
18978         (build_vtbl_initializer): Likewise.
18979         * decl2.c (finish_file): Likewise.
18980
18981 2000-01-27  Jim Wilson  <wilson@cygnus.com>
18982
18983         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
18984         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
18985
18986 2000-01-27  Mike Stump  <mrs@wrs.com>
18987
18988         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
18989         for scopes.
18990
18991 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
18992
18993         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
18994
18995 2000-01-26  J"orn Rennecke <amylaar@cygnus.co.uk>
18996
18997         * optimize.c (calls_setjmp_r): Supply new argument
18998         to special_function_p.
18999
19000 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19001
19002         * call.c: PROTO -> PARAMS.
19003         * class.c: Likewise.
19004         * cp-tree.h: Likewise.
19005         * cvt.c: Likewise.
19006         * decl.c: Likewise.
19007         * decl.h: Likewise.
19008         * decl2.c: Likewise.
19009         * dump.c: Likewise.
19010         * errfn.c: Likewise.
19011         * error.c: Likewise.
19012         * except.c: Likewise.
19013         * expr.c: Likewise.
19014         * init.c: Likewise.
19015         * input.c: Likewise.
19016         * lex.c: Likewise.
19017         * lex.h: Likewise.
19018         * method.c: Likewise.
19019         * optimize.c: Likewise.
19020         * parse.y: Likewise.
19021         * pt.c: Likewise.
19022         * repo.c: Likewise.
19023         * rtti.c: Likewise.
19024         * search.c: Likewise.
19025         * semantics.c: Likewise.
19026         * spew.c: Likewise.
19027         * tree.c: Likewise.
19028         * typeck.c: Likewise.
19029         * typeck2.c: Likewise.
19030         * xref.c: Likewise.
19031
19032 2000-01-25  Richard Henderson  <rth@cygnus.com>
19033
19034         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
19035
19036 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
19037
19038         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
19039         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
19040         (struct vcall_offset_data_s): New type.
19041         (dfs_vcall_offset_queue_p): New function.
19042         (dfs_build_vcall_offset_vtbl_entries): Likewise.
19043         (build_vcall_offset_vtbl_entries): Likewise.
19044         (layout_vtable_decl): Likewise.
19045         (num_vfun_entries): Likewise.
19046         (num_extra_vtbl_entries): Add the entries for vcall offsets.
19047         (build_vtbl_initializer): Likewise.
19048         (dfs_finish_vtabls): Use layout_vtable_decl.
19049         (modify_one_vtables): Always duplicate vtables under the new ABI.
19050         (finish_struct_1): Use layout_vtable_decl.
19051
19052 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19053
19054         * decl.c (member_function_or_else): Change third arg from a format
19055         specifier to an `enum overload_flags'.  Callers changed.
19056
19057 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
19058
19059         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
19060         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
19061         build_const_cast, get_delta_difference, check_return_expr): Avoid
19062         ANSI string concatenation usage.
19063
19064 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
19065
19066         * class.c (layout_class_type): Put the fields required to make a
19067         class non-empty at the end, not the beginning, of the TYPE_FIELDs
19068         list.
19069
19070 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
19071
19072         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
19073         template.
19074
19075         * decl2.c (mark_used): Do instantiate inlines that have been
19076         explicitly instantiated.
19077
19078 2000-01-24  Richard Henderson  <rth@cygnus.com>
19079
19080         * call.c (build_over_call): Use expand_tree_builtin.
19081         * typeck.c (build_function_call_real): Likewise.
19082         (build_binary_op_nodefault): Handle unordered compares.
19083
19084 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
19085
19086         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
19087         cp_tree_index values.
19088         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
19089         New global node #defines for them.
19090         * rtti.c (call_void_fn): Replace with ...
19091         (build_runtime_decl): ... new static function.
19092         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
19093         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
19094         (build_dynamic_cast_1): Always produce correctly typed result.
19095         Explicitly produce type_info addresses. Use dynamic_cast_node.
19096         * exception.cc (__throw_bad_cast): Return `void *'.
19097         (__throw_bad_typeid): Return `const type_info &'.
19098
19099 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
19100
19101         * cp-tree.h (get_vtable_decl): Prototype new function.
19102         * class.c (get_vtable_decl): New function. Broken out from ...
19103         (build_vtable): ... here. Use it.
19104         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
19105         by get_vtable_decl.
19106
19107 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
19108
19109         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
19110         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
19111         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
19112         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
19113         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
19114         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
19115         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
19116         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
19117         (CPTI_TINFO_VAR_ID): New enumeration.
19118         (__tp_desc_type_node, __access_mode_type_node,
19119         __bltn_desc_type_node, __user_desc_type_node,
19120         __class_desc_type_node, __ptr_desc_type_node,
19121         __attr_desc_type_node, __func_desc_type_node,
19122         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
19123         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
19124         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
19125         enum_desc_type_node, class_desc_type_node,
19126         si_class_desc_type_node, vmi_class_desc_type_node,
19127         ptmd_desc_type_node, base_desc_type_node): New #defines.
19128         (tinfo_fn_id, tinfo_fn_type): Rename to ...
19129         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
19130         (tinfo_var_id): New enumeration.
19131         (DECL_TINFO_FN_P): Augment comment.
19132         * decl.c (cp_global_trees): Adjust documentation.
19133         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
19134         tinfo_decl_type and tinfo_var_id.
19135         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
19136         (build_typeid): Remove unused variable.
19137         (get_tinfo_var): Use tinfo_var_id.
19138         (tinfo_name): New static function.
19139         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
19140         (tinfo_from_decl): Likewise.
19141         (get_base_offset): New static function, broken out of
19142         expand_class_desc.
19143         (expand_si_desc): Use tinfo_name.
19144         (expand_class_desc): Likewise. Lose local static variable.
19145         Use base_desc_type_node. Use get_base_offset.
19146         (expand_ptr_desc): Use tinfo_name.
19147         (expand_attr_desc): Likewise.
19148         (expand_generic_desc): Likewise.
19149
19150         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
19151         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
19152
19153 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
19154
19155         * cp-tree.h (__eprintf): Remove declaration.
19156         * tree.c (__eprintf): Remove definition.
19157
19158 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
19159             Mark Mitchell  <mark@codesourcery.com>
19160
19161         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
19162         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
19163
19164 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
19165
19166         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
19167
19168 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
19169
19170         * cp-tree.h (register_dtor_fn): New function.
19171         * decl.c (destroy_local_static): Rename to ...
19172         (register_dtor_fn): ... this.  Give it external linkage.
19173         (expand_static_init): Use it.
19174         * decl2.c (do_static_initialization): Likewise, if using
19175         __cxa_atexit.
19176         (do_static_destruction): Check that __cxa_atexit is not in use.
19177         (finish_file): Don't call do_static_destruction if using
19178         __cxa_atexit.
19179
19180         * typeck.c (convert_arguments): Restore two-message error
19181         reporting.
19182
19183 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
19184
19185         Remap dynamic cast hint values to be consistent across ABIs.
19186         * search.c (dynamic_cast_base_recurse): Remap generated value.
19187         (get_dynamic_cast_base_type): Adjust documentation.
19188         * tinfo.h (__user_type_info::dyncast): Likewise.
19189         (__user_type_info::find_public_subobj): Remap BOFF meaning.
19190         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
19191         (__class_type_info::do_dyncast): Likewise.
19192         (__class_type_info::do_find_public_subobj): Likewise.
19193         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
19194
19195 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
19196
19197         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
19198
19199         * typeck2.c (incomplete_type_error): Restore previous
19200         cp_error and cp_error_at call sequence.
19201
19202 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
19203
19204         * class.c (dump_class_hierarchy): Make format agree with argument;
19205         cast pointer to unsigned long and print with %lx.
19206
19207 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
19208
19209         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
19210
19211         * typeck.c (composite_pointer_type, common_type,
19212         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
19213         build_function_call_real, convert_arguments,
19214         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
19215         build_unary_op, mark_addressable, build_compound_expr,
19216         build_static_cast, build_reinterpret_cast, build_const_cast,
19217         build_c_cast, build_modify_expr, get_delta_difference,
19218         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
19219         'ISO C++'.  Fusion consecutive calls to diagnostic message routines
19220         into a single one.
19221         * typeck2.c (readonly_error, abstract_virtuals_error,
19222         process_init_constructor, check_for_new_type): Likewise.
19223
19224 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
19225
19226         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
19227         VAR_DECLs.
19228
19229 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
19230
19231         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
19232         (build_x_typeid): Likewise.
19233         (get_tinfo_fn): Likewise.
19234         (get_tinfo_fn_unused): Rename to ...
19235         (get_tinfo_decl): ... here.
19236         * rtti.c (build_headof): Replace logic error with assertion.
19237         (get_tinfo_fn_dynamic): Rename to ...
19238         (get_tinfo_decl_dynamic): ... here. Make static. Use
19239         complete_type_or_else.
19240         (build_x_typeid): Move into ...
19241         (build_typeid): ... here. Adjust call to
19242         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
19243         throw_bad_typeid expression.
19244         (get_tinfo_fn_unused): Rename to ...
19245         (get_tinfo_decl): ... here. Adjust comment.
19246         (get_tinfo_fn): Delete.
19247         (tinfo_from_decl): New static function.
19248         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
19249         (get_typeid): Use complete_type_or_else.
19250         (build_dynamic_cast_1): Adjust calls to
19251         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
19252         * parse.y (primary): Adjust call to build_typeid.
19253         * except.c (build_eh_type_type_ref): Adjust call to
19254         get_tinfo_decl. Mark as used.
19255         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
19256         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
19257         * parse.c: Regenerated.
19258
19259 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
19260
19261         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
19262         calling convention.
19263         (resolves_to_fixed_type_p): Document calling convention.
19264         * rtti.c (build_x_typeid): Initialize NONNULL.
19265
19266         * cp-tree.h (build_shared_int_cst): New function.
19267         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
19268         * class.c (modify_vtable_entry): Likewise.
19269         (add_virtual_function): Split out code to generated shared
19270         INTEGER_CSTs to build_share_int_cst.
19271         (modify_all_vtables): Handle all the overridden functions here.
19272         Add overridden functions from non-primary virtual bases to the
19273         primary vtable.
19274         (finish_struct_1): Adjust call to modify_all_vtables.  Add
19275         overridden functions from non-primary bases to the vtable.
19276         * tree.c (build_shared_int_cst): New function.
19277
19278         * cp-tree.h (scratchalloc): Remove.
19279         (build_scratch_list): Likewise.
19280         * call.c (convert_class_to_reference): Replace build_scratch_list
19281         and build_expr_list with build_tree_list.
19282         (add_candidate): Replace scratchalloc with expralloc.  Note memory
19283         leak.
19284         (build_user_type_conversion_1):  Replace build_scratch_list
19285         and build_expr_list with build_tree_list.
19286         (build_new_op): Likewise.
19287         (build_op_delete_call): Likewise.
19288         (convert_like): Likewise.
19289         * cvt.c (ocp_convert): Likewise.
19290         * decl.c (start_decl): Likewise.
19291         (start_function): Likewise.
19292         (finish_destructor_body): Likewise.
19293         (maybe_build_cleanup_1): Likewise.
19294         * decl2.c (reparse_decl_as_expr): Likewise.
19295         * init.c (perform_member_init): Likewise.
19296         (expand_cleanup_for_base): Likewise.
19297         (build_builtin_delete_call): Likewise.
19298         (build_new_1): Likewise.
19299         (build_delete): Likewise.
19300         * method.c (do_build_assign_ref): Likewise.
19301         * parse.y (already_scoped_stmt): Likewise.
19302         (nontrivial_exprlist): Likewise.
19303         (net_initializer): Likewise.
19304         (initlist): Likewise.
19305         * parse.c: Regenerated.
19306         * rtti.c (build_x_typeid): Likewise.
19307         (build_dynamic_cast_1): Likewise.
19308         * typeck.c (build_x_compound_expr): Likewise.
19309         (build_static_cast): Likewise.
19310         (build_modify_expr): Likewise.
19311
19312         * cp-tree.h (DECL_VINDEX): Add documentation.
19313         * class.c (build_vtable_entry): Likewise.
19314         (start_vtable): Add comment.
19315         (add_virtual_function): Replace pending_hard_virtuals with
19316         overridden_virtuals and pending_virtuals with new_virtuals.
19317         Replace redundant assignments with assertions.
19318         (check_for_override): Add comment.
19319         (check_bases_and_members): Replace pending_hard_virtuals with
19320         overridden_virtuals and pending_virtuals with new_virtuals.
19321         (create_vtbl_ptr): Likewise.
19322         (layout_class_type): Likewise.
19323         (finish_struct_1): Likewise.  Add comments.
19324
19325 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
19326
19327         * class.c (finish_struct_1): Replace redundant code with
19328         assertions.
19329
19330         * cp-tree.h (flag_new_abi): Move.
19331         (flag_use_cxa_atexit): Likewise.
19332         (flag_honor_std): Likewise.
19333         (flag_rtti): Likewise.
19334         (vbase_offsets_in_vtable_p): Define.
19335         (vptrs_present_everywhere_p): Likewise.
19336         (TYPE_CONTAINS_VPTR_P): Likewise.
19337         (dfs_walk_real): Declare.
19338         * class.c (build_vbase_pointer_fields): Check
19339         vbase_offsets_in_vtable_p.
19340         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
19341         BINFO_VPTR_FIELD.
19342         (build_vbase_offset_vtbl_entries): Simplify.
19343         (build_vbase_offset_vtbl_entries): Adjust.
19344         (build_vbase_pointer): Add ability to look up vbase offsets in
19345         vtable.
19346         (start_vtable): New function.
19347         (add_virtual_function): Use it.
19348         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
19349         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
19350         (build_vtbl_initializer): Take the type of the complete object as
19351         input.  Use it to correctly calculate vbase offsets.
19352         (dfs_finish_vtbls): Pass the complete type to
19353         build_vtbl_initializer.
19354         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
19355         (create_vtable_ptr): Create a vtable even if there are no
19356         new virtual functions, under the new ABI.
19357         (finish_struct_1): Likewise.
19358         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
19359         * decl.c (exapnd_static_init): Remove call to
19360         preserve_initializer.
19361         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
19362         vtables.
19363         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
19364         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
19365         (construct_virtual_bases): Don't initialize virtual base pointers
19366         under the new ABI.
19367         (build_aggr_init): Clean up comment.
19368         (expand_aggr_init_1): Likewise.
19369         * rtti.c (expand_class_desc): Store the virtual function table
19370         index where the vbase offset lives in the offset field.
19371         * search.c (dfs_walk_real): Make it global.
19372         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
19373         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
19374
19375         * tinfo.h (USItype): Make it signed under the new ABI.
19376         * tinfo.cc (convert_to_base): New function.  Encapsulate base
19377         conversion logic here.
19378         (__class_type_info::do_upcast): Use it.
19379         (__class_type_info::do_dyncast): Likewise.
19380         (__class_type_info::do_find_public_subobj): Likewise.
19381
19382         * init.c (construct_virtual_bases): Don't look up the addresses of
19383         virtual bases at run-time.
19384
19385         * class.c (build_vbase_pointer): Relocate.
19386         (build_vbase_pointer_fields): Likewise.
19387         (dfs_build_vbase_offset_vtbl_entries): Likewise.
19388         (build_vbase_offset_vtbl_entries): Likewise.
19389
19390         * decl.c (init_decl_processing): Complain if -fnew-abi
19391         -fno-vtable-thunks is used.
19392
19393         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
19394         flag_new_abi.
19395
19396 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
19397
19398         * cp-tree.h (num_extra_vtbl_entries): New function.
19399         (size_extra_vtbl_entries): Likewise.
19400         (dfs_vtable_path_unmark): Likewise.
19401         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
19402         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
19403         * class.c (num_extra_vtbl_entries): New function.
19404         (size_extra_vtbl_entries): Likewise.
19405         (dfs_build_vbase_offset_vtbl_entries): New function.
19406         (build_vbase_offset_vtbl_entries): Likewise.
19407         (build_vtbl_initializer): Use it.
19408         (finish_struct_1): Adjust vtable sizes (using
19409         num_extra_vtbl_entries).
19410         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
19411         THUNK_DECL is non-NULL before expanding it.
19412         * init.c (expand_virtual_init): Adjust the vtable pointer by
19413         size_extra_vtbl_entries before storing it.
19414         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
19415         Handle TREE_LIST parameters here, not in the dfs_* functions.
19416         (dfs_unmarked_real_bases_queue_p): Adjust.
19417         (dfs_marked_real_bases_queue_p): Likewise.
19418         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
19419         (dfs_vtable_path_marked_real_bases_queue_p): New function.
19420         (dfs_vtable_path_unmark): Likewise.
19421
19422 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
19423
19424         * optimize.c (copy_body_r): Clear the operand three of a
19425         TARGET_EXPR when copying it.
19426
19427 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
19428
19429         * method.c (build_decl_overload_real): Check whether we are in ::
19430         before returning __builtin_new/delete.
19431
19432 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
19433
19434         * pt.c (tsubst_friend_function): Improve comment.
19435         (instantiate_decl): Avoid crashing when a "nested" function is
19436         instantiated from the top level.
19437
19438         * dump.c (dqeueue_and_dump): Dump
19439         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
19440
19441 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19442
19443         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
19444
19445 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
19446
19447         * g++spec.c (lang_specific_driver): Add -fnew-abi if
19448         ENABLE_NEW_GXX_ABI defined.
19449         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
19450         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
19451         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
19452
19453 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
19454
19455         * decl.c (start_cleanup_fn): Call pushdecl.
19456
19457         * call.c (convert_class_to_reference): Fix typos.
19458         (build_conditional_expr): Handle errors gracefully.
19459         * class.c (push_nested_class): Likewise.
19460         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
19461         (DECL_THIS_EXTERN): Use it.
19462         (DECL_THIS_STATIC): Likewise.
19463         * cvt.c (convert_to_void): Handle errors gracefully.
19464         (build_expr_type_conversion): Likewise.
19465         * decl.c (maybe_push_decl): Likewise.
19466         (start_decl_1): Likewise.
19467         (require_complete_types_for_parms): Likewise.
19468         * parse.y (structsp): Likewise.
19469         (base_class): Likewise.
19470         * parse.c: Regenerated.
19471         * pt.c (finish_member_template_decl): Likewise.
19472         * typeck.c (decay_conversion): Likewise.
19473
19474         * cp-tree.h (dfs_skip_vbases): New function.
19475         (find_vbase_instance): Likewise.
19476         * class.c (determine_primary_base): Allow a nearly empty base to
19477         serve as a primary base class under the new ABI.
19478         (get_class_offset_1): Rename to ...
19479         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
19480         messages here.
19481         (get_class_offset): Use it.  Issue error messages here.
19482         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
19483         find the right copies of virtual bases.
19484         (fixup_vtable_deltas1): Rename to ...
19485         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
19486         bases as primary bases.
19487         (fixup_vtable_deltas): Remove.
19488         (override_one_vtable): Handle virtual bases as primary bases.
19489         (merge_overrides): Likewise.
19490         (finish_struct_1): Likewise.
19491         (dump_class_hierarchy): Dump primary-ness of bases as well.
19492         * search.c (mark_primary_bases): Use a pre-order traversal to
19493         handle primary virtual bases.
19494         (dfs_skip_vbases): New fiunction.
19495         (expand_upcast_fixups): Adjust to handle primary virtual bases.
19496         (fixup_virtual_upcast_offsets): Likewise.
19497         (fixup_all_virtual_upcast_offsets): Likewise.
19498         (dfs_find_vbase_instances): New function.
19499         (find_vbase_instance): Likewise.
19500
19501 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
19502
19503         * lex.c (DIR_SEPARATOR): Delete macro.
19504
19505 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
19506
19507        * decl2.c (lang_decode_option): Handle automatic line wrapping
19508        option.
19509
19510 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
19511
19512         * friend.c (do_friend): Don't resolve scopes when processing
19513         template declarations, even if the qualifying scope doesn't
19514         involve template parameters.
19515
19516 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
19517
19518         * class.c (dfs_modify_vtables_queue_p): Remove.
19519         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
19520         and dfs_marked_real_bases_queue_p instead of
19521         dfs_modify_vtables_queue_p.
19522
19523         * class.c (build_vbase_path): Simplify.
19524         (dfs_propagate_binfo_offsets): New function.
19525         (propagate_binfo_offsets): Use it.
19526         (remove_base_field): Simplify.
19527         (dfs_set_offset_for_vbases): Remove.
19528         (dfs_set_offset_for_shared_vbases): New function.
19529         (dfs_set_offset_for_unshared_vbases): Likewise.
19530         (layout_virtual_bases): Use them.
19531         (layout_basetypes): Don't call propagate_binfo_offsets.
19532         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
19533         for the vbases.
19534
19535         * class.c (build_base_field): New function, split out from ...
19536         (build_base_fields): ... here.  Use it.  Allocate primary bases
19537         first, under the new ABI.
19538         (get_vtable_entry): Remove.
19539         (remove_base_field): New function, split out from ...
19540         (remove_base_fields): ... here.  Adjust since primary bases come
19541         first under the new ABI.
19542
19543         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
19544         (initialize_vtbl_ptrs): New function.
19545         (expand_indirect_vtbls_init): Change prototype.
19546         (convert_pointer_to_vbase): Declare.
19547         * init.c (expand_direct_vtbls_init): Remove.
19548         (dfs_initialize_vtbl_ptrs): New function.
19549         (initialize_vtbl_ptrs): Likewise.
19550         (emit_base_init): Use initialize_vtbl_ptrs.
19551         * search.c (convert_pointer_to_vbase): Make it global.
19552         (expand_indirect_vtbls_init): Remove vtable initialization code.
19553         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
19554
19555         * class.c (dfs_finish_vtbls): New function.
19556         (finish_vtbls): Use it.
19557         (dump_class_hierarchy): New function.
19558
19559         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
19560         (BINFO_VBASE_PRIMARY_P): New macro.
19561         (BINFO_VIRTUALS): Add to documentation.
19562         (SET_BINFO_PRIMARY_MARKED_P): Remove.
19563         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
19564         (dfs_mark_primary_bases_queue_p): Likewise.
19565         (dfs_unmarked_real_bases_queue_p): New function.
19566         (dfs_marked_real_bases_queue_p): Likewise.
19567         * search.c (dfs_mark_primary_bases): Adjust.
19568         (mark_primary_bases): Likewise.
19569         (get_shared_vbase_if_not_primary): New function.
19570         (dfs_unmarked_real_bases_queue_p): Likewise.
19571         (dfs_marked_real_bases_queue_p): Likewise.
19572         (dfs_get_pure_virtuals): Simplify.
19573         (get_pure_virtuals): Likewise.
19574
19575 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19576
19577         * lex.c: Include tm_p.h.
19578
19579 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
19580
19581         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
19582
19583 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
19584
19585         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
19586         * pt.c (instantiate_decl): Defer comdat templates that might not be
19587         needed.
19588
19589         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
19590         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
19591         (finish_file): Likewise.
19592
19593         * decl2.c (import_export_class): Undo 12/14 change.
19594
19595         * error.c (dump_decl): operator new, not operatornew.
19596
19597         * class.c (field_decl_cmp): A nontype is "greater" than a type.
19598         * search.c (lookup_field_1): Look for the last field with the
19599         desired name.
19600
19601 2000-01-05  Nathan Sidwell  <nathan@acm.org>
19602
19603         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
19604         FUNCTION_DECL.
19605
19606 2000-01-05  Nathan Sidwell  <nathan@acm.org>
19607
19608         * typeck.c (build_static_cast): Don't strip target qualifiers
19609         when casting from a class.
19610
19611 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19612
19613         * class.c (warn_hidden): Initialize variable `fndecl'.
19614
19615 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
19616
19617         * decl.c (flag_isoc9x): New variable to be able to use code in
19618         c-common.c.  For now always zero.
19619
19620 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
19621
19622         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
19623         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
19624         or unshare_base_binfos for virtual bases here.
19625         * search.c (dfs_get_vbase_types): Do it here.
19626         (get_vbase_types): Adjust.
19627
19628 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
19629
19630         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
19631         (BINFO_PRIMARY_MARKED_P): Use flag 5.
19632         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
19633         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
19634         (unmark_primary_bases): Remove declaration.
19635         (unmarkedp): Declare.
19636         (dfs_vbase_unmark): Likewise.
19637         * class.c (determine_primary_base): Return immediately if there
19638         are no base classes.  Call mark_primary_bases here.
19639         (modify_all_direct_vtables): Remove.
19640         (modify_all_indirect_vtables): Remove.
19641         (dfs_modify_vtables_queue_p): New function.
19642         (dfs_modify_vtables): New function.
19643         (modify_all_vtables): Use them.
19644         (build_base_fields): Build FIELD_DECLs for primary virtual base
19645         classes.
19646         (create_vtable_ptr): Don't call determine_primary_base here.
19647         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
19648         (dfs_set_offset_for_vbases): ... this.
19649         (layout_virtual_bases): Use it.
19650         (layout_class_type): Call determine_primary_base here.
19651         * search.c (unmarkedp): Make it global.
19652         (shared_marked_p): Simplify.
19653         (shared_unmarked_p): Likewise.
19654         (dfs_primary_bases_queue_p): Remove.
19655         (dfs_unmark_primary_bases): Likewise.
19656         (unmark_primary_bases): Likewise.
19657         (mark_primary_bases): Simplify.
19658         (get_pure_virtuals): Don't call mark_primary_bases here.
19659         (dfs_vbase_unmark): New function.
19660         (get_vbase_types): Simplify.
19661
19662         * class.c (struct base_info): Remove.
19663         (determine_primary_base): Take has_virtual_p rather than a
19664         base_info as input.  Don't calculate max_has_virtual.
19665         (finish_struct_bits): Remove max_has_virtual argument.
19666         (create_vtable_ptr): Remove max_has_virtual_p argument.
19667         (layout_virtual_bases): Remove max argument.
19668         (layout_basetypes): Likewise.
19669         (layout_class_type): Remove max_has_virtual_p argument.
19670         (finish_struct_1): Remove max_has_virtual.
19671
19672         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
19673         (layout_basetypes): Remove.
19674         * class.c (propagate_binfo_offsets): Moved here from tree.c.
19675         Update to handle primary virtual bases.
19676         (remove_base_fields): New function, split out from
19677         layout_basetypes.
19678         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
19679         (layout_virtual_bases): New function, split out from
19680         layout_basetypes.  Update to handle primary virtual bases.
19681         (layout_basetypes): Moved here from tree.c.  Use
19682         remove_base_fields and layout_virtual_bases.
19683         * search.c (dfs_mark_primary_bases_queue_p): New function.
19684         (mark_primary_bases): Use it.
19685         * tree.c (CEIL): Remove.
19686         (propagate_binfo_offsets): Remove.
19687         (layout_basetypes): Remove.
19688
19689 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
19690
19691         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
19692         (BINFO_PRIMARY_MARKED_P): New macro.
19693         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
19694         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
19695         (mark_primary_bases): New function.
19696         (unmark_primary_bases): Likewise.
19697         * search.c (get_abstract_virtuals_1): Remove.
19698         (dfs_mark_primary_bases): New function.
19699         (mark_primary_bases): Likewise.
19700         (dfs_unmark_primary_bases): Likewise.
19701         (unmark_primary_bases): Likewise.
19702         (dfs_get_pure_virtuals): Likewise.
19703
19704 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
19705
19706         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
19707         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
19708         (modify_one_vtable): Adjust.
19709         (fixup_vtable_deltas1): Likewise.
19710         (override_one_vtable): Likewise.
19711         * search.c (get_abstract_virtuals_1): Likewise.
19712         (get_pure_virtuals): Likewise.
19713         (expand_upcast_fixups): Likewise.
19714         * tree.c (debug_binfo): Likewise.
19715
19716         * class.c (build_vtable): Don't return a value.  Don't rebuild
19717         vtables for bases that have already been handled.
19718         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
19719         already been handled.
19720         (modify_one_vtable): Adjust accordingly.
19721         (fixup_vtable_deltas1): Likewise.
19722         (finish_struct_1): Likewise.
19723
19724 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
19725
19726         * call.c (build_new_method_call): Also check destructors.