OSDN Git Service

* c-format.c (gcc_diag_char_table): Add %J.
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2003-09-20  Richard Henderson  <rth@redhat.com>
2
3         * decl.c, decl2.c, pt.c: Use %J in diagnostics.
4
5 2003-09-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6
7         PR c++/157
8         * parser.c (cp_parser_direct_declarator): Clear
9         parser->num_template_parameter_lists when parsing function
10         parameters.
11         (cp_parser_constructor_declarator_p): Likewise.
12
13 2003-09-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14
15         PR c++/495
16         * pt.c (tsubst_friend_class): Only use innermost template
17         arguments for the injected friend class template.
18
19 2003-09-19  Nathan Sidwell  <nathan@codesourcery.com>
20
21         PR c++/12332
22         * pt.c (instantiate_class_template): Increment
23         processing_template_decl around the tsubst of a template member
24         function.
25
26 2003-09-19  Gabriel Dos Reis  <gdr@integrable-solutions.net>
27
28         * decl.c (cxx_scope_descriptor): Fix thinko.
29         (struct cp_binding_level): Adjust type of binding_depth field. 
30
31 2003-09-18  Danny Smith  <dannysmith@users.sourceforge.net>
32
33         PR c++/12320
34         * call.c (type_passed_as): Check for incomplete type.
35         (convert_for_arg_passing): Likewise.
36
37 2003-09-18  Nathan Sidwell  <nathan@codesourcery.com>
38
39         PR c++/9848
40         * optimize.c (maybe_clone_body): Don't set MARK_USED on parameters
41         here.
42         * semantics.c (expand_body): Set it here on the remaining clones.
43
44 2003-09-18  Roger Sayle  <roger@eyesopen.com>
45
46         * lex.c (init_operators): Remove operator_name_info for FFS_EXPR.
47         * class.c (instantiate_type): Remove FFS_EXPR case.
48
49 2003-09-18  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
50
51         * ChangeLog: Fix recent commit.
52
53 2003-09-18  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
54
55         * ChangeLog: Add PR number to patch for PR c++/12316.
56
57 2003-09-18  Gabriel Dos Reis <gdr@integrable-solutions.net>
58
59         * error.c (dump_type): Simplify.  Use pp_type_specifier_seq for
60         "C" types. 
61         * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Fix thinko.
62
63 2003-09-17  Richard Henderson  <rth@redhat.com>
64
65         * semantics.c (expand_body): Don't save/restore input_location.
66
67 2003-09-17  Mark Mitchell  <mark@codesourcery.com>
68
69         PR c++/12266
70         * cp-tree.h (tsubst_flags_t): Add tf_conv.
71         * class.c (standard_conversion): Pass tf_conv to
72         instantiate_type.
73         (resolve_address_of_overloaded_function): Do not call mark_used
74         when just checking conversions.
75
76         PR debug/12066
77         * cp-lang.c (LANG_HOOKS_BUILTIN_TYPE_DECLS): Define.
78         * cp-tree.h (cxx_builtin_type_decls): Declare.
79         * decl.c (builtin_type_decls): New variables.
80         (cxx_builtin_type_decls): New function.
81         (record_builtin_type): Add to builtin_type_decls.
82
83 2003-09-17  Richard Henderson  <rth@redhat.com>
84
85         PR c++/12316
86         * semantics.c (expand_or_defer_fn): Inc/dec function_depth.
87
88 2003-09-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
89
90         PR c++/7939
91         * typeck.c (comptypes): Don't ICE when its first argument is
92         error_mark_node.
93         (compparms): Reverse the arguments of same_type_p.
94
95 2003-09-15  Nathan Sidwell  <nathan@codesourcery.com>
96
97         PR c++/12184
98         * typeck.c (convert_arguments): Return error_mark_node for an
99         incomplete parameter. Make error message more informative.
100
101 2003-09-12  Mark Mitchell  <mark@codesourcery.com>
102
103         PR c++/3907
104         * class.c (maybe_note_name_used_in_class): Refine test for whether
105         or not we are in a class scope.
106
107         * cp-tree.h (language_function): Remove x_expanding_p.
108         (expanding_p): Remove.
109         (doing_semantic_analysis_p): Remove.
110         (scope_kind): Add sk_function_parms, sk_class,
111         sk_namespace.
112         (innermost_scope_kind): New method.
113         * call.c (cxx_type_promotes_to): Use type_decays_to.
114         * cp-lang.c (LANG_HOOKS_PUSHLEVEL): Redefine.
115         (LANG_HOOKS_POPLEVEL): Likewise.
116         * decl.c (cp_binding_level): Remove parm_flag, template_parms_p,
117         template_spec_p, namespace_p, is_for_scope, is_try_scope, and
118         is_catch_scope.  Add kind and explicit_spec_p.
119         (cxx_scope_descriptor): Use a lookup table.
120         (find_class_binding_level): Use "kind" field in binding_level, not
121         the various flags.
122         (pop_binding_level): Likewise.
123         (innermost_nonclass_level): Likewise.
124         (toplevel_bindings_p): Likewise.
125         (namespace_bindings_p): Likewise.
126         (template_parm_scope_p): Likewise.
127         (innermost_scope_kind): New method.
128         (current_tmpl_spec_kind): Use "kind" field in binding_level, not
129         the various flags.
130         (pushlevel): Remove check for doing_semantic_analysis_p.
131         (begin_scope): Simplify.
132         (add_decl_to_level): Use "kind" field in binding_level, not
133         the various flags.
134         (push_local_binding): Likewise.
135         (pop_label): Remove check for doing_semantic_analysis_p.
136         (poplevel): Use "kind" field in binding_level, not
137         the various flags.
138         (set_block): Remove check for doing_semantic_analysis_p.
139         (pushlevel_class): Use "kind" field in binding_level, not
140         the various flags. 
141         (poplevel_class): Likewise.
142         (initial_push_namespace_scope): Likewise.
143         (maybe_push_to_top_level): Likewise.
144         (set_identifier_type_value_with_scope): Likewise.
145         (pop_everything): Likewise.
146         (maybe_process_template_type_declaration): Likewise.
147         (pushtag): Likewise.
148         (pushdecl): Likewise.
149         (pushdecl_with_scope): Likewise.
150         (check_previous_goto_1): Likewise.
151         (define_label): Likewise.
152         (finish_case_label): Likewise.
153         (lookup_tag): Likewise.
154         (unqualified_namespace_lookup): Likewise.
155         (lookup_name_real): Likewise.
156         (lookup_name_current_level): Likewise.
157         (lookup_type_current_level): Likewise.
158         (record_builtin_type): Likewise.
159         (cp_make_fname_decl): Likewise.
160         (maybe_inject_for_scope_var): Likewise.
161         (cp_finish_decl): Remove check for doing_semantic_analysis_p.
162         (start_function): Use begin_scope, not pushlevel.
163         (finish_function): Use "kind" field in binding_level, not
164         the various flags.
165         (start_method): Use begin_scope, not pushlevel.
166         (make_label_decl): Do not check expanding_p.
167         (save_function-data): Do not set expanding_p.
168         (cxx_push_function_context): Do not clear expanding_p.
169         * semantics.c (cxx_expand_function_start): Do not set expanding_p.
170         
171 2003-09-14  Mark Mitchell  <mark@codesourcery.com>
172
173         * class.c (layout_class_type): Make DECL_MODE match TYPE_MODE for
174         an bit-field whose width exceeds that of its type.
175
176 2003-09-14  Geoffrey Keating  <geoffk@apple.com>
177
178         * rtti.c (get_tinfo_decl): Set TREE_PUBLIC for typeinfo decls.
179
180 2003-09-14  Kazu Hirata  <kazu@cs.umass.edu>
181
182         * ChangeLog: Follow spelling conventions.
183         * parser.c: Likewise.
184
185 2003-09-13  Richard Henderson  <rth@redhat.com>
186
187         * decl2.c (finish_file): Check cgraph_assemble_pending_functions
188         during relaxation loop.
189
190 2003-09-11  David Edelsohn  <edelsohn@gnu.org>
191
192         * decl2.c (var_finalized_p): Swap arms of conditional.
193
194 2003-09-10  Nathan Sidwell  <nathan@codesourcery.com>
195
196         PR c++/11788
197         * typeck.c (build_address): If it is a function, mark it used.
198         (build_unary_op): Do not lose object's side-effects when taking
199         address of static member function.
200         * class.c (resolve_address_of_overloaded_function): Use
201         tsubst_flags_t parameter. Only expect overload sets. Adjust.
202         (instantiate_type): Adjust flags passing. Do not lose object's
203         side-effects when taking address of static member function.
204
205 2003-09-11  Richard Henderson  <rth@redhat.com>
206
207         * semantics.c (expand_or_defer_fn): Update for new
208         cgraph_finalize_function argument.
209
210 2003-09-10  Richard Henderson  <rth@redhat.com>
211
212         * decl2.c (cxx_callgraph_analyze_expr): Mark argument unused.
213
214 2003-09-10  Jan Hubicka  <jh@suse.cz>
215
216         * decl2.c (var_finalized_p): New.
217         (maybe_emit_vtables, write_out_vars, finish_file): Use it.
218
219 2003-09-10  Richard Henderson  <rth@redhat.com>
220
221         * decl2.c (cxx_callgraph_analyze_expr): New, from corpse of
222         mark_member_pointers.
223         (lower_function): Remove.
224         * cp-tree.h: Update to match.
225         * cp-lang.c (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): New.
226         (LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Remove.
227
228 2003-09-09  Richard Henderson  <rth@redhat.com>
229
230         * semantics.c (expand_or_defer_fn): Update call to 
231         cgraph_finalize_function.
232
233         * semantics.c (expand_or_defer_fn): Use cgraph_finalize_function
234         always.
235
236         * decl2.c (finish_file): Avoid out-of-bounds array reference
237         during memmove.
238
239 2003-09-09  Richard Henderson  <rth@redhat.com>
240
241         * decl2.c (mark_member_pointers): Rename from
242         mark_member_pointers_and_eh_handlers and don't check eh handlers.
243
244 2003-09-09  Christian Ehrhardt  <ehrhardt@mathematik.uni-ulm.de>
245
246         PR bootstrap/12168
247         * method.c (use_thunk): Clear DECL_RTL of copied nodes.
248
249 2003-09-08  Mark Mitchell  <mark@codesourcery.com>
250
251         * cp-lang.c (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define to
252         c_register_builtin_type.
253
254         PR c++/11786
255         * decl2.c (add_function): Do not complain about seeing the same
256         non-function twice.
257         * semantics.c (perform_koenig_lookup): Improve documentation.
258
259         PR c++/5296
260         * pt.c (try_one_overload): Add addr_p parameter.
261         (resolve_overloaded_unification): Pass it.
262
263 2003-09-08  Richard Henderson  <rth@redhat.com>
264
265         * optimize.c (maybe_clone_body): Inc/dec function_depth.
266
267 2003-09-08  Richard Henderson  <rth@redhat.com>
268
269         * decl.c (finish_function): Clear current_function_decl.
270         * decl2.c (mark_used): Don't push/pop gc context.
271         * optimize.c (optimize_function): Likewise.
272         * tree.c (cp_cannot_inline_tree_fn): Likewise.
273         * pt.c (instantiate_decl): Inc/dec function_depth instead.
274         * semantics.c (expand_body): Update for tree_rest_of_compilation
275         nested argument.
276
277 2003-09-07  Gabriel Dos Reis  <gcc@integrable-solutions.net>
278
279         PR c++/11762
280         * error.c (dump_decl): Handle namespace-alias-definition.
281         * decl.c (warn_extern_redeclared_static): There is no point in
282         checking changes in storage class specifier for a namespace
283         declaration. 
284         (duplicate_decls): Tidy diagnostic message.
285         * cxx-pretty-print.c (pp_cxx_left_brace): New macro.
286         (pp_cxx_right_brace): Likewise.
287         (pp_cxx_original_namespace_definition): New function.
288         (pp_cxx_namespace_alias_definition): Likewise.
289         (pp_cxx_declaration): Use them.  Handle NAMESPACE_DECLs.
290
291 2003-09-07  Jan Hubicka  <jh@suse.cz>
292
293         * decl2.c (maybe_emit_vtables, write_out_vars, finish_file):
294         Avoid re-emitting variables in unit-at-a-time mode.
295
296 2003-09-06  Mark Mitchell  <mark@codesourcery.com>
297
298         PR c++/11867
299         * call.c (standard_conversion): Improve comments.
300         (perform_direct_initialization): Make sure we return an expression
301         of the correct type.
302         * typeck.c (build_static_cast): Check for ambiguity and
303         accessibility when performing conversions.
304
305 2003-09-06  Gabriel Dos Reis  <gdr@integrable-solutions.net>
306
307         * cp-tree.h (add_binding): Remove declaration.
308         * name-lookup.h (supplement_binding): Declare.
309         * decl.c (add_binding): Move to name-lookup.c.
310         (push_local_binding): Adjust.
311         (push_class_binding): Likewise.
312         (set_identifier_type_value_with_scope): Likewise.
313         * name-lookup.c (supplement_binding): Rename from add_binding.
314         Return a bool.  Improve documentation. 
315         (set_namespace_binding): Adjust.
316         * Make-lang.in (cp/name-lookup.o): Depend on toplev.h
317
318 2003-09-06  Nathan Sidwell  <nathan@codesourcery.com>
319
320         PR c++/11794
321         * class.c (pushclass): Push dependent using decls for nested
322         classes of templates too.
323
324 2003-09-06  Roger Sayle  <roger@eyesopen.com>
325
326         PR c++/11409
327         * class.c (resolve_address_of_overloaded_function): When building
328         list of matching non-template function decls, ignore anticipated
329         declarations of undeclared or shadowed GCC builtins.
330
331 2003-09-06  Steven Bosscher  <steven@gcc.gnu.org>
332
333         PR c++/11595
334         * decl.c (define_label): Remove unreachable timevar pop.
335         Always return the decl, even if the definition is invalid.
336
337 2003-09-06  Nathan Sidwell  <nathan@codesourcery.com>
338
339         PR c++/12167
340         * parser.c (cp_parser_late_parsing_default_args): Push & pop the
341         unparsed functions queue.
342
343 2003-09-05  Mark Mitchell  <mark@codesourcery.com>
344
345         PR c++/12163
346         * call.c (perform_direct_initialization): Correct logic for
347         direct-initialization of a class type.
348
349         PR c++/12146
350         * pt.c (lookup_template_function): Robustify.
351
352 2003-09-05  Nathan Sidwell  <nathan@codesourcery.com>
353
354         PR c++/11922
355         * pt.c (tsubst_qualified_id): Make sure we get a non-type.
356         (tsubst_expr, tsubst_copy_and_build): Pass false, not zero, as
357         is_type_p to lookup_qualified_name.
358
359         * semantics.c (finish_call_expr): Refactor some code.
360
361         PR c++/12037
362         * cp-tree.h (COMPOUND_EXPR_OVERLOADED): New.
363         (build_min_non_dep): Declare.
364         * tree.c (build_min): Propagate TREE_SIDE_EFFECTS.
365         (build_min_non_dep): New.
366         * cvt.c (convert_to_void): Don't explicitly copy
367         TREE_SIDE_EFFECTS, TREE_NO_UNUSED_WARNING.
368         * call.c (build_new_method_call): Use build_min_non_dep.
369         * decl2.c (grok_array_decl): Likewise.
370         (build_offset_ref_call_from_tree): Likewise.
371         * typeck.c (finish_class_member_access_expr,
372         build_x_indirect_ref, build_x_binary_op, build_x_unary_op,
373         build_x_conditional_expr, build_x_compound_expr): Likewise.
374         (build_static_cast, build_reinterpret_cast,
375         build_const_cast): Propagate TREE_SIDE_EFFECTS inside a template.
376         * typeck2.c (build_x_arrow): Use build_min_non_dep.
377         (build_functional_cast): Propagate TREE_SIDE_EFFECTS inside a
378         template.
379         * rtti.c (build_dynamic_cast_1): Set DECL_IS_PURE.
380         (build_dynamic_cast): Set TREE_SIDE_EFFECTS.
381         * pt.c (build_non_dependent_expr): Check COMPOUND_EXPR_OVERLOADED.
382
383 2003-09-04  Richard Henderson  <rth@redhat.com>
384
385         * decl2.c (mark_member_pointers_and_eh_handlers): Update for
386         change in cgraph_mark_needed_node arguments.
387
388 2003-09-02  Geoffrey Keating  <geoffk@apple.com>
389
390         PR 12161
391         * decl2.c (mark_used): Use ggc_push_context/ggc_pop_context.
392         * tree.c (cp_cannot_inline_tree_fn): Likewise.
393
394 2003-09-04  Nathan Sidwell  <nathan@codesourcery.com>
395
396         * cp-tree.h (finish_sizeof, finish_alignof): Remove.
397         (expr_sizeof): Replace with ...
398         (cxx_sizeof_or_alignof_expr): ... here.
399         (cxx_sizeof_or_alignof_type): Make complain parameter a bool.
400         * parser.c (cp_parser_unary_expression): Commonize alignof and
401         sizeof handling.
402         * pt.c (tsubst_copy_and_build): Adjust alignof and sizeof
403         substitution.
404         * semantics.c (finish_sizeof, finish_alignof): Remove.
405         * typeck.c (cxx_sizeof_or_alignof_type): Complain parameter
406         becomes bool. Set TREE_READONLY.
407         (expr_sizeof): Replace with ...
408         (cxx_sizeof_or_alignof_expr): ... here. Clear TREE_SIDE_EFFECTS.
409
410 2003-09-04  Mark Mitchell  <mark@codesourcery.com>
411
412         Remove cast-as-lvalue extension.
413         * call.c (build_conditional_expr): Correct formatting.
414         (convert_like_real): Use lvalue_p, not non_cast_lvalue_p.
415         (initialize_real): Use real_lvalue_p, not real_non_cast_lvalue_p.
416         * cp-tree.h (non_cast_lvalue_p): Remove.
417         (real_non_cast_lvalue_p): Remove.
418         (non_cast_lvalue_or_else): Remove.
419         * tree.c (lvalue_p_1): Remove allow_cast_as_lvalue parameter.
420         (real_lvalue_p): Adjust call to lvalue_p_1.
421         (non_cast_lvalue_p): Remove.
422         (non_cast_lvalue_or_else): Remove.
423         (lvalue_p): Adjust call to lvalue_p_1.
424         (lvalue_or_else): Simplify.
425         * typeck.c (build_unary_op): Use lvalue_or_else, not
426         non_cast_lvalue_or_else.
427         (build_static_cast): Use real_lvalue_p, not real_non_cast_lvalue_p.
428
429 2003-09-03  DJ Delorie  <dj@redhat.com>
430
431         * decl.c (finish_function): Pass fndecl to aggregate_value_p.
432
433 2003-09-03  Mark Mitchell  <mark@codesourcery.com>
434
435         PR c++/12053
436         * class.c (include_empty_classes): Correct logic for ABI version 1.
437
438 2003-09-03  Richard Henderson  <rth@redhat.com>
439
440         * optimize.c (optimize_function): Push/pop ggc context around
441         the call to optimize_inline_calls.
442
443 2003-09-02  Scott Brumbaugh  <scottb.lists@verizon.net>
444
445         PR c++/11553
446         * parser.c (cp_parser_decl_specifier_seq): Add check for a
447         duplicate friend decl-specifier.
448
449 2003-09-02  Mark Mitchell  <mark@codesourcery.com>
450
451         PR c++/11847
452         * pt.c (convert_nontype_argument): Correct representation of
453         REFERENCE_TYPE expressions.
454
455         PR c++/11808
456         * cp-tree.h (KOENIG_LOOKUP_P): New macro.
457         (finish_call_expr): Change prototype.
458         * parser.c (cp_parser_postfix_expression): Adjust call to
459         finish_call_expr.
460         * pt.c (tsubst_copy_and_build): Use KOENIG_LOOKUP_P.
461         * semantics.c (finish_call_expr): Add koenig_p parameter.
462
463 2003-09-01  Mark Mitchell  <mark@codesourcery.com>
464
465         PR c++/12114
466         * cp-tree.h (initialize_reference): Change prototype.
467         * call.c (initialize_reference): Add cleanup parameter.
468         * decl.c (grok_reference_init): Likewise.
469         (check_initializer): Likewise.
470         (cp_finish_decl): Insert a CLEANUP_STMT if necessary.
471         (duplicate_decls): When replacing an anticipated builtin, do not
472         honor TREE_NOTHROW.
473         * typeck.c (convert_for_initialization): Correct call to
474         initialize_reference.
475
476         PR c++/11972
477         * pt.c (dependent_type_p_r): Pass only the innermost template
478         arguments to any_dependent_template_arguments_p.
479
480 2003-09-01  Josef Zlomek  <zlomekj@suse.cz>
481
482         * error.c (dump_expr): Kill BIT_ANDTC_EXPR.
483         * lex.c (init_operators): Kill BIT_ANDTC_EXPR.
484         * pt.c (tsubst_copy): Kill BIT_ANDTC_EXPR.
485         * typeck.c (build_binary_op): Kill BIT_ANDTC_EXPR.
486         (tsubst_copy_and_build): Kill BIT_ANDTC_EXPR.
487
488 2003-08-29  Mark Mitchell  <mark@codesourcery.com>
489
490         PR c++/12093
491         * pt.c (build_non_dependent_expr): Do not build a
492         NON_DEPENDENT_EXPR for a STRING_CST.
493
494         PR c++/11928
495         * search.c (add_conversions): Avoid adding two conversion
496         operators for the same type.
497
498 2003-08-29  Mark Mitchell  <mark@codesourcery.com>
499
500         PR c++/6196
501         * pt.c (tsubst_copy_and_build): Correct handling of
502         address-of-label extension.
503         * semantics.c (finish_goto_stmt): The address of a label must go
504         through the lvalue-to-rvalue conversion.
505
506 2003-08-29  Richard Henderson  <rth@redhat.com>
507             Jason Merrill <jason@redhat.com>
508
509         * cp-lang.c (LANG_HOOKS_RTL_EXPAND_START): New.
510         (LANG_HOOKS_RTL_EXPAND_STMT): New.
511         * cp-tree.h (cxx_expand_function_start): Declare.
512         * decl.c (start_function): Use allocate_struct_function.
513         Move stmts_are_full_exprs_p assertion from expand_body.
514         Do not free_after_parsing or free_after_compilation.
515         (cxx_push_function_context): Move code to set struct function
516         data from genrtl_start_function.
517         * optimize.c (optimize_function): Don't inc/dec function_depth.
518         * semantics.c (expand_body): Use tree_rest_of_compilation.
519         (cxx_expand_function_start): Rename from genrtl_start_function,
520         omit bits done by tree_rest_of_compilation.
521         (genrtl_finish_function): Remove.
522         (clear_decl_rtl): Move to ../tree-optimize.c.
523
524 2003-08-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
525
526         PR c++/11811
527         * cxx-pretty-print.c (pp_cxx_canonical_template_parameter): New
528         function. 
529         * cxx-pretty-print.h: Declare.
530         * error.c (dump_template_parameter): Use it.
531         (dump_type): Likewise.
532
533 2003-08-28  Mark Mitchell  <mark@codesourcery.com>
534
535         * init.c (decl_constant_value): Deal with COND_EXPR specially.
536         * call.c (build_conditional_expr): Revert previous patch.
537
538         PR optimization/5079
539         * call.c (build_conditional_expr): Use decl_constant_value to
540         simplify the arguments.
541
542 2003-08-26  Dan Nicolaescu  <dann@ics.uci.edu>
543
544         * parser.c (struct cp_token): Use enum bitfields.
545         (CP_TOKEN_BLOCK_NUM_TOKENS): Make sure cp_token_block fits in a
546         512B allocation unit.
547         (cp_parser_token_tree_map_node): Use enum bitfields.
548
549 2003-08-26  Nathan Sidwell  <nathan@codesourcery.com>
550
551         PR c++/11871
552         * decl.c (push_class_level_binding): Correct old_decl value from
553         my 2003-07-29 reorganization.
554
555         * call.c (build_call): Don't set TREE_SIDE_EFFECTS here.
556         (build_new_method_call): Add goto finish.
557         * semantics.c (simplify_aggr_init_exprs_r): Don't set
558         TREE_SIDE_EFFECTS on a call.
559
560 2003-08-25  Richard Henderson  <rth@redhat.com>
561
562         * cxx-pretty-print.c (pp_cxx_class_name): Remove unused function.
563
564 2003-08-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
565
566         * cxx-pretty-print.h (pp_cxx_flag_default_argument): New flag.
567         (cxx_pretty_printer): Adjust base type.
568         (pp_cxx_function_specifier): Declare.
569         * cxx-pretty-print.c (pp_cxx_whitespace): New macro.
570         (pp_cxx_left_paren): Likewise.
571         (pp_cxx_right_paren): Likewise.
572         (pp_cxx_dot): Likewise.
573         (pp_cxx_arrow): Likewise.
574         (pp_cxx_semicolon): Likewise.
575         (pp_cxx_identifier): Likewise.
576         (pp_cxx_cv_qualifier_seq): Likewise.
577         (pp_cxx_storage_class_specifier): Likewise.
578         (pp_cxx_expression_list): Likewise.
579         (pp_cxx_space_for_pointer_operator): Likewise.
580         (pp_cxx_init_declarator): Likewise.
581         (pp_cxx_call_argument_list): Likewise.
582         (pp_cxx_nonconsecutive_character): Tidy.
583         (pp_cxx_conversion_function_id): New function.
584         (pp_cxx_template_id): Likewise.
585         (pp_cxx_template_keyword_if_needed): Likewise.
586         (pp_cxx_nested_name_specifier): Likewise.
587         (pp_cxx_unqualified_id): Tidy
588         (pp_cxx_qualified_id): Handle more nodes.
589         (pp_cxx_primary_expression): Tidy.
590         (pp_cxx_postfix_expression): Likewise.
591         (pp_cxx_new_expression): Tidy.
592         (pp_cxx_delete_expression): Likewise.
593         (pp_cxx_cast_expression): New function.
594         (pp_cxx_pm_expression): Tidy.
595         (pp_cxx_conditional_expression): Likewise.
596         (pp_cxx_assignment_operator): New function.
597         (pp_cxx_assignment_expression): Tidy.
598         (pp_cxx_expression): New function.
599         (pp_cxx_function_specifier): Likewise.
600         (pp_cxx_decl_specifier_seq): Likewise.
601         (pp_cxx_simple_type_specifier): Tidy.
602         (pp_cxx_type_specifier_seq): Likewise.
603         (pp_cxx_ptr_operator): New function.
604         (pp_cxx_implicit_parameter_type): Likewise.
605         (pp_cxx_parameter_declaration): Tidy.
606         (pp_cxx_parameter_declaration_clause): New function.
607         (pp_cxx_exception_specification): Likewise.
608         (pp_cxx_direct_declarator): Tidy.
609         (pp_cxx_declarator): Likewise.
610         (pp_cxx_ctor_initializer): New function.
611         (pp_cxx_function_definition): Likewise.
612         (pp_cxx_abstract_declarator): Tidy.
613         (pp_cxx_direct_abstract_declarator): Likewise.
614         (pp_cxx_type_id): Likewise.
615         (pp_cxx_exception_declaration): New function.
616         (pp_cxx_statement): Likewise.
617         (pp_cxx_simple_declaration): Likewise.
618         (pp_cxx_template_parameter_list): Likewise.
619         (pp_cxx_template_parameter): Likewise.
620         (pp_cxx_template_declaration): Likewise.
621         (pp_cxx_explicit_specialization): Likewise.
622         (pp_cxx_explicit_instantiation): Likewise.
623         (pp_cxx_declaration): Tidy.
624         (pp_cxx_pretty_printer_init): Initialize more fields.
625
626 2003-08-25  Mark Mitchell  <mark@codesourcery.com>
627
628         PR c++/8795
629         * cp-tree.h (build_cplus_method_type): Remove.
630         * call.c (standard_conversion): Use build_method_type_directly
631         instead of build_cplus_method_type.
632         * class.c (build_clone): Likewise.
633         (adjust_clone_args): Likewise.
634         * decl.c (build_ptrmem_type): Likewise.
635         (grokdeclarator): Likewise.
636         (check_function_type): Likewise.
637         * decl2.c (grok_method_quals): Likewise.
638         (maybe_retrofit_in_chrg): Likewise.
639         * pt.c (copy_default_args_to_explicit_spec): Likewise.
640         (tsubst_function_type): Likewise.
641         (tsubst): Likewise.
642         * tree.c (build_cplus_method_type): Remove.
643         * typeck.c (merge_types): Use build_method_type_directly.
644
645 2003-08-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
646
647         PR c++/3765
648         * search.c (dfs_access_in_type): Fix typo in comment.
649         (dfs_accessible_queue_p): Likewise.
650         (dfs_accessible_p): Only terminate when a friend is found.
651         (accessible_p): Return immediately if access_in_type allows
652         access.
653
654 2003-08-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
655
656         PR c++/641, c++/11876
657         * friend.c (add_friend): Add complain parameter.
658         (make_friend_class): Likewise.
659         (do_friend): Adjust add_friend call.
660         * decl.c (grokdeclarator): Adjust make_friend_class call.
661         * parser.c (cp_parser_member_declaration): Likewise.
662         (cp_parser_template_declaration_after_exp): Likewise.
663         * pt.c (instantiate_class_template): Adjust make_friend_class
664         and add_friend call.
665         * cp-tree.h (make_friend_class): Adjust declaration.
666         (add_friend): Likewise.
667
668 2003-08-21  Jason Merrill  <jason@redhat.com>
669
670         PR c++/11283
671         * call.c (build_conditional_expr): Ignore cv-qual differences for
672         non-class types.
673
674 2003-08-21  Mark Mitchell  <mark@codesourcery.com>
675
676         PR c++/11551
677         * parser.c (cp_parser_id_expression): Add declarator_p parameter.
678         (cp_parser_primary_expression): Adjust call to
679         cp_parser_id_expression.
680         (cp_parser_unqualified_id): Complain about the use of
681         typedef-names in a destructor declarator.
682         (cp_parser_postfix_expression): Adjust call to
683         cp_parser_id_expression.
684         (cp_parser_type_parameter): Likewise.
685         (cp_parser_template_argument): Likewise.
686         (cp_parser_declarator_id): Likewise.
687
688         PR c++/11919
689         * call.c (standard_conversion): Use same_type_p, not pointer
690         equality, to compare types.
691
692         PR c++/10762
693         * parser.c (cp_parser_using_declaration): Check for invalid uses
694         of template-ids here...
695         * decl2.c (do_class_using_decl): ... rather than here.
696
697 2003-08-20  Mark Mitchell  <mark@codesourcery.com>
698
699         PR c++/11834
700         * pt.c (more_specialized): Bump processing_template_decl.
701
702 2003-08-21  Jason Merrill  <jason@redhat.com>
703
704         PR c++/11614
705         * decl.c (grokdeclarator): Recognize a flexible array based on the
706         type, not the form of the declarator.
707
708 2003-08-20  Jason Merrill  <jason@redhat.com>
709
710         * semantics.c (simplify_aggr_init_expr): Split out from
711         simplify_aggr_init_exprs_r.  Convert slot address to match
712         the return type.
713         * cp-tree.h: Declare it.
714         * tree.c (cp_copy_res_decl_for_inlining): Don't clobber the
715         DECL_NAME of a user variable.
716
717 2003-08-20  Nathan Sidwell  <nathan@codesourcery.com>
718
719         PR c++/11945
720         * pt.c (build_non_dependent_expr): Look inside COND_EXPR and
721         COMPOUND_EXPR.
722         * semantics.c (finish_expr_stmt): Always convert to void.
723         * typeck.c (build_x_compound_exp): Always convert to void.
724
725 2003-08-19  Mark Mitchell  <mark@codesourcery.com>
726
727         PR c++/11684
728         * cp-tree.h (grok_op_properties): Change prototype.
729         * decl.c (grok_op_properties): Add complain parameter.
730         (grokfndecl): Pass it.
731         * pt.c (tsubst_decl): Adjust accordingly.
732
733         PR c++/10926
734         * decl.c (start_method): Return immediately if push_template_decl
735         does not like the declaration.
736         * pt.c (push_template_decl_real): Disallow member template
737         destructors.
738
739         PR c++/11036
740         * cp-tree.h (add_binding): Add prototype.
741         * class.c (add_method): Set TYPE_HAS_DESTRUCTOR if appropriate.
742         (maybe_warn_about_overly_private_class): Use
743         CLASSTYPE_DESTRUCTORS.
744         (pushclass): Adjust call to set_identifier_type_value.
745         * decl.c (add_binding): Give it external linkage.
746         (push_local_binding): Adjust call to add_binding.
747         (push_class_binding): Likewise.
748         (set_identifier_type_value_with_scope): Change prototype.  Use
749         add_binding for global bindings.
750         (set_identifier_type_value): Adjust accordingly.
751         (pushtag): Likewise.
752         (pushdecl): Use set_identifier_type_value, not
753         set_identifier_type_value_with_scope.
754         (pushdecl_namespace_level): Adjust calls to
755         SET_IDENTIFIER_TYPE_VALUE to pass a DECL.
756         (pushdecl_class_level): Likewise.
757         (lookup_tag): Use select_decl.
758         (select_decl): Improve comment.
759         (record_builtin_type): Do not call pushdecl.
760         (cxx_init_decl_processing): Do not call xref_tag for bad_alloc.
761         (cp_finish_decl): Adjust call to set_identifier_type_value.
762         (check_elaborated_type_specifier): Improve checks for invalid uses
763         of typedefs.
764         (xref_tag): Adjust call to check_elaborated_type_specifier.
765         * decl2.c (grokclassfn): Do not set TYPE_HAS_DESTRUCTOR.
766         * name-lookup.c (set_namespace_binding): Use add_binding.
767         * parser.c (cp_parser_simple_type_specifier): Return a TYPE_DECL,
768         rather than an IDENTIFIER_NODE, to represent built-in types, if
769         requested by the caller.
770         (cp_parser_postfix_expression): Adjust call.
771         (cp_parser_type_specifier): Likewise.
772         (cp_parser_elaborated_type_specifier): Adjust call to
773         check_elaborated_type_specifier.
774         * typeck2.c (build_functional_cast): Do not perform name lookups.
775
776         PR c++/10717
777         * decl.c (expand_static_init): Remove unncessary code.
778
779 2003-08-19  Andrew Pinski  <pinskia@physics.uc.edu>
780
781         PR c++/10538, PR c/5582
782         * cp/cp-lang.c (LANG_HOOKS_DECL_UNINIT): Define.
783
784 2003-08-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
785
786         PR c++/11174
787         * init.c (build_offset_ref): Perform access checking for
788         pointer to member correctly.
789
790 2003-08-19  Gabriel Dos Reis  <gdr@integrable-solutions.net>
791
792         * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTICS): Fix spelling.
793
794 2003-08-18  Nathan Sidwell  <nathan@codesourcery.com>
795
796         PR c++/11957
797         * cp-tree.h (finish_stmt_expr): Add bool parameter.
798         * init.c (finish_init_stmts): Pass true to finish_stmt_expr. Don't
799         adjust the stmt_expr here.
800         (build_vec_init): Use finish_stmt_expr_expr, convert result to
801         array type.
802         * parser.c (cp_parser_primar_expression): Adjust finish_stmt_expr
803         call.
804         * pt.c (tsubst_copy): Likewise.
805         * semantics.c (finish_stmt_expr): Add parameter.
806
807         * pt.c (instantiate_class_template): Push to class's scope before
808         tsubsting base.
809
810 2003-08-17  Jan Hubicka  <jh@suse.cz>
811
812         PR C++/11702
813         * semantics.c (finish_id_expression): Mark all functions as used.
814
815 2003-08-16  Nathan Sidwell  <nathan@codesourcery.com>
816
817         PR c++/11512
818         * cvt.c (convert_to_void): Indicate which side of conditional has
819         no effects, and rhs of comma operator. Test for no sideeffect
820         expressions here and always build a convert expr.
821         * init.c (expand_default_init): Convert the init to void.
822         * typeck.c (build_x_compound_expr): Do not check for side effects
823         here.
824         (build_compound_expr): Do not convert lhs when building a
825         template.
826
827 2003-08-15  Nathan Sidwell  <nathan@codesourcery.com>
828
829         * cp-tree.def (NON_DEPENDENT_EXPR): Add operand.
830         * decl2.c (build_offset_ref_call_from_tree): Use
831         build_non_dependent_expr.
832         * error.c (dump_expr) <NON_DEPENDENT_EXPR case>: Dump the operand.
833         * pt.c (build_non_dependent_expr): Set operand.
834
835 2003-08-14  Jan Hubicka  <jh@suse.cz>
836
837         * decl2.c (mark_member_pointers): Rename to...
838         (mark_member_pointers_and_eh_tinfos): ... this one; deal with eh tinfos
839         (lower_function): Update call.
840         * except.c (eh_type_info): Break out from ...
841         (build_eh_type): ... here; tinfo is already used.
842         (finish_eh_spec_block): Mark tinfos as used.
843         * semantics.c (finish_handler_params): Mark tinfo as used.
844         * cp-tree.h (eh_type_info): Declare.
845
846 2003-08-15  Nathan Sidwell  <nathan@codesourcery.com>
847
848         * pt.c (instantiate_class_template): Set location before
849         substuting bases.
850
851         * decl.c (make_typename_type): Use my_friendly_assert.
852         * pt.c (tsubst_aggr_type): Rearrange context substitution.
853
854 2003-08-14  Jan Hubicka  <jh@suse.cz>
855
856         * method.c (use_thunk): Expand body directly.
857
858 2003-08-12  Mark Mitchell  <mark@codesourcery.com>
859
860         PR c++/11703
861         * call.c (type_passed_as): Use TYPE_SIZE, not TYPE_PRECISION to
862         determine whether or not to promote types.
863         (convert_for_arg_passing): Likewise.
864         * decl2.c (cp_build_parm_decl): Do not set DECL_ARG_TYPE in
865         templates.
866         * pt.c (tsubst_decl): Do not expect it to be set.
867
868         PR c++/9512
869         PR c++/10923
870         * cp-tree.h (check_elaborated_type_specifier): Declare.
871         (handle_class_head): Remove.
872         (note_got_semicolon): Likewise.
873         (note_list_got_semicolon): Likewise.
874         (finish_class_definition): Likewise.
875         * decl.c (check_elaborated_type_specifier): Make it public.
876         Robustify.
877         (handle_class_head): Remove.
878         * parser.c (cp_parser_elaborated_type_specifier): Use
879         check_elaborated_type_specifier.
880         (cp_parser_class_specifier): Do not call finish_class_definition.
881         (cp_parser_class_head): Or handle_class_head.  Check for
882         over-qualified names.
883         * semantics.c (finish_class_definition): Remove.
884
885         * parser.c (cp_parser_check_for_definition_in_return_type): New
886         function.
887         (cp_parser_simple_declaration): Adjust call to
888         cp_parser_init_declarator.
889         (cp_parser_decl_specifier_seq): Change type of
890         declares_class_or_enum parameter.
891         (cp_parser_explicit_instantiation): Adjust accordingly.
892         (cp_parser_type_specifier): Change type of
893         declares_class_or_enum parameter.
894         (cp_parser_init_declarator): Add declares_class_or_enum
895         parameter.
896         (cp_parser_parameter_declaration): Adjust call to
897         cp_parser_decl_specifier_seq.
898         (cp_parser_function_definition): Likewise.
899         (cp_parser_member_declaration): Likewise.
900         (cp_parser_single_declaration): Likewise.
901
902         * cp-tree.h (lang_type_class): Remove has_call_overloaded,
903         has_array_ref_overloaded, has_arrow_overloaded, and got_semicolon.
904         (TYPE_OVERLOADS_CALL_EXPR): Remove.
905         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
906         (TYPE_OVERLOADS_ARROW): Likewise.
907         (CLASSTYPE_GOT_SEMICOLON): Likewise.
908         * class.c (check_bases): Do not set them.
909         (finish_struct_1): Likewise.
910         * decl.c (cp_finish_decl): Do not set CLASSTYPE_GOT_SEMICOLON.
911         (build_ptrmemfunc_type): Likewise.
912         (grok_op_properties): Do not set TYPE_OVERLOADS_*.
913         (start_function): Do not check CLASSTYPE_GOT_SEMICOLON.
914         * decl2.c (grokfield): Do not set CLASSTYPE_GOT_SEMICOLON.
915         * lex.c (note_got_semicolon): Remove.
916         (note_list_got_semicolon): Likewise.
917         * parser.c (cp_parser_simple_declaration): Do not call
918         note_list_got_semicolon.
919         * pt.c (list_eq): Remove.
920         (lookup_template_class): Do not set CLASSTYPE_GOT_SEMICOLON.
921         (instantiate_class_template): Do not set TYPE_OVERLOADS*.
922         (instantiate_class_template): Do not set CLASSTYPE_GOT_SEMICOLON.
923         * ptree.c (cxx_print_type): Do not print them.
924         * semantics.c (finish_member_class_template): Do not call
925         note_list_got_semicolon.
926
927 2003-08-11  Aldy Hernandez  <aldyh@redhat.com>
928
929         * call.c (standard_conversion): Opaque pointers interconvert.
930
931         * testsuite/g++.dg/other/opaque-3.C: New.
932
933 2003-08-11  Mark Mitchell  <mark@codesourcery.com>
934
935         * typeck.c (merge_types): Handle cv-qualified pointer-to-member
936         types correctly.
937
938 2003-08-10  Mark Mitchell  <mark@codesourcery.com>
939
940         PR c++/11789
941         * cp-tree.h (get_vbase): Remove.
942         (get_vbase_types): Remove.
943         * init.c (expand_member_init): Correct logic for looking up base
944         classes.
945
946 2003-08-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
947
948         * error.c (dump_expr): Tidy.
949         * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): New.
950         (pp_cxx_begin_template_argument_list): Likewise.
951         (pp_cxx_end_template_argument_list): Likewise.
952         (is_destructor_name): Likewise.
953         (pp_cxx_unqualified_id): Likewise.
954         (pp_cxx_qualified_id): Likewise.
955         (pp_cxx_id_expression): Likewise.
956         (pp_cxx_new_expression): Likewise.
957         (pp_cxx_delete_expression): Likewise.
958         (pp_cxx_pm_expression): Likewise.
959         (pp_cxx_type_specifier): Rework.
960         (pp_cxx_type_id): Likewise.
961         (pp_cxx_primary_expression): Likewise.
962         (pp_cxx_postfix_expression): Likewise.
963         (pp_cxx_unary_expression): Likewise.
964         (pp_cxx_multiplicative_expression): Likewise.
965         (pp_cxx_conditional_expression): Likewise.
966         (pp_cxx_assignment_expression): Likewise.
967         (pp_cxx_pretty_printer_init): Tidy.
968
969 2003-08-10  Nathan Sidwell  <nathan@codesourcery.com>
970
971         * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): non-NULL
972         NODE is always a TREE_VEC of nonzero size.
973         (NUM_TMPL_ARGS): NODE is always a TREE_VEC.
974         * decl2.c (arg_assoc): Template args will be a vec.
975         * error.c (dump_decl) <TEMPLATE_ID_EXPR case>: Call
976         dump_template_argument_list.
977         (dump_template_parms): Args will be a vec.
978         * parser.c (cp_parser_template_argument_list): Produce a
979         vector, not a list.
980         * pt.c (coerce_template_parms): Args are always vectors.
981         (mangle_class_name_for_template): Likewise.
982         (lookup_template_function): Likewise.
983         (lookup_template_class): Likewise.
984         (tsubst_template_args): Likewise.
985         (tsubst_baselink): Use tsubst_template_args.
986         (tsubst_qualified_id): Likewise.
987         (tsubst_copy) <TEMPLATE_ID_EXPR case>: Likewise.
988         (tsubst_copy_and_build) <TEMPLATE_ID_EXPR case>: Likewise.
989         (any_dependent_template_args_p):  Args are always vectors.
990         * tree.c (cp_tree_equal): Add TEMPLATE_ID_EXPR case.
991
992         PR c++/11670
993         * call.c (convert_like_real): Add rvalue binding error message.
994         * error.c (dump_expr) <NOP_EXPR case>: Detect when the no expr is
995         really a cast.
996
997         PR c++/10530
998         * pt.c (dependent_type_p_r): A dependent template-id is a class
999         type with dependent template arguments, or a bound template
1000         template parameter.
1001         (type_dependent_expression_p): A template function decl cannot
1002         have a dependent context.
1003
1004 2003-08-07  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1005
1006         PR c++/5767
1007         * parser.c (cp_parser_class_name): Return immediately when scope
1008         is error_mark_node.
1009
1010 2003-08-07  Aldy Hernandez  <aldyh@redhat.com>
1011
1012         * cp/Make-lang.in (cp/call.o): Add dependency for target.h.
1013
1014         * cp/call.c (standard_conversion): Support opaque types.
1015         Include target.h.
1016         (strip_top_quals): Use cp_build_qualified_type instead of
1017         TYPE_MAIN_VARIANT.
1018
1019         * cp/typeck.c (convert_for_assignment): Support opaque types.
1020
1021         * testsuite/g++.dg/other/opaque-1.C: New.
1022
1023         * testsuite/g++.dg/other/opaque-2.C: New.
1024
1025 2003-08-06  Aldy Hernandez  <aldyh@redhat.com>
1026
1027         * decl.c (grokparms): Use cp_build_qualified_type instead
1028         TYPE_MAIN_VARIANT.
1029
1030 2003-08-05  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1031
1032         * cxx-pretty-print.h: New file.
1033         * cxx-pretty-print.c: Likewise.
1034         * error.c (scratch_pretty_printer): Change type.
1035         (init_error): Tidy.
1036         (dump_aggr_type): Likewise.
1037         (dump_global_iord): Likewise.
1038         (dump_expr): Likewise.
1039         (dump_char): Remove.
1040         * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTITCS): Define.
1041         (cxx_initialize_diagnostics): New function.
1042         * Make-lang.in (CXX_OBJS): Add cp/cxx-pretty-print.o
1043         (CXX_PRETTY_PRINT_H): New variable.
1044         (cp/cxx-pretty-print.o): New rule.
1045         (cp/cp-lang.o): Update dependence.
1046         (cp/error.o): Likewise.
1047
1048 2003-08-05  Steven Bosscher  <steven@gcc.gnu.org>
1049
1050         * cp-tree.h (struct lang_decl): Don't include c_lang_decl.
1051         (DECL_DECLARED_INLINE_P): Remove.
1052         * decl2.c (import_export_decl): Only look at DECL_DECLARED_INLINE_P
1053         if decl is a FUNCTION_DECL.  This never made sense, but now it is
1054         required to avoid a tree check failure.
1055         * decl.c (grokfndecl): Don't touch DID_INLINE_FUNC.
1056         * optimize.c (maybe_clone_body): Likewise.
1057
1058 2003-08-04  Roger Sayle  <roger@eyesopen.com>
1059
1060         * decl.c (cxx_insert_default_attributes): Delete.
1061         * cp-tree.h (cxx_insert_default_attributes): Don't prototype.
1062         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Don't define.
1063
1064 2003-08-03  Nathan Sidwell  <nathan@codesourcery.com>
1065
1066         PR c++/11704
1067         * pt.c (type_dependent_expression_p): Cope with COMPONENT_REF with
1068         unknown type.
1069
1070         PR c++/11766
1071         * typeck.c (comp_ptr_ttypes_real): Don't loop on pointers to
1072         member functions.
1073
1074 2003-08-02  Nathan Sidwell  <nathan@codesourcery.com>
1075
1076         PR c++/9447
1077         * cp-tree.def (USING_DECL): Document its type.
1078         * class.c (pushclass): If we're entering a template, push any
1079         dependent using decls it has.
1080         * decl2.c (do_class_using_decl): Refactor. Type is NULL iff it is
1081         a dependent scope.
1082         * pt.c (tsubst_decl) <USING_DECL case>: Set type.
1083         (tsubst): Remove USING_DECL checks.
1084         (type_dependent_expression_p): Remove USING_DECL case.
1085         * semantics.c (finish_member_declaration): A USING_DECL's type
1086         indicates whether it is dependent.
1087
1088 2003-08-02  Nathan Sidwell  <nathan@codesourcery.com>
1089
1090         * cp-tree.h (pushclass): Remove unneeded parameter.
1091         * class.c (pushclass): Remove unneeded MODIFY parm. Adjust.
1092         (push_nested_class): Adjust pushclass call.
1093         * pt.c (instantiate_class_template): Likewise.
1094         * semantics.c (begin_class_definition): Likewise.
1095
1096 2003-08-01  Nathanael Nerode  <neroden@gcc.gnu.org>
1097
1098         * typeck2.c (add_exception_specifier): Use 'bool' where appropriate.
1099
1100 2003-08-01  Mark Mitchell  <mark@codesourcery.com>
1101
1102         PR c++/11697
1103         * decl.c (decls_match): Don't ignore the types of template
1104         classes.
1105
1106         PR c++/11744
1107         * pt.c (tsubst_copy_and_build): Refine Koenig lookup logic.
1108
1109 2003-08-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1110
1111         PR c++/8442, c++/8806
1112         * decl.c (qualify_lookup): Accept TEMPLATE_DECL if types are
1113         preferred.
1114         (check_elaborated_type_specifier): Add allow_template_p
1115         parameter.  Check tag mismatch and class template.
1116         (xref_tag): Add template_header_p parameter.  Add assertion
1117         that name is an IDENTIFIER_NODE.  Remove implicit typename
1118         warning.  Simplify lookup process if globalize is true.
1119         (cxx_init_decl_processing): Adjust call to xref_tag.
1120         (xref_tag_from_type): Likewise.
1121         * decl2.c (handle_class_head): Likewise.
1122         * parser.c (cp_parser_elaborated_type_specifier,
1123         cp_parser_class_head): Likewise.
1124         * rtti.c (init_rtti_processing, build_dynamic_cast1,
1125         tinfo_base_init, emit_support_tinfos): Likewise.
1126         * class.c (is_base_of_enclosing_class): Remove.
1127         * pt.c (convert_template_argument): Don't accept RECORD_TYPE as
1128         template template argument.
1129         * cp-tree.h (xref_tag): Adjust declaration.
1130         (is_base_of_enclosing_class): Remove.
1131         * NEWS: Document template template argument change.
1132
1133 2003-08-01  Nathan Sidwell  <nathan@codesourcery.com>
1134
1135         * parser.c (cp_parser_init_declarator,
1136         cp_paser_member_declaration): Reformat.
1137         * pt.c (lookup_template_class, type_unification_real, unify,
1138         type_dependent_expression_p): Reformat.
1139
1140         PR c++/11295
1141         * cp-tree.h (tubst_flags_t): Add tf_stmt_expr_cmpd,
1142         tf_stmt_expr_body.
1143         (finish_stmt_expr_expr): Declare.
1144         * parser.c (cp_parser_primary_expression): Tell
1145         cp_parser_compount_statement that it is a statement expression.
1146         (cp_parser_statement, cp_parser_labeled_statement,
1147         cp_parser_compound_statement, cp_parser_statement_seq_opt): Add
1148         in_statement_expr_p parameter.
1149         (cp_parser_expression_statement): Likewise. Call
1150         finish_stmt_expr_expr for final expression of a statement
1151         expression.
1152         (cp_parser_for_init_statement,
1153         cp_parser_implicitly_scoped_statement,
1154         cp_parser_already_scoped_statement, cp_parser_function_definition,
1155         cp_parser_try_block, cp_parser_handled): Adjust.
1156         * pt.c (tsubst_copy) <STMT_EXPR case>: Pass tf_stmt_expr.
1157         (tsubst_expr): Process tf_stmt_expr and tf_stmt_exprs flags.
1158         (tsubst_expr) <EXPR_STMT case>: Check tf_stmt_exprs flag.
1159         * semantics.c (finish_expr_stmt): Do not deal with statement
1160         expressions.
1161         (begin_stmt_expr): Clear last_expr_type.
1162         (finish_stmt_expr_expr): New.
1163         (finish_stmt_expr): Process the value expression.
1164
1165         * typeck.c (build_compound_expr): If RHS is a TARGET_EXPR, put the
1166         compound expr inside the target's initializer.
1167
1168         PR c++/11525
1169         * parser.c (cp_parser_primary_expression): Do not set
1170         non-constant-p merely because it is a dependent scope.
1171
1172         PR c++/9447
1173         * decl2.c (do_class_using_decl): Set type to NULL_TREE.
1174         * semantics.c (finish_expr_stmt): Do not convert to void in a
1175         template.
1176
1177 2003-07-31  Nathan Sidwell  <nathan@codesourcery.com>
1178
1179         * pt.c (coerce_template_parms): Refactor.
1180         (fn_type_unification): Increment processing_template_decl when
1181         tsubsting an incomplete set of explicit args.
1182
1183         PR c++/11347
1184         * pt.c (instantiate_class_template): Increment
1185         processing_template_decl around the tsubst of a template member
1186         class.
1187         (tsubst_qualified_id): Assert we do not have a dependent scope.
1188
1189         * pt.c (coerce_template_template_parms, lookup_template_class,
1190         can_complete_type_without_circularity, instantiate_class_template,
1191         tsubst_decl, unify): Reformat.
1192
1193 2003-07-31  Jan Hubicka  <jh@suse.cz>
1194
1195         * decl2.c (maybe_make_one_only): Use mark_referenced.
1196         * method.c (use_thunk): Likewsie.
1197
1198 2003-07-30  Jan Hubicka  <jh@suse.cz>
1199
1200         * class.c (build_vtable_entry_ref): Kill.
1201         (build_vtbl_ref_1): Do not call build_vtable_entry_ref.
1202         (build_vfn_ref): Do not call build_vtable_entry_ref.
1203         * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Kill.
1204         * cp-tree.h (prepare_assemble_variable): Kill.
1205         * cp-decl.c (prepare_assemble_variable): Kill.
1206
1207 2003-07-29  Geoffrey Keating  <geoffk@apple.com>
1208
1209         * parser.c (cp_lexer_new_main): Use c_common_no_more_pch instead
1210         of setting valid_pch by hand.
1211
1212 2003-07-29  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
1213
1214         * decl.c (finish_enum): Initialize underlying_type.
1215
1216 2003-07-29  Nathan Sidwell  <nathan@codesourcery.com>
1217
1218         PR c++/9447
1219         * decl.c (add_binding): Add bval local variable.
1220         (push_class_level_binding): Likewise. Allow a USING_DECL to be
1221         pushed.
1222         * decl2.c (do_class_using_decl):  The type of a using decl is
1223         unknown.
1224         * parser.c (cp_parser_postfix_expression): Refactor unqualified-id
1225         function call lookup code.
1226         * pt.c (tsubst): A USING_DECL will have unknown type.
1227         (tsubst_copy_and_build): Allow a using decl.
1228         (type_dependent_expression_p): A USING_DECL will make it
1229         dependent.
1230         * semantics.c (finish_member_declaration): Push a dependent using
1231         declaration.
1232
1233 2003-07-28  Mark Mitchell  <mark@codesourcery.com>
1234
1235         PR c++/11530
1236         * parser.c (cp_parser_postfix_expression): Do not call mark_used.
1237         * semantics.c (finish_id_expression): Call mark_used for all
1238         declarations.
1239
1240 2003-07-28  Mark Mitchell  <mark@codesourcery.com>
1241
1242         PR c++/11667
1243         * call.c (standard_conversion): Allow all integral->enumeral
1244         conversions, after marking them as bad.
1245         * decl.c (finish_enum): Make sure that all enumerators are
1246         properly converted to the underlying type.
1247         (build_enumerator): Set DECL_CONTEXT for namespace-scope
1248         enumeration types.
1249         * pt.c (tsubst_copy): Adjust handling of CONST_DECLs accordingly.
1250         (tsubst_enum): Tidy.
1251
1252         * Make-lang.in (typeck.o): Depend on convert.h.
1253         (class.o): Likewise.
1254         (rtti.o): Likewise.
1255         * call.c: Include convert.h.
1256         (convert_arg_to_ellipsis): Use convert_to_real.
1257         * class.c: Include convert.h.
1258         (build_base_path): Use convert_to_integer.
1259         * rtti.c: Include convert.h.
1260         (build_headof): Use convert_to_integer.
1261         * typeck.c: Include convert.h.
1262         (decay_conversion): Use convert_to_integer.
1263         (build_unary_op): Use build_nop.
1264         (get_delta_difference): Use convert_to_integer.
1265         (build_ptrmemfunc): Avoid unncessary conversions.
1266
1267 2003-07-28  Jan Hubicka  <jh@suse.cz>
1268
1269         * decl2.c (mark_member_pointers): Verify that member pointer points to
1270         the function.
1271
1272 2003-07-28  Nathan Sidwell  <nathan@codesourcery.com>
1273
1274         * cp-tree.h (begin_compound_stmt): No scope arg is a bool.
1275         (finish_compound_stmt): Remove no scope arg.
1276         * decl.c (register_dtor_fn): Adjust begin_compound_stmt and
1277         end_compound_stmt calls.
1278         (expand_static_init, begin_destructor_body, begin_function_body,
1279         finish_function_body): Likewise.
1280         * decl2.c (start_objects, finish_objects,
1281         start_static_storage_duration_function,
1282         finish_static_storage_duration_function): Likewise.
1283         * init.c (begin_init_stmts, finish_init_stmts,
1284         construct_virtual_base, build_vec_init): Likewise.
1285         * method.c (do_build_assign_ref, synthesize_method): Likewise.
1286         * parser.c (cp_parser_compound_statement,
1287         cp_parser_implicitly_scoped_statement,
1288         cp_parser_already_scoped_statement): Likewise.
1289         * pt.c (tsubst_expr): Likewise.
1290         * semantics.c (begin_compound_stmt): No scope arg is a bool.
1291         (finish_compound_stmt): Remove no scope arg.
1292
1293         * error.c (dump_expr) <COMPOUND_EXPR case>: A compound expr is
1294         always dyadic.
1295
1296 2003-07-27  Mark Mitchell  <mark@codesourcery.com>
1297
1298         * call.c (standard_conversion): Tweak handling of
1299         pointer-to-member types.
1300         * pt.c (tsubst): Correctly qualify pointers-to-data member types.
1301         * typeck.c (comp_ptr_ttypes_real): Check qualifiers on
1302         pointer-to-data member types.
1303
1304 2003-07-27  Nathan Sidwell  <nathan@codesourcery.com>
1305
1306         * parser.c (cp_parser_type_parameter): Reformat.
1307         (cp_parser_parameter_declaration): Deprecate default args where
1308         not allowed.
1309
1310 2003-07-26  Nathan Sidwell  <nathan@codesourcery.com>
1311
1312         * cfns.h: Rebuilt.
1313
1314         * cp-tree.h (begin_init_stmts, finish_init_stmts): Remove.
1315         (begin_global_stmt_expr, finish_global_stmt_expr): Remove.
1316         * init.c (begin_init_stmts): Make static. Return is_global
1317         value. Always call begin_stmt_expr.
1318         (finish_init_stmts): Make static. Add is_global parm. Always
1319         building a stmt tree.
1320         (build_aggr_init): Adjust begin_init_stmts, finish_init_stmts calls.
1321         (build_vec_init): Likewise. Always building a stmt tree.
1322         (expand_default_init): Always building a stmt tree.
1323         (get_temp_regvar): Likewise.
1324         * semantics.c (begin_global_stmt_expr,
1325         finish_global_stmt_expr): Remove.
1326
1327 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
1328
1329         * cp-tree.h (build_compound_expr): Take LHS & RHS args.
1330         (build_x_compound_expr_from_list): Declare.
1331         * typeck.c (build_x_compound_expr_from_list): New.
1332         (build_x_compound_expr): Adjust.
1333         (build_compound_expr): Remove unreachable code. Take two
1334         parameters, adjust.
1335         * decl.c (grok_reference_init): Use
1336         build_x_compound_expr_from_list.
1337         (expand_static_init): Adjust build_compound_expr call.
1338         (cxx_maybe_build_cleanup): Likewise.
1339         * init.c (perform_member_init): Use
1340         build_x_compound_expr_from_list.
1341         (build_new_1): Likewise.
1342         (build_vec_delete): Adjust build_compound_expr calls.
1343         (build_vbase_delete): Likewise.
1344         * typeck2.c (store_init_value): Use
1345         build_x_compound_expr_from_list.
1346         (build_functional_cast): Likewise.
1347
1348 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
1349
1350         * cp-tree.h (enum tsubst_flags_t): Add tf_user.
1351         * decl.c (make_typename_type): Pass it.
1352         * pt.c (lookup_template_class): Use it.
1353         (resolve_typename_type): Pass it.
1354         * semantics.c (finish_template_type): Pass it.
1355
1356 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
1357
1358         PR c++/11617
1359         * cp-tree.h (qualified_name_lookup_error): Declare.
1360         * pt.c (tsubst_qualified_id): Use qualified_name_lookup_error for
1361         errors.
1362         (tsubst_expr) <DECL_STMT case>: Likewise.
1363         (tsubst_copy_and_build) <COMPONENT_REF case>: Likewise.
1364         * semantics.c (qualified_name_lookup_error): New, broken out of ...
1365         (finish_id_expression): ... here. Use it.
1366
1367 2003-07-25  Falk Hueffner  <falk.hueffner@student.uni-tuebingen.de>
1368
1369         * cfns.gperf: Add '%%' delimiter to placate gperf 3.0.
1370
1371 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
1372
1373         PR c++/11596
1374         * pt.c (maybe_fold_nontype_arg, maybe_fold_nontype_args): Remove.
1375         (tsubst_template_arg): New.
1376         (tsubst_template_arg_vector): Rename to ...
1377         (tsubst_template_args): ... this. Accept a TREE_LIST form. Use
1378         tsubst_template_arg.
1379         (coerce_template_parms): Use tsubst_template_arg for default
1380         value.
1381         (tsubst_template_parms): Likewise.
1382         (tsubst_aggr_type): Adjust.
1383         (tsubst_decl): Likewise.
1384         (tsubst): Use tsubst_template_arg for a DOMAIN. Adjust.
1385         (tsubst_copy) <TEMPLATE_ID_EXPR case>: Use tsubst_template_args.
1386
1387 2003-07-25 Gabriel Dos Reis  <gdr@integrable-solutions.net>
1388
1389         * Make-lang.in (cp/error.o): Depend on DIAGNOSTIC_H.
1390         * error.c: Use the new pretty-printer framework.
1391
1392 2003-07-24  Per Bothner  <pbothner@apple.com>
1393
1394         * decl.c (pushdecl_class_level): Don't use push_srcloc/pop_srcloc
1395         which causes errors messages to incorrectly mention included files.
1396
1397 2003-07-24  Mark Mitchell  <mark@codesourcery.com>
1398
1399         * cp-tree.h (convert_to_base_statically): Declare.
1400         * call.c (build_special_member_call): Convert INSTANCE to the base
1401         type.
1402         * class.c (convert_to_base_statically): New method.
1403         * init.c (construct_virtual_base): Use it.
1404         * method.c (do_build_assign_ref): Fix typo in comment.
1405
1406 2003-07-24  Jason Merrill  <jason@redhat.com>
1407
1408         * decl.c: Just set truthvalue_* to boolean_*.
1409
1410 2003-07-24  Nathan Sidwell  <nathan@codesourcery.com>
1411
1412         * decl.c (reshape_init): Remove unreachable code.
1413
1414 2003-07-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1415
1416         PR c++/11513
1417         * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): Use current_scope.
1418
1419 2003-07-23  Mark Mitchell  <mark@codesourcery.com>
1420
1421         PR c++/11645
1422         * cp-tree.h (accessible_base_p): Declare.
1423         * call.c (build_over_call): Use it.
1424         * search.c (accessible_base_p): New function, split out from ...
1425         (lookup_base): ... here.
1426
1427         PR c++/11517
1428         * call.c (build_conditional_expr): Use perform_implicit_conversion
1429         and error_operand_p.  Robustify.
1430         * typeck.c (build_unary_op): Use perform_implicit_conversion.
1431
1432 2003-07-23  Nathan Sidwell  <nathan@codesourcery.com>
1433
1434         PR c++/10953
1435         * parser.c (cp_parser_nested_name_specifier): Reset scope on
1436         failure.
1437         (cp_parser_elaborated_type_specifier): Likewise.
1438
1439 2003-07-22  Mark Mitchell  <mark@codesourcery.com>
1440
1441         Eliminate use of POINTER_TYPE for pointers-to-members.
1442         * call.c (standard_conversion): Rework pointer-to-member handling.
1443         Add comments.
1444         (add_builtin_candidate): Likewise.
1445         (resolve_scoped_fn_name): Remove.
1446         (build_conditional_expr): Rework pointer-to-member handling.
1447         (compare_ics): Likewise.
1448         * class.c (check_field_decls): Use TYPE_PTR_P.
1449         * cp-lang.c (cp_var_mod_type_p): Rework pointer-to-member
1450         handling.
1451         * cp-tree.h (SCALAR_TYPE_P): Use TYPE_PTR_TO_MEMBER_P.
1452         (TYPE_PTRMEM_P): Add comment.
1453         (TYPE_PTR_P): Simplify.
1454         (TYPE_PTROB_P): Correct definition.
1455         (TYPE_PTR_TO_MEMBER_P): New macro.
1456         (TYPE_PTRMEM_CLASS_TYPE): Adjust.
1457         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
1458         (resolved_scoped_fn_name): Remove declaration.
1459         (build_offset_ref): Change prototype.
1460         (resolve_offset_ref): Remove.
1461         (comp_target_types): Remove.
1462         * cvt.c (cp_convert_to_pointer): Rework pointer-to-member
1463         handling.
1464         (convert_to_reference): Use can_convert.
1465         (ocp_convert): Improve error handling.  Rework pointer-to-member
1466         handling.
1467         (perform_qualification_conversions): Rework pointer-to-member
1468         handling.
1469         * decl.c (build_ptrmem_type): Handle functions too.
1470         (create_array_type_for_decl): Remove OFFSET_TYPE error message.
1471         (grokdeclarator): Use OFFSET_TYPE for pointers to data members.
1472         (grokparms): Remove OFFSET_TYPE error message.
1473         * dump.c (cp_dump_tree): Rework pointer-to-member handling.
1474         * error.c (dump_type_prefix): Likewise.
1475         * expr.c (cplus_expand_constant): Use build_nop.
1476         * init.c (build_offset_ref): Add address_p parameter.  Fold in
1477         necessary bits from resolve_offset_ref.
1478         (resolve_offset_ref): Remove.
1479         * parser.c (cp_parser_postfix_expression): Remove special case
1480         code for OFFSET_TYPE.
1481         * pt.c (convert_nontype_argument): Rework pointer-to-member
1482         handling.
1483         (convert_template_argument): Likewise.
1484         (unify): Likewise.
1485         (invalid_nontype_parm_type_p): Likewise.
1486         (dependent_type_p_r): Likewise.
1487         * rtti.c (get_tinfo_decl): Remove OFFSET_TYPE special case.
1488         (target_incomplete_p_): Rework pointer-to-member
1489         handling.
1490         (get_pseudo_ti_init): Likewise.
1491         (get_pseudo_ti_desc): Likewise.
1492         * semantics.c (finish_qualified_id_expr): Adjust call to
1493         build_offset_ref.  Remove use of resolve_offset_ref.
1494         * tree.c (pod_type_p): Use TYPE_PTR_TO_MEMBER_P.
1495         * typeck.c (target_type): Use TYPE_PTRMEM_P.
1496         (type_unknown_p): Remove obsolete code about the time before
1497         non-dependent expressions were handled correctly.
1498         (qualify_type_recursive): Remove.
1499         (composite_pointer_type_r): New function.
1500         (composite_pointer_type): Use it.
1501         (merge_types): Remove dead comments.
1502         (comp_cv_target_types): Remove.
1503         (comp_target_types): Likewise.
1504         (comp_target_parms): Likewise.
1505         (cxx_sizeof_or_alignof_type): Remove OFFSET_TYPE error.
1506         (build_indirect_ref): Use TYPE_PTR_TO_MEMBER_P.
1507         (build_binary_op): Do not use of comp_target_types.
1508         (pointer_diff): Remove OFFSET_TYPE case.
1509         (build_unary_op): Adjust pointer-to-member handling.
1510         (unary_complex_lvalue): Likewise.
1511         (check_for_casting_away_constness): Add description parameter.
1512         (build_static_cast): Pass it.
1513         (build_reinterpret_cast): Use check_for_casting_away_constness.
1514         (build_const_cast): Adjust pointer-to-member handling.
1515         (build_c_cast): Likewise.
1516         (convert_for_assignment): Remove OFFSET_TYPE error message.
1517         (comp_ptr_ttypes_real): Adjust pointer-to-member handling.
1518         (comp_ptr_ttypes_reinterpret): Remove.
1519         (casts_away_constness_r): Adjust pointer-to-member handling.
1520         (casts_away_constness): Liekwise.
1521         (strip_all_pointer_quals): Remove.
1522         * typeck2.c (digest_init): Adjust pointer-to-member handling.
1523         (build_m_component_ref): Likewise.
1524
1525 2003-07-22  Wolfgang Bangerth  <bangerth@dealii.org>
1526
1527         * lex.c (unqualified_fn_lookup_error): Mention that the error
1528         message needs to be kept in synch with the manual.
1529
1530 2003-07-22  Nathan Sidwell  <nathan@codesourcery.com>
1531
1532         PR c++/11614
1533         * decl.c (grokdeclarator): An array member is only a flexible
1534         array member if the field itself is the array.
1535
1536 2003-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1537
1538         PR c++/10793
1539         * decl.c (xref_basetypes): Handle error_mark_node.
1540
1541 2003-07-22  Nathan Sidwell  <nathan@codesourcery.com>
1542
1543         * cp-tree.h (enum cp_lvalue_kind): Add clk_packed.
1544         * tree.c (lvalue_p_1): Set it.
1545         * class.c (check_field): Don't allow non-packed non-POD fields to
1546         be packed.
1547         * call.c (reference_binding): Need a temporary for all bitfield
1548         and packed fields.
1549         (convert_like_real): Check it is ok to make a temporary here.
1550
1551 2003-07-21  Nathan Sidwell  <nathan@codesourcery.com>
1552
1553         * cp-tree.h (hack_identifier): Remove.
1554         * method.c (hack_identifier): Remove.
1555         * semantics.c (finish_id_expression): Expand hack_identifier
1556         here. Simplify.
1557
1558 2003-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1559
1560         * call.c class.c decl.c decl2.c g++spec.c lex.c parser.c pt.c rtti.c
1561         semantics.c typeck.c: Remove unnecessary casts.
1562
1563 2003-07-18  Nathan Sidwell  <nathan@codesourcery.com>
1564
1565         * cp-tree.h (hack_identifier): Remove.
1566         * method.c (hack_identifier): Remove.
1567         * semantics.c (finish_id_expression): Expand hack_identifier
1568         here. Simplify.
1569
1570 2003-07-18  Nathan Sidwell  <nathan@codesourcery.com>
1571
1572         * cp-tree.h (finish_non_static_data_member): Add object param.
1573         * method.c (hack_identifier): Adjust.
1574         * pt.c (tsubst_copy_and_build) <COMPONENT_REF case>: Don't search
1575         again for a FIELD_DECL.
1576         * semantics.c (finish_non_static_data_member): Add object
1577         parameter. Always save the DECL in the COMPONENT_REF.
1578         * call.c (resolve_scoped_fn_name): Adjust.
1579
1580 2003-07-17  Zack Weinberg  <zack@codesourcery.com>
1581
1582         * pt.c (get_bindings): Make definition consistent with
1583         forward declaration.
1584
1585 2003-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1586
1587         PR c++/7809
1588         * friend.c (add_friend): Check access for member functions
1589         and templates.
1590
1591 2003-07-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1592
1593         PR c++/10668
1594         * typeck.c (build_class_member_access_expr): Improve diagnostic.
1595
1596 2003-07-16  Mark Mitchell  <mark@codesourcery.com>
1597
1598         PR c++/11547
1599         * cp-tree.h (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P): New
1600         macro.
1601         (DECL_PRETTY_FUNCTION_P): Use VAR_DECL_CHECK.
1602         * decl.c (duplicate_decls): Merge
1603         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1604         * parser.c (cp_parser_postfix_expression): Adjust call to
1605         cp_parser_initializer_list and
1606         cp_parser_parenthesized_expression_list.
1607         (cp_parser_parenthesized_expression_list): Add non_constant_p.
1608         (cp_parser_new_placement): Adjust call to
1609         cp_parser_parenthesized_expression_list.
1610         (cp_parser_direct_new_declarator): Likewise.
1611         (cp_parser_conditional_expression): Remove.
1612         (cp_parser_constant_expression): Parse an assignment-expression,
1613         not a conditional-expression.
1614         (cp_parser_simple_declaration): Resolve expression/declaration
1615         ambiguity more quickly.
1616         (cp_parser_mem_initializer): Adjust call to
1617         cp_parser_parenthesized_expression_list.
1618         (cp_parser_init_declarator): Keep track of whether or not the
1619         initializer is a constant-expression.
1620         (cp_parser_initializer): Add non_constant_p parameter.
1621         (cp_parser_initializer_clause): Likewise.
1622         (cp_parser_initializer_list): Likewise.
1623         (cp_parser_attribute_list): Adjust call to
1624         cp_parser_parenthesized_expression_list.
1625         (cp_parser_functional_cast): Likewise.
1626         * pt.c (tsubst_decl): Copy
1627         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1628         (tsubst_expr): Tweak use of DECL_PRETTY_FUNCTION_P.
1629         * semantics.c (finish_id_expression): Use
1630         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1631
1632 2003-07-16  Neil Booth  <neil@daikokuya.co.uk>
1633
1634         * lang-options.h: Remove.
1635
1636 2003-07-16  Andrew Pinski  <pinskia@physics.uc.edu>
1637
1638         PR c/10962
1639         * class.c (field_decl_cmp): Remove.
1640         (resort_field_decl_cmp): Remove.
1641         (resort_sorted_fields): Remove.
1642         (add_fields_to_vec): Rename to ...
1643         (add_fields_to_record_type): this.
1644         (finish_struct_1): Change to be using
1645         sorted_fields_type's fields.
1646         * cp-tree.h (lang_decl): In lang_decl_u3
1647         change sorted_fields to be a pointer to
1648         sorted_fields_type.
1649         (resort_sorted_fields): Remove prototype.
1650         * search.c (lookup_field_1): Change to be using
1651         sorted_fields_type's fields.
1652
1653 2003-07-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1654
1655         PR c++/5421
1656         * decl.c (grokdeclarator): Handle TEMPLATE_ID_EXPR if friend
1657         is a member of other class.
1658         * friend.c (do_friend): Don't build TEMPLATE_DECL if friend
1659         is a specialization of function template.
1660
1661 2003-07-16  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1662
1663         PR c++/10903
1664         * pt.c (convert_nontype_argument): Fix thinko in diagnostic.
1665         Improve.
1666
1667 2003-07-15  Mark Mitchell  <mark@codesourcery.com>
1668
1669         * cp-tree.def (LOOKUP_EXPR): Remove.
1670         * cp-tree.h (cp_id_kind): Add CP_ID_KIND_UNQUALIFIED_DEPENDENT.
1671         (LOOKUP_EXPR_GLOBAL): Remove.
1672         (get_bindings): Remove.
1673         (is_aggr_type_2): Remove.
1674         * call.c (resolved_scoped_fn_name): Remove support for
1675         LOOKUP_EXPR.
1676         * decl.c (grokfndecl): Likewise.
1677         (grokdeclarator): Likewise.
1678         * error.c (dump_decl): Likewise.
1679         (dump_expr): Likewise.
1680         * friend.c (do_friend): Likewise.
1681         * init.c (build_offset_ref): Likewise.
1682         * lex.c (unqualified_fn_lookup_error): Use pedwarn.  Do not create
1683         LOOKUP_EXPRs
1684         * mangle.c (write_expression): Remove support for LOOKUP_EXPR.
1685         * parser.c (cp_parser_postfix_expression): Modify Koenig lookup
1686         test.
1687         * pt.c (get_bindings): Give it internal linkage.
1688         (check_explicit_specialization): Remove support for LOOKUP_EXPR.
1689         (lookup_template_function): Likewise.
1690         (for_each_tempalte_parm_r): Likewise.
1691         (tsubst_decl): Likewise.
1692         (tsubst_qualified_id): Handle template template parameters.
1693         (tsubst_copy): Remove support for LOOKUP_EXPR.
1694         (tsubst_copy_and_build): Likewise.
1695         (most_general_template): Likewise.
1696         (value_dependent_expression_p): Likewise.
1697         (type_dependent_expression_p): Note that IDENTIFIER_NODEs are
1698         always dependent.
1699         * semantics.c (perform_koenig_lookup): Do not create
1700         IDENTIFIER_NODEs.
1701         (finish_fname): Likewise.
1702         (finish_id_expression): Likewise.
1703         * tree.c (is_aggr_type_2): Remove.
1704
1705 2003-07-16  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1706
1707         PR c++/11531
1708         * typeck.c (check_return_expr): Fix thinko in diagnostic.
1709
1710 2003-07-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1711
1712         PR c++/10108
1713         * pt.c (tsubst_decl) <TEMPLATE_DECL>: Add a check for
1714         error_mark_node.
1715
1716 2003-07-14  Mark Mitchell  <mark@codesourcery.com>
1717
1718         PR c++/11509
1719         * pt.c (dependent_scope_ref_p): New function.
1720         (value_dependent_expression_p): Use it.
1721         (type_dependent_expression_p): Likewise.
1722
1723         * pt.c (tsubst_friend_function): Use reregister_specialization.
1724
1725         PR c++/7019
1726         * cp-tree.h (lookup_qualified_name): Adjust prototype.
1727         * decl.c (lookup_qualified_name): Add complain parameter.  Adjust
1728         call to is_aggr_type.
1729         * parser.c (cp_parser_lookup_name): Adjust call to
1730         lookup_qualified_name.
1731         * pt.c (tsubst_qualified_id): Likewise.
1732         (tsubst_copy_and_build): Likewise.
1733         * semantics.c (finish_qualified_id_expr): Deal with erroneous
1734         expressions.
1735
1736 2003-07-14  Gabriel Dos Reis <gdr@integrable-solutions.net>
1737
1738         PR c++/11510
1739         * call.c (op_error): Properly format  REALPART_EXPR and
1740         IMAGPART_EXPR.
1741         * error.c (dump_expr): Likewise.
1742
1743 2003-07-14  Gabriel Dos Reis <gdr@integrable-solutions.net>
1744
1745         * error.c (dump_expr): Handle EMPTY_CLASS_EXPR.
1746
1747 2003-07-14  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1748
1749         PR c++/5293
1750         * call.c (initialize_reference): Improve diagnostic.
1751
1752 2003-07-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1753
1754         PR c++/11154
1755         * pt.c (more_specialized_class): Add full_args parameter.
1756         (most_specialized_class): Adjust calls to more_specialized_class.
1757         * cp-tree.h (more_specialized_class): Adjust declaration.
1758
1759 2003-07-14  Dan Nicolaescu  <dann@ics.uci.edu>
1760
1761         * lex.c (enum tree_node_kind): Delete.
1762
1763 2003-07-13  Mark Mitchell  <mark@codesourcery.com>
1764
1765         PR c++/11503
1766         * cp-tree.h (DECL_SELF_REFERENCE_P): New macro.
1767         (SET_DECL_SELF_REFERENCE_P): Likewise.
1768         * class.c (build_self_reference): Use SET_DECL_SELF_REFERENCE_P.
1769         * pt.c (tsubst_decl): Copy it.
1770         * search.c (lookup_base): Use DECL_SELF_REFERENCE_P.
1771
1772         * pt.c (reregister_specialization): Fix thinko in previous change.
1773
1774         * cp-tree.h (cp_id_kind): New type.
1775         (unqualified_name_lookup_error): Change prototype.
1776         (unqualified_fn_lookup_error): New function.
1777         (do_identifier): Remove.
1778         (do_scoped_id): Likewise.
1779         (tsubst_copy_and_build): Change prototype.
1780         (reregister_specialization): New function.
1781         (perform_koenig_lookup): Likewise.
1782         (finish_id_expression): Likewise.
1783         * call.c (build_method_call): Adjust call to
1784         unqualified_name_lookup_error.
1785         * decl.c (duplicate_decls): Use reregister_specialization.
1786         * lex.c (is_global): Remove.
1787         (unqualified_name_lookup_error): Return a value.
1788         (do_identifier): Remove.
1789         (do_scoped_id): Likewise.
1790         (identifier_typedecl_value): Remove.
1791         (unqualified_fn_lookup_error): New function.
1792         * parser.c (cp_parser_id_kind): Remove.
1793         (cp_parser_non_constant_id_expression): Remove.
1794         (cp_parser_primary_expression): Use finish_id_expression.
1795         (cp_parser_class_or_namespace_name): Use cp_id_kind, not
1796         cp_parser_id_kind.
1797         (cp_parser_postfix_expression): Use perform_koenig_lookup.
1798         (cp_parser_template_argument): Use cp_id_kind.
1799         (cp_parser_fold_non_dependent_expr): Adjust call to
1800         tsubst_copy_and_build.
1801         * pt.c (unregister_specialization): Rename to ...
1802         (reregister_specialization): This.
1803         (tsubst_friend_function): Use it.
1804         (maybe_fold_nontype_arg): Adjust call to tsubst_copy_and_build.
1805         (tsubst_qualified_id): Likewise.
1806         (tsubst_expr): Likewise.
1807         (tsubst_copy_and_build): Add function_p parameter.  Use
1808         finish_id_expression.  Introduce RECUR macro.
1809         (tsubst_non_call_postfix_expression): New function.
1810         (regenerate_decl_from_template): Use reregister_specialization.
1811         * semantics.c (perform_koenig_lookup): New function.
1812         (finish_id_expression): Likewise.
1813
1814 2003-07-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1815
1816         * pt.c (push_access_scope_real): Remove.
1817         (push_access_scope): Move code from push_access_scope_real.
1818         (pop_access_scope): Don't check for TEMPLATE_DECL.
1819         (instantiate_template): Defer access checking during template
1820         substitution.
1821         (regenerate_decl_from_template): Tidy.
1822
1823 2003-07-11  Nathanael Nerode  <neroden@gcc.gnu.org>
1824
1825         PR c++/11437
1826         * operators.def: Add definitions for __imag__, __real__.
1827
1828 2003-07-11  Nathan Sidwell  <nathan@codesourcery.com>
1829
1830         PR c++/11050
1831         * parser.c (cp_parser_expression_list): Rename to ...
1832         (cp_parser_parenthesized_expression_list): ... here. Add attribute
1833         parameter, parse the surounding parentheses.
1834         (cp_parser_skip_to_closing_parenthesis): Add recover and or_comma
1835         parameters. Return int.
1836         (cp_parser_skip_to_closing_parenthesis or comma): Remove.
1837         (cp_parser_postfix_expression): Adjust function call parsing.
1838         (cp_parser_new_placement): Adjust.
1839         (cp_parser_new_initializer): Likewise.
1840         (cp_parser_cast_expression): Likewise.
1841         (cp_parser_selection_statement): Likewise.
1842         (cp_parser_mem_initializer): Likewise.
1843         (cp_parser_asm_definition): Likewise.
1844         (cp_parser_init_declarator): Likewise.
1845         (cp_parser_declarator): Make
1846         cdtor_or_conv_p an int ptr.
1847         (cp_parser_direct_declarator): Likewise. Check for a parameter
1848         list on cdtors & conv functions.
1849         (cp_parser_initializer): Adjust.
1850         (cp_parser_member_declaration): Adjust.
1851         (cp_parser_attribute_list): Move code into
1852         cp_parser_parens_expression_list.
1853         (cp_parser_functional_cast): Adjust.
1854         * pt.c (type_dependent_expression_p): Erroneous expressions are
1855         non-dependent.
1856
1857 2003-07-11  Geoffrey Keating  <geoffk@apple.com>
1858
1859         * decl.c (cp_finish_decl): Handle 'used' attribute.
1860
1861         * cp-lang.c (c_reset_state): New dummy routine.
1862         * cp-tree.h (finish_file): Move prototype to c-common.h.
1863         * parser.c (c_parse_file): Rename from yyparse; don't call finish_file.
1864
1865 2003-07-11  Mark Mitchell  <mark@codesourcery.com>
1866
1867         PR c++/8327
1868         * pt.c (tsubst_qualified_id): Implement suggested resolution for
1869         Core Issue 2.
1870         (type_dependent_expression_p): Likewise.
1871
1872 2003-07-10  Mark Mitchell  <mark@codesourcery.com>
1873
1874         * typeck.c (build_binary_op): Do not warn about signed
1875         vs. unsigned comparisons in the bodies of templates.
1876
1877         PR c++/9411
1878         * parser.c (cp_parser_postfix_expression): Check dependency of
1879         functions.
1880
1881 2003-07-09  Mark Mitchell  <mark@codesourcery.com>
1882
1883         PR c++/10032
1884         * decl.c (cxx_init_decl_processing): With -pedantic, pedwarns are
1885         still errors.
1886
1887         PR c++/10527
1888         * error.c (decl_to_string): Do not print default argument
1889         expressions.
1890
1891         * cp-tree.h (break_out_calls): Remove declaration.
1892         * tree.c (break_out_calls): Remove.
1893         * typeck.c (build_modify_expr): Avoid invalid sharing of trees.
1894
1895 2003-07-09  Nathan Sidwell  <nathan@codesourcery.com>
1896
1897         PR c++ 9483
1898         * class.c (check_field_decls): Pass DECL_NAME to constructor_name_p.
1899         * decl2.c (constructor_name_p): Avoid repeated constructor_name
1900         calls.
1901         * decl.c (grokdeclarator): Refactor ctor/dtor detection.
1902
1903 2003-07-09  Mark Mitchell  <mark@codesourcery.com>
1904
1905         * typeck.c (build_x_unary_op): Take note of the fact that
1906         PREINCREMENT_EXPR and POSTINCREMENT_EXPR are binary operations on
1907         trees.
1908
1909         * parser.c (cp_parser_primary_expression): Preserve the form of
1910         qualified expressions in templates, even if they are not
1911         dependent.
1912         * pt.c (convert_nontype_argument): Handle non-dependent SCOPE_REFs.
1913         (tsubst_qualified_id): Likewise.
1914         * search.c (accessible_p): Treat everything in the body of a
1915         template as accessible.
1916
1917 2003-07-08  Mark Mitchell  <mark@codesourcery.com>
1918
1919         * cp-tree.def (NON_DEPENDENT_EXPR): New node.
1920         * cp-tree.h (build_call_from_tree): Remove.
1921         (build_member_call): Likewise.
1922         (dependent_template_arg_p): Remove.
1923         (any_dependent_template_arguments_p): New function.
1924         (dependent_template_id_p): Likewise.
1925         (any_type_dependent_arguments_p): Likewise.
1926         (build_non_dependent_expr): Likewise.
1927         (build_non_dependent_args): Likewise.
1928         (build_x_compound_expr): Adjust prototype.
1929         * call.c (build_new_method_call): Handle non-dependent expressions
1930         correctly.
1931         * decl2.c (grok_array_decl): Likewise.
1932         (build_offset_ref_call_from_tree): Likewise.
1933         (build_call_from_tree): Remove.
1934         * error.c (dump_decl): Handle NON_DEPENDENT_EXPR.
1935         (dump_expr): Likewise.
1936         * init.c (build_member_call): Remove.
1937         * mangle.c (write_expression): Update handling for template-ids.
1938         * parser.c (cp_parser_primary_expression): Use
1939         any_dependent_template_arguments_p.  Update constant-expression
1940         handling.
1941         (cp_parser_postfix_expression): Use
1942         any_type_dependent_arguments_p.  Simplify call processing.
1943         (cp_parser_unary_expression): Simplify.
1944         (cp_parser_expression): Adjust for changes to
1945         build_x_compound_expr.
1946         (cp_parser_template_argument): Implement standard-conforming
1947         parsing of non-type template arguments.
1948         (cp_parser_direct_declarator): Use
1949         cp_parser_fold_non_dependent_expr.
1950         (cp_parser_fold_non_dependent_expr): New function.
1951         (cp_parser_next_token_ends_template_argument_p): Likewise.
1952         * pt.c (convert_template_argument): Do not call
1953         maybe_fold_nontype_arg.
1954         (tsubst_baselink): Likewise.
1955         (tsubst_copy_and_build): Share common code.  Make sizeof/alignof
1956         processing work correctly for non-dependent expressions.  Adjust
1957         handling of COMPOUND_EXPR.  Simplify call processing.
1958         (value_dependent_expression_p): Deal with functional casts and
1959         sizeof/alignof correctly.
1960         (type_dependent_expression_p): Handle overloaded functions.
1961         (any_type_dependent_arguments_p): New function.
1962         (any_dependent_template_arguments_p): Likewise.
1963         (dependent_template_p): Treat SCOPE_REFs as dependent.
1964         (dependent_template_id_p): Simplify.
1965         (build_non_dependent_expr): New function.
1966         (build_non_dependent_args): Likewise.
1967         * semantics.c (finish_stmt_expr): Don't make dependent
1968         statement-expresions have void type.
1969         (finish_call_expr): Handle non-dependent expressions
1970         correctly.
1971         * tree.c (lvalue_p_1): Treat NON_DEPENDENT_EXPRs as lvalues.
1972         * typeck.c (cxx_sizeof_or_alignof_type): Give the expression
1973         type size_t, even in templates.
1974         (expr_sizeof): Likewise.
1975         (finish_class_member_access_expr): Handle non-dependent expressions
1976         correctly.
1977         (build_x_indirect_ref): Likewise.
1978         (build_x_binary_op): Likewise.
1979         (build_x_unary_op): Likewise.
1980         (build_x_conditional_expr): Likewise.
1981         (build_x_compound_expr): Likewise.
1982         * typeck2.c (build_x_arrow): Likewise.
1983
1984 2003-07-09  Jan Hubicka  <jh@suse.cz>
1985
1986         * cp-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New.
1987         * decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS.
1988         (start_function): Use DECL_ESTIMATED_INSNS.
1989         * optimize.c (maybe_clone_body): Use DECL_ESTIMATED_INSNS.
1990
1991         * decl2.c (maybe_emit_vtables): Fix marking vtables as needed in
1992         unit-at-a-time
1993
1994 2003-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1995
1996         PR c++/11030
1997         * pt.c (instantiate_class_template): Don't call xref_tag to
1998         inject name when the friend class is a specialization.
1999
2000 2003-07-07  Mark Mitchell  <mark@codesourcery.com>
2001
2002         * cp-tree.h (build_scoped_method_call): Remove.
2003         (lookup_qualified_name): Remove parameter.
2004         (tsubst_copy_and_build): Declare.
2005         (finish_qualified_object_call_expr): Remove.
2006         (check_accessibility_of_qualified_id): New function.
2007         (finish_qualified_id_expr): Likewise.
2008         (non_reference): Likewise.
2009         (build_expr_from-tree): Remove.
2010         * call.c (non_reference): Remove.
2011         (build_scoped_method_call): Likewise.
2012         (build_method_call): Use error_operand_p.  Assert that we are not
2013         processing a template.
2014         (standard_conversion): Use non_reference.
2015         * class.c (build_vtbl_entry_ref): Likewise.
2016         (build_vtbl_ref_1): Likewise.
2017         * cvt.c (build_expr_type_conversion): Use non_reference.
2018         * decl.c (lookup_qualified_name): Remove flags parameter.
2019         (grok_op_properties): Use non_reference.
2020         * decl2.c (grok_array_decl): Likewise.
2021         (build_expr_from_tree): Remove.
2022         (build_offset_ref_call_from_tree): Update comment.
2023         * error.c (parm_to_string): Call reinit_global_formatting_buffer.
2024         * except.c (prepare_eh_types): Use non_reference.
2025         (can_convert_eh): Likewise.
2026         * init.c (build_dtor_call): Avoid using build_method_call.
2027         * mangle.c (write_template_param): Remove misleading comment.
2028         * method.c (locate_copy): Use non_reference.
2029         * parser.c (cp_parser_scope_through_which_access_occurs): Remove.
2030         (cp_parser_primary_expression): Do not create SCOPE_REFs is
2031         non-dependent contexts.
2032         (cp_parser_postfix_expression): Use finish_qualified_id_expr.
2033         (cp_parser_direct_declarator): Use tsubst_copy_and_build, not
2034         build_expr_from_tree.
2035         (cp_parser_lookup_name): Adjust call to lookup_qualified_name.
2036         Use check_accessibility_of_qualified_id.
2037         * pt.c (maybe_fold_nontype_arg): Use tsubst_copy_and_build, not
2038         build_expr_from_tree.
2039         (tsubst_baselink): New function.
2040         (tsubst_qualified_id): Likewise.
2041         (tsubst_copy): Use them.  Remove support for METHOD_CALL_EXPR.
2042         (tsubst_expr): Adjust call to lookup_qualified_name.
2043         (tsubst_copy_and_build): Handle SCOPE_REFs specially.  Adjust
2044         handling of CALL_EXPRs.
2045         (value_dependent_expression_p): Use INTEGRAL_OR_ENUMERATION_TYPE_P.
2046         * rtti.c (get_tinfo_decl_dynamic): Use non_reference.
2047         * search.c (check_final_overrider): Likewise.
2048         * semantics.c (check_accessibility_of_qualified_id): New function.
2049         (finish_qualified_object_call_expr): Remove.
2050         * typeck.c (target_type): Use non_reference.
2051         (cxx_sizeof_or_alignof_type): Likewise.
2052         (dubious_conversion_warnings): Likewise.
2053         (convert_for_initialization): Likewise.
2054         (non_reference): New function.
2055
2056 2003-07-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2057
2058         * decl.c (print_binding_level, print_other_binding_stack,
2059         print_binding_stack): Merge uses of HOST_PTR_PRINTF with adjacent
2060         stdio calls.
2061         * ptree.c (cxx_print_decl, cxx_print_binding): Likewise.
2062
2063 2003-07-07  Andreas Jaeger  <aj@suse.de>
2064
2065         * friend.c: Convert to ISO C90 prototypes.
2066
2067         * Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output
2068         language.
2069         * cfns.h: Regenerate.
2070
2071         * typeck.c: Convert remaining prototypes to ISO C90.
2072         * search.c: Likewise.
2073
2074         * decl2.c (build_expr_from_tree): Convert prototype to ISO C90.
2075         * semantics.c (expand_or_defer_fn): Likewise
2076         * mangle.c (discriminator_for_string_literal): Likewise.
2077         * g++spec.c (lang_specific_driver): Likewise.
2078
2079         * search.c (lookup_base_r): Remove unused variable.
2080
2081 2003-07-07  Nathan Sidwell  <nathan@codesourcery.com>
2082
2083         * semantics.c: (genrtl_try_block) Adjust emit_line_note
2084         calls.
2085
2086 2003-07-07  Andreas Jaeger  <aj@suse.de>
2087
2088         * search.c (lookup_base_r): Remove unused variable.
2089
2090 2003-07-06  Michael Chastain  <mec@shout.net>
2091
2092         PR debug/10055
2093         * lex.c (cxx_init): Call push_srcloc and pop_srcloc rather than
2094         assigning to input_filename directly.
2095
2096 2003-07-06  Kazu Hirata  <kazu@cs.umass.edu>
2097
2098         * call.c: Fix comment formatting.
2099         * class.c: Likewise.
2100         * cp-tree.h: Likewise.
2101         * decl.c: Likewise.
2102         * decl2.c: Likewise.
2103         * error.c: Likewise.
2104         * method.c: Likewise.
2105         * name-lookup.c: Likewise.
2106         * parser.c: Likewise.
2107         * pt.c: Likewise.
2108         * rtti.c: Likewise.
2109         * search.c: Likewise.
2110         * typeck.c: Likewise.
2111
2112 2003-07-06  Mark Mitchell  <mark@codesourcery.com>
2113
2114         PR c++/11345
2115         * search.c (lookup_base_r): Remove is_non_public and
2116         within_current_scope parameters.  Remove other dead code.
2117         (lookup_base): Adjust call to lookup_base_r.
2118         (adjust_result_of_qualified_name_lookup): Improve comment.
2119         * semantics.c (finish_call_expr): Use maybe_dummy_object.
2120
2121 2003-07-06  Neil Booth  <neil@daikokuya.co.uk>
2122
2123         * cp-lang.c (LANG_HOOKS_HANDLE_FILENAME,
2124         LANG_HOOKS_MISSING_ARGUMENT): Override.
2125
2126 2003-07-05  Mark Mitchell  <mark@codesourcery.com>
2127
2128         PR c++/11431
2129         * typeck.c (build_static_cast): Check for reference conversions
2130         earlier.
2131
2132 2003-07-04  Mark Mitchell  <mark@codesourcery.com>
2133
2134         * cp-tree.h (perform_integral_promotions): Declare.
2135         * call.c (build_addr_func): Use decay_conversion.
2136         (convert_arg_to_ellipsis): Likewise.  Remove misleading comment.
2137         (convert_for_arg_passing): Use perform_integral_promotions.
2138         * cvt.c (build_expr_type_conversion): Use decay_conversion.
2139         (type_promotes_to): Do not return a cv-qualified type.
2140         * decl.c (grok_reference_init): Fix formatting.
2141         (get_atexit_node): Use decay_conversion.
2142         (build_enumerator): Use perform_integral_promotions.
2143         * init.c (build_vec_init): Use decay_conversion.
2144         * semantics.c (finish_expr_stmt): Likewise.
2145         (finish_switch_cond): Use perform_integral_promotions.
2146         * typeck.c (default_conversion): Likewise.
2147         (perform_integral_promotions): New function.
2148         (build_indirect_ref): Use decay_conversion.
2149         (build_array_ref): Use perform_integral_promotions.
2150         (convert_arguments): Use decay_conversion.
2151         (build_unary_op): Use perform_integral_promotions.
2152         (build_c_cast): Use decay_conversion.
2153         (build_modify_expr): Likewise.
2154         (convert_for_initialization): Likewise.
2155         * typeck2.c (build_x_arrow): Likewise.
2156
2157 2003-07-04  Kazu Hirata  <kazu@cs.umass.edu>
2158
2159         * call.c: Fix comment typos.
2160         * class.c: Likewise.
2161         * cp-tree.h: Likewise.
2162         * cvt.c: Likewise.
2163         * decl2.c: Likewise.
2164         * decl.c: Likewise.
2165         * init.c: Likewise.
2166         * mangle.c: Likewise.
2167         * parser.c: Likewise.
2168         * pt.c: Likewise.
2169         * search.c: Likewise.
2170         * semantics.c: Likewise.
2171         * tree.c: Likewise.
2172         * typeck.c: Likewise.
2173
2174 2003-07-04  Zack Weinberg  <zack@codesourcery.com>
2175
2176         * parser.c (cp_lexer_read_token): No need to handle string
2177         constant concatenation.
2178
2179 2003-07-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2180
2181         * cp-tree.h (GCC_DIAG_STYLE, ATTRIBUTE_GCC_CXXDIAG): Define.
2182         (cp_error_at, cp_warning_at, cp_pedwarn_at): Mark with
2183         ATTRIBUTE_GCC_CXXDIAG.
2184
2185 2003-07-03  Mark Mitchell  <mark@codesourcery.com>
2186
2187         * call.c (build_addr_func): Handle bound pointers-to-members.
2188         (build_method_call): Do not call resolve_offset_ref.
2189         (implicit_conversion): Likewise.
2190         (resolve_scoped_fn_name): Use finish_non_static_data_member, not
2191         resolve_offset_ref.
2192         (resolve_args): Do not call resolve_offset_ref.
2193         (build_conditional_expr): Likewise.
2194         (build_new_method_call): Likewise.
2195         * cp-tree.def (OFFSET_REF): Update documentation.
2196         * cvt.c (cp_convert_to_pointer): Update handling of conversions from
2197         pointers to members to pointers.
2198         (ocp_convert): Do not call resolve_offset_ref.
2199         (convert_to_void): Likewise.
2200         (build_expr_type_conversion): Likewise.
2201         * decl2.c (delete_sanity): Likewise.
2202         * init.c (resolve_offset_ref): Simplify greatly.
2203         (build_vec_delete): Do not call resolve_offset_ref.
2204         * parser.c (cp_parser_postfix_expression): Call resolve_offset_ref
2205         if appropriate.
2206         (cp_parser_unary_expression): Use
2207         cp_parser_simple_cast_expression.
2208         (cp_parser_delete_expression): Likewise.
2209         (cp_parser_cast_expression): Likewise.
2210         (cp_parser_pm_expression): Use cp_parser_binary_op.
2211         (cp_parser_simple_cast_expression): New function.
2212         * rtti.c (build_dynamic_cast_1): Do not call resolve_offset_ref.
2213         * semantics.c (finish_increment_expr): Likewise.
2214         (finish_typeof): Likewise.
2215         * tree.c (lvalue_p_1): Do not handle OFFSET_REF.
2216         * typeck.c (require_complete_type): Do not handle OFFSET_REFs.
2217         (decay_conversion): Do not call resolve_offset_ref.
2218         (finish_class_member_access_expr): Likewise.
2219         (convert_arguments): Likewise.
2220         (build_x_binary_op): Handle DOTSTAR_EXPR.
2221         (condition_conversion): Do not call resolve_offset_ref.
2222         (unary_complex_lvalue): Likewise.
2223         (build_static_cast): Likewise.
2224         (build_reinterpret_cast): Likewise.
2225         (build_const_cast): Likewise.
2226         (build_c_cast): Likewise.
2227         (build_modify_expr): Likewise.
2228         (convert_for_assignment): Likewise.
2229         (convert_for_initialization): Likewise.
2230         * typeck2.c (build_x_arrow): Likewise.
2231         (build_m_component_ref): Simplify.
2232
2233         * call.c (build_scoped_method_call): Use convert_to_void.
2234         (build_method_call): Likewise.
2235         * class.c (check_field_decls): Remove dead code.
2236         * cvt.c (convert_from_reference): Remove OFFSET_TYPE handling.
2237         * decl2.c (grok_array_decl): Remove dead code.
2238         (arg_assoc_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
2239         as pointer-to-member representation.
2240         * init.c (build_offset_ref): Tidy.
2241         (build_vec_delete_1): Use convert_to_void.
2242         * mangle.c (write_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
2243         as pointer-to-member representation.
2244
2245 2003-07-03  Nathan Sidwell  <nathan@codesourcery.com>
2246
2247         PR c++/9162
2248         * decl.c (grokdeclarator): Return friend decls, not
2249         void_type_node.
2250         * decl2.c (grokfield): Alter friend decl check.
2251         * parser.c (struct cp_parser): Document default_arg chain on
2252         unparsed_functions_queue.
2253         (cp_parser_save_default_args): New.
2254         (cp_parser_init_declarator, cp_parser_function_definition,
2255         cp_parser_member_declaration): Call it.
2256         (cp_parser_class_specifier): Remove unused variable. Alter
2257         processing of unparsed_functions_queue.
2258
2259 2003-07-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2260
2261         * class.c (add_method, check_field_decl): Fix format specifier.
2262         * decl.c (duplicate_decls, pushdecl, check_goto,
2263         fixup_anonymous_aggr, maybe_commonize_var, grokdeclarator,
2264         start_enum): Likewise.
2265         * decl2.c (ambiguous_decl): Likewise.
2266         * pt.c (redeclare_class_template): Likewise.
2267
2268 2003-07-02  Nathan Sidwell  <nathan@codesourcery.com>
2269
2270         PR c++/10219
2271         * pt.c (type_unification_real): Don't unify exprs of error type.
2272         * tree.c (error_type): Don't die on error_type.
2273
2274         PR c++/9779
2275         * decl2.c (arg_assoc_class): Don't die on NULL type.
2276         * typeck.c (type_unknown_p): Don't die on untyped expressions.
2277
2278 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
2279
2280         PR c++/6949
2281         * decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local
2282         classes.
2283
2284 2003-07-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2285
2286         * error.c (locate_error): %P takes an `int', not a `tree'.
2287
2288 2003-07-02  Jan Hubicka  <jh@suse.cz>
2289
2290         * decl2.c (defer_fn): Set DECL_DEFER_OUTPUT.
2291         (finish-file): Do not process function with DECL_DEFER_OUTPUT clear;
2292         clear DECL_DEFER_OUTPUT once function is processed; avoid flags
2293         massaging.
2294
2295         * cp-tree.h (DECL_NEEDED_P): Support unit-at-a-time
2296         (expand_or_defer_fn): Declare.
2297         (lower_function): Declare.
2298         * decl.c (start_cleanup_fn): Use expand_or_defer_fn.
2299         * decl2.c: Include cgraph.h and varpool.h
2300         (maybe_emit_vtables):  Make explicit instantations as needed.
2301         (mark_member_pointers, lower_function): New functions.
2302         (finish_file): Do unit-at-a-time.
2303         * method.c (synthesize_method): Use expand_or_defer_fn.
2304         * optimize.c (maybe_clone_body): Use expand_or_defer_fn.
2305         * parser.c (cp_parser_function_definition_after_decl): Use
2306         expand_or_defer_fn.
2307         * pt.c (instantiate_decl): Likewise.
2308         * semantics.c: Include cgraph.h
2309         (expand_or_defer_fn): Break out from ...
2310         (expand_body): ... here; deal with unit-at-a-time.
2311         * cp-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION,
2312         LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Define.
2313
2314 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
2315
2316         * call.c (resolve_scoped_fn_name): Return error_mark_node for
2317         erroneous cases.
2318
2319 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
2320
2321         PR c++/11149
2322         * call.c (resolve_scoped_fn_name): Check that the qualifying scope
2323         is a class type.
2324
2325 2003-07-01  Giovanni Bajo  <giovannibajo@libero.it>
2326
2327         PR c++/8046
2328         * error.c (dump_decl): Handle BIT_NOT_EXPR as
2329         pseudo destructor calls.
2330
2331 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
2332
2333         * cp-tree.h (define_label): Replace filename and lineno
2334         arguments with a location_t.
2335         * decl.c (pop_label): Adjust define_label call.
2336         (define_label): Replace filename and lineno arguments with a
2337         location_t.
2338         * semantics.c (finish_label): Adjust define_label call.
2339
2340 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
2341
2342         PR c++/9559
2343         * decl2.c (grokfield): Do not build NOP_EXPRs around the
2344         error_mark_node.
2345
2346 2003-06-30  Neil Booth  <neil@daikokuya.co.uk>
2347
2348         * Make-lang.in: Update.
2349         * cp-lang.c (c_language): Define.
2350         (LANG_HOOKS_INIT_OPTIONS): Use common hook.
2351         * cp-tree.h (cxx_init_options): Remove.
2352         * lex.c: Don't include diagnostic.h.
2353         (cxx_init_options): Remove.
2354
2355 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
2356
2357         PR c++/4933
2358         * error.c (dump_expr): Support correctly the COMPOUND_EXPR
2359         tree generated within a template. Use dump_expr to dump an
2360         expression sizeof.
2361
2362 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
2363
2364         * mangle.c (write_expression): Exit gracefully when trying to
2365         mangle a CALL_EXPR.
2366
2367 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
2368
2369         PR c++/10750
2370         * parser.c (cp_parser_primary_expression): A VAR_DECL with a
2371         (value- or type-) dependent expression as DECL_INITIAL is a
2372         valid constant-expression (at parser time).
2373
2374 2003-06-30  Giovanni Bajo <giovannibajo@libero.it>
2375
2376         PR c++/11106
2377         * error.c (dump_decl): Call dump_decl to dump the DECL_NAME for a
2378         USING_DECL, instead of print_tree_identifier.
2379
2380 2003-06-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2381
2382         * cp-tree.h (language_to_string): Adjust declaration.
2383         * dump.c (cp_dump_tree): Adjust usage.
2384         * error.c (dump_char): Use output_formatted_scalar. Tidy.
2385         (parm_to_string): Lose unused parameter.  Tidy.
2386         (expr_to_string): Likewise.
2387         (code_to_string): Likewise.
2388         (language_to_string): Likewise.
2389         (op_to_string): Likewise.
2390         (assop_to_string): Likewise.
2391         (digit_buffer): Remove.
2392         (dump_type): Format builtin vector type as __vector__.
2393
2394 2003-06-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2395
2396         * error.c (print_integer): Remove.
2397         (dump_type_suffix): Adjust.
2398         (dump_expr): Likewise.
2399
2400 2003-06-28  Nathan Sidwell  <nathan@codesourcery.com>
2401
2402         * error.c (print_instantiation_partial_context): Take a
2403         location_t.
2404         (print_instantiation_full_context): Adjust.
2405         (print_instantiation_context): Adjust.
2406
2407         * cp-tree.h (cp_line_of, cp_file_of): Remove.
2408         * error.c (cp_line_of, cp_file_of): Merge into ...
2409         (location_of): ... here. Make static, return a location_t.
2410         (cp_error_at, cp_warning_at, cp_pedwarn_at): Adjust.
2411
2412 2003-06-28  Nathan Sidwell  <nathan@codesourcery.com>
2413
2414         PR c++/10784
2415         * call.c (joust): Move warn_conversion check outwards.
2416
2417 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
2418
2419         * decl.c (build_typename_type)
2420         * mangle.c (write_template_template_arg)
2421         * parser.c (cp_parser_scope_through_which_access_occurs)
2422         * pt.c (push_access_scope_real, push_access_scope, pop_access_scope)
2423         * repo.c (get_base_filename)
2424         * semantics.c (maybe_convert_cond):
2425         Mark the definition static, matching the forward declaration.
2426
2427 2003-06-27  Mark Mitchell  <mark@codesourcery.com>
2428
2429         PR c++/10468
2430         * pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly.
2431
2432 2003-06-27  Mark Mitchell  <mark@codesourcery.com>
2433
2434         PR c++/10796
2435         * decl.c (finish_enum): Implement DR377.
2436
2437         * decl.c (cp_finish_decl): Don't make variables with reference
2438         type readonly while they are being initialized.
2439
2440 2003-06-26  Mark Mitchell  <mark@codesourcery.com>
2441
2442         PR c++/11332
2443         * typeck.c (build_static_cast): Avoid returning expressions with
2444         reference type.
2445
2446 2003-06-26  Nathan Sidwell  <nathan@codesourcery.com>
2447
2448         * call.c (build_op_delete_call): Use strip_array_call. Correct
2449         error message to say 'delete' or 'delete[]'.
2450
2451 2003-06-26  Giovanni Bajo  <giovannibajo@libero.it>
2452
2453         PR c++/8266
2454         * pt.c (check_explicit_specialization): When looking up a
2455         template function from an identifier outside class-scope, bind
2456         it to CP_DECL_CONTEXT.
2457
2458 2003-06-25  Mark Mitchell  <mark@codesourcery.com>
2459
2460         PR c++/10990
2461         * search.c (lookup_base_r): Rely on accessible_p, rather than
2462         trying to emulate that logic here.
2463
2464         PR c++/10931
2465         * call.c (convert_like): Pass issue_conversion_warnings.
2466         (convert_like_with_context): Likewise.
2467         (convert_like_real): Add issue_conversion_warnings parameter.
2468         (perform_direct_initialization_if_possible): New function.
2469         * cp-tree.h (perform_direct_initialization_if_possible): Declare it.
2470         * typeck.c (check_for_casting_away_constness): New function.
2471         (build_static_cast): Rewrite.
2472
2473 2003-06-24  Nathan Sidwell  <nathan@codesourcery.com>
2474
2475         * call.c (enforce_access): Assert we get a binfo.
2476         (build_op_delete_call): Pass a binfo to
2477         perform_or_defer_access_check.
2478         * class.c (alter_access): Likewise.
2479         * decl.c (make_typename_type): Likewise.
2480         (make_unbound_class_template): Likewise.
2481         * lex.c (do_identifier): Likewise.
2482         * method.c (hack_identifier): Likewise.
2483         * parser.c (cp_parser_lookup_name): Likewise.
2484         * search.c (lookup_member): Likewise. Move IDENTIFIER_CLASS_VALUE
2485         test.
2486         * semantics.c (finish_non_static_data_member): Likewise.
2487         (perform_or_defer_access_check): Expect a binfo.
2488         * typeck.c (comptypes): Expect types.
2489
2490         * mangle.c (find_substitution): Don't pass a non-type to same_type_p
2491         * friend.c (make_friend_class): Likewise.
2492         * pt.c (check_default_tmpl_args): Likewise.
2493         (lookup_template_class): Likewise.
2494
2495 2003-06-24  Jan Hubicka  <jh@suse.cz>
2496
2497         * method.c (thunk_labelno): Move outside ifdef block to make garbage
2498         collector happy.
2499
2500 2003-06-24  Jan Hubicka  <jh@suse.cz>
2501
2502         * class.c (build_vtable): Make vtables.
2503         * cp-tree.h (DECL_VTABLE_OR_VTT_P): New macro.
2504         * decl2.c (output_vtable_inherit): Rename to ...
2505         (prepare_assemble_variable): ... this one; change interface.
2506         (maybe_emit_vtables): Do not call output_vtable_inherit.
2507         * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Define.
2508         * cp-tree.h (prepare_assemble_variable): New.
2509
2510 2003-06-23  Andrew Pinski <pinskia@physics.uc.edu>
2511
2512         * method.c: add prototype for make_alias_for_thunk.
2513         (thunk_labelno, make_alias_for_thunk): only define
2514         if ASM_OUTPUT_DEF is defined.
2515
2516 2003-06-23  Jakub Jelinek  <jakub@redhat.com>
2517
2518         * method.c (thunk_labelno): New variable.
2519         (make_alias_for_thunk): New function.
2520         (use_thunk): Use it if defined ASM_OUTPUT_DEF.  Put the thunk
2521         into the same section as the function it is calling.
2522         Include gt-cp-method.h.
2523         * Make-lang.in (gt-cp-method.h): Depend on s-gtype.
2524         (cp/method.o): Depend on gt-cp-method.h.
2525         * config-lang.in (gtfiles): Add $(srcdir)/cp/method.c.
2526
2527 2003-06-23  Jan Hubicka  <jh@suse.cz>
2528
2529         * decl.c (register_dtor_fn): Mark cleanup as used.
2530         * decl2.c (mark_vtable_entries): Skip nops.
2531         * rtti.c (get_tinfo_ptr): Mark tinfo as used.
2532         (build_dynamic_cast_1): Likewise.
2533         (tinfo_base_init): Likewise.
2534         (emit_tinfo_decl): Likewise.
2535
2536 2003-06-23  Jakub Jelinek  <jakub@redhat.com>
2537
2538         * mangle.c (hash_type): Val is the TREE_LIST itself, not a pointer
2539         to it.
2540
2541 2003-06-21  Gabriel Dos Reis <gdr@integrable-solutions.net>
2542
2543         PR c++/10784
2544         * call.c (joust): Warn about choosing conversion sequence only if
2545         -Wconversion.
2546
2547 2003-06-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2548
2549         PR c++/10864
2550         * call.c (op_error): Tidy.
2551         * error.c (dump_expr): Properly format 'T()' when T is an
2552         aggregate type.
2553
2554 2003-06-21  Gabriel Dos Reis <gdr@integrable-solutions.net>
2555
2556         PR c++/10915
2557         * decl.c (grok_op_properties): Warn possible confusing conversion
2558         only if -Wconversion.
2559
2560 2003-06-20  Mark Mitchell  <mark@codesourcery.com>
2561
2562         PR c++/10749
2563         * parser.c (cp_parser_class_head): See through dependent names
2564         when parsing a class-head.
2565
2566         PR c++/10845
2567         * pt.c (try_class_unification): Correct handling of member class
2568         templates.
2569
2570 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
2571
2572         * semantics.c (genrtl_finish_function): Adjust
2573         expand_function_end call.
2574
2575 2003-06-19  Mark Mitchell  <mark@codesourcery.com>
2576
2577         PR c++/10939
2578         * pt.c (tsubst_decl): Do not try to substitute into non-dependent
2579         functions.
2580         (value_dependent_expression_p): Correct logic for FUNCTION_DECLs.
2581
2582         PR c++/9649
2583         * cp-tree.h (pushdecl_class_level): Change prototype.
2584         (push_class_level_binding): Likewise.
2585         * decl.c (add_binding): Reject duplicate static data members.
2586         (pushdecl_class_level): Return a value indicating whether or not
2587         the binding was valid.
2588         (push_class_level_binding): Likewise.
2589         * semantics.c (finish_member_declaration): Don't keep invalid
2590         declarations.
2591
2592         PR c++/11041
2593         * call.c (initialize_reference): Do not use cp_finish_decl to emit
2594         temporary variables.
2595         * cp-tree.h (static_aggregates): Declare.
2596         (pushdecl_top_level_and_finish): Likewise.
2597         * decl.c (pushdecl_top_level_1): New function.
2598         (pushdecl_top_level): Use it.
2599         (pushdecl_top_level_and_finish): New function.
2600         (initialize_local_var): Remove redundant code.
2601         (cp_finish_decl): Remove support for RESULT_DECLs.  Don't check
2602         building_stmt_tree.
2603         * decl.h (static_aggregates): Remove.
2604         * decl2.c (get_guard): Use pushdecl_top_level_and_finish.
2605         * rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish.
2606         (tinfo_base_init): Likewise.
2607
2608 2003-06-19  Matt Austern  <austern@apple.com>
2609
2610         PR c++/11228
2611         * init.c (build_zero_init): Assert that number of array elements
2612         is an integer constant.
2613         (build_default_init) Don't use build_zero_init for arrays with
2614         variable number of elements.
2615
2616 2003-06-19  Andreas Jaeger  <aj@suse.de>
2617
2618         * cp-tree.h: Remove duplicated declarations.
2619
2620 2003-06-18  Nathanael Nerode  <neroden@gcc.gnu.org>
2621
2622         * pt.c: Convert to ISO C.
2623         * semantics.c: Convert to ISO C.
2624
2625 2003-06-18  Nathan Sidwell  <nathan@codesourcery.com>
2626
2627         * cp-tree.h (comp_except_specs, compparms, cp_has_mutable_p,
2628         at_least_as_qualified_p, more_qualified_p): Return bool.
2629         * typeck.c: ANSIFY function definitions.
2630         (comp_array_types): Take redeclaration bool parameter.
2631         (comptypes): Rearrange STRICT handling.
2632         (at_least_as_qualified_p, more_qualified_p,
2633         comp_cv_qualification): Cache cv quals.
2634         (compparms): Rearrange loop.
2635
2636 2003-06-18  Nathan Sidwell  <nathan@codesourcery.com>
2637
2638         * cp-tree.h (COMPARE_RELAXED): Rename to ...
2639         (COMPARE_DERIVED): ... here. Adjust comment.
2640         (resolve_typename_type_in_current_instantiation): Remove.
2641         (cp_tree_equal, comptypes): Return a bool.
2642         * cvt.c (convert_to_reference): Adjust comptypes call.
2643         * pt.c (template_args_equal, unify,): Adjust cp_tree_equal call.
2644         (resolve_typename_type_in_current_instantiation): Remove.
2645         * tree.c (cp_tree_equal): Return bool. Cope with TEMPLATE_DECLs and
2646         IDENTIFIER_NODEs. Abort if undeciderable. Adjust recursive
2647         calls. Refactor code.
2648         * typeck.c (comp_array_types): Return bool. Lose callback.
2649         parameter. Adjust cp_tree_equal calls.
2650         (comptypes): Return bool. Adjust strict handling. Remove relaxed
2651         enumeration and java type handling. Deal with typename types here.
2652         Adjust recursive and cp_tree_equals calls. Adjust base and derived
2653         checking.
2654         (comp_target_types): Remove unreachable code. Adjust
2655         same_or_base_type_p calls.
2656         (ptr_reasonably_similar): Adjust base and derived check.
2657
2658         * typeck.c (maybe_warn_about_returning_address_of_local): Remove
2659         unused calculation.
2660         (check_return_expr): Adjust error messages.
2661         * cp-tree.def (SCOPE_REF): Correct comment.
2662
2663 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
2664
2665         * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
2666         string again.
2667
2668 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
2669
2670         * optimize.c (dump_function): Form complete flag name by
2671         prefixing 'fdump-' to string returned by dump_flag_name().
2672
2673 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
2674
2675         * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
2676         string.
2677
2678 2003-06-17  Jason Merrill  <jason@redhat.com>
2679
2680         PR c++/10929
2681         * decl.c (grokfndecl): Don't mark a function inline for
2682         -finline-functions if it isn't defined.
2683
2684 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
2685
2686         PR c++/10712
2687         * class.c (handle_using_decl): Robustify.
2688
2689         PR c++/11105
2690         * cp-tree.h (DECL_CONV_FN_TYPE): New method.
2691         * mangle.c (struct globals): Remove internal_mangling_p.
2692         (write_unqualified_name): Use DECL_CONV_FN_TYPE.
2693         (write_template_parm): Don't write out the level number.
2694         (conv_type_names): New variable.
2695         (hash_type): New function.
2696         (compare_type): Likewise.
2697         (mangle_conv_op_name_for_type): Don't try to mangle conversion
2698         operator names.
2699         * search.c (lookup_conversion_operator): New function.
2700         (lookup_fnfields_1): Use it.
2701
2702 2003-06-17  Andreas Jaeger  <aj@suse.de>
2703
2704         * except.c: Remove duplicate declaration of push_eh_cleanup.
2705
2706         * call.c: Remove extra declaration of inhibit_warnings.
2707
2708 2003-06-16  Nathanael Nerode  <neroden@gcc.gnu.org>
2709
2710         2003-06-16  Jens-Michael Hoffmann  <jensmh@gmx.de>
2711         * mangle.c: Convert to ISO C.
2712
2713 2003-06-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2714
2715         * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR
2716         macro.
2717
2718 2003-06-16  Nathanael Nerode  <neroden@gcc.gnu.org>
2719
2720         * tree.c: Convert to ISO C.
2721
2722 2003-06-16  Kazu Hirata  <kazu@cs.umass.edu>
2723
2724         * cp-tree.h: Follow spelling conventions.
2725         * mangle.c: Likewise.
2726         * method.c: Likewise.
2727         * parser.c: Likewise.
2728
2729 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
2730
2731         * decl.c (start_function): Adjust init_function_start call.
2732         * method.c (use_thunk): Likewise.
2733         * semantics.c (genrtl_start_function): Likewise.
2734
2735 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
2736
2737         * Make-lang.in: Remove c-options.o.
2738
2739 2003-06-13  Nathanael Nerode  <neroden@gcc.gnu.org>
2740
2741         * lex.c: Convert to ISO C.
2742
2743         2003-05-19  Jens-Michael Hoffmann  <jensmh@gmx.de>
2744         * init.c: removes use of PARAMS macro.  Use ISO style function
2745         declarations.  (Not copyright-significant change.)
2746
2747         * rtti.c: Remove PARAMS.
2748
2749         * typeck2.c: Convert to ISO C.
2750
2751 2003-06-12  Mark Mitchell  <mark@codesourcery.com>
2752
2753         PR c++/10635
2754         * typeck.c (build_c_cast): Check that the destination type is
2755         complete.
2756
2757 2003-06-11  Mark Mitchell  <mark@codesourcery.com>
2758
2759         PR c++/10432
2760         * cp-tree.h (finish_declarator): Remove.
2761         * decl.c (cp_finish_decl): Make sure to pop_nested_class even for
2762         erroneous declarations.
2763         * semantics.c (finish_declarator): Remove.
2764
2765 2003-06-11  Roger Sayle  <roger@eyesopen.com>
2766
2767         * decl2.c (generate_ctor_or_dtor_function): Avoid expanding a
2768         global static constructor/destructor if it will be empty, i.e.
2769         either doesn't call any ctors/dtors or only calls pure or const
2770         ctors/dtors.
2771
2772 2003-06-11  Mark Mitchell  <mark@codesourcery.com>
2773
2774         * mangle.c (tm_p.h): Include it.
2775         * Make-lang.in (cp/mangle.o): Depend on $(TM_P_H).
2776
2777         PR c++/11131
2778         * tree.c (cp_cannot_inline_fn): Check for "inline" before
2779         instantiation.
2780
2781 2003-06-10  Jason Merrill  <jason@redhat.com>
2782
2783         PR c++/10968
2784         * pt.c (mark_decl_instantiated): Clear DECL_COMDAT.
2785
2786 2003-06-10  Andrew Pinski  <pinskia@physics.uc.edu>
2787
2788         * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY.
2789         (start_cleanup_cnt): New.
2790
2791 2003-06-10  Mark Mitchell  <mark@codesourcery.com>
2792
2793         PR c++/11131
2794         * cp-tree.h (template_for_substitution): Declare.
2795         * decl2.c (mark_used): Use it when figuring out whether or not a
2796         function is inline.
2797         * pt.c (template_for_substitution): Give it external linkage.
2798         * tree.c (cp_cannot_inline_tree_fn): Instantiate as early as
2799         possible.
2800
2801 2003-06-09  Zack Weinberg  <zack@codesourcery.com>
2802
2803         PR 8861
2804         * mangle.c (write_real_cst): New function.  Implement
2805         ABI-compliant mangling of floating-point literals when
2806         -fabi-version>=2; provide backward compatibility with 3.3 when
2807         -fabi-version=1 (with warning).  Clarify commentary.
2808         (write_template_arg_literal): Use write_real_cst.
2809
2810 2003-06-07  Andreas Jaeger  <aj@suse.de>
2811
2812         * cp/decl.c (xref_tag): Remove undefined macro NONNESTED_CLASSES.
2813
2814 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
2815
2816         * cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
2817         (LANG_HOOKS_HANDLE_OPTION): Override.
2818         * cp-tree.h (cxx_init_options): Update.
2819         * lex.c (cxx_init_options): Update.
2820
2821 2003-06-05  Jan Hubicka  <jh@suse.cz>
2822
2823         * Make-lang.in:  Add support for stageprofile and stagefeedback
2824
2825 2003-06-04  J"orn Rennecke <joern.rennecke@superh.com>
2826
2827         * decl.c (grokdeclarator): Error_mark_node in, error_mark_node out.
2828
2829 2003-06-04  Andreas Jaeger  <aj@suse.de>
2830
2831         * g++spec.c (lang_specific_driver): Remove ALT_LIBM usage.
2832
2833 2003-06-03  Jason Merrill  <jason@redhat.com>
2834
2835         * cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors.
2836
2837         * cp/decl.c (reshape_init): Handle vectors.
2838
2839         * testsuite/g++.dg/init/array10.C: New.
2840
2841 2003-06-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2842
2843         PR c++/10940
2844         * pt.c (check_explicit_specialization): Check for 'static'
2845         earlier.
2846
2847 2003-05-31  Diego Novillo  <dnovillo@redhat.com>
2848
2849         * class.c (dump_array): Call CONSTRUCTOR_ELTS to access
2850         the operand of a CONSTRUCTOR node.
2851
2852 2003-05-31  Gabriel Dos Reis <gdr@integrable-solutions.net>
2853
2854         * decl.c (cp_binding_level::this_entity): Rename from this_class.
2855         (cxx_scope_descriptor): New function.
2856         (cxx_scope_debug): Likewise.
2857         (push_binding_level): Use it.
2858         (pop_binding_level): Likewise.
2859         (suspend_binding_level): Likewise.
2860         (resume_binding_level): Likewise.
2861         (pushlevel_class): Adjust use of this_class.
2862         (pushtag): Likewise.
2863         (lookup_name_real): Likewise.
2864         (global_scope_name): New variable.
2865         (initialize_predefined_identifiers): Initialize it.
2866         (push_namespace): Use it.
2867         (make_cxx_scope): New function.
2868         (pushlevel): Use it.
2869         (pushlevel_class): Likewise.
2870         (push_binding_level): Simplify.  Loose the last two arguments.
2871         (make_binding_level): Remove.
2872         (initial_push__namespace_scope): New function.
2873         (push_namespace): Use it.  Simplify.
2874         (cxx_init_decl_processing): Likewise.
2875         (declare_namespace_level): Remove.
2876
2877 2003-05-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2878
2879         PR c++/10956
2880         * pt.c (instantiate_decl): Don't use full template arguments if
2881         we are dealing with specializations.
2882
2883 2003-05-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2884
2885         * decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS.
2886         (binding_depth): Unconditionally define.
2887         (is_class_level): Likewise.
2888         (indent): Likewise.  Take an indenting parameter.
2889         (push_binding_level): Remove conditional definittion.
2890         (pop_binding_level): Likewise.
2891         (suspend_binding_level): Likewise.
2892         (resume_binding_level): Likewise.
2893         (pushlevel): Likewise.
2894         (pushlevel_class): Likewise.
2895         (poplevel_class): Likewise.
2896         (pop_everything): Likewise.
2897
2898 2003-05-27  Gabriel Dos Reis <gdr@integrable-solutions.net>
2899
2900         * name-lookup.h (global_scope_p): New macro.
2901         * decl.c (pop_binding_level): Use it.  Don't refer directly to
2902         global_binding_level.
2903         (suspend_binding_level): Likewise.
2904         (global_bindings_p): Likewise.
2905         (print_other_binding_stack): Likewise.
2906         (print_binding_stack): Likewise.
2907         (maybe_push_to_top_level): Likewise.
2908         (pushdecl_namespace_level): Likewise.
2909         (cxx_init_decl_processing): Likewise.
2910         (start_decl): Likewise.
2911         (cp_finish_decl): Likewise.
2912         (start_function): Likewise.
2913         (global_binding_level): Remove.
2914
2915 2003-05-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2916
2917         * parser.c (cp_parser_explicit_instantiation): Restore old
2918         access before template instantiation.
2919
2920 2003-05-23  Geoffrey Keating  <geoffk@apple.com>
2921
2922         * lang-specs.h: Use -o to specify preprocessor's output file.
2923         Make -no-integrated-cpp work when building PCH files.
2924
2925 2003-05-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2926
2927         PR c++/10682
2928         * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
2929         check for implicitly created typedef to an enum.
2930
2931 2003-05-21  Jason Merrill  <jason@redhat.com>
2932
2933         * init.c (build_vec_delete): Copy the address into a temporary
2934         variable before calling build_vec_delete_1.
2935         * decl2.c (delete_sanity): Don't call stabilize_reference.
2936
2937 2003-05-21  Nathan Sidwell  <nathan@codesourcery.com>
2938
2939         * pt.c (register_specialization): Update the decl's location,
2940         if necessary.
2941         (check_explicit_specialization): Likewise.
2942
2943 2003-05-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2944
2945         * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX.
2946
2947 2003-05-21  Danny Smith  <dannysmith@users.sourceforge.net>
2948
2949         PR c++/9738
2950         * decl.c (duplicate_decls): Re-invoke make_decl_rtl
2951         if the old decl had instantiated DECL_RTL.
2952         (Base on Richard Henderson 2003-05-13 patch to c-decl.c).
2953
2954 2003-05-19  Matt Austern  <austern@apple.com>
2955
2956         * lang-options.h: Document -Wno-invalid-offsetof
2957         * typeck.c (build_class_member_access_expr): Don't complain about
2958         (Foo *)p->x for non-POD Foo if warn_invalid_offset is zero.
2959
2960 2003-05-18 Andrew Pinski <pinskia@physics.uc.edu>
2961
2962         * name-lookup.c (free_binding_entry): fix where the GTY markers are.
2963         (binding_entry_make): Make entry->chain NULL after getting an entry.
2964         fix the spelling of chain in a comment.
2965         (binding_table_free): speed up by having temporary variable.
2966         (binding_table_new): set table->chain to be NULL after allocating
2967         a table.
2968         (cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set
2969         binding->previous to NULL after getting an binding for speed.
2970
2971 2003-05-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2972
2973         * cp-tree.h (struct lang_type_class): Replace data member tags
2974         with hash-table nested_udts.
2975         (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS.
2976         * class.c (unreverse_member_declarations): Don't touch
2977         CLASSTYPE_TAGS.
2978         (pushclass): Use cxx_remember_type_decls.
2979         * decl.c (struct cp_binding_level): Replace data member tags with
2980         hash-table type_decls.
2981         (pop_binding_level): Handle level->type_decls.
2982         (kept_level_p): Adjust.
2983         (poplevel): Remove unused local variable.
2984         (bt_print_entry): New function.
2985         (print_binding_level): Use it.
2986         (push_namespace): Build current_binding_level->type_decls.
2987         (maybe_process_template_type_declaration): Adjust.
2988         (pushtag): Likewise.
2989         (clear_anon_tags): Use binding_table_remove_anonymous_types.
2990         (gettags): Remove.
2991         (cxx_remember_type_decls):  Rename from storetags.  Adjust.
2992         (lookup_tag): Use binding_table_find_anon_type.  Tidy.
2993         (lookup_tag_reverse): Use binding_table_reverse_maybe_remap.
2994         (cxx_init_decl_processing): Build global_binding_level->type_decls.
2995         (store_parm_decls): Remove pointless code.
2996         * name-lookup.c (free_binding_entry): New variable.
2997         (ENTRY_INDEX): New macro.
2998         (struct binding_table_s): New datatype.
2999         (binding_entry_make): New function.
3000         (binding_entry_free): Likewise.
3001         (binding_table_construct): Likewise.
3002         (binding_table_free): Likewise.
3003         (binding_table_new): Likewise.
3004         (binding_table_expand): Likewise.
3005         (binding_table_insert): Likewise.
3006         (binding_table_find): Likewise.
3007         (binding_table_find_anon_type): Likewise.
3008         (binding_table_reverse_maybe_remap): Likewise.
3009         (binding_table_remove_anonymous_types): Likewise.
3010         (binding_table_foreach): Likewise.
3011         * name-lookup.h (binding_table): New type.
3012         (binding_entry): Likewise.
3013         (bt_foreach_proc): Likewise.
3014         (struct binding_entry_s): New datatype.
3015         (SCOPE_DEFAULT_HT_SIZE): New macro.
3016         (CLASS_SCOPE_HT_SIZE): Likewise.
3017         (NAMESPACE_ORDINARY_HT_SIZE): Likewise.
3018         (NAMESPACE_STD_HT_SIZE): Likewise.
3019         (GLOBAL_SCOPE_HT_SIZE): Likewise.
3020         (binding_table_new): Declare.
3021         (binding_table_free): Likewise.
3022         (binding_table_insert): Likewise.
3023         (binding_table_find_anon_type): Likewise.
3024         (binding_table_reverse_maybe_remap): Likewise.
3025         (binding_table_remove_anonymous_types): Likewise.
3026         (binding_table_foreach): Likewise.
3027         (binding_table_find): Likewise.
3028         (cxx_remember_type_decls): Likewise.
3029         * pt.c (bt_instantiate_type_proc): New function.
3030         (do_type_instantiation): Use it.
3031         * search.c (lookup_field_r): Use binding_table_find.
3032
3033 2003-05-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3034
3035         * semantics.c (perform_deferred_access_checks): Don't discard
3036         checked access.
3037
3038 2003-05-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3039
3040         * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
3041         libiberty VA_ macros, always use stdarg.
3042         * rtti.c (create_pseudo_type_info): Likewise.
3043         * tree.c (build_min_nt, build_min): Likewise.
3044
3045 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3046
3047         * ptree.c (cxx_print_type, cxx_print_xnode): Use string
3048         concatentation on HOST_WIDE_INT_PRINT_* format specifier to
3049         collapse multiple function calls into one.
3050         * tree.c (debug_binfo): Likewise.
3051
3052 2003-05-15  Jason Merrill  <jason@redhat.com>
3053
3054         PR c++/5388
3055         * call.c (conditional_conversion): Don't consider implicit
3056         conversions if T2 is a base of T1.
3057         * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
3058         (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
3059
3060         * parser.c (cp_parser_primary_expression): Convert a static data
3061         member from reference.
3062
3063 2003-05-15  Mark Mitchell  <mark@codesourcery.com>
3064
3065         * call.c (build_op_delete_call): Avoid creating unnecessary types.
3066         * class.c (instantiate_type): Remove tests for tf_no_attributes.
3067         * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
3068         (COMPARE_NO_ATTRIBUTES): Remove.
3069         * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
3070
3071         PR c++/8385
3072         * semantics.c (finish_typeof): Refine type-dependency check.
3073
3074 2003-05-13  Jason Merrill  <jason@redhat.com>
3075
3076         * typeck.c (build_modify_expr): Don't always stabilize the lhs and
3077         rhs.  Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
3078
3079 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3080
3081         * method.c (synthesize_method): Call push/pop_deferring_access_checks.
3082
3083 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3084
3085         PR c++/10230, c++/10481
3086         * semantics.c (finish_non_static_data_member): Handle when the
3087         non-static member is not from a base of the current class type.
3088
3089 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3090
3091         PR c++/10552
3092         * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
3093         template and has dependent context.
3094
3095 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3096
3097         * pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
3098
3099 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3100
3101         PR c++/9252
3102         * cp-tree.h (saved_scope): Remove check_access field.
3103         (tsubst_flags_t): Remove tf_parsing.
3104         * decl.c (maybe_push_to_top_level): Don't initialize
3105         scope_chain->check_access.
3106         (make_typename_type, make_unbound_class_template): Don't use
3107         tf_parsing.
3108         (register_dtor_fn): Use push/pop_deferring_access_checks
3109         instead of scope_chain->check_access.
3110         * method.c (use_thunk): Likewise.
3111         * parser.c (cp_parser_explicit_instantiation
3112         (cp_parser_constructor_declarator_p): Don't call
3113         push/pop_deferring_access_checks here.
3114         (cp_parser_template_argument, cp_parser_class_name): Don't use
3115         tf_parsing.
3116         (yyparse): Check flag_access_control.
3117         * pt.c (instantiate_class_template): Call
3118         push/pop_deferring_access_checks.
3119         * semantics.c (push_deferring_access_checks): Propagate
3120         dk_no_check.
3121         (perform_or_defer_access_check): Make sure basetype_path is
3122         a type before comparison.
3123         * call.c (build_op_delete_call, build_over_call): Use
3124         perform_or_defer_access_check.
3125         * class.c (alter_access): Likewise.
3126         * init.c (build_offset_ref): Likewise.
3127         * lex.c (do_identifier): Likewise.
3128         * method.c (hack_identifier): Likewise.
3129         * search.c (lookup_member): Likewise.
3130         * semantics.c (finish_non_static_data_member): Likewise.
3131         (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
3132         instead of flag_access_control.
3133
3134 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3135
3136         PR c++/9554
3137         * parser.c (cp_parser_class_name): Remove check_access parameter.
3138         All caller adjusted.  Update declaration.
3139         (cp_parser_lookup_name): Likewise.
3140         * semantics.c (push_deferring_access_checks): Change parameter type
3141         to enum deferring_kind.  All caller adjusted.
3142         (resume_deferring_access_checks): Adjust to use new enum.
3143         (stop_deferring_access_checks): Likewise.
3144         (perform_or_defer_access_check): Likewise.
3145         * cp-tree.h (deferring_kind): New enum.
3146         (deferred_access): Adjust field type.
3147         (push_deferring_access_checks): Update declaration.
3148
3149 2003-05-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3150
3151         PR c++/10555, c++/10576
3152         * pt.c (lookup_template_class): Handle class template with
3153         multiple levels of parameters when one of the levels contain
3154         errors.
3155
3156 2003-05-08  Jason Merrill  <jason@redhat.com>
3157
3158         * init.c (build_new_1): Don't reuse a TARGET_EXPR in an
3159         expression.  Undo some of the recent reorg.
3160
3161 2003-05-07  Richard Henderson  <rth@redhat.com>
3162
3163         PR c++/10570
3164         * cfns.gperf: Comment out POSIX thread cancellation points,
3165         plus abort and raise.
3166         * cfns.h: Regenerate.
3167
3168 2003-05-07  Jason Merrill  <jason@redhat.com>
3169
3170         * call.c (build_conditional_expr): Don't assume that the folded
3171         expression has result_type.
3172
3173 2003-05-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3174
3175         * typeck.c (build_unary_op): Deal with const qualifier in
3176         invalid pointer-to-member earlier.
3177
3178 2003-05-05  Jason Merrill  <jason@redhat.com>
3179
3180         PR c++/9537
3181         * call.c (conditional_conversion): Build an RVALUE_CONV if
3182         we're just changing the cv-quals.
3183         (build_conditional_expr): Don't call convert to change
3184         cv-quals.
3185
3186 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3187
3188         PR c++/10496
3189         * typeck.c (build_unary_op): Don't output const qualifier when
3190         output invalid pointer-to-member diagnostics.
3191
3192 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3193
3194         * decl.c: Fix typos.
3195
3196 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3197
3198         PR c++/4494
3199         * decl.c (start_function): Use same_type_p to check return type
3200         of main.
3201
3202 2003-05-03  Zack Weinberg  <zack@codesourcery.com>
3203
3204         PR c/10604
3205         * cp/typeck.c (build_x_compound_expr): No need to check
3206         extra_warnings as well as warn_unused_value.
3207
3208 2003-05-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3209
3210         PR c++/9364, c++/10553, c++/10586
3211         * decl.c (make_typename_type): Don't crash on illegal code.
3212
3213 2003-05-03  Nathan Sidwell  <nathan@codesourcery.com>
3214
3215         * class.c (finish_struct): Use location_t and input_location
3216         directly.
3217         * decl.c (make_label_decl): Likewise.
3218         (use_label): Likewise.
3219         * decl2.c (warn_if_unknown_interface): Likewise.
3220         (start_static_initialization_or_destruction): Likewise.
3221         (generate_ctor_or_dtor_function): Likewise.
3222         (finish_file): Likewise.
3223         * error.c (print_instantiation_full_context): Likewise.
3224         * init.c (create_temporary_var): Likewise.
3225         * method.c (synthesize_method): Likewise.
3226         * parser.c (cp_token): Likewise.
3227         (cp_lexer_set_source_position_from_token): Likewise.
3228         (cp_lexer_get_preprocessor_token): Likewise.
3229         (cp_parser_statement): Likewise.
3230         * pt.c (tsubst_friend_function): Likewise.
3231         (instantiate_class_template): Likewise.
3232         (tsubst_decl): Likewise.
3233         (tsubst): Likewise.
3234         (instantiate_decl): Likewise.
3235         * semantics.c (begin_class_definition): Likewise.
3236         (expand_body): Likewise.
3237
3238 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
3239
3240         * class.c (finish_struct): Rename lineno to input_line.
3241         * decl.c (push_binding_level, pop_binding_level,
3242         suspend_binding_level, resume_binding_level, make_label_decl,
3243         use_label, start_function): Likewise.
3244         * decl2.c (warn_if_unknown_interface,
3245         start_static_initialization_or_destruction,
3246         generate_ctor_or_dtor_function, finish_file): Likewise.
3247         * error.c (cp_line_of, print_instantiation_full_context,
3248         print_instantiation_context): Likewise.
3249         * except.c (check_handlers_1, check_handlers): Likewise.
3250         * init.c (create_temporary_var): Likewise.
3251         * method.c (use_thunk, synthesize_method): Likewise.
3252         * parser.c (cp_lexer_set_source_position_from_token,
3253         cp_lexer_get_preprocessor_token): Likewise.
3254         * pt.c (push_tinst_level, pop_tinst_level,
3255         tsubst_friend_function, instantiate_class_template, tsubst_decl,
3256         tsubst, tsubst_expr, instantiate_decl): Likewise.
3257         * semantics.c (genrtl_try_block, finish_label_stmt,
3258         begin_class_definition, expand_body,
3259         genrtl_finish_function): Likewise.
3260         * tree.c (build_min_nt, build_min): Likewise.
3261
3262 2003-05-01  Mark Mitchell  <mark@codesourcery.com>
3263
3264         * decl2.c (comdat_linkage): Don't externalize explicit
3265         instantiations.
3266
3267 2003-05-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3268
3269         PR c++/10554
3270         * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
3271         is not NULL.
3272
3273 2003-05-01  Steven Bosscher  <steven@gcc.gnu.org>
3274
3275         * cp-tree.h (struct lang_id2): Remove.  Move fields from here...
3276         (struct lang_identifier): ... to here.
3277         (LANG_ID_FIELD): Remove.
3278         (SET_LANG_ID): Remove.
3279         (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
3280         (SET_IDENTIFIER_LABEL_VALUE): Likewise.
3281         (IDENTIFIER_IMPLICIT_DECL): Likewise.
3282         (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
3283         (IDENTIFIER_ERROR_LOCUS): Likewise.
3284         (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
3285
3286 2003-05-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3287
3288         PR c++/8772
3289         * pt.c (convert_template_argument): Correct diagnostic.
3290
3291 2003-04-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3292
3293         PR c++/9432, c++/9528
3294         * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
3295
3296 2003-04-30  Garbiel Dos Reis  <gcc@integrable-solutions.net>
3297
3298         * decl.c (check_previous_goto_1): Adjust prototype.
3299         (check_previous_goto): Adjust use.
3300         (check_switch_goto): Likewise.
3301         (use_label): Adjust.
3302         (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
3303         (struct named_label_use_list): Use location_t datatype.
3304
3305 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
3306
3307         PR c++/10551
3308         * pt.c (mark_decl_instantiated): Defer all explicit instantiations
3309         that have not yet been written out.
3310
3311 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
3312
3313         PR c++/10549
3314         * class.c (layout_class_type): Mark overlong bitfields as having
3315         the maximum size permitted by their type, after layout.
3316
3317         PR c++/10527
3318         * error.c (dump_expr): Correctly handling of NEW_EXPR.4
3319
3320 2003-04-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3321
3322         * call.c (build_operator_new_call): Fix typo.
3323         * lang-options.h: Likewise.
3324
3325 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
3326
3327         PR c++/10515
3328         * cp-tree.h (lookup_field_1): Declare it.
3329         * search.c (lookup_field_1): Make it public.
3330         * decl.c (reshape_init): Handle designated initializers.
3331
3332         * decl.c (maybe_commonize_var): Further tweak support for systems
3333         without weak symbols.
3334
3335 2003-04-27  Mark Mitchell  <mark@codesourcery.com>
3336
3337         * decl.c (maybe_commonize_var): Fix thinko in last patch.
3338
3339 2003-04-27  Mark Mitchell  <mark@codesourcery.com>
3340
3341         PR c++/10506
3342         * method.c (use_thunk): Decrement immediate_size_expand.
3343
3344         PR c++/10503
3345         * cp-tree.h (DECL_VAR_MARKED_P): New macro.
3346         (DECL_MAYBE_TEMPLATE): Remove.
3347         * class.c (fixed_type_or_null): Avoid infinite recursion.
3348
3349         * decl.c (maybe_commonize_var): Make the code match the comments.
3350         * pt.c (instantiate_decl): Move call to import_export_decl.
3351
3352 2003-04-26  Mark Mitchell  <mark@codesourcery.com>
3353
3354         * decl2.c (finish_file): Fix merge botch.
3355
3356 2003-04-25  Mark Mitchell  <mark@codesourcery.com>
3357
3358         * decl2.c (finish_file): Don't call import_export_decl for
3359         functions that are not defined.
3360         (handle_class_head): Robustify.
3361         * pt.c (instantiate_decl): Do not call cp_finish_decl for
3362         variables that are not defined.
3363
3364 2003-04-24  Sylvain Pion  <Sylvain.Pion@mpi-sb.mpg.de>
3365
3366         * call.c (print_z_candidates): Fix off by one error.
3367
3368 2003-04-24  Nathan Sidwell  <nathan@codesourcery.com>
3369
3370         PR c++/10337
3371         * call.c (joust): Don't warn about conversion ops that are exact
3372         or cv-conversions. Rearrange to avoid multiple type comparisons.
3373
3374 2003-04-23  Mark Mitchell  <mark@codesourcery.com>
3375
3376         PR c++/10471
3377         * call.c (build_cxx_call): Robustify.
3378
3379 2003-04-23  Neil Booth  <neil@daikokuya.co.uk>
3380
3381         * Make-lang.in (lex.o): Remove mbchar.h.
3382         * lex.c (MULTIBYTE_CHARS): Lose.
3383         * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
3384         in c-lex.c.
3385
3386 2003-04-23  Mark Mitchell  <mark@codesourcery.com>
3387
3388         PR c++/9847
3389         * cp-tree.h (duplicate_tag_error): Remove.
3390         * class.c (duplicate_tag_error): Remove.
3391         * semantics.c (begin_class_definition): Return immediately for a
3392         duplicate class definition.
3393
3394         PR c++/10451
3395         * decl.c (grokdeclarator): Correct logic for "mutable" errors.
3396
3397 2003-04-22  Mark Mitchell  <mark@codesourcery.com>
3398
3399         PR c++/10446
3400         * search.c (lookup_fnfields_1): Handle empty slots in the method
3401         vector.
3402
3403         PR c++/10428
3404         * decl.c (check_elaborated_type_specifier): New function, split
3405         out from ...
3406         (xref_tag): ... here.  Use the new function in more places.
3407
3408         * rtti.c (throw_bad_typeid): Use build_cxx_call.
3409
3410 2003-04-21  Mark Mitchell  <mark@codesourcery.com>
3411
3412         * call.c (build_over_call): Use build_cxx_call.
3413         (build_cxx_call): New method, split out of build_over_call.
3414         * cp-tree.h (language_function): Add can_throw.
3415         (build_cxx_call): Declare it.
3416         * decl.c (finish_function): If a function does not contain any
3417         calls to functions that can throw an exception, indicate that
3418         fact.
3419         * decl2.c (mark_used): Do not defer the instantiation of
3420         functions, if the current function does not throw.
3421         * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
3422         * pt.c (instantiate_decl): Make sure import_export_decl is called
3423         before emitting things.
3424         * rtti.c (throw_bad_cast): Use build_cxx_call.
3425         (build_dynamic_cast_1): Likewise.
3426         * typeck.c (build_function_call): Likewise.
3427
3428 2003-04-21  Nathan Sidwell  <nathan@codesourcery.com>
3429
3430         PR c++/9881
3431         * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
3432         expressions. Reverts my 2002-08-08 patch.
3433
3434         * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
3435         cheaper early exit.
3436
3437 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
3438
3439         * cp/decl2.c (start_static_storage_duration_function): Take count
3440         arg, don't check if it wraps round.
3441         (generate_ctor_or_dtor_function): Add locus arg, use it.
3442         (generate_ctor_and_dtor_functions_for_priority): Data arg is a
3443         locus.
3444         (finish_file): Set line numbers to past EOF for synthesized
3445         functions.
3446
3447 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
3448
3449         PR c++/10405
3450         * search.c (lookup_field_1): Final scan goes backwards for
3451         types, forwards for non-types.
3452
3453 2003-04-17  Roger Sayle  <roger@eyesopen.com>
3454
3455         PR c/10375
3456         * decl.c (duplicate_decls): Preserve "const", "noreturn" and
3457         "nothrow" function attributes.
3458
3459 2003-04-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3460
3461         PR c++/10347
3462         * pt.c (type_dependent_expression_p): Handle array new.
3463
3464 2003-04-15  Mark Mitchell  <mark@codesourcery.com>
3465
3466         PR c++/10381
3467         * parser.c (cp_parser_primary_expression): Reorganize logic for
3468         dealing with name lookup failures.
3469
3470 2003-04-15  Jason Merrill  <jason@redhat.com>
3471
3472         * decl2.c (mark_used): Don't instantiate anything if
3473         skip_evaluation.
3474
3475 2003-04-14  Ziemowit Laski  <zlaski@apple.com>
3476
3477         * tree.c (build_cplus_array_type_1): Do not call
3478         uses_template_parms() on a NULL index_type.
3479
3480 2003-04-13  Roger Sayle  <roger@eyesopen.com>
3481
3482         * decl.c (duplicate_decls): Preserve pure and malloc attributes.
3483
3484 2003-04-12  Mark Mitchell  <mark@codesourcery.com>
3485
3486         PR c++/10300
3487         * init.c (build_new_1): Reorganize.
3488
3489 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
3490
3491         * class.c (initialize_array)
3492         * decl.c (reshape_init)
3493         * decl2.c (build_expr_from_tree)
3494         * init.c (build_zero_init)
3495         * pt.c (tsubst_copy, tsubst_copy_and_build)
3496         * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
3497         (ptm_initializer, class_initializer, get_pseudo_ti_init)
3498         * semantics.c (finish_compound_literal)
3499         * typeck.c (build_ptrmemfunc1)
3500         * typeck2.c (store_init_value, process_init_constructor)
3501         (build_functional_cast): Use build_constructor.
3502
3503 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
3504
3505         * call.c (print_z_candidates): Use gcc_gettext_width, not
3506         strlen, to determine how much padding to use.
3507
3508 2003-04-10  Zack Weinberg  <zack@codesourcery.com>
3509
3510         * decl.c: Update all calls to shadow_warning.
3511
3512 2003-04-10  Mark Mitchell  <mark@codesourcery.com>
3513
3514         * class.c (layout_class_type): Correct handling for overlong
3515         bit-fields whose width is the same as an integer type.
3516
3517 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
3518
3519         * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
3520         * cp-lang.c (cp_tree_size): New function.
3521         (LANG_HOOKS_TREE_SIZE): Override.
3522
3523         * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
3524         tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
3525         (union lang_tree_node): Remove common and srcloc members.
3526         (build_srcloc_here): Don't prototype.
3527         * decl.c (cp_tree_node_structure): Kill SRCLOC case.
3528         * pt.c (pending_templates): Correct comment.
3529         * tree.c (build_srcloc, build_srcloc_here): Kill.
3530
3531 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
3532
3533         * call.c: Include intl.h.
3534         (print_z_candidate): Always use inform; get rid of errfn
3535         argument. Reorganize so that all the strings get picked up
3536         by xgettext.  Note obligation of caller to pass first argument
3537         through gettext.
3538         (print_z_candidates): Update to match.  Indent second and
3539         successive candidates by strlen() of translated message.
3540         (joust): Restructure ambiguous-conversion pedwarn so that
3541         translators see a complete sentence.  Update calls to
3542         print_z_candidate.
3543
3544         * Make-lang.in (cp/call.o): Update dependencies.
3545
3546 2003-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3547
3548         * decl.c (set_current_binding_level): Delete, revert last change.
3549         (current_binding_level): Modify to allow it as as lvalue.
3550
3551 2003-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3552
3553         * name-lookup.c (find_binding): Pass appropriate pointer type to
3554         POP_TIMEVAR_AND_RETURN.
3555
3556 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3557
3558         * Make-lang.in (cp-warn): Add $(STRICT_WARN).
3559         * cp-tree.h: Don't insist on having GNUC.
3560
3561 2003-04-03  Jason Merrill  <jason@redhat.com>
3562
3563         * cvt.c (ocp_convert): Only abort if we try to convert an object
3564         of TREE_ADDRESSABLE type.
3565
3566         * class.c (build_vtable): Set DECL_ALIGN here.
3567         (get_vtable_decl): Not here.
3568         (layout_vtable_decl): Or here.
3569         (create_vtable_ptr): Or here.
3570         (layout_class_type): Or here.
3571         (check_bitfield_decl): Don't mess with field alignment.
3572
3573 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3574
3575         * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
3576         DEF_ASSN_OPERATOR): Delete spurious semi-colon.
3577         * rtti.c (dfs_class_hint_mark): Likewise.
3578
3579         * decl.c (push_local_name, push_class_level_binding,
3580         maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
3581         functions returning void.
3582         * decl2.c (add_using_namespace): Likewise.
3583
3584         * decl.c (print_binding_level, print_other_binding_stack,
3585         print_binding_stack): Cast argument of %p specifier to void*.
3586         * ptree.c (cxx_print_decl): Likewise.
3587
3588         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
3589         VAR_FUNCTION_OR_PARM_DECL_CHECK,
3590         VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
3591         BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
3592         LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
3593
3594         * decl.c (set_current_binding_level): New macro.  Use throughout
3595         when setting the current binding level.
3596
3597         * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
3598         in enum.
3599         * method.c (mangling_flags): Likewise.
3600
3601         * cp-tree.h (lang_type_header): Add __extension__ and use
3602         CHAR_BITFIELD for members.
3603
3604 2003-04-02  Geoffrey Keating  <geoffk@apple.com>
3605
3606         PR other/9274
3607         * mangle.c: Include gt-cp-mangle.h.
3608         (subst_identifiers): Mark with GTY.
3609         * config-lang.in (gtfiles): Add cp/mangle.c.
3610         * Make-lang.in: (gt-cp-mangle.h): New rule.
3611         (cp/mangle.o): Depends on gt-cp-mangle.h.
3612
3613 2003-04-01  Andrew Pinski  <pinskia@physics.uc.edu>
3614
3615         * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
3616         after \$(srcdir)/cp/name-lookup.h.
3617         * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
3618         of ggc_alloc.  Include gt-cp-name-lookup.h at the end of the file.
3619         * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
3620         (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
3621
3622 2003-03-31  Jason Merrill  <jason@redhat.com>
3623
3624         PR java/10145
3625         * class.c (check_field_decl): Don't set DECL_ALIGN.
3626
3627 2003-03-30  Mark Mitchell  <mark@codesourcery.com>
3628
3629         PR c++/7647
3630         * decl.c (grokdeclarator): Tidy, slightly.
3631         * search.c (lookup_field_1): Add want_type parameter.
3632         (lookup_field_r): Adjust call to lookup_field_1.
3633
3634 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3635
3636         * Make-lang.in (cp/name-lookup.o): Add more dependencies.
3637
3638 2003-03-30  Gabriel Dos Reis <gdr@integrable-solutions.net>
3639
3640         * cp-tree.h (binding_for_name: Move to name-lookup.h  Adjust
3641         prototype.
3642         (cxx_scope_find_binding_for_name): Likewise.
3643         * decl.c (find_binding: Move to name-lookup.c.
3644         (binding_for_name): Likewise.
3645         (cxx_scope_find_binding_for_name): Likewise.
3646         (BINDING_LEVEL):  Remove.
3647         (push_binding): Tidy.
3648         (push_class_binding): Likewise.
3649         (pop_binding): Likewise.
3650         (poplevel): Likewise.
3651         (poplevel_class): Likewise.
3652         (set_identifier_type_value_with_scope): Likewise.
3653         (push_overloaded_decl): Likewise.
3654         (lookup_tag): Likewise.
3655         (unqualified_namespace_lookup): Likewise.
3656         (lookup_name_current_level): Likewise.
3657         (maybe_inject_for_scope_var): Likewise.
3658         (namespace_binding): Move to name-lookup.c.
3659         (set_namespace_binding): Likewise.
3660         * decl2.c (lookup_using_namespace): Tidy.
3661         (qualified_lookup_using_namespace): Likewise.
3662         (do_toplevel_using_decl): Likewise.
3663         * name-lookup.c: Include "timevar.h"
3664         * name-lookup.h (cxx_scope):  Declare.
3665         (struct cxx_binding): Lose member "has_level".  Adjust "scope"
3666         member declaration.
3667         (BINDING_SCOPE): Adjust definition.
3668         (BINDING_HAS_LEVEL_P): Remove.
3669
3670 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3671
3672         * name-lookup.c: New file.
3673         * name-lookup.h: Likewise..
3674         * decl.c (push_binding): Adjust use cxx_binding_make.
3675         (free_bindings): Move to name-lookup.c
3676         (pop_binding): Use cxx_binding_free.
3677         (binding_for_name): Tidy.
3678         * cp-tree.h: Include "name-lookup.h"
3679         (cxx_binding_make): Move to name-lookup.h
3680         (cxx_binding_clear): Likewise.
3681         (struct cxx_binding): Likewise.
3682         (LOCAL_BINDING_P): Likewise.
3683         (INHERITED_VALUE_BINDING_P): Likewise.
3684         (BINDING_SCOPE): Likewise.
3685         (BINDING_HAS_LEVEL_P): Likewise.
3686         (BINDING_VALUE): Likewise.
3687         (BINDING_TYPE): Likewise.
3688         * config-lang.in (gtfiles): Add cp/name-lookup.h
3689         * Make-lang.in (cp/name-lookup.o): New rule.
3690         (CXX_OBJS): Add cp/name-lookup.o
3691         (CXX_TREE_H): Add cp/name-lookup.h
3692
3693 2003-03-28  Jason Merrill  <jason@redhat.com>
3694
3695         PR c++/10245
3696         * cvt.c (force_rvalue): New fn.
3697         * call.c (build_conditional_expr): Use it.
3698         * cp-tree.h: Declare it.
3699
3700 2003-03-28  Mike Stump  <mrs@apple.com>
3701
3702         * error.c (dump_expr): Add 0x to printed hex numbers to make
3703         output match source code better.
3704
3705 2003-03-28  Mark Mitchell  <mark@codesourcery.com>
3706
3707         PR c++/10218
3708         * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
3709         definitions.
3710
3711         * decl2.c (generate_ctor_or_dtor_function): Tolerate a
3712         non-existant ssdf_decls array.
3713         (finish_file): Call generator_ctor_or_dtor_function when there are
3714         static constructors or destructors and no other static
3715         initializations.
3716
3717 2003-03-28  Nathan Sidwell  <nathan@codesourcery.com>
3718
3719         PR c++/10047
3720         * decl2.c (finish_file): Don't warn about explicitly instantiated
3721         inline decls.
3722
3723 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
3724
3725         PR c++/10224
3726         * pt.c (lookup_template_class): Only check instantiated args if
3727         they do not contain template parameters.
3728
3729 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
3730
3731         PR c++/10158
3732         * parser.c (cp_parser_function_definition): Set
3733         DECL_INITIALIZED_IN_CLASS for members.
3734         * pt.c (instantiate_decl): Only reduce the template args for
3735         friends that are not defined in class.
3736
3737 2003-03-25  Jason Merrill  <jason@redhat.com>
3738
3739         * call.c (print_z_candidate): Change name of first arg to msgid.
3740         (joust): Add comment for translators.
3741
3742 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
3743
3744         PR c++/9898, PR c++/383, DR 322
3745         * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
3746         through reference types on both PARM and ARG.
3747
3748 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
3749
3750         PR c++/10119
3751         * error.c (dump_expr) <BASELINK>: Use dump_expr.
3752         * pt.c (maybe_fold_nontype_args): New function.
3753         (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
3754         <TEMPLATE_ID_EXPR>: Break out folding code, call it.
3755         (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
3756         maybe_fold_nontype_args.
3757
3758 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
3759
3760         PR c++/10026
3761         * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
3762
3763 2003-03-23  Mark Mitchell  <mark@codesourcery.com>
3764
3765         PR c++/7086
3766         * typeck.c (cxx_mark_addressable):  Adjust call to
3767         gen_mem_addressof or put_var_into_stack.
3768
3769 2003-03-22  Nathan Sidwell  <nathan@codesourcery.com>
3770
3771         PR c++/9978, c++/9708
3772         * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
3773         * call.c (add_template_candidate_real): Adjust
3774         instantiate_template call.
3775         * class.c (resolve_address_of_overloaded_function): Likewise.
3776         * decl.c (build_enumerator): Set TREE_CONSTANT.
3777         * pt.c (check_instantiated_args): New.
3778         (push_inline_template_parms_recursive): Set TREE_CONSTANT,
3779         TREE_READONLY.
3780         (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
3781         (reduce_template_parm_level): Likewise.
3782         (process_template_parm): Likewise.
3783         (check_explicit_specialization): Adjust instantiate_template call.
3784         (convert_template_argument): Don't check non-type argument here.
3785         (lookup_template_class): Check them here.
3786         (tsubst_friend_function): Adjust instantiate_template call.
3787         (instantiate_template): Add tsubst_flags parameter, use it. Check
3788         instantiated args.
3789
3790 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
3791
3792         * decl.c: Update calls to shadow_warning.
3793
3794 2003-03-21  Nathan Sidwell  <nathan@codesourcery.com>
3795
3796         PR c++/9898
3797         * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
3798         (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
3799
3800 2003-03-20  Mark Mitchell  <mark@codesourcery.com>
3801
3802         * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
3803         friends.
3804         * cp/pt.c (instantiate_class_template): Fix formatting.
3805
3806 2003-03-14  Matt Austern  <austern@apple.com>
3807
3808         * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
3809         (unemitted_tinfo_decl_p): Remove.
3810         (emit_tinfo_decl): Change declaration to remove unused parameter.
3811         * decl2.c (finish_file): Change tinfo emission to loop through
3812         unemitted_tinfo_decls array instead of looping through all decls.
3813         * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
3814         unused second parameter.
3815         (init_rtti_processing): initialize unemitted_tinfo_decls varray.
3816         (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
3817         (emit_tinfo_decl): remove unused second parameter, add assertion
3818         that decl hasn't already been emitted.
3819
3820 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
3821
3822         * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
3823         type from 'int' to 'bool'. Replace 0 and 1 with true and false in
3824         return statements.
3825
3826 2003-03-19  Jason Merrill  <jason@redhat.com>
3827
3828         PR c++/8316, c++/9315, c++/10136
3829         * call.c (print_z_candidate): Split out from...
3830         (print_z_candidiates): ...here.
3831         (joust): Use it.
3832
3833 2003-03-17  Roger Sayle  <roger@eyesopen.com>
3834
3835         PR c++/10031
3836         * decl.c (duplicate_decls): Use the new type when prototyping
3837         anticipated decls, even when the types match.  This defines the
3838         exception list for the built-in function.
3839
3840 2003-03-17  Jason Merrill  <jason@redhat.com>
3841
3842         PR c++/10091
3843         * typeck.c (build_class_member_access_expr): Compare
3844         TYPE_MAIN_VARIANTs.
3845
3846 2003-03-17  Mark Mitchell  <mark@codesourcery.com>
3847
3848         PR c++/9639
3849         * parser.c (cp_parser_declarator_id): Clear parser->scope.
3850
3851 2003-03-16  Jason Merrill  <jason@redhat.com>
3852
3853         PR c++/9993
3854         * decl.c (finish_function): Only allow the NRVO to use variables
3855         declared at function scope.
3856
3857 2003-03-17  Andreas Jaeger  <aj@suse.de>
3858
3859         * Make-lang.in (cp/TAGS): Remove.
3860
3861 2003-03-16  Nathan Sidwell  <nathan@codesourcery.com>
3862
3863         PR c++/9629
3864         * cp-tree.h (struct language_function): Add in_base_initializer.
3865         (in_base_initializer): define it.
3866         (expand_member_init): Remove INIT param.
3867         * init.c (expand_member_init): Remove INIT param, return the member.
3868         (emit_mem_initializers): Set in_base_initializer.
3869         * class.c (build_base_path): Check in_base_initializer.
3870         * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
3871         * pt.c (tsubst_initializer_list): Likewise.
3872
3873 2003-03-16   Gabriel Dos Reis <gdr@integrable-solutions.net>
3874
3875         * decl.c (binding_for_name): Fix initialization thinko.
3876
3877 2003-03-15  Gabriel Dos Reis <gdr@integrable-solutions.net>
3878
3879         Compile-time improvement: 2/n.
3880         * cp-tree.h (struct cxx_binding): New datatype;
3881         (struct lang_identifier): Use it.
3882         (LOCAL_BINDING_P): Adjust definition.
3883         (INHERITED_VALUE_BINDING_P): Likewise.
3884         (BINDING_SCOPE): Likewise.
3885         (BINDING_HAS_LEVEL_P): Likewise.
3886         (BINDING_VALUE): Likewise.
3887         (BINDING_TYPE): Likewise.
3888         (IDENTIFIER_VALUE): Likewise.
3889         (struct tree_binding): Remove.
3890         (TS_CP_BINDING): Likewise.
3891         ((union lang_tree_node): Remove field "binding".
3892         (cxx_binding_clear): New macro.
3893         (binding_for_name): Adjust return type.
3894         (qualified_lookup_using_namespace): Adjust prototype.
3895         (lookup_using_namespace): Adjust prototype.
3896         (cxx_scope_find_binding_for_name): Declare.
3897         * cp-tree.def: Remove CPLUS_BINDING definition.
3898         * decl.c (push_binding): Adjust local variable type.
3899         (add_binding): Likewise.
3900         (push_class_binding): Likewise.
3901         (pop_binding): Likewise.
3902         (poplevel): Likewise.
3903         (poplevel_class): Likewise.
3904         (free_bindings):  Adjust type.
3905         (find_binding): Adjust return type, add a third parameter. Remove
3906         non-useful assertion now that we use static typing.
3907         (cxx_scope_find_binding_for_name): New function.
3908         (binding_for_name): Use it.  Adjust local variable type. Simplify.
3909         (namespace_binding):  Simplify.
3910         (set_namespace_binding): Likewise.
3911         (set_identifier_type_value_with_scope): Adjust local variable type.
3912         (lookup_tag): Don't type-abuse of local variable 'old'.
3913         (lookup_namespace_name): Likewise.  Allocate binding on stack.
3914         (select_decl): Adjust prototype.
3915         (unqualified_namespace_lookup):  Allocate binding on stack.
3916         Don't type-abuse of local variable 'val'.
3917         (lookup_name_real): Likewise.
3918         (maybe_inject_for_scope_var): Adjust local variable type.
3919         (cp_tree_node_structure): Remove CPLUS_BINDING case label.
3920         (namespace_binding): Adjust logic, simplify.
3921         (BINDING_LEVEL): Adjust definition.
3922         (push_class_level_binding): Adjust local variable type.
3923         (struct cxx_saved_binding): Adjust field 'binding' type.
3924         * decl2.c (ambiguous_decl): Adjust prototype.
3925         (lookup_using_namespace): Adjust local variable type.
3926         (qualified_lookup_using_namespace): Catch type error and correct
3927         ensueing logic error.
3928         (do_nonmember_using_decl): Adjust local variable type.  Allocate
3929         temporary cxx_binding on stack.
3930         (do_toplevel_using_decl): Adjust local variable type.
3931         * ptree.c (cxx_print_cxx_binding): New function.
3932         (cxx_print_identifier): Use it.
3933         (cxx_print_xnode): Delete CPLUS_BINDING case label.
3934
3935 2003-03-15  Roger Sayle  <roger@eyesopen.com>
3936
3937         * tree.c (count_functions): Fix whitespace.
3938
3939 2003-03-15  Neil Booth  <neil@daikokuya.co.uk>
3940
3941         * Make-lang.in: Update.
3942
3943 2003-03-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3944
3945         PR c++/6440
3946         * pt.c (maybe_process_partial_specialization): Handle
3947         member class template when enclosing class template is
3948         explicit specialized.
3949         (most_general_template): Stop looking when DECL is already
3950         specialized.
3951
3952 2003-03-13  Jason Merrill  <jason@redhat.com>
3953
3954         PR c++/9420
3955         * search.c (lookup_conversions): Call complete_type here.
3956         * call.c (implicit_conversion): Not here.
3957
3958 2003-03-13  Mark Mitchell  <mark@codesourcery.com>
3959
3960         * decl2.c (do_nonmember_using_decl): Correct handling of
3961         simultaneous type/non-type bindings.
3962
3963         * call.c (initialize_reference): Remove bogus assertion.
3964         * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
3965
3966 2003-03-12  Andrew Lewycky  <andrew@mxc.ca>
3967
3968         PR c++/7050
3969         * expr.c (cxx_expand_expr): Return const0_rtx for throw
3970         expressions.
3971
3972 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
3973
3974         PR c++/9474
3975         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
3976         to merge old and new declarations.
3977
3978 2003-03-12  Alexandre Oliva  <aoliva@redhat.com>
3979
3980         * g++.1: Remove.
3981         * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
3982         (cp/g++.1): Build it from scratch in the build tree.
3983         (c++.install-man): Depend on it.  Install it from the build tree.
3984         (c++.mostlyclean): Clean it.
3985
3986 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
3987
3988         PR c++/9474
3989         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
3990         to merge old and new declarations.
3991
3992         PR c++/9924
3993         * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
3994
3995 2003-03-11  Jason Merrill  <jason@redhat.com>
3996
3997         PR c++/9820
3998         * search.c (lookup_member): Fix handling of functions in a class
3999         being defined.
4000
4001 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
4002
4003         PR c++/8700
4004         * call.c (convert_class_to_reference): Adjust usage of
4005         splice_viable.
4006         (any_viable): Remove.
4007         (splice_viable): Combine with any_viable.
4008         (print_z_candidates): Avoid printing duplicates.
4009         (build_user_type_conversion_1): Adjust usage of splice_viable.
4010         (build_new_function_call): Likewise.
4011         (build_operator_new_call): Likewise.
4012         (build_object_call): Likewise.
4013         (build_conditional_expr): Likewise.
4014         (build_new_op): Likewise.
4015         (build_new_method_call): Likewise.
4016         (joust): Remove spurious comment.
4017         * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
4018         * decl2.c (arg_assoc_class): Simplify.
4019         * friend.c (add_friend): Likewise.
4020
4021 2003-03-11  Jason Merrill  <jason@redhat.com>
4022
4023         PR c++/8660
4024         * decl2.c (check_classfn): A member template only matches a
4025         member template.
4026
4027 2003-03-11  Neil Booth  <neil@daikokuya.co.uk>
4028
4029         * Make-lang.in (CXX_C_OBJS): Update.
4030         * lang-specs.h: Don't define __GNUG__ here.
4031
4032 2003-03-10  Mark Mitchell  <mark@codesourcery.com>
4033
4034         * call.c (perform_overload_resolution): New function.
4035         (build_new_function_call): Use it.
4036         (build_operator_new_call): Likewise.
4037         (add_candidates): Add explicit_targs and template_only parameters.
4038         (build_new_op): Adjust accordingly.
4039         * cp-tree.h (build_operator_new_call): New function.
4040         (build_function_call_real): Remove.
4041         (build_function_call_maybe): Likewise.
4042         * init.c (build_new_1): Use build_operator_new_call.
4043         * typeck.c (build_function_call_real): Rename to ...
4044         (build_function_call): ... this.
4045
4046 2003-03-10  Devang Patel  <dpatel@apple.com>
4047
4048         PR c++/9394
4049         * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
4050
4051 2003-03-10  Jason Merrill  <jason@redhat.com>
4052
4053         PR c++/9798
4054         * decl.c (push_using_directive): Push before recursing.
4055
4056         PR c++/9868, c++/9524
4057         * call.c (resolve_scoped_fn_name): Handle the case of a function
4058         pointer member.
4059
4060         * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
4061         argument in the pointer-to-member case.
4062
4063 2003-03-09  Mark Mitchell  <mark@codesourcery.com>
4064
4065         PR c++/9373
4066         * cp-lang.c (cxx_get_alias_set): Use alias set zero for
4067         pointers to member functions.
4068
4069         PR c++/8534
4070         * decl.c (build_ptrmemfunc_type): Do not allow default arugments
4071         in pointer-to-member-function types.
4072
4073 2003-03-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4074
4075         * expr.c (cplus_expand_constant): Use C90 prototype style.
4076         (cxx_expand_expr): Likewise.
4077
4078 2003-03-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4079
4080         PR c++/9970
4081         * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
4082         functions.
4083
4084 2003-03-08  Geoffrey Keating  <geoffk@apple.com>
4085
4086         * lang-specs.h (c++-header): Change .pch to .gch.
4087
4088 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
4089
4090         * cp-tree.h (cxx_init): Update prototype.
4091         * lex.c (cxx_init): Similarly.
4092
4093 2003-03-08  Mark Mitchell  <mark@codesourcery.com>
4094
4095         PR c++/9823
4096         * cp-tree.h (begin_mem_initializers): Remove.
4097         * parser.c (cp_parser_mem_initializer_list): Inline it here.
4098         Do not call finish_mem_initializers if not in a constructor.
4099         (cp_parser_class_head): Fix typo in error message.
4100         * semantics.c (begin_mem_initializers): Remove.
4101         * testsuite/g++.dg/parser/constructor1.C: New test.
4102
4103         PR c++/9809
4104         * call.c (add_function_candidate): Skip builtin fuctions that have
4105         not yet been declared.
4106
4107         PR c++/9982
4108         * init.c (build_new_1): Correct logic for determining whether or
4109         not to use an array cookie.
4110
4111         PR c++/9524
4112         * parser.c (cp_parser_postfix_expression): Call
4113         finish_non_static_data_member, even when processing_template_decl.
4114
4115         PR c++/9912
4116         * cp-tree.h (is_ancestor): New function.
4117         (handle_class_head): Change prototype.
4118         * decl2.c (is_namespace_ancestor): Rename to ...
4119         (namespace_anecestor): ... this.
4120         (set_decl_namespace): Adjust accordingly.
4121         (handle_class_head): Remove unncessary parameters.
4122         * parser.c (cp_parser_class_head): Check that
4123         nested-name-specifiers are used appropriately.
4124
4125 2003-03-07  Mark Mitchell  <mark@codesourcery.com>
4126
4127         * call.c (reference_binding): Remove REF_IS_VAR parameter.
4128         (implicit_conversion): Adjust call to reference_binding.
4129         (make_temporary_var_for_ref_to_type): Add TYPE parameter.
4130         (initialize_reference): Adjust handling for references bound to
4131         rvalues.
4132         * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
4133         prototype.
4134         (real_non_cast_lvalue_p): New method.
4135         * cvt.c (build_up_reference): Adjust use of
4136         make_temporary_var_for_ref_to_temp.
4137         * tree.c (real_non_cast_lvalue_p): New method.
4138
4139 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4140
4141         * except.c (init_exception_processing): Use C90 prototype style.
4142         (cp_protect_cleanup_actions): Likewise.
4143         (prepare_eh_type): Likewise.
4144         (build_eh_type_type): Likewise.
4145         (build_exc_ptr): Likewise.
4146         (do_begin_catch): Likewise.
4147         (dtor_nothrow): Likewise.
4148         (do_end_catch): Likewise.
4149         (push_eh_cleanup): Likewise.
4150         (decl_is_java_type): Likewise.
4151         (choose_personality_routine): Likewise.
4152         (initialize_handler_parm): Likewise.
4153         (expand_start_catch_block): Likewise.
4154         (expand_end_catch_block): Likewise.
4155         (begin_eh_spec_block): Likewise.
4156         (finish_eh_spec_block): Likewise.
4157         (do_allocate_exception): Likewise.
4158         (do_free_exception): Likewise.
4159         (wrap_cleanups_r): Likewise.
4160         (stabilize_throw_expr): Likewise.
4161         (build_throw): Likewise.
4162         (complete_ptr_ref_or_void_ptr_p): Likewise.
4163         (is_admissible_throw_operand): Likewise.
4164         (nothrow_libfn_p): Likewise.
4165         (can_convert_eh): Likewise.
4166         (check_handlers_1): Likewise.
4167         (check_handlers): Likewise.
4168
4169 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
4170
4171         * call.c (merge_conversion_sequences): New function.
4172         (build_conv): Set ICS_USER_FLAG for USER_CONVs.
4173         (convert_class_to_reference): Correct handling of second
4174         standard conversion sequence in a user-defined conversion
4175         sequence.
4176         (build_user_type_conversion_1): Use merge_conversion_sequences.
4177         * cp-tree.def: Add comments for CONV nodes.
4178         * rtti.c (get_tinfo_decl): Use build_address/build_nop.
4179
4180 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4181
4182         * error.c (init_error): Use C90 prototype style.
4183         (dump_scope): Likewise.
4184         (dump_qualifiers): Likewise.
4185         (dump_template_argument): Likewise.
4186         (dump_template_argument_list): Likewise.
4187         (dump_template_parameter): Likewise.
4188         (dump_template_bindings): Likewise.
4189         (dump_type): Likewise.
4190         (dump_typename): Likewise.
4191         (class_key_or_enum): Likewise.
4192         (dump_aggr_type): Likewise.
4193         (dump_type_prefix): Likewise.
4194         (dump_type_suffix): Likewise.
4195         (dump_global_iord): Likewise.
4196         (dump_simple_decl): Likewise.
4197         (dump_decl): Likewise.
4198         (dump_template_decl): Likewise.
4199         (dump_function_decl): Likewise.
4200         (dump_parameters): Likewise.
4201         (dump_exception_spec): Likewise.
4202         (dump_function_name): Likewise.
4203         (dump_template_parms): Likewise.
4204         (dump_char): Likewise.
4205         (dump_expr_list): Likewise.
4206         (dump_expr): Likewise.
4207         (dump_binary_op): Likewise.
4208         (dump_unary_op): Likewise.
4209         (type_as_string): Likewise.
4210         (expr_as_string): Likewise.
4211         (decl_as_string): Likewise.
4212         (context_as_string): Likewise.
4213         (lang_decl_name): Likewise.
4214         (cp_file_of): Likewise.
4215         (cp_line_of): Likewise.
4216         (decl_to_string): Likewise.
4217         (expr_to_string): Likewise.
4218         (fndecl_to_string): Likewise.
4219         (code_to_string): Likewise.
4220         (language_to_string): Likewise.
4221         (parm_to_string): Likewise.
4222         (op_to_string): Likewise.
4223         (type_to_string): Likewise.
4224         (assop_to_string): Likewise.
4225         (args_to_string): Likewise.
4226         (cv_to_string): Likewise.
4227         (cxx_print_error_function): Likewise.
4228         (cp_diagnostic_starter): Likewise.
4229         (cp_diagnostic_finalizer): Likewise.
4230         (cp_print_error_function): Likewise.
4231         (function_category): Likewise.
4232         (print_instantiation_full_context): Likewise.
4233         (print_instantiation_partial_context): Likewise.
4234         (maybe_print_instantiation_context): Likewise.
4235         (print_instantiation_context): Likewise.
4236         (cp_printer): Likewise.
4237         (print_integer): Likewise.
4238         (print_non_consecutive_character): Likewise.
4239         (locate_error): Likewise.
4240
4241 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
4242
4243         PR c++/9965
4244         * call.c (reference_binding): Add ref_is_var parameter.
4245         (implicit_conversion): Adjust call to reference_binding.
4246         (initialize_reference): Likewise.
4247
4248         PR c++/9400
4249         * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
4250         PARM_DECLs.
4251
4252         PR c++/9791
4253         * class.c (get_basefndecls): Use lookup_fnfields_1.
4254
4255 2003-03-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4256
4257         PR c++/9188
4258         * parser.c (cp_parser_type_parameter): Remove redundant `expect'
4259         in error message.
4260         (cp_parser_single_declaration): Likewise.
4261
4262 2003-03-05  Jason Merrill  <jason@redhat.com>
4263
4264         PR c++/9440
4265         * call.c (build_conditional_expr): Use convert rather than an
4266         explicit NOP_EXPR.
4267
4268 2003-03-02  Matt Austern  <austern@apple.com>
4269
4270         * decl.c (cp_binding_level): Add static_decls varray member.
4271         (add_decl_to_level): Add static/inline namespace scope
4272         declarations to static_decls array.
4273         (wrapup_global_for_namespace): Pass static_decls only, instead of
4274         all decls, to wrapup_global_declarations/check_global_declarations.
4275         (push_namespace): Initialize static_decls for ordinary namespaces.
4276         (cxx_init_decl_processing): Initialize static_decls for global
4277         namespace.
4278
4279 2003-03-05  Mark Mitchell  <mark@codesourcery.com>
4280
4281         * class.c (end_of_class): Correct thinko.
4282
4283 2003-03-04  Nathanael Nerode  <neroden@gcc.gnu.org>
4284
4285         * config-lang.in: Replace ${libstdcxx_version} by its value.
4286
4287 2003-03-04  Gabriel Dos Reis <gdr@integrable-solutions.net>
4288
4289         * cp-tree.h (cxx_saved_binding): Declare.
4290         (struct saved_scope): Adjust type of field 'old_binding'.
4291         * decl.c (cxx_saved_binding_make): New macro.
4292         (struct cxx_saved_binding): Define.
4293         (store_bindings): Adjust prototype.  Use cxx_saved_binding to save
4294         C++ bindings.
4295         (maybe_push_to_top_level): Adjust local variable type.
4296         (pop_from_top_level): Likewise.
4297
4298 2003-03-04  Tom Tromey  <tromey@redhat.com>
4299
4300         * Make-lang.in (c++.tags): New target.
4301
4302 2003-03-04  Neil Booth  <neil@daikokuya.co.uk>
4303
4304         * Make-lang.in: Update.
4305
4306 2003-03-03  Jason Merrill  <jason@redhat.com>
4307
4308         * decl.c (finish_enum): Do set the type in a template. Simplify.
4309         * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
4310
4311 2003-03-03  Mark Mitchell  <mark@codesourcery.com>
4312
4313         PR c++/9878
4314         * call.c (convert_class_to_reference): Correct conversion
4315         sequences.
4316         (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
4317         (implicit_conversion): Adjust call to reference_binding.
4318         (add_candidate): Change type of candidates parameter.
4319         (add_function_candidate): Likewise.
4320         (add_conv_candidate): Likewise.
4321         (build_builtin_candidate): Likewise.
4322         (add_builtin_candidate): Likewise.
4323         (add_builtin_candidates): Likewise.
4324         (add_template_candidate_real): Likewise.
4325         (add_template_candidate): Likewise.
4326         (add_template_conv_candidate): Likewise.
4327         (build_user_type_conversion_1): Adjust accordingly.
4328         (build_object_call): Likewise.
4329         (build_conditional_expr): Likewise.
4330         (add_candidates): Likewise.
4331         (build_new_op): Likewise.
4332         (convert_like_real): Use USER_CONV_CAND.  Use build_nop.
4333         (build_new_method_call): Adjust calls to add_function_candidate.
4334         (make_temporary_var_for_ref_to_temp): New function.
4335         (initialize_reference): Add decl parameter.
4336         * class.c (build_rtti_vtbl_entries): Use build_address and
4337         build_nop.
4338         * cp-tree.h (initialize_reference): Change prototype.
4339         (make_temporary_var_for_ref_to_temp): New function.
4340         (build_type_conversion): Change prototype.
4341         (build_address): New function.
4342         (build_nop): Likewise.
4343         * cvt.c (cp_convert_to_pointer): Adjust call to
4344         build_type_conversion.  Avoid indicating redundant NOP_EXPRs.
4345         Use build_nop.
4346         (convert_to_pointer_force): Use build_nop.
4347         (build_up_reference): Use make_temporary_var_for_ref_to_temp.
4348         (convert_to_reference): Adjust call to build_type_conversion.
4349         (ocp_convert): Likewise.
4350         (build_type_conversion): Remove for_sure parameter.
4351         * decl.c (grok_reference_init): Use initialize_reference.
4352         * typeck.c (build_address): New function.
4353         (build_nop): Likewise.
4354         (build_unary_op): Use them.
4355         (build_ptrmemfunc): Tidy slightly.
4356         (convert_for_initialization): Adjust call to
4357         initialize_reference.
4358         * typeck2.c (store_init_value): Remove #if 0'd code.
4359
4360 2003-03-03  Jason Merrill  <jason@redhat.com>
4361
4362         * decl.c (start_function): Clear DECL_NUM_STMTS.
4363
4364         * class.c (get_vtable_decl): Use vtbl_type_node.
4365         (build_primary_vtable): Check for it.
4366
4367 2003-03-02  Aldy Hernandez  <aldyh@redhat.com>
4368
4369         * decl.c (check_initializer): Check for vector_opaque_p.
4370
4371 2003-03-02  Ashif Harji  <asharji@uwaterloo.ca>
4372
4373         * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
4374           invoke an external cpp during compilation.
4375
4376 2003-03-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4377
4378         * decl.c (duplicate_decls): Convert use of warning_with_decl() to
4379         that of warning().
4380         (start_decl): Likewise.
4381         (start_function): Likewise.
4382
4383 2003-03-01  Neil Booth  <neil@daikokuya.co.uk>
4384
4385         * Make-lang.in (CXX_C_OBJS): Update.
4386
4387 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
4388
4389         PR c++/9892
4390         * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
4391         instantiating it.
4392
4393 2003-02-28  Aldy Hernandez  <aldyh@redhat.com>
4394
4395         * parser.c (cp_parser_init_declarator): Revert opaque
4396         vector_opaque_p change.
4397         Do not include target.h.
4398
4399 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
4400
4401         PR c++/9879
4402         * cp-tree.h (build_zero_init): Add parameter.
4403         * decl.c (cp_finish_decl): Adjust call.
4404         * init.c (build_zero_init): Add nelts parameter.  Adjust recursive
4405         calls.
4406         (build_default_init): Add nelts parameter.  Adjust calls to
4407         build_zero_init.
4408         (build_new_1): Adjust call to build_default_init.
4409         * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
4410
4411 2003-02-26  Devang Patel  <dpatel@apple.com>
4412
4413         * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
4414         required.  Postpone enum setting for template decls.
4415         (build_enumerator): Delay copying value node until finish_enum
4416         (). Remove #if 0'ed code.
4417         * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
4418         (tsubst_copy): Add check for enum type.
4419
4420 2003-02-25  Mark Mitchell  <mark@codesourcery.com>
4421
4422         PR c++/9683
4423         * decl2.c (prune_vars_needing_no_initialization): Do not throw
4424         away initializations for DECL_EXTERNAL VAR_DECLs.
4425         (finish_file): Adjust accordingly.
4426         * pt.c (instantiate_decl): Do not defer VAR_DECLs.
4427
4428 2003-02-24 Gabriel Dos Reis  <gdr@integrable-solutions.net>
4429
4430         * decl.c (add_binding): Time TV_NAME_LOOKUP.
4431         (push_class_binding): Likewise.
4432         (set_namespace_binding): Likewise.
4433
4434 2003-02-24  Mark Mitchell  <mark@codesourcery.com>
4435
4436         PR c++/9836
4437         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
4438         specializations back to the main template.
4439         * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
4440         * pt.c (resolve_typename_type): Likewise.
4441
4442 2003-02-24  Jeffrey D. Oldham  <oldham@codesourcery.com>
4443
4444         PR c++/9778
4445         * pt.c (tsubst_copy_and_build): For a templated function inside a
4446         scope, process template arguments.
4447
4448 2003-02-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4449
4450         PR c++/9602
4451         * typeck2.c (abstract_virtuals_error): Don't check when
4452         TYPE is still template parameter dependent.
4453
4454 2003-02-23  Mark Mitchell  <mark@codesourcery.com>
4455
4456         PR c++/5333
4457         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
4458         * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
4459         * pt.c (instantiate_class_template): Don't try to instantiate
4460         dependent types.
4461         (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
4462
4463 2003-02-21  Mark Mitchell  <mark@codesourcery.com>
4464
4465         PR c++/9749
4466         * decl.c (grokdeclarator): Do not allow parameters with variably
4467         modified types.
4468
4469 2003-02-21  Nathan Sidwell  <nathan@codesourcery.com>
4470
4471         * search.c (grow_bfs_bases): Remove. Fold into ...
4472         (bfs_walk): ... here, fix fencepost error. Fix merge lossage
4473         in previous patch.
4474
4475 2003-02-20  Mark Mitchell  <mark@codesourcery.com>
4476
4477         PR c++/9729
4478         * mangle.c (mangle_conv_op_name_for_type): Issue an error message
4479         when the G++ 3.2 ABI prevents correct compilation.
4480
4481 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
4482
4483         Change base class access representation. Share virtual base
4484         binfos.
4485         * cp/call.c (build_special_member_call): Remove binfo_for_vbase
4486         call.
4487         * cp/class.c (build_base_path): Likewise.
4488         (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
4489         (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
4490         (make_new_vtable): Adjust.
4491         (force_canonical_binfo_r): Delete.
4492         (force_canonical_binfo): Delete.
4493         (mark_primary_virtual_base): Delete.
4494         (dfs_unshared_virtual_bases): Delete.
4495         (mark_primary_bases): Adjust.
4496         (maybe_warn_about_overly_private_class): Adjust.
4497         (dfs_base_derived_from): Delete.
4498         (base_derived_from): Follow the inheritance chain.
4499         (struct find_final_overrider_data): Add vpath member.
4500         (dfs_find_final_overrider): Adjust.
4501         (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
4502         (find_final_overrider): Adjust.
4503         (update_vtable_entry_for_fn): Adjust.
4504         (modify_all_vtables): Adjust.
4505         (walk_subobject_offsets): Adjust.
4506         (layout_nonempty_base_or_field): Adjust.
4507         (layout_empty_base): Remove last parameter. Adjust.
4508         (build_base_field): Adjust.
4509         (build_base_fields): Adjust.
4510         (propagate_binfo_offsets): Remove last parameter. Adjust.
4511         (dfs_set_offset_for_unshared_vbases): Delete.
4512         (layout_virtual_bases): Adjust.
4513         (finish_struct_1): Adjust.
4514         (init_class_processing): Don't init access nodes.
4515         (dfs_get_primary_binfo): Delete.
4516         (get_primary_binfo): Adjust.
4517         (dump_class_hierarchy_r): Remove most derived arg, add IGO
4518         parameter. Adjust.
4519         (dump_class_hierarchy): Adjust.
4520         (finish_vtbls): Adjust.
4521         (get_original_base): Delete.
4522         (build_vtt_inits): Adjust.
4523         (dfs_build_secondary_vptr_vtt_inits): Adjust.
4524         (dfs_ctor_vtable_bases_queue_p): Adjust.
4525         (build_ctor_vtbl_group): Adjust.
4526         (dfs_accumulate_vtbl_inits): Adjust.
4527         (build_vtbl_initializer): Adjust.
4528         (build_vbase_offset_vtbl_entries): Adjust.
4529         (add_vcall_offset_vtbl_entries_1): Adjust.
4530         * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
4531         (access_*_node): Remove.
4532         (CANONICAL_BINFO): Delete.
4533         (BINFO_UNSHARED_MARKED): Remove.
4534         (BINFO_MARKED): Set LANG_FLAG_0 directly.
4535         (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
4536         (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
4537         (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
4538         Delete.
4539         (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
4540         (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
4541         (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
4542         Delete.
4543         (BINFO_DEPENDENT_BASE_P): New.
4544         (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
4545         index.
4546         (markedp, unmarkedp): Adjust.
4547         (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
4548         dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
4549         find_vbase_instance, binfo_for_vbase): Delete.
4550         (copied_binfo, original_binfo): Declare.
4551         (finish_base_specifier): Add virtual_p arg.
4552         (unshare_base_binfos): Delete.
4553         (copy_base_binfos): Declare.
4554         (reverse_path): Delete.
4555         * cp/decl.c (xref_basetypes): Access and virtuality passed
4556         differently. Don't copy direct base binfos here. Call
4557         copy_base_binfos.
4558         * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
4559         (initialize_vtbl_ptrs): Adjust.
4560         (expand_member_init): Adjust.
4561         * cp/parser.c (cp_parser_base_specifier): Adjust.
4562         * cp/pt.c (instantiate_class_template): Adjust.
4563         (get_template_base_recursive): Adjust.
4564         * cp/rtti.c (get_pseudo_ti_init): Adjust.
4565         (get_pseudo_ti_desc): Adjust.
4566         * cp/tree.c (unshare_base_binfos): Rename to ...
4567         (copy_base_binfos): ... here, reimplement.
4568         (make_binfo): Set BINFO_DEPENDENT_BASE_P.
4569         (reverse_path): Remove.
4570         * cp/typeck.c (get_delta_difference): Adjust error messages.
4571         * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
4572         * cp/search.c (lookup_base_r): Adjust.
4573         (dynamic_cast_base_recurse): Adjust.
4574         (canonical_binfo): Remove.
4575         (dfs_canonical_queue): Remove.
4576         (dfs_assert_unmarked_p): Remove.
4577         (assert_canonical_unmarked): Remove.
4578         (shared_marked_p, shared_unmarked_p): Remove.
4579         (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
4580         (dfs_access_in_type): Adjust.
4581         (access_in_type): Adjust.
4582         (dfs_accessible_queue_p): Adjust.
4583         (dfs_accessible_p): Adjust.
4584         (is_subobject_of_p_1, is_subobject_of_p): Remove.
4585         (struct lookup_field_info): Remove from_dep_base_p field.
4586         (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
4587         (lookup_field_r): Remove dependent base code.
4588         (lookup_member): Likewise.
4589         (dfs_walk, dfs_walk_real): Add access arg to queue fn.
4590         (dfs_unmarked_real_bases_queue_p): Remove.
4591         (dfs_marked_real_bases_queue_p): Remove.
4592         (dfs_skip_vbases): Remove.
4593         (dfs_get_pure_virtuals): Adjust.
4594         (markedp, unmarkedp): Adjust.
4595         (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
4596         (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
4597         (dfs_unmark): Adjust.
4598         (dfs_get_vbase_types):Remove.
4599         (dfs_build_inheritance_graph_order): Remove.
4600         (get_vbase_types): Remove
4601         (dfs_find_vbase_instance): Remove.
4602         (find_vbase_instance): Remove.
4603         (dfs_debug_unmarkedp): Adjust.
4604         (dependent_base_p): Remove.
4605         (dfs_push_type_decls): Adjust.
4606         (dfs_push_decls): Adjust.
4607         (dfs_no_overlap_yet): Adjust.
4608         (copied_binfo): New function.
4609         (original_binfo): New function.
4610         (binfo_for_vbase): Remove.
4611
4612 2003-02-18  Zack Weinberg  <zack@codesourcery.com>
4613
4614         * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
4615         (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
4616         vectors, for speed.
4617
4618 2003-02-18  Mark Mitchell  <mark@codesourcery.com>
4619
4620         PR c++/9704
4621         * class.c (layout_class_type): In the 3.2 ABI, take into account
4622         trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
4623
4624 2003-02-18  Matt Austern <austern@apple.com>
4625
4626         * cp/cp-lang.c: Change lang hooks so that final_write_globals does
4627         nothing for C++.
4628         * cp/decl.c (wrapup_globals_for_namespace): Remove special
4629         handling of global namespace.
4630
4631 2003-02-18  Geoffrey Keating  <geoffk@apple.com>
4632
4633         * cp-tree.h (rid_to_yy): Delete.
4634         (C_RID_YYCODE): Delete.
4635         (finish_file): Delete redundant declaration.
4636
4637 2003-02-18  Jason Merrill  <jason@redhat.com>
4638
4639         PR c++/9623
4640         * decl.c (reshape_init): Don't mess with initializer labels.
4641
4642         PR c++/9485
4643         * parser.c (cp_parser_postfix_expression): Set idk properly for
4644         object->scope::member.
4645
4646 2003-02-18  Ben Elliston  <bje@redhat.com>
4647
4648         PR other/7350
4649         * decl.c (duplicate_decls): Fix typo in comment.
4650
4651 2003-02-17  Michael Elizabeth Chastain <mec@shout.net>
4652
4653         PR debug/9717
4654         * class.c (build_base_field): Mark fields for base classes with
4655         DECL_IGNORED_P.
4656
4657 2003-02-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4658
4659         PR c++/9457
4660         * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
4661         CONSTRUCTOR_ELTS only once.
4662
4663 2003-02-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4664
4665         PR c++/9459
4666         * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
4667         (dump_type_suffix): Likewise.
4668
4669 2003-02-14  Nathan Sidwell  <nathan@codesourcery.com>
4670
4671         * search.c: ANSIfy function declarations and definitions.
4672         * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
4673         * call.c (build_method_call, resolve_scoped_fn_name,
4674         build_java_interface_fn_ref): Adjust lookup_field, lookup_member
4675         calls.
4676         * class.c (handle_using_decl): Likewise.
4677         * decl.c (make_typename_type, make_unmound_class_template,
4678         start_decl, compute_array_index_type): Likewise.
4679         * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
4680         * init.c (expand_member_init, build_member_call): Likewise.
4681         * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
4682         resolve_typename_type): Likewise.
4683         * typeck.c (lookup_destructor, finish_class_member_access_exprm
4684         build_prememfunc_access_expr): Likewise.
4685
4686 2003-02-13  Gabriel Dos Reis <gdr@integrable-solutions.net>
4687
4688         * decl2.c: Include "timevar.h".
4689         (namespace_ancestor): Time name lookup.
4690         (add_using_namespace): Likewise.
4691         (lookup_using_namespace): Likewise.
4692         (qualified_lookup_using_namespace): Likewise.
4693         (decl_namespace): Likewise.
4694         (lookup_arg_dependent): Likewise.
4695         * lex.c (do_identifier): Likewise.
4696         (do_scoped_id): Likewise.
4697         * pt.c (lookup_template_class): Likewise.
4698
4699 2003-02-14   Andrew Pinski <pinskia@physics.uc.edu>
4700
4701         * decl.c: (define_label): Fix warning for return 0 instead of NULL.
4702
4703 2003-02-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4704
4705         * decl.c: Include "timevar.h".
4706         (poplevel): Time name lookup.
4707         (find_binding): Likewise.
4708         (push_namespace): Likewise.
4709         (pop_nested_namespace): Likewise.
4710         (store_bindings): Likewise.
4711         (maybe_push_to_top_level): Likewise.
4712         (pop_from_top_level): Likewise.
4713         (push_local_name): Likewise.
4714         (pushtag): Likewise.
4715         (pushdecl): Likewise.
4716         (pushdecl_with_scope): Likewise.
4717         (pushdecl_namespace_level): Likewise.
4718         (pushdecl_top_level): Likewise.
4719         (pushdecl_class_level): Likewise.
4720         (push_class_level_binding): Likewise.
4721         (push_using_decl): Likewise.
4722         (push_using_directive): Likewise.
4723         (push_overloaded_decl): Likewise.
4724         (lookup_label): Likewise.
4725         (define_label): Likewise.
4726         (lookup_tag): Likewise.
4727         (lookup_tag_reverse): Likewise.
4728         (lookup_namespace_name): Likewise.
4729         (select_decl): Likewise.
4730         (unqualified_namespace_lookup): Likewise.
4731         (lookup_name_real): Likewise.
4732         (lookup_name_current_level): Likewise.
4733         (lookup_type_current_level): Likewise.
4734         (maybe_inject_for_scope_var): Likewise.
4735         (xref_tag): Likewise.
4736
4737         * Make-lang.in (cp/decl.o): Add dependency on timevar.h
4738
4739 2003-02-12  Phil Edwards  <pme@gcc.gnu.org>
4740
4741         * decl.c (build_enumerator):  Remove unneeded test.
4742
4743 2003-02-09  Dan Nicolaescu  <dann@ics.uci.edu>
4744
4745         * cp-tree.h (struct lang_type_header): Make all fields unsigned
4746         char.
4747
4748 2003-02-03  Mark Mitchell  <mark@codesourcery.com>
4749
4750         PR c++/7129
4751         * call.c (z_candidate): Add args.
4752         (convert_class_to_reference): Set it.
4753         (implicit_conversion): Tidy.
4754         (add_candidate): Add args parameter.
4755         (add_function_candidate): Adjust call to add_candidate.
4756         (add_conv_candidate): Likewise.
4757         (build_builtin_candidate): Likewise.
4758         (build_user_type_conversion_1): Eliminate wasteful tree_cons
4759         usage.
4760         (build_new_function_call): Likewise.
4761         (build_object_call): Likewise.
4762         (add_candidates): New function.
4763         (build_new_op): Use it.
4764         (covert_like_real): Adjust call to build_over_call.
4765         (build_over_call): Remove args parameter.
4766         * operators.def: Add <?= and >?=.
4767
4768 2003-02-01  Richard Sandiford  <rsandifo@redhat.com>
4769
4770         * typeck.c (build_indirect_ref): Don't check flag_volatile.
4771
4772 2003-01-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4773
4774         PR c++/8849
4775         * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
4776
4777 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
4778
4779         * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
4780         BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
4781         (BINFO_LANG_ELTS): New #define.
4782         * tree.c (make_binfo): Use BINFO_LANG_ELTS.
4783
4784 2003-01-30  Geoffrey Keating  <geoffk@apple.com>
4785
4786         * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
4787
4788 2003-01-30  Mark Mitchell  <mark@codesourcery.com>
4789
4790         * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
4791         for class types.
4792         * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
4793         rather than TYPE_LANG_FLAG_0.
4794         (TYPE_BUILT_IN): Remove.
4795         (TYPE_DEPENDENT_P): New macro.
4796         (TYPE_DEPENDENT_P_VALID): Likewise.
4797         (lang_type_class): Add fields_readonly.
4798         * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
4799         * pt.c (dependent_type_p_r): New function, split out from ...
4800         (dependent_type_p): ... here.  Memoize results.
4801         * search.c (dependent_base_p): Use dependent_type_p, not
4802         uses_template_parms.
4803         * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
4804         for class types.
4805
4806 2003-01-29  Mark Mitchell  <mark@codesourcery.com>
4807
4808         * call.c (build_field_call): Use build_new_op, not build_opfncall.
4809         (prep_operand): New function.
4810         (build_new_op): Use it.  Remove dead code.
4811         * class.c (pushclass): Change "modify" parameter type from int to
4812         bool.
4813         (currently_open_class): Use same_type_p, not pointer equality.
4814         (push_nested_class): Adjust calls to pushclass, remove modify
4815         parameter.
4816         * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
4817         (pushclass): Change prototype.
4818         (push_nested_class): Likewise.
4819         (grokoptypename): Remove.
4820         (build_opfncall): Remove.
4821         (value_dependent_expression_p): Declare.
4822         (resolve_typename_type): Likewise.
4823         (resolve_typename_type_in_current_instantiation): Likewise.
4824         (enter_scope_of): Remove.
4825         (tsubst): Remove.
4826         (tsubst_expr): Likewise.
4827         (tsubst_copy): Likewise.
4828         (tsubst_copy_and_build): Likewise.
4829         * decl.c (warn_about_implicit_typename_lookup): Remove.
4830         (finish_case_label): Return error_mark_node for erroneous labels.
4831         (start_decl): Adjust calls to push_nested_class.
4832         (grokfndecl): Call push_scope/pop_scope around call to
4833         duplicate_decls.
4834         (grokdeclarator): Do not call tsubst.
4835         (start_function): Adjust calls to push_nested_class.
4836         * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
4837         (check_classfn): Use push_scope/pop_scope around type comparisions.
4838         (grokoptypename): Remove.
4839         (push_sscope): Adjust call to push_nested_class.
4840         * error.c (dump_type): Show cv-qualification of typename types.
4841         * init.c (build_member_call): Use build_new_op, not
4842         build_opfncall.
4843         * method.c (build_opfncall): Remove.
4844         * parser.c (cp_parser): Add allow_non_constant_expression_p and
4845         non_constant_expression_p.
4846         (cp_parser_constant_expression): Adjust prototype.
4847         (cp_parser_resolve_typename_type): Remove.
4848         (cp_parser_non_constant_expression): New function.
4849         (cp_parser_non_constant_id_expression): Likewise.
4850         (cp_parser_new): Set allow_non_constant_expression_p and
4851         non_constant_expression_p.
4852         (cp_parser_primary_expression): Reject `this' and `va_arg' in
4853         constant-expressions.  Note that dependent names aren't really
4854         constant.
4855         (cp_parser_postfix_expression): Reject conversions to non-integral
4856         types in constant-expressions.  Neither are increments or
4857         decrements.
4858         (cp_parser_unary_expression): Reject increments and decrements in
4859         constant-expressions.
4860         (cp_parser_direct_new_declarator): Adjust call to
4861         cp_parser_constant_expression.
4862         (cp_parser_cast_expression): Reject conversions to non-integral
4863         types in constant-expressions.
4864         (cp_parser_assignment_expression): Rejects assignments in
4865         constant-expressions.
4866         (cp_parser_expression): Reject commas in constant-expressions.
4867         (cp_parser_labeled_statement): Adjust call to
4868         cp_parser_constant_expression.
4869         (cp_parser_direct_declarator): Simplify array bounds, even in
4870         templates, when they are non-dependent.  Use
4871         resolve_typename_type, not cp_parser_resolve_typename_type.
4872         (cp_parser_class_head): Use resolve_typename_type, not
4873         cp_parser_resolve_typename_type.
4874         (cp_parser_member_declaration): Adjust call to
4875         cp_parser_constant_expression.
4876         (cp_parser_constant_initializer): Likewise.
4877         (cp_parser_constructor_declarator): Use resolve_typename_type, not
4878         cp_parser_resolve_typename_type.
4879         (cp_parser_late_parsing_default_args): Adjust call to
4880         push_nested_class.
4881         * pt.c (tsubst): Give it internal linkage.
4882         (tsubst_expr): Likewise.
4883         (tsubst_copy): Likewise.
4884         (tsubst_copy_and_build): Likewise.
4885         (push_access_scope_real): Likewise.
4886         (tsubst_friend_class): Likewise.
4887         (instantiate_class_template): Adjust call to pushclass.
4888         (value_dependent_expression_p): Give it external linkage.
4889         Robustify.
4890         (resolve_typename_type): New function.
4891         * semantics.c (finish_call_expr): Use build_new_op, not
4892         build_opfncall.
4893         (begin_constructor_declarator): Remove.
4894         (begin_class_definition): Adjust call to pushclass.
4895         (enter_scope_of): Remove.
4896         * typeck.c (comptypes): Resolve typename types as appropriate.
4897         (build_x_indirect_ref): Use build_new_op, not build_opfncall.
4898         (build_x_compound_expr): Likewise.
4899         (build_modify_expr): Likewise.
4900         (build_x_modify_expr): Likewise.
4901         * typeck2.c (build_x_arrow): Likewise.
4902
4903 2003-01-29  Fariborz Jahanian  <fjahanian@apple.com>
4904
4905         * pt.c (last_pending_template) Declare GTY().
4906
4907 2003-01-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4908
4909         PR c++/8591
4910         * parser.c (cp_parser_elaborated_type_specifier): Convert
4911         TEMPLATE_DECL to TYPE_DECL only when processing template friends.
4912         (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
4913
4914 2003-01-28  Nathan Sidwell  <nathan@codesourcery.com>
4915
4916         PR c++/9437
4917         * pt.c (unify): Don't unify '*T' with 'U C::*'.
4918
4919         PR c++/3902
4920         * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
4921         inside a declarator.
4922
4923 2003-01-27  Nathan Sidwell  <nathan@codesourcery.com>
4924
4925         * class.c (update_vtable_entry_for_fn): Add index parameter.
4926         Generate vcall thunk for covariant overriding from a virtual
4927         primary base.
4928         (dfs_modify_vtables): Adjust.
4929
4930 2003-01-25  Nathan Sidwell  <nathan@codesourcery.com>
4931
4932         PR c++/9403
4933         * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
4934         template keyword.
4935         (cp_parser_base_specifier): Look for and consume a
4936         TEMPLATE keyword. Replace switch with array index.
4937
4938         PR c++/795
4939         * semantics.c (finish_non_static_data_member): Remember the
4940         field's type even in a template.
4941
4942         PR c++/9415
4943         * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
4944         already scoped.
4945
4946         PR c++/8545
4947         * parser.c (cp_parser_cast_expression): Be more tentative.
4948
4949 2003-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4950
4951         * cp-tree.h (flagged_type_tree_s): Remove.
4952         (check_for_new_type): Likewise.
4953         * typeck2.c (check_for_new_type): Likewise.
4954
4955 2003-01-23  Nathanael Nerode  <neroden@gcc.gnu.org>
4956
4957         * dump.c: ANSIfy function declarations and definitions.
4958
4959         * cp-tree.h, decl.h: Get rid of PARAMS.  Again.
4960
4961 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
4962
4963         PR c++/9354
4964         * init.c (build_new): Set the type of the new-expression, even
4965         when processing_templte_decl.
4966
4967         PR c++/9216
4968         * parser.c (cp_parser_primary_expression): Improve error message
4969         for templates used in an expression context.
4970
4971         PR c++/8696
4972         * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
4973         parse when encountering "typedef".
4974
4975 2003-01-22  Nathanael Nerode  <neroden@gcc.gnu.org>
4976
4977         * class.c, parser.c: ANSIfy function definitions and declarations.
4978
4979 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
4980
4981         PR c++/9328
4982         * error.c (dump_decl): For an OVERLOAD, just print the name of the
4983         function; it doesn't make sense to try to print its type.
4984         * semantics.c (finish_typeof): Issue errors about invalid uses.
4985
4986         PR c++/9298
4987         * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
4988         function.
4989         (cp_parser_expression_statement): Use it.
4990         (cp_parser_explicit_instantiation): Likewise.
4991         * pt.c (do_decl_instantiation): Improve error handling logic.
4992
4993 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
4994
4995         PR c++/9384
4996         * parser.c (cp_parser_using_declaration): Issue error messages
4997         about name resolution failures here.
4998
4999         PR c++/9388
5000         * class.c (currently_open_derived_class): Use dependent_type_p.
5001         * cp-tree.h (dependent_type_p): New function.
5002         (dependent_template_arg_p): Likewise.
5003         (dependent_template_p): Likewise.
5004         (type_dependent_expression_p): Likewise.
5005         * parser.c (cp_parser_dependent_type_p): Remove.
5006         (cp_parser_value_dependent_type_p): Likewise.
5007         (cp_parser_type_dependent_expression_p): Likewise.
5008         (cp_parser_dependent_template_arg_p): Likewise.
5009         (cp_parser_dependent_template_id_p): Likewise.
5010         (cp_parser_dependent_template_p): Likewise.
5011         (cp_parser_diagnose_invalid_type_name): Replace
5012         cp_parser_dependent_type_p with dependent_type_p, etc.
5013         (cp_parser_primary_expresion): Likewise.
5014         (cp_parser_nested_name_specifier_opt): Likewise.
5015         (cp_parser_postfix_expression): Likewise.
5016         (cp_parser_unary_expression): Likewise.
5017         (cp_parser_template_name): Likewise.
5018         (cp_parser_class_name): Likewise.
5019         (cp_parser_lookup_name): Likewise.
5020         * pt.c (dependent_type_p): New function.
5021         (value_dependent_expression_p): Likewise.
5022         (type_dependent_expression_p): Likewise.
5023         (dependent_template_arg_p): Likewise.
5024         (dependent_template_id_p): Likewise.
5025         (dependent_template_p): Likewise.
5026
5027         PR c++/9285
5028         PR c++/9294
5029         * parser.c (cp_parser_simple_declaration): Return quickly when
5030         encountering errors.
5031
5032 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5033
5034         Make-lang.in (cp/decl.o-warn): Add -Wno-error.
5035
5036 2003-01-17  Jason Merrill  <jason@redhat.com>
5037
5038         PR c++/9167, c++/9358
5039         * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
5040
5041 2003-01-17  Jason Merrill  <jason@redhat.com>
5042
5043         PR c++/9342
5044         * call.c (build_conditional_expr): Always do lvalue-rvalue
5045         conversion.
5046
5047 2003-01-17  Mark Mitchell  <mark@codesourcery.com>
5048
5049         PR c++/9294
5050         * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
5051         * cp-tree.h (BASELINK_BINFO): Adjust.
5052         (BASELINK_FUNCTIONS): Likewise.
5053         (BASELINK_ACCESS_BINFO): Likewise.
5054         (tree_baselink): New structure.
5055         (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
5056         (lang_tree_node): Add baselink.
5057         * decl.c (cp_tree_node_structure): Add BASELINK case.
5058         * search.c (build_baselink): Adjust.
5059         * tree.c (cp_walk_subtrees): Add BASELINK case.  Remove BASELINK_P
5060         test from TREE_LIST case.
5061
5062         PR c++/9272
5063         * parser.c (cp_parser_constructor_declarator_p): Do not assume
5064         that a constructor cannot be declared outside of its own class.
5065
5066         * parser.c (cp_parser_resolve_typename_type): If the scope cannot
5067         be resolved, neither can the qualified name.
5068
5069         * rtti.c (get_pseudo_ti_desc): Fix thinko.
5070
5071 2003-01-16  Jason Merrill  <jason@redhat.com>
5072
5073         PR c++/8564
5074         * init.c (build_vec_init): Re-add maxindex parm.
5075         (perform_member_init, build_aggr_init): Pass it.
5076         (build_new_1): Pass it. Use an incomplete array type for full_type.
5077         * typeck.c (build_modify_expr): Pass it.
5078         * cp-tree.h: Adjust.
5079
5080 2003-01-16  Jeffrey D. Oldham  <oldham@codesourcery.com>
5081
5082         * cp-tree.h (tsubst_copy_and_build): New declaration.
5083         * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
5084         (tsubst_expr): Use 'tsubst_copy_and_build'.  Update initial comment.
5085         (tsubst_copy_and_build): New function.
5086
5087 2003-01-16  Mark Mitchell  <mark@codesourcery.com>
5088
5089         * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
5090         (PARTIAL_INSTANTIATION_P): Remove.
5091         (IMPLICIT_TYPENAME_P): Likewise.
5092         (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
5093         (build_typename_type): Remove declaration.
5094         (parmlist_is_exprlist): Likewise.
5095         * decl.c (build_typename_type): Make it static, remove third
5096         parameter.
5097         (push_class_binding): Don't do implicit typename stuff.
5098         (make_typename_type): Likewise.
5099         (lookup_name_real): Likewise.
5100         (grokdeclarator): Don't try to convert declarations into
5101         initializations.  Don't do implicit typename stuff.
5102         (parmlist_is_exprlist): Remove.
5103         (xref_basetypes): Simplify.
5104         * decl2.c (grokfield): Don't try to convert declarations into
5105         initializations.
5106         (build_anon_union_vars): Do this while processing templates, too.
5107         (finish_anon_union): Likewise.
5108         * error.c (dump_type): Remove implicit typename handling.
5109         * parser.c (cp_parser_diagnose_invalid_type_name): New method.
5110         (cp_parser_primary_expression): Correct handling of names not
5111         found by unqualified name lookup in templates.
5112         (cp_parser_nested_name_specifier_opt): Avoid checking dependency
5113         of types when possible.
5114         (cp_parser_simple_declaration): Complain intelligently about some
5115         invalid declarations.
5116         (cp_parser_member_declaration): Likewise.
5117         (cp_parser_constructor_declarator_p): Don't check when we're in a
5118         function scope.
5119         * pt.c (instantiate_class_template): Remove
5120         PARTIAL_INSTANTIATION_P gunk.
5121         * search.c (lookup_field_r): Don't build implicit typenames.
5122         (marked_pushdecls_p): Don't enter dependent base types.
5123         (unmarked_pushdecls_p): Likewise.
5124         * semantics.c (begin_class_definition): Remove implicit typename
5125         stuff.
5126
5127 2003-01-16  Nathan Sidwell  <nathan@codesourcery.com>
5128
5129         PR c++/9212
5130         * parser.c (cp_parser_direct_declarator): If accepting either
5131         abstract or named, the name must be an unqualified-id.
5132
5133 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5134
5135         * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
5136
5137 2003-01-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5138
5139         * decl2.c (check_classfn): Fix uninitialized warning.
5140         (build_anon_union_vars): Likewise.
5141         * pt.c (tsubst_copy): Likewise.
5142
5143 2003-01-14  Jeffrey D. Oldham  <oldham@codesourcery.com>
5144
5145         Further conform g++'s __vmi_class_type_info to the C++ ABI
5146         specification.
5147         * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
5148         the specification.
5149         (class_hint_flags): Likewise.
5150
5151 2003-01-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5152
5153         * config-lang.in: Add semantics.c to gtfiles.
5154         * cp-tree.h (flagged_type_tree_s): Remove lookups field.
5155         (saved_scope): Likewise.
5156         (type_lookups): Remove.
5157         (deferred_access): New structure.
5158         (type_access_control): Remove.
5159         (save_type_access_control): Likewise.
5160         (reset_type_access_control): Likewise.
5161         (decl_type_access_control): Likewise.
5162         (push_deferring_access_checks): Declare.
5163         (resume_deferring_access_checks): Likewise.
5164         (stop_deferring_access_checks): Likewise.
5165         (pop_deferring_access_checks): Likewise.
5166         (get_deferred_access_checks): Likewise.
5167         (pop_to_parent_deferring_access_checks): Likewise.
5168         (perform_deferred_access_checks): Likewise.
5169         (perform_or_defer_access_check): Likewise.
5170         * decl.c (make_typename_type): Use perform_or_defer_access_check.
5171         (make_unbound_class_template): Likewise.
5172         (grokdeclarator): Don't call decl_type_access_control.
5173         * parser.c (cp_parser_context): Remove deferred_access_checks
5174         and deferring_access_checks_p fields.
5175         (cp_parser_context_new): Adjust.
5176         (cp_parser): Remove access_checks_lists.
5177         (cp_parser_defer_access_check): Remove.
5178         (cp_parser_start_deferring_access_checks): Remove.
5179         (cp_parser_stop_deferring_access_checks): Remove.
5180         (cp_parser_perform_deferred_access_checks): Remove.
5181         (cp_parser_nested_name_specifier_opt): Use new deferred access
5182         functions.
5183         (cp_parser_simple_declaration): Likewise.
5184         (cp_parser_template_id): Likewise.
5185         (cp_parser_function_definition): Likewise.
5186         (cp_parser_class_specifier): Likewise.
5187         (cp_parser_lookup_name): Likewise.
5188         (cp_parser_single_declaration): Likewise.
5189         (cp_parser_pre_parsed_nested_name_specifier): Likewise.
5190         (cp_parser_parse_tentatively): Likewise.
5191         (cp_parser_parse_definitely): Likewise.
5192         (yyparse): Likewise.
5193         (cp_parser_init_declarator): Remove access_checks parameter.
5194         Use new deferred access functions.
5195         (cp_parser_function_definition_from_specifiers_and_declarator):
5196         Likewise.
5197         (cp_parser_class_head): Remove deferring_access_checks_p and
5198         saved_access_checks parameters.  Use new deferred access functions.
5199         (cp_parser_member_specification_opt): Don't call
5200         reset_type_access_control.
5201         * search.c (type_access_control): Remove.
5202         * semantics.c: Include "gt-cp-semantics.h".
5203         (deferred_type_access_control): Remove.
5204         (deferred_access_stack): New variable.
5205         (deferred_access_free_list): Likewise.
5206         (push_deferring_access_checks): New function.
5207         (resume_deferring_access_checks): Likewise.
5208         (stop_deferring_access_checks): Likewise.
5209         (pop_deferring_access_checks): Likewise.
5210         (get_deferred_access_checks): Likewise.
5211         (pop_to_parent_deferring_access_checks): Likewise.
5212         (perform_deferred_access_checks): New function, adapted from
5213         cp_parser_perform_deferred_access_checks.
5214         (perform_or_defer_access_check): New function, adapted from
5215         cp_parser_defer_access_check.
5216         (current_type_lookups): Remove.
5217         (deferred_type_access_control): Likewise.
5218         (decl_type_access_control): Likewise.
5219         (save_type_access_control): Likewise.
5220         (reset_type_access_control): Likewise.
5221         (begin_function_definition): Adjust.
5222         (begin_class_definiton): Likewise.
5223
5224 2003-01-13  Jason Merrill  <jason@redhat.com>
5225
5226         PR c++/8748
5227         * class.c (build_base_path): Take the address before calling save_expr.
5228
5229         * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
5230         all the ambiguous conversions are bad.
5231
5232         * class.c (maybe_warn_about_overly_private_class): Don't stop
5233         searching when we find a nonprivate method.
5234
5235         * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
5236
5237 2003-01-12  Mark Mitchell  <mark@codesourcery.com>
5238
5239         * cp-tree.h (get_arglist_len_in_bytes): Remove.
5240
5241         PR c++/9264
5242         * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
5243         typeame types more robustly.
5244
5245 2003-01-11  Phil Edwards  <pme@gcc.gnu.org>
5246
5247         * parser.c:  Fix comment typos.
5248
5249 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
5250
5251         PR c++/9099
5252         * parser.c (cp_parser_scope_through_which_access_occurs): Handle
5253         an object_type which is not a class type.
5254
5255 2003-01-10  Geoffrey Keating  <geoffk@apple.com>
5256
5257         * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
5258         (cp_parser_late_parsing_default_args): Likewise.
5259
5260 2003-01-10  Nathanael Nerode  <neroden@gcc.gnu.org>
5261
5262         * cfns.gperf: ANSIfy function declarations.
5263         * cfns.h: Regenerate.
5264         * cp-tree.h: ANSIfy function declarations.
5265
5266 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
5267
5268         * cp-tree.h (reparse_absdcl_as_expr): Remove.
5269         (reparse_absdcl_as_casts): Likewise.
5270         (reparse_decl_as_expr): Likewise.
5271         (finish_decl_parsing): Likewise.
5272         * decl2.c (reparse_absdcl_as_expr): Remove.
5273         (reparse_absdcl_as_casts): Likewise.
5274         (repase_decl_as_expr): Likewise.
5275         (finish_decl_parsing): Likewise.
5276
5277         PR c++/9128
5278         PR c++/9153
5279         PR c++/9171
5280         * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
5281         function.
5282         (cp_parser_nested_name_specifier_opt): Correct the
5283         check_dependency_p false.
5284         (cp_parser_postfix_expression): Fix formatting.
5285         (cp_parser_decl_specifier_seq): Avoid looking for constructor
5286         declarators when possible.
5287         (cp_parser_template_id): Avoid performing name-lookup when
5288         possible.
5289         (cp_parser_class_head): Do not count specializations when counting
5290         levels of templates.
5291         (cp_parser_constructor_declarator_p): Return immediately if
5292         there's no chance that the tokens form a constructor declarator.
5293         * rtti.c (throw_bad_typeid): Add comment.  Do not return an
5294         expression with reference type.
5295         (get_tinfo_decl_dynamic): Do not return an expression with
5296         reference type.
5297         (build_typeid): Add comment.  Do not return an expression with
5298         reference type.
5299         * typeck.c (build_class_member_access_expr): Improve handling of
5300         conditionals and comma-expressions as objects.
5301
5302 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
5303
5304         * cfns.gperf: ANSIfy function declarations.
5305         * cfns.h: Regenerate.
5306         * cp-tree.h: ANSIfy function declarations.
5307         * parser.c: ANSIfy function declarations & definitions.
5308
5309         * decl.c (bad_specifiers): Fix parameter order error I introduced.
5310
5311 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
5312
5313         Merge from pch-branch:
5314
5315         2003-01-09  Geoffrey Keating  <geoffk@apple.com>
5316
5317         Merge to tag pch-merge-20030102:
5318
5319         * semantics.c (finish_translation_unit): Don't call finish_file.
5320         * parser.c: Don't include ggc.h.
5321         (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
5322         read first token here.  Don't allow PCH files after the first
5323         token is read.
5324         (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
5325         (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
5326         (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
5327         (cp_parser_late_parsing_for_member): Don't duplicate call to
5328         cp_lexer_set_source_position_from_token.
5329         (cp_parser_late_parsing_default_args): Likewise.
5330         (yyparse): Call finish_file after clearing the_parser.
5331
5332         2002-12-11  Geoffrey Keating  <geoffk@apple.com>
5333
5334         * Make-lang.in: Remove $(GGC_H) from all dependencies.
5335         (CXX_TREE_H): Add $(GGC_H).
5336         * class.c: Don't include ggc.h.
5337         (field_decl_cmp): Make parameters be 'const void *' to match qsort.
5338         (method_name_cmp): Likewise.
5339         (resort_data): New variable.
5340         (resort_field_decl_cmp): New.
5341         (resort_method_name_cmp): New.
5342         (resort_sorted_fields): New.
5343         (resort_type_method_vec): New.
5344         (finish_struct_methods): Delete cast.
5345         (finish_struct_1): Delete cast.
5346         * cp-tree.h: Include ggc.h.
5347         (struct lang_type_class): Add reorder attribute to field `methods'.
5348         (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
5349         (resort_sorted_fields): New prototype.
5350         (resort_type_method_vec): New prototype.
5351         * call.c: Don't include ggc.h.
5352         * decl.c: Likewise.
5353         * decl2.c: Likewise.
5354         * init.c: Likewise.
5355         * lex.c: Likewise.
5356         * method.c: Likewise.
5357         * optimize.c: Likewise.
5358         * parse.y: Likewise.
5359         * pt.c: Likewise.
5360         * repo.c: Likewise.
5361         * search.c: Likewise.
5362         * semantics.c: Likewise.
5363         * spew.c: Likewise.
5364         * tree.c: Likewise.
5365
5366         * lang-specs.h: Remove comment.
5367
5368         2002-12-03  Geoffrey Keating  <geoffk@apple.com>
5369
5370         * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
5371         (operator_name_info): Mark to be saved for PCH, specify size.
5372         (assignment_operator_name_info): Likewise.
5373
5374         2002-11-19  Geoffrey Keating  <geoffk@apple.com>
5375
5376         * decl.c (anon_cnt): Mark to be saved for PCH.
5377
5378         2002-10-25  Geoffrey Keating  <geoffk@apple.com>
5379
5380         * lex.c  (init_reswords): Delete now-untrue comment.
5381         Allocate ridpointers using GGC.
5382
5383         2002-10-04  Geoffrey Keating  <geoffk@apple.com>
5384
5385         * cp-tree.h (union lang_decl_u2): Add tags to all fields.
5386
5387         * g++spec.c (lang_specific_driver): Don't include standard
5388         libraries in `added'.
5389
5390         2002-08-27  Geoffrey Keating  <geoffk@redhat.com>
5391
5392         * decl2.c (finish_file): Call c_common_write_pch.
5393         * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
5394
5395         2002-08-17  Geoffrey Keating  <geoffk@redhat.com>
5396
5397         * g++spec.c (lang_specific_driver): Treat .h files as C++ header
5398         files when using g++.
5399         * lang-specs.h: Handle compiling C++ header files.
5400
5401 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
5402
5403         * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
5404
5405 2003-01-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5406
5407         * pt.c (push_access_scope_real): Call push_to_top_level for
5408         function in namespace scope.
5409         (pop_access_scope): Call pop_from_top_level for function in
5410         namespace scope.
5411
5412 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
5413
5414         * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
5415
5416 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
5417
5418         * Make-lang.in (c++.install-common, c++.install-man,
5419         c++.uninstall): Prepend $(DESTDIR) to destination paths in
5420         all (un)installation commands.
5421         (c++.install-common): Rewrite $(LN) commands to support
5422         DESTDIR with "ln" as well as with "ln -s".
5423
5424 2003-01-08  Jason Merrill  <jason@redhat.com>
5425
5426         * parser.c (cp_parser_primary_expression): See through explicitly
5427         scoped ALIAS_DECLs, too.
5428
5429 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
5430
5431         * decl.c: Remove some #if 0 code.
5432
5433         * decl.c: ANSIfy function declarations.
5434
5435 2003-01-07  Mark Mitchell  <mark@codesourcery.com>
5436
5437         * parser.c (cp_parser_asm_definition): Correct handling of omitted
5438         operands.
5439
5440 2003-01-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5441
5442         PR c++/9030
5443         * decl.c (make_typename_type): Check access only when tf_error.
5444         (make_unbound_class_template): Likewise.
5445         * pt.c (saved_access_scope): New variable.
5446         (push_access_scope_real): New function.
5447         (push_access_scope): Likewise.
5448         (pop_access_scope): Likewise.
5449         (tsubst_default_argument): Use them.
5450         (instantiate_template): Likewise.
5451         (regenerate_decl_from_template): Likewise.
5452         (instantiate_decl): Likewise.
5453         (get_mostly_instantiated_function_type): Likewise.
5454
5455 2003-01-07  Nathanael Nerode <neroden@gcc.gnu.org>
5456
5457         * tree.c: Delete bogus #if 0 code.
5458
5459 2003-01-07  Andreas Schwab  <schwab@suse.de>
5460
5461         * class.c (layout_class_type): Don't use
5462         PCC_BITFIELD_TYPE_MATTERS if not defined.
5463
5464 2003-01-06  Mark Mitchell  <mark@codesourcery.com>
5465
5466         PR c++/9165
5467         * decl2.c (build_cleanup): Mark the object as used.
5468
5469         * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
5470         (hash_local_specialization): New function.
5471         (register_local_specialization): Revert 2003-01-05 change.
5472         (instantiate_decl): Use hash_local_specialization when creating
5473         the local_specializations table.
5474
5475         * decl2.c (mark_used): Do not synthesize thunks.
5476
5477         * class.c (layout_class_type): Correct handling of unnamed
5478         bitfields wider than their types.
5479
5480         PR c++/9189
5481         * parser.c (cp_parser): Remove default_arg_types.  Update
5482         documentation for unparsed_functions_queues.
5483         (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
5484         parameter.
5485         (cp_parser_new): Don't set parser->default_arg_types.
5486         (cp_parser_function_definition): Adjust usage of
5487         unparsed_funtions_queues.
5488         (cp_parser_class_specifier): Don't mess with
5489         parser->default_arg_types.  Handle default argument processing in
5490         a separate phase from function body processing.
5491         (cp_parser_template_declaration_after_export): Adjust usage of
5492         unparsed_functions_queues.
5493         (cp_parser_late_parsing_for_member): Do not handle default
5494         arguments.
5495
5496 2003-01-06  Nathan Sidwell  <nathan@codesourcery.com>
5497
5498         PR c++/9109
5499         * parser.c (cp_parser_declarator_kind): New enum.
5500         (cp_parser_declarator): Adjust.
5501         (cp_parser_direct_declarator): Adjust. Allow for either named or
5502         abstract declarator. Prefer abstract, if possible. Allow
5503         parenthesized function name.
5504         (cp_parser_condition): Adjust cp_parser_declarator call.
5505         (cp_parser_explicit_instantiation): Likewise.
5506         (cp_parser_init_declarator): Likewise.
5507         (cp_parser_type_id): Likewise.
5508         (cp_parser_function_definition): Likewise.
5509         (cp_parser_member_declaration): Likewise.
5510         (cp_parser_parameter_declaration): Use cp_parser_declarator to do
5511         the tentative parsing.
5512         (cp_parser_exception_declaration): Likewise.
5513
5514 2003-01-05  Mark Mitchell  <mark@codesourcery.com>
5515
5516         * parser.c (cp_parser_template_parameter): Adjust call to
5517         cp_parser_parameter_declaration.
5518         (cp_parser_parameter_declaration_list): Likewise.
5519         (cp_parser_parameter_declaration): Replace
5520         greater_than_is_operator_p with template_parm_p parameter.  Do not
5521         cache tokens for template default arguments.
5522
5523         * pt.c (retrieve_local_specialization): Use htab_find, not
5524         htab_find_with_hash.
5525         (register_local_specialization): Use htab_find_slot, not
5526         htab_find_slot_with_hash.
5527         (instantiate_decl): Pass a hash function to htab_create.
5528
5529 2003-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5530
5531         * parser.c (cp_parser_binary_expression,
5532         cp_parser_multiplicative_expression,
5533         cp_parser_additive_expression, cp_parser_shift_expression,
5534         cp_parser_relational_expression, cp_parser_equality_expression,
5535         cp_parser_and_expression, cp_parser_exclusive_or_expression,
5536         cp_parser_inclusive_or_expression,
5537         cp_parser_logical_and_expression, cp_parser_logical_or_expression,
5538         cp_parser_binary_expression): Const-ify.
5539
5540 2003-01-04  Mark Mitchell  <mark@codesourcery.com>
5541
5542         * method.c (use_thunk): Disable access control while building the
5543         body of the thunk.
5544
5545 2003-01-03  Nathanael Nerode  <neroden@gcc.gnu.org>
5546
5547         * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
5548         front end.
5549
5550 2003-01-03  Matt Austern  <austern@apple.com>
5551
5552         * cp-tree.h (struct lang_type_class): add field for key method
5553         (cp_global_trees): rename dynamic_classes to keyed_classes
5554         (key_method): add definition
5555         * class.c (finish_struct_1): compute class's key method, and add
5556         the class to keyed_classes list if there is no key method.
5557         * decl.c (finish_function): add class to keyed_classes list if we
5558         see a definition of the class's key method.
5559         * pt.c (instantiate_class_template): add template specialization
5560         of a dynamic class to keyed_classes list.
5561         * decl2.c (key_method): remove
5562         (finish_file): iterate only through keyed_classes list when
5563         deciding whether to emit vtables, remove class from its list after
5564         we do the emission.
5565
5566 2003-01-02  Jason Merrill  <jason@redhat.com>
5567
5568         * call.c (build_conditional_expr): Stabilize lvalues properly.
5569         * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
5570         * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
5571         Don't allow CALL_EXPR or VA_ARG_EXPR, either.
5572
5573         * call.c (convert_like_real): Call decl_constant_value for an
5574         IDENTITY_CONV even if there are no more conversions.
5575
5576         * cvt.c (build_up_reference): Don't push unnamed temps.
5577
5578         * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
5579
5580         * dump.c (cp_dump_tree): Don't try to dump class-specific fields
5581         for a backend struct.
5582
5583         * except.c (wrap_cleanups_r, build_throw): Make
5584         MUST_NOT_THROW_EXPRs void.
5585         * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
5586
5587         * init.c (build_vec_delete_1): Pre-evaluate the base address.
5588
5589         * init.c (get_temp_regvar): Simplify logic.
5590
5591         * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
5592         our replacement is a decl.
5593
5594         * decl.c (cp_make_fname_decl): Push the decls inside the
5595         outermost scope.
5596
5597 2003-01-03  Nathan Sidwell  <nathan@codesourcery.com>
5598
5599         PR c++/45, c++/3784
5600         * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
5601         the same too.
5602
5603 2003-01-03  Graham Stott  <graham.stott@btinternet.com>
5604
5605         * parser.c (struct cp_parser): Add access_checks_lists field
5606         (cp_parser_simple_declaration): Use.
5607         (cp_parser_init_declarator): Likewise.
5608
5609 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
5610
5611         * parser.c (cp_parser_declaration): Accept the __extension__
5612         keyword before the declaration.
5613
5614         PR c++/2843
5615         * parser.c (cp_parser_parameter_declaration): Allow attributes to
5616         appear after the declarator.
5617
5618         * call.c (build_new_method_call): Fix typo in message format
5619         string.
5620
5621 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
5622
5623         * parser.c (cp_lexer_next_token_is): Declare it inline.
5624         (cp_lexer_set_source_position_from_token): Likewise.
5625         (cp_lexer_debugging_p): Likewise.
5626         (cp_parser_parsing_tentatively): Likewise.
5627         (cp_parser_nested_name_specifier_opt): Reduce the number of calls
5628         to the cp_lexer_peek_token.
5629
5630         * parser.c (cp_parser_sizeof_operand): Do not evaluate the
5631         expression.
5632
5633 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
5634
5635         * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
5636         cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
5637         cp/repo.c: Fix copyright years.
5638
5639 2003-01-01  Neil Booth  <neil@daikokuya.co.uk>
5640
5641         * lex.c: Remove superfluous include of cpplib.h.
5642         (CONSTRAINT): Define without conditions.
5643         (init_cp_pragma): Use c_register_pragma.
5644
5645 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
5646
5647         * .cvsignore: Remove.
5648
5649 2002-12-31  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5650
5651         * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
5652           except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
5653           lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
5654           pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
5655           typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
5656           copyright header.
5657         * lex.h: parse.y is dead, so don't mention it.  Also replace the
5658           copyright header with the default GNU copyright header.
5659
5660 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
5661
5662         * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
5663         (lookup_name_namespace_only): Likewise.
5664         (begin_only_namespace_names): Likewise.
5665         (end_only_namespace_names): Likewise.
5666         * decl.c (only_namespace_names): Remove.
5667         (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
5668         (lookup_name_real): Do not check only_namespace_names.
5669         (lookup_name_namespace_only): Remove.
5670         (begin_only_namespace_names): Likewise.
5671         (end_only_namespace_names): Likewise.
5672         * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
5673         nested-name-specifiers more gracefully.
5674         (cp_parser_class_or_namespace_name): Avoid looking up namespace
5675         names when they cannot possibly appear.
5676         (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
5677         (cp_parser_elaborated_type_specifier): Likewise.
5678         (cp_parser_namespace_name): Only look for namespace names.
5679         (cp_parser_lookup_name): Add is_namespace parameter.
5680         (cp_parser_lookup_name_simple): Adjust call to
5681         cp_parser_lookup_name.
5682
5683         * parser.c (cp_parser_dependent_type_p): Fix thinko.
5684
5685 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
5686
5687         * .cvsignore: Update.
5688
5689 2002-12-31  Nathan Sidwell  <nathan@codesourcery.com>
5690
5691         * class.c (modify_vtable_entry): Remove unused variable.
5692         (get_vcall_index): Always expect a non-thunk.
5693         (update_vtable_entry_for_fn): Combine covariant adjustments, when
5694         overriding a thunk. Pass get_vcall_index a non-thunk.
5695
5696         * decl2.c (finish_file): Mark undefined inlines as extern.
5697
5698 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
5699
5700         * cp-tree.def (RETURN_INIT): Remove.
5701         * cp-tree.h (DECL_IN_MEMORY_P): Remove.
5702         (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
5703         (note_level_for_for): Remove.
5704         (note_level_for_try): Likewise.
5705         (note_level_for_catch): Likewise.
5706         (finish_named_return_value): Likewise.
5707         (do_pushlevel): Change prototype.
5708         (pending_lang_change): Remove.
5709         * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
5710         sk_for.
5711         (note_level_for_for): Remove.
5712         (note_level_for_try): Likewise.
5713         (note_level_for_catch): Likewise.
5714         (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
5715         * parser.c (cp_parser_context_free_list): Make it "deletable".
5716         (cp_parser_template_argument): Remove misleading comment.
5717         * pt.c (tsubst_expr): Remove RETURN_INIT code.
5718         * semantics.c (genrtl_named_return_value): Remove.
5719         (do_pushlevel): Take a scope kind as an argument.
5720         (begin_if_stmt): Adjust.
5721         (begin_while_stmt): Likewise.
5722         (begin_for_stmt): Likewise.
5723         (finish_for_init_stmt): Likewise.
5724         (begin_switch_stmt): Likewise.
5725         (begin_handler): Likewise.
5726         (begin_compound_stmt): Likewise.
5727         (finish_named_return_value): Remove.
5728         (cp_expand_stmt): Remove RETURN_INIT case.
5729         * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
5730
5731 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
5732
5733         PR c++/9112
5734         * parser.c (cp_parser_direct_declarator): Handle erroneous
5735         parenthesized declarators correctly.
5736
5737 2002-12-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5738
5739         * cp-tree.h (pending_lang_change): Declare.
5740
5741 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
5742
5743         * parser.c (cp_parser_context_free_list): New variable.
5744         (cp_parser_context_new): Use it.
5745         (cp_parser_error): Check return code from
5746         cp_parser_simulate_error.
5747         (cp_parser_simulate_error): Return a value.
5748         (cp_parser_id_expression): Optimize common case.
5749         (cp_parser_class_name): Likewise.
5750         (cp_parser_class_specifier): Adjust call to
5751         cp_parser_late_parsing_default_args.
5752         (cp_parser_lookup_name): Optimize common case.
5753         (cp_parser_late_parsing_for_member): Adjust call to
5754         cp_parser_late_parsing_default_args.
5755         (cp_parser_late_parsing_default_args): Add scope parameter.
5756         (cp_parser_require): Avoid creating the error message unless it's
5757         needed.
5758         (cp_parser_parse_definitely): Place free'd contexts on the free
5759         list.
5760
5761         * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
5762
5763 2002-12-30  David Edelsohn  <edelsohn@gnu.org>
5764
5765         * parser.c (cp_parser_parameter_declaration_clause): Treat system
5766         header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
5767
5768 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
5769
5770         * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
5771         GCC, not GNU CC.
5772
5773 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
5774
5775         * parse.y: Remove.
5776         * spew.c: Likewise.
5777         * Make-lang.in (gt-cp-spew.h): Remove.
5778         * cp-tree.h (do_pending_lang_change): Remove.
5779         (do_identifier): Change prototype.
5780         (finish_id_expr): Remove.
5781         * decl.c (lookup_name_real): Remove yylex variable.
5782         * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
5783         * lex.c (init_cpp_parse): Remove.
5784         (reduce_cmp): Likewise.
5785         (token_cmp): Likewise.
5786         (yychar): Likewise.
5787         (lastiddecl): Likewise.
5788         (token_count): Likewise.
5789         (reduce_count): Likewise.
5790         (yyhook): Likewise.
5791         (print_parse_statistics): Likewise.
5792         (do_pending_lang_change): Likewise.
5793         (do_identifier): Remove parsing parameter.
5794         * lex.h (lastiddecl): Remove.
5795         (looking_for_typename): Remove.
5796         (looking_for_template): Likewise.
5797         (pending_lang_change): Likewise.
5798         (yylex): Likewise.
5799         * semantics.c (finish_id_expr): Remove.
5800
5801         * decl.c (grokdeclarator): Diagnost "extern thread" and "static
5802         thread" correctly.
5803
5804 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
5805
5806         * decl.c, decl2.c, decl.h:  GCC, not GNU CC.  This is the C++ front
5807         end, not the C front end.
5808
5809 2002-12-30  Nathan Sidwell  <nathan@codesourcery.com>
5810
5811         * cp-tree.h (THUNK_TARGET): New macro.
5812         (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
5813         (finish_thunk): Remove offset parms.
5814         * class.c (find_final_overrider): Look through thunks.
5815         (get_vcall_index): Use THUNK_TARGET.
5816         (update_vtable_entry_for_fn): Look through thunks. Set covariant
5817         fixed offset here. Adjust finish_thunk call.
5818         (build_vtbl_initializer): Adjust finish_thunk calls.
5819         * mangle.c (mangle_call_offset): Remove superfluous if.
5820         (mangle_thunk): Adjust.
5821         * method.c (make_thunk): Adjust.
5822         (finish_thunk): Adjust.
5823         (thunk_adjust): Remove assert.
5824         (use_thunk): Use THUNK_TARGET
5825         * dump1.c (cp_dump_tree): Adjust thunk dumping.
5826
5827         PR c++/9054
5828         * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
5829         * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
5830
5831 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5832
5833         Remove traditional C constructs 4/n.
5834         * decl2.c (grok_method_quals, warn_if_unknown_interface,
5835         grok_x_components, cp_build_parm_decl, build_artificial_parm,
5836         maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
5837         delete_sanity, check_member_template, check_java_method,
5838         check_classfn, finish_static_data_member_decl, grokfield,
5839         grokbitfield, grokoptypename, grok_function_init,
5840         cplus_decl_attributes, constructor_name, defer_fn,
5841         build_anon_union_vars, finish_anon_union, coerce_new_type,
5842         coerce_delete_type, comdat_linkage, maybe_make_one_only,
5843         key_method, import_export_vtable, import_export_class,
5844         output_vtable_inherit, import_export_decl, import_export_tinfo,
5845         build_cleanup, get_guard, get_guard_bits, get_guard_cond,
5846         set_guard, start_objects, finish_objects,
5847         start_static_storage_duration_function,
5848         finish_static_storage_duration_function, get_priority_info,
5849         start_static_initialization_or_destruction,
5850         finish_static_initialization_or_destruction,
5851         do_static_initialization, do_static_destruction,
5852         prune_vars_needing_no_initialization, write_out_vars,
5853         reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
5854         add_using_namespace, merge_functions, ambiguous_decl,
5855         lookup_using_namespace, lookup_using_namespace,
5856         qualified_lookup_using_namespace, set_decl_namespace,
5857         decl_namespace, current_decl_namespace, push_decl_namespace,
5858         pop_decl_namespace, push_scope, pop_scope, add_function,
5859         arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
5860         lookup_arg_dependent, do_namespace_alias,
5861         validate_nonmember_using_decl, do_nonmember_using_decl,
5862         do_toplevel_using_decl, do_local_using_decl,
5863         do_class_using_decl, do_using_directive, check_default_args,
5864         mark_used, handle_class_head): Use C90 prototypings.  Use booleans.
5865         * parser.c (cp_parser_class_head): Use booleanss.
5866         * decl.c (walk_globals, walk_vtables): Likewise.
5867         * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
5868         walk_globals): Change return type from 'int' to 'bool'.
5869         * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
5870         throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
5871         build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
5872         get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
5873         qualifier_flags, tinfo_base_init, generic_initializer,
5874         ptr_initializer, dfs_class_hint_mark, ptm_initializer,
5875         dfs_class_hint_unmark, class_hint_flags, class_initializer,
5876         typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
5877         get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
5878         unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
5879         * repo.c (repo_compile_flags, repo_template_declared,
5880         repo_template_defined, repo_class_defined, repo_get_id,
5881         repo_template_used, repo_vtable_used, repo_inline_used,
5882         repo_tinfo_used, repo_template_instantiated, extract_string,
5883         open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
5884         finish_repo): Likewise.
5885         * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
5886         cxx_print_xnode): Likewise..
5887         * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
5888         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
5889         * cxxfilt.c (demangle_it, print_demangler_list, usage,
5890         standard_symbol_characters, hp_symbol_characters, main, fatal):
5891         Likewise.
5892         (strip_underscore):  Change type from 'int' to 'bool'.
5893         (main): Use boolean constants.
5894
5895 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5896
5897         Remove traditional C constructs 3/n.
5898         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
5899         build_up_reference, warn_ref_binding, convert_to_reference,
5900         convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
5901         convert_to_void, convert, convert_force, build_type_conversion,
5902         build_expr_type_conversion, type_promotes_to,
5903         perform_qualification_conversions): Use C90 prototyping style.
5904         * decl2.c (grok_array_decl): Use boolean constant.
5905         (delete_sanity): Likewise.
5906         * typeck.c (build_unary_op): Likewise.
5907         * semantics.c (finish_switch_cond): Likewise.
5908         * parser.c (cp_parser_direct_new_declarator): Likewise.
5909         * init.c (build_new): Likewise.
5910
5911 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
5912
5913         * Make-lang.in (po-generated): Remove parse.c.
5914         (CXX_OBJS): Remove parse.o and spew.o.  Add parser.o.
5915         ($(srcdir)/cp/parse.h): Remove target.
5916         ($(srcdir)/cp/parse.c): Likewise.
5917         (gt-cp-parse.h): Likewise.
5918         (gt-cp-parser.h): New target.
5919         (c++.distclean): Do not remove parse.output.
5920         (c++.maintainer-clean): Do not remove parse.c or parse.h.
5921         (cp/spew.o): Remove target.
5922         (cp/lex.o): Adjust dependencies.
5923         (cp/pt.o): Likewise.
5924         (cp/parse.o): Likewise.
5925         (cp/TAGS): Do not mention parse.c.
5926         (cp/parser.o): New target.
5927         * NEWS: Mention the new parser.
5928         * call.c (build_scoped_method_call): Simplify.
5929         (build_method_call): Likewise.
5930         (build_new_function_call): Adjust calls to add_function_candidate
5931         and add_template_candidate.
5932         (build_new_op): Improve handling of erroroneous operands.
5933         (convert_default_arg): Remove circular argument processing.
5934         (name_as_c_string): New function.
5935         (build_new_method_call): Use it.
5936         (perform_implicit_conversion): Use error_operand_p.
5937         * class.c (finish_struct_anon): Use constructor_name_p.
5938         (check_field_decls): Likewise.
5939         (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
5940         (resolve_address_of_overloaded_function): Likewise.
5941         (instantiate_type): Tweak pointer-to-member handling.
5942         (get_primary_binfo): Remove incorrect assertion.
5943         * config-lang.in (gtfiles): Add parser.c, remove parse.c.
5944         * cp-tree.h (DEFARG_TOKENS): New macro.
5945         (default_arg): New structure.
5946         (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
5947         (lang_tree_node): Add default_arg.
5948         (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
5949         (type_info_ref_type): New macro.
5950         (saved_scope): Make processing_explicit_instantiation a boolean.
5951         (check_access): New field.
5952         (unparsed_text): Remove.
5953         (language_function): Remove unparsed_inlines.
5954         (error_operand_p): New macro.
5955         (lang_decl): Adjust pending_inline_info.
5956         (DEFARG_POINTER): Remove.
5957         (tag_types): Add typenames.
5958         (lookup_ualified_name): Declare.
5959         (lookup_name_real): Likewise.
5960         (shadow_tag): Adjust prototype.
5961         (get_scope_of_declarator): Declare it.
5962         (process_next_inline): Remove it.
5963         (check_for_missing_semicolon): Likewise.
5964         (maybe_get_template_decl_from_type_decl): Declare it.
5965         (finish_label_stmt): Adjust prototype.
5966         (finish_non_static_data_meber): Declare it.
5967         (finish_pseudo_destructor_call_expr): Rename to ...
5968         (finish_pseudo_destructor_expr): ... this.
5969         (finish_compound_literal): Declare it.
5970         (begin_inline_definitions): Remove it.
5971         (init_spew): Remove.
5972         (peekyylex): Likewise.
5973         (arbitrate_lookup): Likewise.
5974         (frob_opname): Likewise.
5975         (maybe_snarf_defarg): Likewise.
5976         (add_defarg_fn): Likewise.
5977         (do_pending_defargs): Likewise.
5978         (done_pending_defargs): Likewise.
5979         (unprocessed_defarg_fn): Likewise.
5980         (replace_defarg): Likewise.
5981         (end_input): Likewise.
5982         (get_overloaded_fn): Likewise.
5983         * cvt.c (convert_to_reference): Improve error handling.
5984         * decl.c (lookup_name_real): Do not declare it static.
5985         (maybe_push_to_top_level): Set check_access.
5986         (identifier_type_value): Adjust call to lookup_name_real.
5987         (lookup_qualified_name): New method.
5988         (lookup_name_real): Remove special-case parsing code.
5989         (lookup_name-nonclass): Adjust call to lookup_name_real.
5990         (lookup_name_namespace_only): Likewise.
5991         (lookup_name): Likewise.
5992         (check_tag_decl): Return the type declared.
5993         (shadow_tag): Likewise.
5994         (register_dtor_fn): Tweak check_access.
5995         (grokfndecl): Use constructor_name_p.
5996         (get_scope_of_declarator): New function.
5997         (grokdeclarator): Obscure tweaks for slightly different declarator
5998         representations.
5999         (start_method): Return error_mark_node to indicate failure.
6000         (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
6001         * decl2.c (constructor_name_full): Simplify.
6002         (constructor_name): Use it.
6003         (build_expr_from_tree): Adjust for changes to do new parser.
6004         (push_scope): Improve robustness.
6005         (validate_nonmember_using_decl): Process declarations, not names.
6006         (do_class_using_decl): Likewise.
6007         (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
6008         here.
6009         * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
6010         * expr.c (cxx_expand_expr): Handle BASELINKs.
6011         * init.c (member_init_ok_or_else): Issue more errors.
6012         (build_offset_ref): Tweak handling of FUNCTION_DECLs.
6013         * lex.c: Do not include parse.h.
6014         (yypring): Do not declare.
6015         (yylval): Likewise.
6016         (make_reference_declarator): Remove error-generating code.
6017         (rid_to_yy): Remove.
6018         (cxx_init): Do not call init_spew.
6019         (yypring): Remove.
6020         (check_for_missing_semicolon): Remove.
6021         * lex.h (got_scope): Remove.
6022         (got_object): Remove.
6023         * method.c (hack_identifier): Use finish_non_static_data_member.
6024         (implicitly_declare_fn): Adjust use of constructor_name.
6025         * parser.c: New file.
6026         * pt.c (parse.h): Do not include it.
6027         (maybe_get_template_decl_from_template): Do not declare it.
6028         (finish_member_template_decl): Tweak.
6029         (begin_explicit_instantiation): Adjust for
6030         processing_explicit_instantiation being boolean.
6031         (end_explicit_instantiation): Likewise.
6032         (maybe_process_partial_specialization): Tighten specialization
6033         test.
6034         (retrieve_local_specialization): Adjust ue of hash table.
6035         (eq_local_specializations): New function.
6036         (register_local_specialization): Likewise.
6037         (push_template_decl_real): Remove unnecessary test.
6038         (maybe_get_template_decl_from_type_decl): Don't make it static.
6039         (for_each_template_parm_r): Handle TYPEOF_TYPE.
6040         (tsubst_copy): Use retrieive_local_specialization to handle
6041         PARM_DECL.  Adjust handling of CONST_DECLs.  Handle BASELINKs.
6042         Handle COMPONENT_REFs with pseudo-destructor-expressions.
6043         Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
6044         (tsubst_expr): Pass decls, not names, to do_local_using_decl.
6045         (unify): Tweak handling of CONST_DECLs.
6046         (regenerate_decl_from_template): Use push_nested_class.
6047         (template_for_substitution): New funciton.
6048         (instantiate_decl): Use it.  Register parameters as local
6049         specializations.
6050         * rtti.c (init_rtti_processing): Set type_info_ref_type.
6051         (build_typeid): Use it.
6052         (get_typeid): Likeise.
6053         * search.c (accessible_p): Use check_access, not
6054         flag_access_control.
6055         (adjust_result_of_qualified_name_lookup): Pay attention to the
6056         context_class.
6057         * semantics.c (finish_asm_stmt): Adjust error handling.
6058         (finish_label_stmt): Return the statement.
6059         (finish_non_static_data_member): New function.
6060         (finish_class_expr): Handle BASELINKs.
6061         (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
6062         (finish_object_call_expr): Simplify handling during templates.
6063         (finish_pseudo_destructor_call_expr): Rename to ...
6064         (finish_pseudo_dtor_expr): ... this.
6065         (finish_compound_literal): New function.
6066         (begin_inline_definitions): Remove.
6067         (finish_sizeof): Remove special template handling.
6068         * spew.c: Do not include parse.h.
6069         * tree.c (get_overloaded_fn): Remove.
6070         * typeck.c (build_class_member_access_expr): Handle
6071         PSEUDO_DTOR_EXPR.  Adjust handling of static member functions.
6072         (lookup_destructor): New function.
6073         (finish_class_member_access_expr): Use it.
6074         (convert_arguments): Simplify.
6075         (build_unary_op): Handle BASELINKs.
6076
6077 2002-12-26  Nathan Sidwell  <nathan@codesourcery.com>
6078
6079         PR c++/4803
6080         * decl2.c (mark_used): Defer inline functions.
6081         (finish_file): Merge deferred_fns loops. Check all used
6082         inline functions have a definition.
6083         * method.c (make_thunk): Thunks are not inline.
6084
6085         PR c++/5116, c++/764
6086         * call.c (build_new_op): Make sure template class operands are
6087         instantiated.
6088
6089 2002-12-24  Nathan Sidwell  <nathan@codesourcery.com>
6090
6091         PR C++/7964
6092         * cp-tree.h (resolve_scoped_fn_name): Prototype.
6093         * call.c (resolve_scoped_fn_name): New function. Deal with
6094         more template expansion. Broken out of ...
6095         * parse.y (parse_finish_call_expr): ... here. Call it.
6096         * decl2.c (build_expr_from_tree, CALL_EXPR): Use
6097         resolve_scoped_fn_name and build_call_from_tree.
6098
6099         PR c++/9053
6100         * decl.c (duplicate_decls): Templates may be disambiguated by
6101         return type.
6102
6103         PR c++/8702
6104         * decl2.c (check_classfn): Use lookup_fnfield_1. List all
6105         conversion operators on failure.
6106
6107 2002-12-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6108
6109         Remove traditional C constructs 2/n.
6110         * call.c (tourney, build_field_call, equal_functions, joust,
6111         compare_ics, build_over_call, build_java_interface_fn_ref,
6112         convert_like_real, op_error, build_object_call, resolve_args,
6113         build_vfield_ref, check_dtor_name, build_scoped_method_call,
6114         build_addr_func, build_call, build_method_call, null_ptr_cst_p,
6115         sufficient_parms_p, build_conv, non_reference, strip_top_quals,
6116         standard_conversion, reference_related_p,
6117         reference_compatible_p, convert_class_to_reference,
6118         direct_reference_binding, reference_binding,
6119         ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
6120         add_template_conv_candidate, any_viable, any_strictly_viable,
6121         build_this, splice_viable, print_z_candidates,
6122         build_user_type_conversion, build_new_function_call,
6123         conditional_conversion, build_conditional_expr, build_new_op,
6124         build_op_delete_call, enforce_access, call_builtin_trap,
6125         convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
6126         convert_default_arg, type_passed_as, convert_for_arg_passing,
6127         in_charge_arg_for_name, is_properly_derived_from,
6128         maybe_handle_implicit_object, maybe_handle_ref_bind,
6129         source_type, add_warning, can_convert, can_convert_arg,
6130         perform_implicit_conversion, can_convert_arg_bad,
6131         initialize_reference, add_conv_candidate,
6132         add_template_candidate_real, add_template_candidate): Ansify.
6133
6134 2002-12-22  Nathan Sidwell  <nathan@codesourcery.com>
6135
6136         PR c++/8572
6137         * cp-tree.h (grokoptypename): Add SCOPE parameter.
6138         * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
6139         if in a template scope.
6140         * parse.y (unoperator): Return the scope.
6141         (operator_name): Adjust grokoptypename call.
6142
6143 2002-12-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6144
6145         * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
6146         * decl.c (make_unbound_class_template): Adjust.  Check for tf_error.
6147         * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
6148
6149 2002-12-20  Kazu Hirata  <kazu@cs.umass.edu>
6150
6151         * ChangeLog: Fix a typo.
6152         * class.c: Fix comment typos.
6153         * cp-tree.h: Likewise.
6154
6155 2002-12-18  Jason Merrill  <jason@redhat.com>
6156
6157         Handle anonymous unions at the tree level.
6158         C++ ABI change: Mangle anonymous unions using the name of their
6159         first named field (by depth-first search).  Should not cause
6160         binary compatibility problems, though, as the compiler previously
6161         didn't emit anything for affected unions.
6162         * cp-tree.def (ALIAS_DECL): New tree code.
6163         * decl2.c (build_anon_union_vars): Build ALIAS_DECLs.  Return the
6164         first field, not the largest.
6165         (finish_anon_union): Don't mess with RTL.  Do set DECL_ASSEMBLER_NAME,
6166         push the decl, and write it out at namespace scope.
6167         * decl.c (lookup_name_real): See through an ALIAS_DECL.
6168         (pushdecl): Add namespace bindings for ALIAS_DECLs.
6169         * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
6170         of a decl which doesn't have one.
6171         * typeck.c (build_class_member_access_expr): Don't recurse if
6172         we already have the type we want.
6173
6174 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6175
6176         PR c++/8099
6177         * friend.c (make_friend_class): Allow partial specialization
6178         when declaration is not a template friend.
6179
6180 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6181
6182         PR c++/3663
6183         * pt.c (lookup_template_class): Copy TREE_PRIVATE and
6184         TREE_PROTECTED to created decl nodes.
6185
6186 2002-12-18  Mark Mitchell  <mark@codesourcery.com>
6187
6188         * class.c (build_base_field): Do not set DECL_PACKED on the
6189         FIELD_DECL.
6190
6191 2002-12-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6192
6193         * cp-tree.h (struct tree_srcloc): Use location_t.
6194         (SOURCE_LOCUS): New.
6195         (SRCLOC_FILE, SRCLOC_LINE): Adjust.
6196
6197 2002-12-17  Jason Merrill  <jason@redhat.com>
6198
6199         * decl.c (finish_function): Also complain about no return in
6200         templates.
6201         * semantics.c (finish_return_stmt): Also call check_return_expr in
6202         templates.
6203         * typeck.c (check_return_expr): In a template, just remember that we
6204         saw a return.
6205
6206 2002-12-16  Jason Merrill  <jason@redhat.com>
6207
6208         * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
6209         of the CALL_EXPR.
6210
6211         * semantics.c (do_pushlevel): Call pushlevel after adding the
6212         SCOPE_STMT.
6213         (do_poplevel): Call poplevel before adding the SCOPE_STMT.
6214         * parse.y (function_body): Go back to using compstmt.
6215         * decl.c (pushdecl): Skip another level to get to the parms level.
6216
6217         * call.c (build_new_method_call): Use is_dummy_object to determine
6218         whether or not to evaluate the object parameter to a static member
6219         function.
6220
6221 2002-12-14  Jason Merrill  <jason@redhat.com>
6222
6223         * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
6224         return slot for normal functions.  Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
6225         * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
6226         don't bother with an AGGR_INIT_EXPR.
6227         (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
6228         just generate a new decl normally.  Take return slot parm.
6229         * cp-tree.h: Adjust prototype.
6230
6231 2002-12-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6232
6233         PR C++/8031
6234         * cvt.c (convert_to_pointer_force): Don't try comparing against
6235         erronous type.
6236
6237 2002-12-13  Geoffrey Keating  <geoffk@apple.com>
6238
6239         * cp-tree.h: Have the multiple-include guards around
6240         the entire file.
6241
6242 2002-12-10  David Edelsohn  <edelsohn@gnu.org>
6243
6244         * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
6245         for SPEW_DEBUG.
6246         (snarf_method): Same.
6247         (snarf_defarg): Same.
6248
6249 2002-12-10  Mark Mitchell  <mark@codesourcery.com>
6250
6251         PR c++/8372
6252         * pt.c (tsubst_copy): Handle destructor names more correctly.
6253
6254 2002-12-10  Matt Austern   <austern@apple.com>
6255
6256         * cp-tree.h: get rid of needs_virtual_reinit bit.
6257
6258 2002-12-09  Mark Mitchell  <mark@codesourcery.com>
6259
6260         * NEWS: Document removal of in-class initialization extension for
6261         static data members of non-arithmetic, non-enumeration type.
6262         * decl.c (check_static_variable_definition): Do not allow that
6263         extension.
6264         * decl2.c (grokfield): Do not call digest_init when processing
6265         templates.
6266
6267 2002-12-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6268
6269         * error.c (dump_expr): Fix format specifier warning.
6270
6271 2002-12-04  Geoffrey Keating  <geoffk@apple.com>
6272
6273         * class.c (finish_struct_1): Correct comment.
6274         * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
6275
6276 2002-12-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6277
6278         PR C++/8799
6279         * error.c (dump_expr): Don't ever try to dump a non-existent
6280         expression.
6281
6282 2002-12-03  Nathan Sidwell  <nathan@codesourcery.com>
6283
6284         Implement covariant returns.
6285         * cp-tree.h (IS_AGGR_TYPE_2): Remove.
6286         (struct lang_decl_flags): Add this_thunk_p flag.
6287         Rename vcall_offset to virtual_offset.
6288         (struct lang_decl): Rename delta to fixed_offset.
6289         (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
6290         (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
6291         (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
6292         (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
6293         (make_thunk): Add this_adjusting arg.
6294         (finish_thunk): Declare.
6295         (mangle_thunk): Add this_adjusting arg.
6296         * class.c (get_vcall_index): Use base function for lookup.
6297         (update_vtable_entry_for_fn): Generate covariant thunk.
6298         (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
6299         (build_vtbl_initializer): Use base function for lookup.
6300         Finish covariant thunk here. Adjust thunk generation.
6301         * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
6302         Adjust thunk dumping.
6303         * mangle.c (mangle_call_offset): New function.
6304         (mangle_thunk): Adjust for covariant thunks.
6305         * method.c (make_thunk): Adjust. Do not set name here.
6306         (finish_thunk): New function. Set name here.
6307         (use_thunk): Generate covariant thunks too.
6308         (thunk_adjust): New function.
6309         * search.c (covariant_return_p): Remove. Fold into ...
6310         (check_final_overrider): ... here. Simplify.
6311         * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
6312
6313 2002-12-03  Jason Merrill  <jason@redhat.com>
6314
6315         PR c++/8674
6316         * call.c (build_over_call): Check specifically for TARGET_EXPR
6317         when eliding.
6318
6319         PR c++/8461, c++/8625
6320         * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
6321         (cp_convert_parm_for_inlining): Remove.
6322         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
6323         Remove.
6324         * cp-tree.h (ADDR_IS_INVISIREF): Remove.
6325         * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
6326
6327         * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
6328         an ambiguous conversion.
6329
6330 2002-12-03  Mark Mitchell  <mark@codesourcery.com>
6331
6332         PR c++/8688
6333         * decl.c (reshape_init): Handle erroneous initializers.
6334
6335 2002-12-02  Mark Mitchell  <mark@codesourcery.com>
6336
6337         PR c++/8720
6338         * spew.c (remove_last_token): Make sure that last_chunk is set
6339         correctly.
6340
6341         PR c++/8615
6342         * error.c (dump_expr): Handle character constants with
6343         TREE_OVERFLOW set.
6344
6345 2002-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6346
6347         DR 180
6348         * decl.c (grokdeclarator): Require class-key for all friend class.
6349         Output the correct type and context in the error message.
6350
6351 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
6352
6353         PR c++/5919
6354         * pt.c (unify): Use variably_modified_type_p to test validity of
6355         template argument types.
6356
6357         PR c++/8727
6358         * cp-tree.h (lang_type_class): Add typeinfo_var.
6359         (CLASSTYPE_TYPEINFO_VAR): New macro.
6360         * rtti.c (get_tinfo_decl): Use it.
6361
6362         PR c++/8663
6363         * init.c (expand_member_init): Always get the main variant of a
6364         base class.
6365
6366 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
6367
6368         PR c++/8332
6369         PR c++/8493
6370         * decl.c (cxx_init_decl_processing): Use size_type_node, not
6371         c_size_type_node.
6372         * decl2.c (coerce_new_type): Likewise.
6373         * except.c (do_allocate_exception): Likewise.
6374
6375 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
6376
6377         * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
6378         dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
6379         lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
6380         repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
6381         typeck2.c: Include coretypes.h and tm.h.
6382         * Make-lang.in: Update dependencies.
6383
6384 2002-11-30  Mark Mitchell  <mark@codesourcery.com>
6385
6386         PR c++/8227
6387         * decl.c (layout_var_decl): Deal gracefully with erroneous types.
6388         (check_initializer): Validate the type of the initialized
6389         variable, even if the initializer is absent.
6390         * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
6391
6392         PR c++/8214
6393         * typeck.c (convert_for_assignment): Do not use
6394         decl_constant_value on the operand.
6395
6396         PR c++/8511
6397         * pt.c (instantiate_decl): Handle template friends defined outside
6398         of the class correctly.
6399
6400 2002-11-29  Joe Buck <jbuck@synopsys.com>
6401
6402         * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
6403         anonymous structs.
6404
6405 2002-11-29  Mark Mitchell  <mark@codesourcery.com>
6406
6407         * class.c (walk_subobject_offsets): Recur on binfos as well as on
6408         types.
6409         (layout_nonempty_base_or_field): Pass it a binfo when processing a
6410         base class.
6411         (layout_empty_base): Likewise.
6412         (build_base_field): Likewise.
6413
6414 2002-11-27  Mark Mitchell  <mark@codesourcery.com>
6415
6416         * class.c (build_base_field): Make sure we get the canonical base
6417         when descending through primary bases.
6418
6419 2002-11-26  Geoffrey Keating  <geoffk@apple.com>
6420
6421         * decl.c (check_initializer): Don't error on initialisation of
6422         a scalar with a brace-enclosed expression.
6423
6424 2002-11-26  Nathan Sidwell  <nathan@codesourcery.com>
6425
6426         * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
6427         (template_parms_equal): Remove prototype.
6428         * typeck.c (buuld_indirect_ref): Reformat.
6429
6430 2002-11-25  Jason Merrill  <jason@redhat.com>
6431
6432         * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
6433         and a DO_STMT.
6434
6435 2002-11-25  Mark Mitchell  <mark@codesourcery.com>
6436
6437         * tree.c (cp_build_qualified_type_real): Correct handling of
6438         array types.
6439         * class.c (walk_subobject_offsets): Fix thinko.
6440         (build_base_field): Record offsets of empty bases in primary
6441         virtual bases.
6442         (layout_class_type): Record offsets of empty bases in fields.
6443
6444         * search.c (is_subobject_of_p_1): Fix thinko.
6445         (lookup_field_queue_p): Likewise.
6446
6447 2002-11-24  Mark Mitchell  <mark@codesourcery.com>
6448
6449         * class.c (layout_class_type): Reuse tail padding when laying out
6450         virtual bases.
6451
6452 2002-11-22  Mark Mitchell  <mark@codesourcery.com>
6453
6454         * rtti.c (qualifier_flags): Fix thinko.
6455
6456 2002-11-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6457
6458         Remove traditional C constructs 1/n.
6459         * cp-tree.h (init_method, set_mangled_name_for_decl,
6460         build_opfncall, hack_identifier, make_thunk, use_thunk,
6461         synthesize_method, implicitly_declare_fn,
6462         skip_artificial_parms_for, optimize_function, calls_setjmp_p,
6463         maybe_clone_body): Remove use of PARAMS.
6464
6465         * method.c (do_build_assign_ref, do_build_copy_constructor,
6466         synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
6467         Likewise.
6468         (synthesize_method): Use 'bool' type and constants instead of
6469         'int'.
6470         (locate_copy): Likewise.
6471         (implicitly_declare_fn): Likewise.
6472
6473         * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
6474         Remove old-style declaration.
6475         (maybe_clone_body): Use 'bool' type and constants.
6476
6477 2002-11-21  Glen Nakamura  <glen@imodulo.com>
6478
6479         PR c++/8342
6480         * typeck.c (get_member_function_from_ptrfunc): Make sure that a
6481         SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
6482         of the branches of a COND_EXPR.
6483
6484 2002-11-19  Mark Mitchell  <mark@codesourcery.com>
6485
6486         * pt.c (for_each_template_parm): Free allocated memory.
6487         * search.c (is_subobject_of_p_1): New function.
6488         (is_subobject_of_p): Avoid walking virtual bases multiple times.
6489
6490 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
6491
6492         * g++spec.c (lang_specific_spec_functions): New.
6493
6494 2002-11-15  Kazu Hirata  <kazu@cs.umass.edu>
6495
6496         * ChangeLog: Follow spelling conventions.
6497         * class.c: Likewise.
6498         * decl2.c: Likewise.
6499
6500 2002-11-14  Zack Weinberg  <zack@codesourcery.com>
6501
6502         * search.c (dfs_push_decls): Do not try to reorder elements
6503         3..n of method_vec if method_vec has only two elements.
6504         Reverse order of two tests to avoid accessing unallocated
6505         memory.
6506
6507 2002-11-14  Mark Mitchell  <mark@codesourcery.com>
6508
6509         * class.c (dfs_find_final_overrider): Adjust so that the most
6510         derived object is a binfo, rather than a class type.
6511         (find_final_overrider): Likewise.
6512         (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
6513         (add_vcall_offset): Likewise.
6514
6515 2002-11-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6516
6517         PR c++/8389
6518         * pt.c (instantiate_template): Push class scope for member
6519         functions.
6520         (get_mostly_instantiated_function_type): Likewise.  Don't call
6521         tsubst on context.  Remove CONTEXTP and TPARMSP parameters.
6522         * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
6523         * mangle.c (write_encoding, write_unqualified_name): Adjust.
6524
6525 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
6526
6527         * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
6528         vcall offfsets.  Split out ...
6529         (add_vcall_offset): ... new function.
6530
6531         PR c++/8338
6532         * pt.c (for_each_template_parm): Add htab parameter.
6533         (process_partial_specialization): Adjust call.
6534         (push_template_decl_real): Likewise.
6535         (pair_fn_data): Add visited.
6536         (for_each_template_parm_r): Avoid walking duplicates more than
6537         once.
6538         (uses_template_parms): Adjust call to for_each_template_parm.
6539
6540 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
6541
6542         * class.c (add_implicitly_declared_members): Put implicitly
6543         declared functions at the end of TYPE_METHODs when -fabi-version
6544         is at least 2.
6545
6546 2002-11-05  Geoffrey Keating  <geoffk@apple.com>
6547
6548         * decl2.c (finish_file): Correct spelling.
6549
6550 2002-11-03  Mark Mitchell  <mark@codesourcery.com>
6551
6552         * call.c (build_special_member_call): Do not try to lookup VTTs by
6553         name.
6554         * class.c (vtbl_init_data): Add generate_vcall_entries.
6555         (get_vtable_decl): Do not look up virtual tables by name.
6556         (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
6557         (set_primary_base): Do not set CLASSTYPE_RTTI.
6558         (determine_primary_base): Likewise.
6559         (get_matching_virtual): Remove.
6560         (get_vcall_index): New function.
6561         (update_vtable_entry_for_fn): Do not try to use virtual thunks
6562         when they are not required.  Assign vcall indices at this point.
6563         (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
6564         Do update dynamic_classes.
6565         (build_vtt): Do not add VTTs to the symbol table.
6566         (build_ctor_vtbl_group): Likewise.
6567         (build_vtbl_initializer): Simplify handling of vcall indices.
6568         (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
6569         for the most derived class.
6570         (add_vcall_offset_vtbl_entries_1): But do not actually add them to
6571         the vtable.
6572         * cp-tree.h (dynamic_classes): New macro.
6573         (lang_type_class): Remove rtti.  Add vtables.  Add vcall_indices.
6574         (CLASSTYPE_RTTI): Remove.
6575         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
6576         (CLASSTYPE_VCALL_INDICES): New macro.
6577         (CLASSTYPE_VTABLES): Likewise.
6578         (BV_USE_VCALL_INDEX_P): Remove.
6579         (build_vtable_path): Remove.
6580         * decl2.c (finish_vtable_vardecl): Remove.
6581         (key_method): Remove #if 0'd code.
6582         (finish_vtable_vardecl): Rename to ...
6583         (maybe_emit_vtables): ... this.
6584         (finish_file): Use it.
6585         * search.c (look_for_overrides_here): Update comment.
6586
6587 2002-11-01  Zack Weinberg  <zack@codesourcery.com>
6588
6589         PR c/7353 redux
6590         * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
6591
6592 2002-10-30  Jason Merrill  <jason@redhat.com>
6593
6594         PR c++/8186
6595         * cp-tree.h (ADDR_IS_INVISIREF): New macro.
6596         * call.c (convert_for_arg_passing): Set it.
6597         * except.c (stabilize_throw_expr): Recurse for such an arg.
6598
6599 2002-10-31  Mark Mitchell  <mark@codesourcery.com>
6600
6601         * cp-tree.h (lang_decl_flags): Remove init_priority.
6602         (lang_decl): Add delta.
6603         (GLOBAL_INIT_PRIORITY): Remove.
6604         (THUNK_DELTA): Revise definition.
6605         * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
6606         * dump.c (cp_dump_tree): Don't dump it.
6607
6608 2002-10-30  Mark Mitchell  <mark@codesourcery.com>
6609
6610         PR c++/8160
6611         * typeck2.c (process_init_constructor): Call complete_array_type.
6612
6613         PR c++/8149
6614         * decl.c (make_typename_type): Issue errors about invalid results.
6615
6616 2002-10-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6617
6618         Core issue 287, PR c++/7639
6619         * cp-tree.h (lang_type_class): Add decl_list field.
6620         (CLASSTYPE_DECL_LIST): New macro.
6621         (maybe_add_class_template_decl_list): Add declaration.
6622         * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
6623         (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
6624         (maybe_add_class_template_decl_list): New function.
6625         (add_implicitly_declared_members): Use it.
6626         * decl.c (maybe_process_template_type_declaration): Likewise.
6627         (pushtag): Likewise.
6628         * friend.c (add_friend): Likewise.
6629         (make_friend_class): Likewise.
6630         * semantics.c (finish_member_declaration): Likewise.
6631         (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
6632         * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
6633         to process members and friends in the order of declaration.
6634
6635 2002-10-29  Mark Mitchell  <mark@codesourcery.com>
6636
6637         PR c++/8287
6638         * decl.c (finish_destructor_body): Create the label to jump to
6639         when returning from a destructor here.
6640         (finish_function_body): Rather than here.
6641
6642 2002-10-25  Zack Weinberg  <zack@codesourcery.com>
6643
6644         PR c++/7266
6645         * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
6646         SCOPE_REF is not null before dereferencing it.
6647
6648 2002-10-25  Mark Mitchell  <mark@codesourcery.com>
6649
6650         * call.c (build_over_call): Use DECL_CONTEXT, not
6651         DECL_VIRTUAL_CONTEXT.
6652         * class.c (modify_vtable_entry): Don't mess with
6653         DECL_VIRTUAL_CONTEXT.
6654         (set_vindex): Remove.
6655         (set_primary_base): Remove vfuns_p parameter.
6656         (determine_primary_base): Likewise.
6657         (modify_all_vtables): Likewise.
6658         (layout_class_type): Likewise.  Adjust calls to other functions
6659         accordingly.
6660         (finish_struct_1): Adjust calls to modified functions.  Set
6661         DECL_VINDEX here.
6662         * cp-tree.h (lang_type_class): Remove vsize.
6663         (CLASSTYPE_VSIZE): Remove.
6664         (lang_decl): Remove thunks.
6665         (DECL_THUNKS): Adjust.
6666         (DECL_VIRTUAL_CONTEXT): Remove.
6667         (duplicate_decls): Don't copy it.
6668         * pt.c (build_template_decl): Don't set it.
6669         (tsubst_decl): Likewise.
6670         * typeck.c (expand_ptrmemfunc_cst): Don't use it.
6671
6672         * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
6673         (build_vtable_entry): Remove.
6674         * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
6675         (lang_decl): Add thunks.
6676         (DECL_THUNKS): New macro.
6677         * decl.c (duplicate_decls): Copy it.
6678         * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
6679         * semantics.c (emit_associated_thunks): Simplify.
6680
6681 2002-10-24  David Edelsohn  <edelsohn@gnu.org>
6682
6683         PR c++/7228
6684         * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
6685         lang_type structure exists before accessing field.
6686         (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
6687         (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
6688         (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
6689         * class.c (check_field_decls): Use new macros.
6690         * typeck2.c (process_init_constructor): Remove redundant check for
6691         existence of lang_type structure.
6692
6693 2002-10-24  Mark Mitchell  <mark@codesourcery.com>
6694
6695         * class.c (end_of_base): New method.
6696         (end_of_class): Use it.  Check indirect virtual bases.
6697
6698         * class.c (check_field_decls): Fix typo.
6699
6700 2002-10-23  Mark Mitchell  <mark@codesourcery.com>
6701
6702         PR c++/8067
6703         * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
6704         related variables.
6705
6706         PR c++/7679
6707         * spew.c (next_token): Do not return an endless stream of
6708         END_OF_SAVED_INPUT tokens.
6709         (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
6710         the cached token stream.
6711         (snarf_defarg): Likewise.
6712
6713 2002-10-23  Zack Weinberg  <zack@codesourcery.com>
6714
6715         * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
6716         variably_modified_type_p.
6717         * cp-tree.h: Remove prototype of variably_modified_type_p.
6718         * tree.c (variably_modified_type_p): Remove; now implemented
6719         in language-independent code.
6720
6721 2002-10-22  Mark Mitchell  <mark@codesourcery.com>
6722
6723         PR c++/6579
6724         * spew.c (snarf_parenthesized_expression): New function.
6725         (snarf_block): Use it.
6726
6727 2002-10-22  Richard Henderson  <rth@redhat.com>
6728
6729         * method.c (use_thunk): Always compute vcall_value; assert that
6730         it is not zero.  Use can_output_mi_thunk; use output_mi_thunk
6731         for vcall thunks as well.
6732
6733 2002-10-21  Mark Mitchell  <mark@codesourcery.com>
6734
6735         * class.c (empty_base_at_nonzero_offset_p): New function.
6736         (layout_nonempty_base_or_field): Do not check for conflicts when
6737         laying out a virtual base using the GCC 3.2 ABI.
6738         (build_base_field): Correct checking for presence of empty classes
6739         at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
6740
6741         * class.c (include_empty_classes): Use normalize_rli.
6742         (layout_class_type): Likewise.
6743
6744         * decl.c (reshape_init): Tweak handling of character arrays.
6745
6746         PR c++/8218
6747         * cp-tree.h (lang_type_class): Add contains_empty_class_p.
6748         (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
6749         * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
6750         (check_field_decls): Likewise.
6751         (layout_class_type): Likewise.
6752         (finish_struct_1): Initialize it.
6753         (walk_subobject_offsets): Use it to prune searches.
6754
6755 2002-10-20  Mark Mitchell  <mark@codesourcery.com>
6756
6757         * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
6758         * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
6759         TARGET_ASM_OUTPUT_MI_THUNK in comments.
6760
6761 2002-10-18  Zack Weinberg  <zack@codesourcery.com>
6762
6763         * decl.c (start_decl): Point users of the old initialized-
6764         typedef extension at __typeof__.
6765
6766 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
6767
6768         * Make-lang.in (method.o): Depend on TARGET_H.
6769         * method.c (target.h): Include it.
6770         (use_thunk): Use target hooks.  Use vcall thunks, if available.
6771
6772 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
6773
6774         * class.c (base_derived_from): Make sure return value is a bool.
6775
6776 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
6777
6778         * class.c (find_final_overrider_data_s): Remove overriding_fn and
6779         overriding_base.
6780         (dfs_base_derived_from): New function.
6781         (base_derived_from): Likewise.
6782         (dfs_find_final_overrider): Use base_derived_from.
6783         (find_final_overrider): Adjust.
6784
6785 2002-10-18  Jason Merrill  <jason@redhat.com>
6786
6787         PR c++/8080
6788         * semantics.c (finish_for_cond, finish_while_cond): Don't mess
6789         with condition decls in a template.
6790
6791 2002-10-17  Nathan Sidwell  <nathan@codesourcery.com>
6792
6793         * class.c (add_method): Compare template parms too.
6794
6795 2002-10-17  Mark Mitchell  <mark@codesourcery.com>
6796
6797         PR c++/7584
6798         * class.c (handle_using_decl): Allow the declaration used to be
6799         from an ambiguous base.
6800
6801         * pt.c (convert_template_argument): Revert this change:
6802                 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
6803                 * pt.c (convert_template_argument): Do not fold non-type
6804                 template rguments when inside a template.
6805
6806         * init.c (expand_default_init): Handle brace-enclosed initializers
6807         correctly.
6808
6809 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
6810
6811         * mangle.c (write_expression): Correct handling of enumeration
6812         constants.
6813         (write_template_arg): Likewise.
6814         * pt.c (convert_template_argument): Do not fold non-type template
6815         arguments when inside a template.
6816
6817         PR c++/7478
6818         * cvt.c (convert_to_reference): Allow references as the incoming
6819         type.
6820
6821 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
6822
6823         PR c++/7524
6824         * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
6825         build_qualified_type.
6826
6827 2002-10-15  Richard Henderson  <rth@redhat.com>
6828
6829         * error.c (dump_expr): Use real_to_decimal directly, and with
6830         the new arguments.
6831
6832 2002-10-15  Mark Mitchell  <mark@codesourcery.com>
6833
6834         * decl.c (reshape_init): Fix typo.
6835
6836         * cp-tree.h (operator_name_info_t): Add arity.
6837         * lex.c (init_operators): Initialize it.
6838         * mangle.c (write_conversion_operator_name): New function.
6839         (write_unqualified_name): Use it.
6840         (write_template_args): Accept template arguments as a TREE_LIST.
6841         (write_expression): Adjust handling of qualified names to match
6842         specification.
6843
6844 2002-10-15  Jason Merrill  <jason@redhat.com>
6845
6846         * call.c (call_builtin_trap): New fn.
6847         (convert_arg_to_ellipsis): Use it.  Downgrade error to warning.
6848         (build_call): Don't set current_function_returns_abnormally outside
6849         a function.
6850
6851 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
6852
6853         * class.c (check_field_decls): Remove empty_p parameter.  Instead,
6854         clear CLASSTYPE_EMPTY_P.
6855         (build_base_field): Likewise.
6856         (build_base_fields): Likewise.
6857         (check_bases_and_members): Likewise.
6858         (create_vtbl_ptr): Likewise.
6859         (layout_class_type): Likewise.  Ensure that empty classes have
6860         size zero when used as base classes in the 3.2 ABI.
6861         (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
6862         CLASSTYPE_NEARLY_EMPTY_P.  Adjust calls to avoid passing empty_p
6863         parameter.
6864         (is_empty_class): Correct definition when using post-3.2 ABI.
6865         * cp-tree.h (lang_type_class): Add empty_p.
6866         (CLASSTYPE_EMPTY_P): New macro.
6867
6868 2002-10-12  Nathan Sidwell  <nathan@codesourcery.com>
6869
6870         * init.c (build_delete): Do not apply save_expr for arrays.
6871         (build_vec_delete): Likewise.
6872
6873 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
6874
6875         * decl.c (layout_var_decl): Call layout_decl even for variables
6876         whose type is an array with unspecified bounds.
6877
6878         PR c++/7176
6879         * lex.c (do_identifier): Add another option for the parsing
6880         parameter.
6881         * parse.y (do_id): Use it.
6882
6883 2002-10-11  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6884
6885         PRs C++/6803, C++/7721 and C++/7803
6886         * decl.c (grokdeclarator): Gracefully handle template-name as
6887         decl-specifier.
6888
6889 2002-10-11  Jason Molenda  <jmolenda@apple.com>
6890
6891         * init.c (build_field_list): Provide uses_unions_p with a default
6892         value.
6893
6894 2002-10-11  Mark Mitchell  <mark@codesourcery.com>
6895
6896         PR c++/5661
6897         * cp-tree.h (variably_modified_type_p): New function.
6898         (grokdeclarator) Tighten check for variably modified types as
6899         fields.
6900         * pt.c (convert_template_argument): Do not allow variably modified
6901         types as template arguments.
6902         * tree.c (variably_modified_type_p): New function.
6903
6904         * NEWS: Document removal of "new X = ..." extension.
6905         * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
6906         brace-enclosed initializers.
6907         * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
6908         (initialize_local_var): Remove declaration.
6909         (expand_static_init): Likewise.
6910         * decl.c (next_initializable_field): New function.
6911         (reshape_init): Likewise.
6912         (check_initializer): Use them.  Build dynamic initializer for
6913         aggregates here too.
6914         (initialize_local_var): Simplify, and incorporate cleanup
6915         insertion code as well.
6916         (destroy_local_var): Remove.
6917         (cp_finish_decl): Tidy.
6918         (expand_static_init): Fold checks for whether or not a variable
6919         needs initialization into this function.  Simplify.
6920         * decl2.c (do_static_initialization): Simplify.
6921         * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
6922         be done for us automatically.
6923         (expand_default_init): Handle brace-enclosed initializers
6924         correctly.
6925         (expand_aggr_init_1): Remove RTL-generation code.
6926         (build_vec_init): Remove "new X = ..." support.
6927         * parse.y (new_initializer): Likewise.
6928         * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
6929         brace-enclosed initializer.
6930         (create_pseudo_type_info): Likewise.
6931         * typeck2.c (store_init_value): Don't try to handle digest_init
6932         being called more than once.
6933         (digest_init): Tidy handling of brace-enclosed initializers.
6934
6935 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6936
6937         * decl.c (typename_hash): Use htab_hash_pointer.
6938
6939 2002-10-10  Jim Wilson  <wilson@redhat.com>
6940
6941         * decl.c (duplicate_decls): Don't call decl_attributes.
6942
6943 2002-10-09  Zack Weinberg  <zack@codesourcery.com>
6944
6945         PR c/7353
6946         * decl.c (start_decl): Unconditionally issue error for
6947         'typedef foo = bar'.
6948         (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
6949         (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
6950
6951 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6952
6953         * decl2.c (prune_vtable_vardecl): Delete unused function.
6954
6955 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
6956
6957         PR c++/7754
6958         * decl2.c (finish_anon_union): Do not expand anonymous unions when
6959         procesing template functions.
6960         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
6961         type. Call layout_decl.
6962         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
6963
6964 2002-10-07  Richard Henderson  <rth@redhat.com>
6965
6966         * decl2.c, pt.c: Revert c++/7754 fix.
6967
6968 2002-10-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6969
6970         PR c++/7804
6971         * error.c (dump_expr) [REAL_CST]: Output in decimal format.
6972
6973 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
6974
6975         PR c++/7931
6976         * pt.c (for_each_template_parm_r): Handle BASELINKs.
6977
6978         PR c++/7754
6979         * decl2.c (finish_anon_union): Do not expand anonymous unions when
6980         procesing template functions.
6981         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
6982         type. Call layout_decl.
6983         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
6984
6985 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
6986
6987         PR c++/8006
6988         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
6989         template parameters.
6990         (globals): Add entity and need_abi_warning.
6991         (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
6992         CLASSTYPE_TEMPLATE_INFO.
6993         (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
6994         TYPE_TI_TEMPLATE.
6995         (write_prefix): Handle typename types correctly.
6996         (write_template_prefix): Handle template template parameters
6997         correctly.
6998         (start_mangling): Add entity parameter.
6999         (finish_mangling): Warn about names whose mangling will change.
7000         (mangle_decl_string): Adjust.
7001         (mangle_type_string): Likewise.
7002         (mangle_special_for_type): Likewise.
7003         (mangle_ctor_vtbl_for_type): Likewise.
7004         (mangle_thunk): Likewise.
7005         (mangle_guard_variable): Likewise.
7006         (mangle_ref_init_variable): Likewise.
7007
7008 2002-10-02  Mark Mitchell  <mark@codesourcery.com>
7009
7010         PR c++/7188.
7011         * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
7012         * cp-tree.h (emit_base_init): Rename to ....
7013         (emit_mem_initializers): ... this.
7014         (expand_member_init): Change prototype.
7015         * init.c (perform_member_init): Compute explicit, rather than
7016         requiring it as a parameter.
7017         (sort_member_init): Rename to ...
7018         (sort_mem_initializers): ... this.  Process bases and data members
7019         together.
7020         (sort_base_init): Remove.
7021         (emit_base_init): Rename to ...
7022         (emit_mem_initializers): ... this.
7023         (expand_aggr_vbase_init_1): Remove.
7024         (construct_virtual_bases): Rename to ...
7025         (construct_virtual_base): ... this.
7026         (expand_member_init): Rework handling of base initializers.
7027         * method.c (do_build_copy_constructor): Use
7028         finish_mem_initializers.
7029         * parse.y (member_init): Adjust calls to expand_member_init.
7030         * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
7031         (tsubst_initializer_list): Use expand_member_init.
7032         * semantics.c (finish_mem_intiailizers): Simplify.
7033
7034 2002-10-02  Matt Austern  <austern@apple.com>
7035         * decl.c (walk_vtables_r): Fixed typo that caused result to
7036         never get a nonzero value.
7037
7038 2002-10-02  Roger Sayle  <roger@eyesopen.com>
7039
7040         PR optimization/6627
7041         * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
7042         from here, and move it to tree.h.
7043         * decl.c (cxx_init_decl_processing): If storing the vbit
7044         in function pointers, ensure that force_align_functions_log
7045         is atleast one.
7046
7047 2002-10-02  Matt Austern  <austern@apple.com>
7048
7049         * class.c (check_field_decls): Changed warning about const member
7050         variables so that it doesn't get issued for a class aggregate.
7051
7052 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
7053
7054         * decl.c (cp_finish_decl): Make sure array types are laid out,
7055         even if the array bounds are unknown.
7056
7057 2002-10-01  Steve Ellcey  <sje@cup.hp.com>
7058
7059         * class.c (build_vtbl_initializer): Change build_c_cast
7060         to build1.
7061
7062 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
7063
7064         * decl.c (cp_finish_decl): Make sure array types are laid out,
7065         even if the array bounds are unknown.
7066
7067         * decl.c (cp_finish_decl): Correct check for dynamic
7068         initialization of thread-local storage.
7069
7070 2002-09-30  Nathan Sidwell  <nathan@codesourcery.com>
7071
7072         * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
7073         overloaded.
7074
7075 2002-09-30  Steve Ellcey  <sje@cup.hp.com>
7076
7077         * class.c (build_vtbl_initializer): Add cast.
7078         (add_vcall_offset_vtbl_entries_1):
7079         Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
7080
7081 2002-09-30  Mark Mitchell  <mark@codesourcery.com>
7082
7083         * class.c (walk_subobject_offsets): Correct the calculation of
7084         offsets for virtual bases.  Correct the counting of array
7085         elements.
7086         (layout_nonempty_base_or_field): Simplify.  Correct the
7087         calculation of offsets to be propagated through the binfo
7088         hierarchy.
7089         (build_base_field): Avoid creating a FIELD_DECL for empty bases.
7090         Add the FIELD_DECL to TYPE_FIELDS.
7091         (build_base_fields): Adjust accordingly.
7092         (layout_virtual_bases): Use build_base_field.
7093         (end_of_class): Return a tree, not an integer.
7094         (warn_about_ambiguous_direct_bases): Rename to ...
7095         (warn_about_ambiguous_bases): ... this.
7096         (include_empty_classes): New function.
7097         (layout_class_type): Create an alternative version of the type to
7098         be used when as a base class type.  Do not call
7099         finish_record_layout until we are done laying out the class.
7100         * cp-tree.h (lang_type_class): Remove size, size_unit.  Add
7101         as_base.
7102         (CLASSTYPE_SIZE): Reimplement.
7103         (CLASSTYPE_SIZE_UNIT): Likewise.
7104         (CLASSTYPE_ALIGN): Likweise.
7105         (CLASSTYPE_USER_ALIGN): Likewise.
7106         (CLASSTYPE_AS_BASE): New macro.
7107         (DECL_INITIALIZED_P): Likewise.
7108         (extract_init): Remove prototype.
7109         (build_forced_zero_init): Rename to ...
7110         (build_zero_init): ... this.
7111         (force_store_init_value): Remove.
7112         * decl.c (obscure_complex_init): Remove.
7113         (duplicate_decls): Copy DECL_INITIALIZED_P.
7114         (check_initializer): Do not leave junk in DECL_INITIAL.
7115         (cp_finish_decl): Handle zero-initialization of entities with
7116         static storage duration.
7117         * expr.c (extract_init): Remove.
7118         * init.c (build_forced_zero_init): Remove.
7119         (build_zero_init): New function.
7120         (build_default_init): Use it.
7121         (build_field_list): Skip FIELD_DECLs for base subobjects.
7122         (push_base_cleanups): Likewise.
7123         * method.c (do_build_assign_ref): Likewise.
7124         (synthesize_exception_spec): Likewise.
7125         * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
7126         (regenerate_decl_from_template): To not set DECL_INITIAL for a
7127         static data member whose initialization took place in its class.
7128         (instantiate_decl): Do not pass an initializer to cp_finish_decl
7129         in that situation.
7130         * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
7131         (dfs_unuse_fields): Likewise.
7132         * tree.c (pod_type_p): Handle error_mark_node.
7133         (zero_init_p): Likewise.
7134         * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
7135         subobjects.
7136         * typeck2.c (store_init_value): Remove #if 0'd code.
7137         (force_store_init_value): Remove.
7138         (process_init_constructor): Use build_zero_init.
7139
7140 2002-09-29  Nathan Sidwell  <nathan@codesourcery.com>
7141
7142         PR c++/7788
7143         * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
7144
7145 2002-09-29  Kazu Hirata  <kazu@cs.umass.edu>
7146
7147         * cp-tree.h: Fix comment typos.
7148         * decl.c: Likewise.
7149         * pt.c: Likewise.
7150
7151 2002-09-25  Mark Mitchell  <mark@codesourcery.com>
7152
7153         * cp/class.c (contains_empty_class_p): New method.
7154         (walk_subobject_offsets): Correct computation of field offset.
7155         (layout_empty_base): Correct placement of emtpy base classes.
7156         (layout_class_type): Warn about ABI changes.
7157
7158 2002-09-23  Mark Mitchell  <mark@codesourcery.com>
7159
7160         * cp/class.c (layout_virtual_bases): Do not round the size of the
7161         type to a multiple of the alignment before laying out virtual bases.
7162         (layout_class_type): Correct handling of bit-fields that are wider
7163         than their type inside unions.  Round the size of the type to a
7164         even number of bytes when computing the size without virtual
7165         bases.
7166         * cp/cp-tree.h (abi_version_at_least): New macro.
7167
7168 2002-09-21  Kazu Hirata  <kazu@cs.umass.edu>
7169
7170         * ChangeLog: Follow spelling conventions.
7171         * ChangeLog.2: Likewise.
7172         * call.c: Likewise.
7173         * class.c: Likewise.
7174         * cp-tree.h: Likewise.
7175         * cvt.c: Likewise.
7176         * decl.c: Likewise.
7177         * decl2.c: Likewise.
7178         * except.c: Likewise.
7179         * friend.c: Likewise.
7180         * g++spec.c: Likewise.
7181         * init.c: Likewise.
7182         * lex.c: Likewise.
7183         * mangle.c: Likewise.
7184         * method.c: Likewise.
7185         * operators.def: Likewise.
7186         * optimize.c: Likewise.
7187         * pt.c: Likewise.
7188         * rtti.c: Likewise.
7189         * search.c: Likewise.
7190         * semantics.c: Likewise.
7191         * spew.c: Likewise.
7192         * tree.c: Likewise.
7193         * typeck.c: Likewise.
7194
7195 2002-09-18  Devang Patel  <dpatel@apple.com>
7196
7197         * cp/cp-tree.h: New prototype for walk_vtabls().
7198         * cp/decl.c (walk_vtables_r): New function.
7199         (struct cp_binding_level): Add new members, namespaces,
7200         names_size and vtables.
7201         (add_decl_to_level): Add decl in namespaces or vtables
7202         chain, if conditions match.
7203         (walk_vtables): New function.
7204         (walk_namespaces_r): Travers separate namespace chain
7205         for namespace decls.
7206         (wrapup_globals_for_namespace): Use names_size instead
7207         of list_length().
7208         * cp/decl2.c (finish_file): Use walk_vtables() instead of
7209         walk_globals() to walk vtable decls.
7210
7211 2002-09-18  Nathan Sidwell  <nathan@codesourcery.com>
7212
7213         * decl.c (grokdeclarator): Use assert, not internal_error. Don't
7214         ICE with invalid pointers & references.
7215
7216 2002-09-17  Zack Weinberg  <zack@codesourcery.com>
7217
7218         * Make-lang.in: Remove all references to the demangler.
7219         * cxxfilt.c: Moved to binutils.
7220
7221 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
7222
7223         PR c++/7718
7224         * pt.c (tsubst_decl): Remove assert.
7225
7226         Remove DR 295 implementation.
7227         * pt.c (check_cv_quals_for_unify): Disable function & method cases.
7228         * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
7229         about ignoring volatile qualifiers.
7230
7231         * search.c (lookup_member): Correct documentation.
7232
7233 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
7234
7235         * cp-tree.h (union lang_tree_node): Add chain_next option.
7236
7237 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
7238
7239         * parse.y (parse_finish_call_expr): Check lookup_member result.
7240
7241         PR c++/7015
7242         * semantic.c (finish_asm_stmt): Fix operand/output_operands
7243         thinko.
7244         * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
7245
7246 2002-09-15  Nathan Sidwell  <nathan@codesourcery.com>
7247
7248         PR c++/7919
7249         * call.c (build_over_call): Convert this pointer for fns found by
7250         using decls.
7251
7252 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
7253
7254         * ChangeLog: Follow spelling conventions.
7255         * ChangeLog.1: Likewise.
7256
7257 2002-09-14  Nathan Sidwell  <nathan@codesourcery.com>
7258
7259         PR c++/7768
7260         * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
7261
7262 2002-09-14  Kazu Hirata  <kazu@cs.umass.edu>
7263
7264         * error.c: Fix comment formatting.
7265         * except.c: Likewise.
7266         * expr.c: Likewise.
7267         * friend.c: Likewise.
7268         * g++spec.c: Likewise.
7269         * init.c: Likewise.
7270         * lex.c: Likewise.
7271         * mangle.c: Likewise.
7272         * method.c: Likewise.
7273         * optimize.c: Likewise.
7274         * pt.c: Likewise.
7275         * rtti.c: Likewise.
7276         * search.c: Likewise.
7277         * semantics.c: Likewise.
7278         * spew.c: Likewise.
7279         * tree.c: Likewise.
7280         * typeck.c: Likewise.
7281         * typeck2.c: Likewise.
7282
7283 2002-09-13  Matt Austern  <austern@apple.com>
7284
7285         PR C++/7828
7286         * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
7287         * cp/call.c: Change call-by-const-reference mechanism to use
7288         non_cast_lvalue_p when deciding whether the create a temporary.
7289         We need a temporary when passing, e.g. (long) x by const ref.
7290
7291 2002-09-13  Nathan Sidwell  <nathan@codesourcery.com>
7292
7293         * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
7294
7295 2002-09-13  Kazu Hirata  <kazu@cs.umass.edu>
7296
7297         * decl.c: Fix comment formatting.
7298         * decl2.c: Likewise.
7299
7300 2002-09-12  Kazu Hirata  <kazu@cs.umass.edu>
7301
7302         * call.c: Fix comment formatting.
7303         * class.c: Likewise.
7304         * cp-lang.c: Likewise.
7305         * cp-tree.h: Likewise.
7306         * cvt.c: Likewise.
7307
7308 2002-09-11  Zack Weinberg  <zack@codesourcery.com>
7309
7310         * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
7311         and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
7312         * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
7313         minor adjustments (use version_string, eliminate yet another
7314         duplicate of xmalloc)
7315
7316 2002-09-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7317
7318         * cp-tree.h (require_complete_eh_spec_types): Add prototype.
7319
7320 2002-09-05  Jason Merrill  <jason@redhat.com>
7321
7322         * typeck2.c (add_exception_specifier): Only pedwarn for an
7323         incomplete type.
7324         (require_complete_eh_spec_types): New fn.
7325         (cxx_incomplete_type_diagnostic): Also support pedwarning.
7326         * typeck.c (complete_type_or_diagnostic): Likewise.
7327         * call.c (build_call): Call require_complete_eh_spec_types.
7328         * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
7329         on an incomplete type.
7330
7331 2002-09-04  Jakub Jelinek  <jakub@redhat.com>
7332
7333         * decl.c (start_cleanup_fn): Clear interface_only before
7334         start_function, restore it afterwards.
7335
7336 2002-09-02  Nathan Sidwell  <nathan@codesourcery.com>
7337
7338         * cp-tree.h (finish_builtin_type): Remove.
7339         * decl2.c (finish_builtin_type): Move to common code.
7340         * decl.c (build_ptrmemfunc_type): Adjust.
7341         * rtti.c (create_pseudo_type_info): Adjust.
7342         (create_tinfo_types): Adjust.
7343
7344 2002-08-31  Jason Merrill  <jason@redhat.com>
7345
7346         * cp-lang.c (cp_expr_size): Allow initialization from a
7347         CONSTRUCTOR.
7348
7349 2002-08-30  Richard Henderson  <rth@redhat.com>
7350
7351         PR opt/7515
7352         * tree.c: Include target.h.
7353         (cp_cannot_inline_tree_fn): Don't auto-inline functions that
7354         don't bind locally.
7355         * Makefile.in (tree.o): Update.
7356
7357 2002-08-27  Mark Mitchell  <mark@codesourcery.com>
7358
7359         * class.c (layout_virtual_bases): Warn about bugs in G++ that
7360         result in incorrect object layouts.
7361         (layout_class_type): Likewise.
7362
7363 2002-08-24  Matt Austern  <austern@apple.com>
7364
7365         * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
7366         are allowable.
7367         (real_lvalue_p): Update caller.
7368         (lvalue_p): Ditto.
7369         (non_cast_lvalue_or_else): New.
7370         * tree.h: Declare it.
7371         * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
7372
7373 2002-08-22  Mark Mitchell  <mark@codesourcery.com>
7374
7375         * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
7376         and COND_EXPR specially; fix error message output.
7377
7378 2002-08-22  Jason Merrill  <jason@redhat.com>
7379
7380         * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
7381         * semantics.c (nullify_returns_r): Likewise.
7382
7383 2002-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7384
7385         Fix PR/7621
7386         * typeck.c (finish_class_member_access_expr): Diagnose cases where
7387         name lookup finds nothing.
7388
7389 2002-08-15  Jason Merrill  <jason@redhat.com>
7390
7391         * semantics.c (finish_then_clause): Remove redundant assignment.
7392         (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
7393         extra binding level outside the if/switch statement.
7394         (finish_while_cond, finish_for_cond): Rewrite complex condition
7395         into the loop body.
7396
7397 2002-08-15  Alexandre Oliva  <aoliva@redhat.com>
7398
7399         * parse.y (sizeof, alignof, typeof): New non-terminals to
7400         increment skip_evaluation.  Replace terminals with them and
7401         decrement skip_evaluation at the end of rules using them.
7402         * decl2.c (mark_used): Don't assemble_external if
7403         skipping evaluation.
7404
7405 2002-08-15  Gabriel Dos Reis  <gdr@nerim.net>
7406
7407         Fix PR/7504
7408         * parse.y (parse_finish_call_expr): Handle incomplete
7409         type used to name a scope.
7410
7411 2002-08-15  Nathan Sidwell  <nathan@codesourcery.com>
7412
7413         PR c++/7598
7414         * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
7415         regression caused by my 2002-08-08 patch.
7416
7417 2002-08-13  Mark Mitchell  <mark@codesourcery.com>
7418
7419         * decl.c (pushdecl_class_level): Honor requests to bind names to
7420         OVERLOADs.
7421
7422 2002-08-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7423
7424         * decl2.c (build_call_from_tree): Fix uninitialized variable.
7425         * parse.y (parse_finish_call_expr): Likewise.
7426         * repo.c (old_args, old_dir, old_main): Const-ify.
7427
7428 2002-08-11  Gabriel Dos Reis  <gdr@nerim.net>
7429
7430         * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
7431         DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
7432         * optimize.c (maybe_clone_body): Likewise.
7433         * pt.c (tsubst_enum): Likewise.
7434         (lookup_template_class): Likewise.
7435         * tree.c (cp_copy_res_decl_for_inlining): Likewise.
7436
7437 2002-08-10  Neil Booth  <neil@daikokuya.co.uk>
7438
7439         * lang-specs.h: Remove -ansi.
7440
7441 2002-08-10  Nathan Sidwell  <nathan@codesourcery.com>
7442
7443         * tree.c (maybe_dummy_object): Replace // with /* */
7444
7445 2002-08-09  Mark Mitchell  <mark@codesourcery.com>
7446
7447         * call.c (standard_conversion): Use build_ptrmem_type.
7448         * cp-tree.h (build_ptrmem_type): New function.
7449         (adjust_result_of_qualified_name_lookup): Likewise.
7450         * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
7451         static data members.
7452         (build_ptrmem_type): New function.
7453         (grokdeclarator): Do not use build_offset_type when encountering a
7454         qualified name.
7455         * parse.y (parse_finish_call_expr): Use
7456         adjust_result_of_qualified_name_lookup.
7457         * search.c (adjust_result_of_qualified_name_lookup): New function.
7458         * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
7459         accessing OFFSET_TYPEs directly.
7460
7461 2002-08-08  Mike Stump  <mrs@apple.com>
7462
7463         * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
7464         (type_decays_to): Likewise.
7465         * class.c (find_final_overrider): Likewise.
7466         (maybe_note_name_used_in_class): Likewise.
7467         * decl.c (current_tmpl_spec_kind): Likewise.
7468         (add_binding): Likewise.
7469         (push_class_binding): Likewise.
7470         (duplicate_decls): Likewise.
7471         (layout_var_decl): Likewise.
7472         (grokfndecl): Likewise.
7473         (grokdeclarator): Likewise.
7474         (check_default_argument): Likewise.
7475         * decl2.c (handle_class_head): Likewise.
7476         * error.c (dump_template_decl): Likewise.
7477         * init.c (build_offset_ref): Likewise.
7478         * pt.c (check_specialization_scope): Likewise.
7479         (determine_specialization): Likewise.
7480         (check_explicit_specialization): Likewise.
7481         (maybe_check_template_type): Likewise.
7482         (process_partial_specialization): Likewise.
7483         (check_default_tmpl_args): Likewise.
7484         (push_template_decl_real): Likewise.
7485         (convert_template_argument): Likewise.
7486         (try_class_unification): Likewise.
7487         (get_bindings_real): Likewise.
7488         (do_decl_instantiation): Likewise.
7489         * semantics.c (begin_function_definition): Likewise.
7490         (finish_member_declaration): Likewise.
7491         (check_multiple_declarators): Likewise.
7492         * typeck.c (comp_array_types): Likewise.
7493         (comptypes): Likewise.
7494         (expr_sizeof): Likewise.
7495         (build_binary_op): Likewise.
7496         (dubious_conversion_warnings): Likewise.
7497         (check_return_expr): Likewise.
7498
7499 2002-08-08  Mark Mitchell  <mark@codesourcery.com>
7500
7501         * typeck.c (build_class_member_access_expr): Do not return
7502         error_mark_node when no error has occurred.
7503
7504 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
7505
7506         * typeck.c (build_component_addr): Remove.
7507         (build_unary_op): Just check it's not a bitfield, and then build
7508         an ADDR_EXPR.
7509
7510 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
7511
7512         * class.c (convert_to_base): Correct check for error_mark_node.
7513         (create_vtable_ptr): Remove unused VFUNS_P parm.
7514
7515 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
7516
7517         * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
7518
7519 2002-08-07  Mark Mitchell  <mark@codesourcery.com>
7520
7521         Rework build_component_ref.
7522         * call.c (build_vfield_ref): Do not go through build_component_ref.
7523         (build_field_call): Use build_class_member_access_expr.
7524         (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
7525         (build_object_call): Likewise.
7526         * class.c (convert_to_base): New function.
7527         (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
7528         (instantiate_type): Handle BASELINKs.
7529         * cp-tree.def (BASELINK): New tree code.
7530         * cp-tree.h (BASELINK_P): Reimplement.
7531         (SET_BASELINK_P): Remove.
7532         (BASELINK_BINFO): Reimplement.
7533         (BASELINK_FUNCTIONS): Likewise.
7534         (BASELINK_ACCESS_BINFO): Likewise.
7535         (BASELINK_OPTYPE): Likewise.
7536         (convert_to_base): New function.
7537         (name_p): Likewise.
7538         (build_object_ref): Remove.
7539         (build_component_ref_1): Likewise.
7540         (build_component_ref): Likewise.
7541         (build_x_component_ref): Likewise.
7542         (build_class_member_access_expr): New function.
7543         (finish_class_member_access_expr): Likewise.
7544         (build_ptrmemfunc_access_expr): Likewise.
7545         * decl.c (grokdeclarator): Handle BASELINKs.
7546         * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
7547         finish_class_member_access_expr.
7548         (arg_assoc): Handle BASELINKs.
7549         (do_class_using_decl): Likewise.
7550         * error.c (dump_decl): Likewise.
7551         (dump_expr): Use build_ptrmemfunc_access_expr.
7552         * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
7553         destructors.
7554         (build_throw): Use BASELINK_FUNCTIONS.
7555         * init.c (perform_member_init): Use
7556         build_class_member_access_expr.
7557         (build_offset_ref): Handle BASELINKs.  Use
7558         build_class_member_access_expr.
7559         * method.c (hack_identifier): Likewise.
7560         * parse.y (do_id): Use BASELINK, not TREE_LIST.
7561         (primary): Remove uses of build_object_ref.
7562         * pt.c (lookup_template_function): Handle BASELINKs.
7563         (resolve_overloaded_unification): Likewise.
7564         * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
7565         (lookup_field): Use BASELINK, not TREE_LIST.
7566         (lookup_fnfiels): Likewise.
7567         (setup_class_bindings): Likewise.
7568         * semantics.c (finish_object_call_expr): Do not use
7569         build_method_call when we already know what function is being
7570         called.
7571         * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
7572         * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
7573         TREE_CHAIN.
7574         (name_p): New function.
7575         * typeck.c (build_object_ref): Remove.
7576         (build_component_ref_1): Likewise.
7577         (build_x_component_ref): Likewise.
7578         (build_class_member_access_expr): New function.
7579         (finish_class_member_access_expr): Likewise.
7580         (build_ptrmemfunc_access_expr): Likewise.
7581         (get_member_function_from_ptrfunc): Use
7582         build_ptrmemfunc_access_expr.
7583         (build_binary_op): Likewise.
7584         (build_unary_op): Likewise.
7585         (build_ptrmemfunc): Likewise.
7586         (pfn_from_ptrmemfunc): Likewise.
7587         * typeck2.c (build_m_component_ref): Adjust comment.
7588
7589 2002-08-07  Neil Booth  <neil@daikokuya.co.uk>
7590
7591         * Make-lang.in (CXX_C_OBJS): Update.
7592         * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
7593         * cp-tree.h (cxx_decode_option): Remove.
7594         * decl2.c (compare_options, lang_f_options, unsupported_options,
7595         cxx_decode_option): Remove.
7596
7597 2002-08-06  Gabriel Dos Reis  <gdr@nerim.net>
7598
7599         * typeck.c (build_x_unary_op): Handle pointer-to-member.
7600
7601 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
7602
7603         * class.c: Don't include obstack.h.
7604         (popclass):
7605         * decl2.c: Delete bogus comment.
7606         * error.c: Don't include obstack.h.
7607         * except.c: Likewise.
7608         (dump_type): Correct comment.
7609         * method.c: Don't include obstack.h.
7610         * tree.c: Likewise.
7611
7612 2002-08-04  Gabriel Dos Reis  <gdr@nerim.net>
7613
7614         Fix PR/2213
7615         * cvt.c (cp_convert_to_pointer): Reject conversions from integral
7616         expressions to pointer-to-data-member of pointer-to-member-functions.
7617
7618 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
7619
7620         * cvt.c (ocp_convert): Delete obsolete code.
7621         * parse.y (permanent_obstack): Delete declaration.
7622         * pt.c (permanent_obstack): Delete declaration.
7623         * repo.c (permanent_obstack): Delete declaration.
7624         (open_repo_file): Use xmalloc instead of permanent_obstack.
7625         (init_repo): Use xstrdup instead of permanent_obstack.
7626
7627 2002-08-04  Nathan Sidwell  <nathan@codesourcery.com>
7628
7629         * cp-tree.h (VF_DERIVED_VALUE): Remove.
7630         * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
7631
7632 2002-08-03  Nathan Sidwell  <nathan@codesourcery.com>
7633
7634         PR 7470.
7635         C++ ABI change - vfunc ordering.
7636         * class.c (add_virtual_function): Remove.
7637         (dfs_modify_all_vtables): Take list of all declared
7638         virtuals. Assign all that are not in primary base.
7639         (check_for_override): Adjust comments.
7640         (create_vtable_ptr): Take single list of virtuals. Build chain
7641         of declared virtuals here.
7642         (layout_class_type): Take single list of virtuals. Adjust.
7643         (finish_struct_1): Keep virtuals on single list. Adjust.
7644
7645 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
7646
7647         * init.c (build_member_call): Use build_new_method_call, not
7648         build_method_call.
7649
7650 2002-08-02  Krister Walfridsson  <cato@df.lth.se>
7651
7652         * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
7653
7654 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
7655
7656         * call.c (build_method_call): Issue a more helpful error message
7657         about ambiguous method names.
7658
7659 2002-08-02  Nathan Sidwell  <nathan@codesourcery.com>
7660
7661         * tree.c (build_shared_int_cst): Make cache file scope, and
7662         GTY it.
7663
7664 2002-08-02  Jason Merrill  <jason@redhat.com>
7665
7666         * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
7667         (cp_expr_size): New fn.
7668         * call.c (build_over_call): Lose empty class hackery.
7669         (convert_arg_to_ellipsis): Promote non-POD warning to error.
7670         * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
7671
7672         * semantics.c (expand_body): Do tree optimization in the function
7673         context, too.
7674
7675 2002-08-01  Neil Booth  <neil@daikokuya.co.uk>
7676
7677         * cp-tree.h: Move all warning and flag declarations to c-common.h.
7678         * decl.c: Move all warning and flag variables to c-common.c.
7679         * decl2.c: Move all warning and flag variables to c-common.c.
7680         * lex.c (flag_digraphs): Remove.
7681         (warn_traditional): Now in c-common.c.
7682
7683 2002-07-31  Mark Mitchell  <mark@codesourcery.com>
7684
7685         * call.c (build_field_call): Do not look up the field by name.
7686         (build_method_call): Simplify.
7687         (struct z_candidate): Add access_path and conversion_path.  Remove
7688         basetype_path.
7689         (convert_class_to_reference): Adjust use of
7690         add_function_candidate.
7691         (add_candidate): Add conversion_path argument.
7692         (add_function_candidate): Use it.
7693         (add_conv_dndidate): Likewise.
7694         (build_builtin_candidate): Likewise.
7695         (add_template_candidate_real): Add conversion_path argument.
7696         (add_template_conv_candidate): Likewise.
7697         (add_template_candidate): Likewise.
7698         (build_user_type_conversion_1): Use it.
7699         (build_new_function_call): Remove name lookup code.  Adjust use of
7700         add_template_candidate and add_function_candidate.
7701         (build_new_op): Likewise.
7702         (convert_like_real): Use build_special_member_call.
7703         (build_over_call): Use cand->conversion_path.
7704         (build_special_member_call): New method.
7705         (build_new_method_call): Remove name lookup code.
7706         * cp-tree.def (OFFSET_REF): Update documentation.
7707         (TEMPLATE_ID_EXPR): Likewise.
7708         * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
7709         (BASELINK_OPTYPE): Likewise.
7710         (build_new_method_call): Adjust prototype.
7711         (build_special_member_call): New method.
7712         (build_baselink): New method.
7713         (build_offset_ref_call_from_tree): Likewise.
7714         (build_call_from_tree): Likewise.
7715         (finish_qualified_call_expr): Remove.
7716         (finish_call_expr): Adjust prototype.
7717         (build_x_function_call): Remove.
7718         * cvt.c (ocp_convert): Use build_special_member_call.
7719         * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
7720         (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
7721         CALL_EXPR.
7722         (build_offset_ref_call_from_tree): New function.
7723         (build_call_from_tree): Likewise.
7724         * init.c (expand_cleanup): Use build_special_member_call.
7725         (expand_default_init): Likewise.
7726         (build_member_call): Use finish_call_expr.
7727         (build_new_1): Use build_special_member_call.
7728         (push_base_cleanups): Likewise.
7729         * method.c (do_build_assign_ref): Likewise.
7730         * parse.y (template_id): Do not pass a COMPONENT_REF to
7731         lookup_template_function.
7732         (primary): Use parse_finish_call_epxr, not finish_call_expr.
7733         (parse_finish_call_expr): New function.
7734         * pt.c (lookup_template_function): Add assertions.
7735         * search.c (lookup_base): Allow T to be a binfo.
7736         (build_baselink): New function.
7737         (lookup_member): Use it.
7738         * semantics.c (finish_call_expr): Do not do name lookup.
7739         (finish_object_call_expr): Remove #if 0'd code.
7740         (finish_qualified_call_expr): Remove.
7741         * typeck.c (build_x_function_call): Remove.
7742         (build_static_case): Use build_special_member_call.
7743         * typeck2.c (build_functional_cast): Likewise.
7744
7745 2002-07-30  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
7746
7747         * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
7748
7749 2002-07-30  Gabriel Dos Reis  <gdr@nerim.net>
7750
7751         * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
7752
7753 2002-07-30  Nathan Sidwell  <nathan@codesourcery.com>
7754
7755         * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
7756         documentation.
7757
7758 2002-07-29  Alan Modra  <amodra@bigpond.net.au>
7759
7760         * cp-tree.h: Comment typo fix.
7761
7762 2002-07-29  Richard Earnshaw  <rearnsha@arm.com>
7763
7764         * spew.c (space_for_token): Allocate zeroed memory for a new token
7765         chunk.
7766
7767 2002-07-27  Roger Sayle  <roger@eyesopen.com>
7768
7769         * decl.c (builtin_function_1): No need to explicitly mark
7770         BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
7771
7772 2002-07-27  Roger Sayle  <roger@eyesopen.com>
7773
7774         * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
7775
7776 2002-07-26  Jason Merrill  <jason@redhat.com>
7777
7778         * call.c (build_over_call): Likewise.
7779         (cp_convert_parm_for_inlining): New fn.
7780         (convert_for_arg_passing): New fn.
7781         (convert_default_arg, build_over_call): Use it.
7782         (type_passed_as): New fn.
7783         * pt.c (tsubst_decl): Use it.
7784         * decl2.c (cp_build_parm_decl): New fn.
7785         (build_artificial_parm): Use it.
7786         (start_static_storage_duration_function): Likewise.
7787         * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
7788         (grokparms): Don't mess with DECL_ARG_TYPE.
7789         * typeck.c (convert_arguments): Use convert_for_arg_passing.
7790         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
7791         Define.
7792         * cp-tree.h: Declare new fns.
7793
7794 2002-07-26  Neil Booth  <neil@daikokuya.co.uk>
7795
7796         * cp-tree.h (flag_operator_names): Remove.
7797         * decl2.c (flag_operator_names): Remove.
7798         (lang_f_options): Remove operator-names.
7799         * lex.c (D_OPNAME): Remove.
7800         (reswords): Remove operator names.
7801         (rid_to_yy): Remove operator names.
7802         (init_reswords): No need to handle D_OPNAME.
7803         * spew.c (read_process_identifier): There are no operator
7804         names.
7805
7806 2002-07-26  Jason Merrill  <jason@redhat.com>
7807
7808         * dump.c (cp_dump_tree): Call c_dump_tree.
7809         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
7810
7811 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
7812
7813         * error.c (print_whitespace): Remove.
7814         * g++spec.c (LIBUNWIND): Move.
7815         * mangle.c (mangled_position, write_signed_number): Remove.
7816
7817 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
7818
7819         * decl2.c (cxx_decode_option): Similarly.
7820
7821 2002-07-25  Gabriel Dos Reis  <gdr@nerim.net>
7822
7823         * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
7824         (cxx_sizeof_or_alignof_type): Take a third argument.
7825         (cxx_sizeof): Adjust definition.
7826         (cxx_alignof): Likewise.
7827         * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
7828         * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
7829         complaining.
7830         (c_sizeof_nowarn): Remove definition.
7831         (build_unary_op): Use cxx_sizeof_nowarn.
7832
7833 2002-07-24  Geoffrey Keating  <geoffk@redhat.com>
7834
7835         * tree.c (cp_build_qualified_type_real): When copying
7836         pointer-to-method types, unshare the record that holds
7837         the cached pointer-to-member-function type.
7838
7839 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
7840
7841         * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
7842
7843 2002-07-23  Gabriel Dos Reis  <gdr@nerim.net>
7844
7845         Fix PR/7363:
7846         * typeck.c (cxx_sizeof_or_alignof_type): New function.
7847         (c_sizeof): Remove definition.
7848         (expr_sizeof): Use cxx_sizeof.
7849         * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
7850         * decl.c (finish_destructor_body): Use cxx_sizeof.
7851         * semantics.c (finish_alignof): Likewise.
7852         (finish_alignof): Use cxx_alignof.
7853         * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
7854         (cxx_sizeof_or_alignof_type): Declare.
7855         (my_friendly_assert): Move to ../c-common.h.
7856
7857 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
7858
7859         * class.c, method.c, pt.c, search.c: Don't define obstack macros.
7860
7861 2002-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7862
7863         PR c++/7347, c++/7348
7864         * cp-tree.h (tsubst_flags_t): Add tf_parsing.
7865         * decl.c (make_typename_type): Use it.
7866         (make_unbound_class_template): Likewise.
7867         (lookup_name_real): Don't call type_access_control if scope is
7868         template parameter dependent.
7869         * parse.y (template_arg): Call make_unbound_class_template with
7870         tf_parsing set.
7871         (nest_name_specifier): Call make_typename_type with tf_parsing set.
7872         (typename_sub0): Likewise.
7873         (typename_sub1): Likewise.
7874         (instantiate_decl): Push class scope.
7875         * pt.c (regenerate_decl_from_template): Call pushclass and popclass
7876         for both static variable and member function template.
7877         (instantiate_decl) Call pushclass and popclass when tsubst'ing type
7878         and arguments.
7879         * search.c (type_access_control): Do type access for TEMPLATE_DECL
7880         too.
7881
7882 2002-07-20  Roger Sayle  <roger@eyesopen.com>
7883
7884         * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
7885         test by using positive_option.  Make whitespace consistent.
7886
7887 2002-07-20  Gabriel Dos Reis  <gdr@nerim.net>
7888
7889         * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
7890         members with 'locus'.  Adjust use throughout.
7891         (struct feed):  Likewise.
7892         (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
7893         Adjust use.
7894         (snarf_defarg): Use error(), not error_with_file_and_line().
7895
7896 2002-07-19  Chris Demetriou  <cgd@broadcom.com>
7897
7898         * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
7899         cpp_options is included.
7900
7901 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7902
7903         PR c++/2862, c++/2863
7904         * pt.c (determine_specialization): Compare the length of
7905         TYPE_ARG_TYPES.  Tidy.
7906
7907 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7908
7909         PR c++/3797
7910         * decl.c (duplicate_decls): Don't propagate inlining parameters from
7911         olddecl to newdecl when newdecl is a specialization of the
7912         instantiation olddecl.
7913
7914 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7915
7916         PR c++/4802, c++/5387
7917         * decl.c (make_typename_type): Use enforce_access.
7918
7919 2002-07-17  Scott Snyder <snyder@fnal.gov>
7920
7921         PR c++/7320
7922         * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
7923
7924 2002-07-12  Mark Mitchell  <mark@codesourcery.com>
7925
7926         * class.c (add_method): Correct handling of conversion operators.
7927
7928 2002-07-11  Mark Mitchell  <mark@codesourcery.com>
7929
7930         PR c++/7224
7931         * class.c (add_method): Simplify.
7932
7933 2002-07-11  Jason Merrill  <jason@redhat.com>
7934
7935         PR c++/7279
7936         * tree.c (cp_copy_res_decl_for_inlining): Also copy
7937         TREE_ADDRESSABLE.
7938
7939 2002-07-10  Graham Stott  <graham.stott@btinternet.com>
7940
7941         * pt.c (template_parm_this_level_p, push_template_decl_real):
7942         Pass depth as int pointer.
7943
7944 2002-07-11  Tim Josling  <tej@melbpc.org.au>
7945
7946         Remove front end hard coding from gengtype.c.
7947
7948         * config-lang.in (gtfiles): Add files needed for this front end.
7949
7950 2002-07-10  Mark Mitchell  <mark@codesourcery.com>
7951
7952         * cp-tree.h (unqualified_name_lookup_error): Declare it.
7953         (begin_function_definition): Adjust prototype.
7954         * lex.c (unqualified_name_lookup_error): New function, split out
7955         from ...
7956         (do_identifier): ... here.
7957         * parse.y (parse_begin_function_definition): New function.
7958         (fn.def1): Use it.
7959         * semantics.c (begin_function_definition): Accept decl-specifiers
7960         and attributes as separate parameters.
7961
7962 2002-07-10  Jason Merrill  <jason@redhat.com>
7963
7964         PR c++/6255
7965         * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
7966         modifying the old one.
7967
7968 2002-07-09  Mark Mitchell  <mark@codesourcery.com>
7969
7970         * cp-tree.h (constructor_name_p): Declare it.
7971         (check_template_template_default_arg): Likewise.
7972         * class.c (handle_using_decl): Use constructor_name_p.
7973         * decl.c (grokdeclarator): Likewise.
7974         * decl2.c (constructor_name_p): Define it.
7975         * init.c (build_member_call): Use constructor_name_p.
7976         * parse.y (template_parm): Use check_template_template_default_arg.
7977         * pt.c (check_explicit_specialization): Use constructor_name_p.
7978         * semantics.c (check_template_template_default_arg): New function.
7979
7980 2002-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7981
7982         * pt.c (can_complete_type_without_circularity): Add static to
7983         function definition.
7984
7985 2002-07-08  Mark Mitchell  <mark@codesourcery.com>
7986
7987         * cp-tree.h (have_extern_spec): Declare it
7988         * decl.c (have_extern_spec): Define it.
7989         (start_decl): Eliminate use of used_extern_spec.
7990         (start_function): Likewise.
7991         * parse.y (have_extern_spec): Remove declaration.
7992         (used_extern_spec): Likewise.
7993         (frob_specs): Eliminate use of used_extern_spec.
7994         (.hush_warning): Likewise.
7995
7996 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
7997
7998         * Make-lang.in (cp/parse.o): Depend on decl.h.
7999         * cp-tree.h (do_decl_instantiation): Change prototype.
8000         * parse.y: Include decl.h.
8001         (parse_decl_instantiation): New function.
8002         (explicit_instantiation): Use it.
8003         * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
8004         and DECLSPECS.
8005
8006 2002-07-07  Roger Sayle  <roger@eyesopen.com>
8007
8008         * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
8009         constructor and destructor tests when passed a TEMPLATE_DECL.
8010
8011 2002-07-05  Jason Merrill  <jason@redhat.com>
8012
8013         * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
8014         pointers.
8015
8016         PR optimization/7145
8017         * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
8018
8019 2002-07-05  Nathan Sidwell  <nathan@codesourcery.com>
8020
8021         Repair damage on weak-impared targets caused by my previous patch.
8022         * cp-tree.h (import_export_tinfo): Add parameter.
8023         * decl2.c (import_export_tinfo): Add parameter, post adjust
8024         DECL_COMDAT.
8025         * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
8026         import_export_tinfo.
8027
8028 2002-07-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8029
8030         PR c++/6944
8031         * init.c (build_aggr_init): Remove qualifiers of init before calling
8032         build_vec_init.
8033         (build_vec_init): Flatten multi-dimensional array during cleanup.
8034         (build_vec_delete_1): Abort if the type of each element is array.
8035
8036 2002-07-03  Graham Stott  <graham.stott@btinternet.com>
8037
8038         * pt.c (instantiate_class_template): Fix typo.
8039
8040 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8041
8042         * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
8043         by CVS conflict in my last patch.
8044
8045 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8046
8047         PR c++/6716
8048         * pt.c (can_complete_type_without_circularity): New function.
8049         (instantiate_class_template): Use it.
8050         * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
8051         message due to incomplete fields.
8052
8053 2002-07-01  Mark Mitchell  <mark@codesourcery.com>
8054
8055         PR c++/7112
8056         * mangle.c (write_expression): Add mangling for sizeof when
8057         applied to a type.
8058         * operators.def: Remove stale comment.
8059
8060 2002-06-30  Nathan Sidwell  <nathan@codesourcery.com>
8061
8062         * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
8063         (CPTI_TYPE_INFO_PTR_TYPE): ... this.
8064         (tinfo_decl_type): Replace with ...
8065         (type_info_ptr_type): ... this.
8066         (import_export_tinfo): Declare.
8067         (tinfo_decl_p): Rename to ...
8068         (unemitted_tinfo_decl_p): ... this.
8069         * decl2.c (import_export_decl): Break out tinfo handling into ...
8070         (import_export_tinfo): ... here. New function.
8071         (finish_file): Adjust.
8072         * rtti.c (TINFO_REAL_NAME): New macro.
8073         (init_rtti_processing): Create the tinfo types.
8074         (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
8075         (get_tinfo_decl): Adjust.
8076         (get_tinfo_ptr): New function.
8077         (get_type_id): Use it.
8078         (tinfo_base_init): Create vtable decl here, if it doesn't exist.
8079         (ptr_initializer): Use get_tinfo_ptr.
8080         (ptm_initializer): Likewise.
8081         (synthesize_tinfo_var): Break into ...
8082         (get_pseudo_ti_init): ... this. Just create the initializer.
8083         (get_pseudo_ti_desc): .. and this.
8084         (create_real_tinfo_var): Remove.
8085         (create_pseudo_type_info): Don't create the vtable decl here.
8086         (get_vmi_pseudo_type_info): Remove.
8087         (create_tinfo_types): Adjust.
8088         (tinfo_decl_p): Rename to ...
8089         (unemitted_tinfo_decl_p): ... here. Adjust.
8090         (emit_tinfo_decl): Adjust. Create the initializer.
8091
8092 2002-06-27  Mark Mitchell  <mark@codesourcery.com>
8093
8094         PR c++/6695
8095         * pt.c (tsubst_friend_class): Substitute into the context of the
8096         friend before using it.
8097
8098 2002-06-26  Mark Mitchell  <mark@codesourcery.com>
8099
8100         * cp-tree.h (xref_tag): Change prototype.
8101         (handle_class_head): Likewise.
8102         (build_x_component_ref): Likewise.
8103         * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
8104         (xref_tag): Take attributes as a separate parameter.
8105         (xref_tag_from_type): Adjust call to xref_tag.
8106         * decl2.c (build_expr_from_tree): Adjust call to
8107         build_x_component_ref.
8108         (handle_class_head): Take attributes as a separate parameter.
8109         * parse.y (parse_xref_tag): New function.
8110         (parse_handle_class_head): Likewise.
8111         (primary): Use parse_xref_tag.
8112         (class_head_decl): Use parse_handle_class_head.
8113         (class_head_defn): Likewise.
8114         * rtti.c (init_rtti_processing): Adjust call to xref_tag.
8115         (build_dynamic_cast_1): Likewise.
8116         (create_pseudo_type_info): Likewise.
8117         (emit_support_tinfos): Likewise.
8118         * typeck.c (build_object_ref): Adjust call to
8119         build_x_component_ref.
8120         (build_x_component_ref): Remove protect parameter.
8121
8122 2002-06-25  Mark Mitchell  <mark@codesourcery.com>
8123
8124         * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
8125         * class.c (handle_using_decl): Likewise.
8126         (instantiate_type): Likewise.
8127         * cp-tree.h (BASELINK_FUNCTIONS): New macro.
8128         (xref_basetypes): Change prototype.
8129         (begin_mem_initializers): New function.
8130         (get_overloaded_fn): Likewise.
8131         * decl.c (xref_basetypes): Simplify.
8132         * error.c (dump_expr): Use BASELINK_FUNCTIONS.
8133         * init.c (build_offset_ref): Likewise.
8134         * parse.y (base_init): Use begin_mem_initializers().
8135         (structsp): Adjust call to xref_basetypes.
8136         * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
8137         (instantiate_class_template): Adjust call to xref_basetypes.
8138         * semantics.c (begin_mem_initializers): New function.
8139         * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
8140         (really_overlaoded_fn): Likewise.
8141         (get_overloaded_fn): New function.'
8142         (get_first_fn): USe BASELINK_FUNCTIONS.
8143
8144 2002-06-24  Mark Mitchell  <mark@codesourcery.com>
8145
8146         * cp-tree.h (SCALAR_TYPE_P): New macro.
8147         (check_for_out_of_scope_variable): New function.
8148         (at_class_scope_p): Likewise.
8149         (finish_fname): Likewise.
8150         * class.c (finish_struct): Use at_function_scope_p.
8151         * decl.c (check_for_out_of_scope_variable): New function, split
8152         out from do_identifier.
8153         (finish_enum): Use at_function_scope_p.
8154         * lex.c (do_identifier): Use check_for_out_of_scope_variable.
8155         * parse.y (VAR_FUNC_NAME): Give it <ttype>.  Use finish_fname.
8156         (primary): Use at_function_scope_p.
8157         * search.c (at_class_scope_p): New function.
8158         * semantics.c (finish_fname): Likewise.
8159         (check_multiple_declarators): Use at_function_scope_p.
8160
8161 2002-06-23  Mark Mitchell  <mark@codesourcery.com>
8162
8163         * parse.y (parse_scoped_id): New function.
8164         (primary): Use it.
8165         * cp-tree.h (do_scoped_id): Adjust declaration.
8166         * lex.c (do_scoped_id): Remove call to yylex.
8167         * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
8168         * typeck2.c (add_exception_specifier): Use tree_cons, rather than
8169         expanding it inline.
8170
8171 2002-06-23  Matt Thomas  <matt@3am-software.com>
8172
8173         * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
8174         "#if VMS_TARGET".
8175
8176 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8177
8178         * mangle.c (integer_type_codes): Const-ify.
8179
8180 2002-06-20  Richard Henderson  <rth@redhat.com>
8181
8182         PR c++/6747
8183         * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
8184         Call put_var_into_stack.
8185
8186 2002-06-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8187
8188         * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
8189         array size calculation.
8190
8191 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8192
8193         PR c++/6892
8194         * pt.c (tsubst_expr): Handle FILE_STMT.
8195
8196 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8197
8198         PR c++/6723
8199         * pt.c (lookup_template_class): Don't build complete argument of
8200         BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
8201         argument.
8202
8203 2002-06-19  Akim Demaille  <akim@epita.fr>
8204
8205         * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
8206         decl.h's TYPENAME.
8207         * spew.c, lex.c: Adjust.
8208         * parse.y (explicit_instantiation): Add empty action to override
8209         the default $$ = $1 where it introduces a type clash.
8210
8211 2002-06-14  Jason Merrill  <jason@redhat.com>
8212
8213         * semantics.c (begin_for_stmt): Push the 'for' scope before
8214         adding the FOR_STMT.
8215
8216         C++ ABI changes.
8217         * class.c (build_base_field): Set DECL_PACKED.
8218         (layout_class_type): Don't use tail padding of PODs.
8219         * mangle.c (write_unqualified_name): Fix template conversion op
8220         mangling.
8221
8222 2002-06-16  Richard Henderson  <rth@redhat.com>
8223
8224         PR opt/6793
8225         * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
8226         after template instantiation.
8227
8228 2002-06-16  Richard Henderson  <rth@redhat.com>
8229
8230         * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
8231
8232 2002-06-15  Gabriel Dos Reis  <gdr@codesourcery.com>
8233
8234         * cp-tree.h (compiler_error): Remove declaration.
8235         * lex.c (compiler_error): Remove definition.
8236
8237 2002-06-14  Steve Ellcey  <sje@cup.hp.com>
8238
8239         * g++spec.c (LIBUNWIND): New.
8240         (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
8241
8242 2002-06-13  Jessica Han  <jessica@cup.hp.com>
8243
8244         * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
8245         (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
8246         (build_vbase_offset_vtbl_entries): Likewise.
8247         * rtti.c (build_headof): Likewise.
8248         (get_tinfo_decl_dynamic): Likewise.
8249         (create_pseudo_type_info): Likewise.
8250
8251 2002-06-12  Stan Shebs  <shebs@apple.com>
8252
8253         * mpw-config.in: Remove file, no longer used.
8254         * mpw-make.sed: Ditto.
8255
8256 2002-06-07  Zack Weinberg  <zack@codesourcery.com>
8257
8258         * decl2.c: Update call to cpp_handle_option.
8259
8260 2002-06-07  H.J. Lu  (hjl@gnu.org)
8261
8262         * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
8263
8264 2002-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
8265
8266         * error.c (cp_error_at): Fix typo.
8267
8268 2002-06-04  Gabriel Dos Reis  <gdr@codesourcery.com>
8269
8270         * error.c (cp_diagnostic_starter): Adjust call.
8271         (maybe_print_instantiation_context): Change prototype to take a
8272         'diagnostic_info *'.
8273         (print_instantiation_full_context): Likewise.
8274         (print_instantiation_partial_context): Likewise.
8275         (cp_diagnostic_starter): Likewise.
8276         (cp_diagnostic_finalizer): Likewise.
8277         (cp_print_error_function): Likewise.
8278         (cp_printer): Take a secondary parameter as a 'text_info *'.
8279         Remove output_state savings.  Adjust calls.
8280
8281 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
8282
8283         * pt.c (inline_parm_levels): Mark for GC.
8284
8285         * mangle.c (start_mangling): Allocate G.substitutions here...
8286         (init_mangle): ... rather than here.
8287         (finish_mangling): Clear the varray pointer when done with it.
8288         * spew.c (yylexstring): Don't use VARRAY_FREE.
8289         * search.c (bfs_walk): Don't use VARRAY_FREE.
8290         * decl2.c (pending_statics): Use gengtype to mark.
8291         (deferred_fns): Likewise.
8292         (ssdf_decls): Likewise.
8293         (init_decl2): Delete.
8294         * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
8295         (cxx_init_decl_processing): Don't call init_decl2.
8296         (cxx_pop_function_context): Don't use VARRAY_FREE.
8297         * cp-tree.h (struct saved_scope): No need for special marking
8298         of varrays.
8299         (struct language_function): Likewise.
8300         (local_classes): Use gengtype to mark.
8301         (init_decl2): Delete prototype.
8302         * class.c (init_class_processing): Don't use
8303         ggc_add_tree_varray_root.
8304         (build_vtbl_initializer): Don't use VARRAY_FREE.
8305
8306         * decl.c (typename_compare): Don't use same_type_p.
8307
8308         * decl.c: Include hashtab.h instead of hash.h.
8309         (typename_hash): Update to use htab_h.
8310         (typename_compare): Likewise.
8311         (typename_htab): Use gengtype to mark.
8312         (build_typename_type): Update to use htab_h.
8313         * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
8314
8315         * Make-lang.in (gt-cp-tree.h): New rule.
8316         (cp/tree.o): Depend on gt-cp-tree.h.
8317         * config-lang.in (gtfiles): Add cp/tree.c.
8318         * tree.c: Include gt-cp-tree.h.
8319         (list_hash_table): Use gengtype to mark.
8320         (init_tree): Use gengtype to mark trees.
8321
8322         * Make-lang.in (cp/decl.o): Add debug.h dependency.
8323         * call.c (struct z_candidate): Use gengtype.
8324         (USER_CONV_CAND): Use WRAPPER_ZC.
8325         (convert_class_to_reference): Use build_zc_wrapper.
8326         (build_type_conversion_1): Likewise.
8327         (build_over_call): Use WRAPPER_ZC.
8328         (add_warning): Use build_zc_wrapper.
8329         * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
8330         * cp-tree.h (struct lang_identifier): Use gengtype.
8331         (struct template_parm_index_s): Likewise.
8332         (struct ptrmem_cst): Likewise.
8333         (struct tree_binding): Likewise.
8334         (struct tree_overload): Likewise.
8335         (struct tree_srcloc): Likewise.
8336         (struct tree_wrapper): Likewise.  Also modify to have a pointer
8337         to struct z_candidate rather than void.
8338         (enum cp_tree_node_structure_enum): New.
8339         (union lang_tree_node): New.
8340         (cxx_mark_tree): Delete prototype.
8341         (cp_tree_node_structure): New prototype.
8342         (build_ptr_wrapper): Delete prototype.
8343         (build_int_wrapper): Delete prototype.
8344         (build_zc_wrapper): New prototype.
8345         * decl.c: Include debug.h
8346         (cxx_mark_tree): Delete.
8347         (cp_tree_node_structure): New.
8348         * tree.c (build_ptr_wrapper): Delete.
8349         (build_int_wrapper): Delete.
8350         (build_zc_wrapper): New.
8351
8352         * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
8353         Correct typo.  Patch from k_fukui@highway.ne.jp.
8354
8355         * semantics.c (current_stmt_tree): Update for change to
8356         struct language_function.
8357         (finish_mem_initializers): Likewise.
8358         * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
8359         * cp-tree.h (struct language_function): Rename from
8360         cp_language_function.  Change all uses.
8361         (cp_function_chain): Don't need to cast.
8362
8363         * class.c (duplicate_tag_error): Reset discriminator.
8364         (check_bases_and_members): Update for data structure changes.
8365         * cp-tree.h (struct lang_id2): Use gengtype.
8366         (flagged_type_tree): Likewise.
8367         (SET_LANG_ID): Use GGC on struct lang_id2.
8368         (struct cp_language_function): Use gengtype.  Remove field
8369         'x_vcalls_possible_p'.
8370         (current_vcalls_possible_p): Delete.
8371         (struct lang_type_header): New.
8372         (struct lang_type_class): Rename from struct lang_type.  Include
8373         struct lang_type_header.
8374         (struct lang_type_ptrmem): New.
8375         (struct lang_type): New.
8376         (LANG_TYPE_CLASS_CHECK): New.  Use it in all the appropriate macros.
8377         (LANG_TYPE_PTRMEM_CHECK): New.  Use it in all the appropriate macros.
8378         (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
8379         (struct lang_decl_flags): Use gengtype.  Add discriminators.
8380         (struct lang_decl): Use gengtype.  Add and use discriminators.
8381         Update the macros that reference moved fields.
8382         (LANG_DECL_U2_CHECK): New function.  Use it when appropriate.
8383         (SET_DECL_THUNK_P): Set discriminator too.
8384         (clear_inline_text_obstack): Delete prototype.
8385         (finish_inline_definitions): Delete prototype.
8386         (mark_pending_inlines): Delete prototype.
8387         (lang_check_failed): New prototype.
8388         * decl.c (struct named_label_use_list): Use gengtype.
8389         (struct named_label_list): Likewise.
8390         (mark_binding_level): Delete.
8391         (mark_named_label_lists): Delete.
8392         (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
8393         (cxx_init_decl_processing): Use generated marker routine.
8394         (begin_destructor_body): Delete dead set to
8395         current_vcalls_possible_p.
8396         (mark_lang_function): Delete.
8397         (mark_cp_function_context): Delete.
8398         (lang_mark_tree): Use generated marker routines.
8399         * decl2.c (start_objects): Set discriminator when setting
8400         GLOBAL_INIT_PRIORITY.
8401         * lex.c (retrofit_lang_decl): Set discriminators.
8402         (copy_lang_type): Update for changes to lang_type structure.
8403         (cp_make_lang_type): Set discriminator.
8404         * parse.y: Use gengtype on YYLVAL.  Don't use dots in identifiers.
8405         * search.c: Include ggc.h.
8406         * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
8407         (finish_inline_definitions): Delete.
8408         * spew.c (struct token): Use gengtype.
8409         (struct token_chunk): New.
8410         (struct unparsed_text): Use gengtype.  Store tokens in chunks.
8411         (struct feed): Use gengtype.
8412         (feed_obstack): Delete.
8413         (feed): Mark as GC root.
8414         (pending_inlines): Mark as GC root.
8415         (pending_inlines_tail): Likewise.
8416         (processing_these_inlines): Likewise.
8417         (token_obstack): Make static.
8418         (first_token): Likewise.
8419         (init_spew): Don't initialize deleted things; use gengtype for roots.
8420         (clear_inline_text_obstack): Delete.
8421         (feed_input): Use GC for struct feed.  Update for changes to
8422         struct unparsed_text.
8423         (mark_pending_inlines): Delete.
8424         (next_token): Rename from add_token.  Change all callers.  Update
8425         for changes to struct unparsed_text.
8426         (space_for_token): New.
8427         (remove_last_token): New.
8428         (alloc_unparsed_text): New.
8429         (snarf_block): Take an unparsed_text.  Update for changes to struct
8430         unparsed_text.
8431         (snarf_method): Update for changes to struct unparsed_text.
8432         (snarf_defarg): Update for changes to struct unparsed_text.
8433         * tree.c (lang_check_failed): New.
8434
8435         * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
8436         gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
8437         (cp/spew.o): Add dependency on gt-<filename>.h.
8438         (cp/decl2.o): Add dependency on gt-<filename>.h.
8439         (cp/call.o): Add dependency on gt-<filename>.h.
8440         (cp/pt.o): Add dependency on gt-<filename>.h.
8441         (cp/repo.o): Add dependency on gt-<filename>.h.
8442         (cp/parse.o): Add dependency on gt-<filename>.h.
8443         * call.c: Use gengtype for roots.
8444         * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
8445         decl2.c parse.y pt.c repo.c spew.c.
8446         * cp-tree.h: Use gengtype for roots.
8447         (struct saved_scope): Use GGC, gengtype.
8448         (cp_parse_init): Delete prototype.
8449         (init_pt): Delete prototype.
8450         * decl.c: Use gengtype for roots.
8451         (mark_saved_scope): Delete.
8452         (cxx_init_decl_processing): Don't call deleted initilisation
8453         routines.
8454         (signed_size_zero_node): Delete, unused.
8455         * decl.h: Use gengtype for roots.
8456         * decl2.c: Use gengtype for roots.
8457         * lex.h: Use gengtype for roots.
8458         * parse.y: Use gengtype for roots.
8459         (cp_parse_init): Delete.
8460         * pt.c: Use gengtype for roots.
8461         (init_pt): Delete.
8462         * repo.c: Use gengtype for roots.
8463         * spew.c: Use gengtype for roots.
8464
8465         * Make-lang.in: Allow for filename changes.  Add gtype-cp.h.
8466         (cp/decl.o): Add dependency on gtype-cp.h.
8467         * decl.c: Remove use of add_deletable_root, use GTY marker instead.
8468         Include gtype-cp.h.  Allow for filename changes.
8469
8470         * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
8471         (cp/decl.o): Add cp/gt-decl.h dependency.
8472         * config-lang.in (gtfiles): New.
8473         * tree.h: Rename struct binding_level to struct cp_binding_level.
8474         * decl.c: Rename struct binding_level to struct cp_binding_level.
8475         Include cp/gt-decl.h.
8476         (struct cp_binding_level): Use gengtype.
8477         (make_binding_level): Use GGC on struct cp_binding_level.
8478         (mark_binding_level): Use gt_ggc_m_cp_binding_level.
8479         (cxx_init_decl_processing): Mark free_binding_level as
8480         deletable.
8481
8482         * decl.c (mark_cp_function_context): Update calling sequence.
8483
8484         * decl.c (start_function): Don't free 'struct
8485         cp_language_function'.
8486         (pop_cp_function_context): Likewise.
8487         (save_function_data): Allocate it using GC.
8488         * semantics.c (genrtl_start_function): Don't free 'struct
8489         cp_language_function'.
8490
8491 2002-05-31  Matthew Woodcraft  <mattheww@chiark.greenend.org.uk>
8492
8493         * lang-specs.h: Use cpp_debug_options.
8494
8495 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
8496
8497         * mangle.c, tree.c: Include real.h.
8498         * Make-lang.in: Update dependency lists.
8499
8500 2002-05-25  Neil Booth  <neil@daikokuya.demon.co.uk>
8501
8502         * lex.c: Don't include c-lex.h.
8503         * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
8504
8505 2002-05-23  Neil Booth  <neil@daikokuya.demon.co.uk>
8506
8507         * spew.c (yyungetc, snarf_block): Remove indent_level handling.
8508
8509 2002-05-22  Richard Henderson  <rth@redhat.com>
8510
8511         * decl.c (obscure_complex_init): Check for VAR_DECL
8512         before using DECL_THREAD_LOCAL.
8513
8514 2002-05-22  Richard Henderson  <rth@redhat.com>
8515
8516         * decl.c (check_tag_decl): Handle RID_THREAD.
8517         (obscure_complex_init): Reject run-time init of tls.
8518         (grokvardecl, grokdeclarator): Handle RID_THREAD.
8519         * lex.c (reswords): Add __thread.
8520         (rid_to_yy): Map RID_THREAD to SCSPEC.
8521
8522 2002-05-22  Neil Booth  <neil@daikokuya.demon.co.uk>
8523
8524         * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
8525         * cp-tree.h (cxx_post_options): Kill.
8526         * cp-lex.c (cxx_post_options): Kill.
8527
8528 2002-05-21  Richard Henderson  <rth@redhat.com>
8529
8530         * lex.c (rid_to_yy): Add RID_THREAD.
8531
8532 2002-05-21  Alexandre Oliva  <aoliva@redhat.com>
8533
8534         * init.c (build_vec_init): Test for trivial copy-assignment when
8535         copy-assigning arrays.
8536
8537 2002-05-20  Andreas Jaeger  <aj@suse.de>
8538
8539         * init.c (build_default_init): Remove unused variable.
8540
8541 2002-05-20  Alexandre Oliva  <aoliva@redhat.com>
8542
8543         * call.c (any_strictly_viable): New.
8544         (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
8545
8546 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8547
8548         * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
8549
8550 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8551
8552         PR c++/186, DR 259
8553         * pt.c (do_decl_instantiation): Don't complain explicit
8554         instantiation after explicit specialization.
8555         (do_type_instantiation): Likewise.
8556
8557 2002-05-19  Alexandre Oliva  <aoliva@redhat.com>
8558
8559         * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
8560         renamed from...
8561         (complete_type_or_else): ... this.  Redefined as macro.
8562         (cxx_incomplete_type_diagnostic): Declare.
8563         (cxx_incomplete_type_error): Define as macro.
8564         * init.c (build_delete): Warn about incomplete types other than
8565         void, and use the built-in operator delete for them.
8566         * typeck.c (complete_type_or_diagnostic): Renamed from
8567         complete_type_or_else.  Added warn_only argument, passed to...
8568         * typeck2.c (cxx_incomplete_type_diagnostic): ... this.  Print
8569         warnings or errors depending on new warn_only argument.  Renamed
8570         from...
8571         (cxx_incomplete_type_error): ... this.  New implementation in
8572         terms of cxx_incomplete_type_diagnostic.
8573
8574 2002-05-18  Jason Merrill  <jason@redhat.com>
8575
8576         PR c++/6611
8577         * decl2.c (import_export_decl): If we clear
8578         DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
8579
8580 2002-05-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8581
8582         PR c++/6620
8583         * pt.c (verify_class_unification): Don't check if PARM is template
8584         parameter dependent.  Simplify.
8585         (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
8586         parameter dependent expression.
8587
8588 2002-05-14  Jason Merrill  <jason@redhat.com>
8589
8590         * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
8591         Do set DECL_COMDAT.
8592         (synthesize_tinfo_var): Take the public decl.
8593         (create_real_tinfo_var): Likewise.  Check DECL_COMDAT.
8594         (emit_tinfo_decl): Adjust.  Call import_export_decl.
8595         * decl2.c (import_export_decl): Simplify tinfo decl handling.
8596
8597 2002-05-14  Alexandre Oliva  <aoliva@redhat.com>
8598
8599         * cp-tree.h (struct lang_type): Added non_zero_init.
8600         (CLASSTYPE_NON_ZERO_INIT_P): New macro.
8601         (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
8602         * class.c (check_field_decls): Test non_zero_init.
8603         * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
8604         zero-to-NULL conversions.
8605         * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
8606         type that needs zero-initialization without zeros.
8607         (check_initializer_decl): Compute zero-initializer for types
8608         that require a non-trivial one.
8609         * init.c (build_forced_zero_init): New function.
8610         (build_default_init): Use it.
8611         * tree.c (zero_init_p): New function.
8612         * typeck2.c (force_store_init_value): New function.
8613         (process_init_constructor): Create non-trivial zero-initializers
8614         for array members and class fields.
8615
8616 2002-05-14  Neil Booth  <neil@daikokuya.demon.co.uk>
8617
8618         * lang-specs.h: Remove redundant -lang-c++.
8619
8620 2002-05-13  Jason Merrill  <jason@redhat.com>
8621
8622         * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
8623         (fixed_type_or_null): See through reference vars.
8624         (build_base_path): Vtable contents are constant.
8625         * typeck.c (get_member_function_from_ptrfunc): Likewise.
8626
8627 2002-05-12  Jason Merrill  <jason@redhat.com>
8628
8629         * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
8630         structs are safe.
8631
8632 2002-05-09  Neil Booth  <neil@daikokuya.demon.co.uk>
8633
8634         * cp-tree.h (flag_ansi): Remove.
8635         * decl2.c (flag_ansi): Remove.
8636         (cxx_decode_option): Set flag_iso and flag_undef.
8637
8638 2002-05-09  Jason Merrill  <jason@redhat.com>
8639
8640         * typeck.c (get_member_function_from_ptrfunc): Reorganize.
8641         Use subtraction rather than a bitmask to get the index.
8642         * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
8643
8644         * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
8645
8646 2002-05-07  Neil Booth  <neil@daikokuya.demon.co.uk>
8647
8648         * Make-lang.in (decl2.o): Update.
8649         * cp-tree.h (warn_multichar): Remove.
8650         * decl2.c: Include c-common.h.
8651         (warn_multichar): Remove.
8652
8653 2002-05-03  Jason Merrill  <jason@redhat.com>
8654
8655         * tree.c (build_cplus_array_type): Only const and volatile get
8656         special handling.
8657
8658         * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
8659
8660 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
8661
8662         ABI change, returning simple classes from functions.
8663         * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
8664         TYPE_HAS_TRIVIAL_INIT_REF is false or
8665         TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
8666
8667 2002-04-30  Jason Merrill  <jason@redhat.com>
8668
8669         PR debug/6436
8670         * decl.c (grokdeclarator): Don't override TYPE_NAME of an
8671         anonymous class with a typedef if there are attributes.
8672
8673 2002-04-29  Paul Eggert  <eggert@twinsun.com>
8674
8675         * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
8676
8677 2002-04-29  Jakub Jelinek  <jakub@redhat.com>
8678
8679         PR c++/6477
8680         * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
8681         non-NULL first.
8682
8683 2002-04-29  Mark Mitchell  <mark@codesourcery.com>
8684
8685         PR c++/6492
8686         * pt.c (tsubst_friend_class): If the friend has an explicit scope,
8687         enter that scope before name lookup.
8688
8689         PR c++/6486
8690         * method.c (do_build_copy_constructor): Avoid building
8691         cv-qualified reference types.
8692
8693 2002-04-29  Nathan Sidwell  <nathan@codesourcery.com>
8694
8695         PR c++/5719
8696         * decl.c (grok_op_properties): Assignment ops don't have to return
8697         by value. operator% should.
8698
8699 2002-04-28  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
8700
8701         PR c/6343
8702         * decl.c (duplicate_decls): Call merge_weak.
8703
8704 2002-04-26  Richard Henderson  <rth@redhat.com>
8705
8706         * parse.y (malloced_yyss, malloced_yyvs): New.
8707         (yyoverflow): Re-add.  Set them.
8708         (free_parser_stacks): New.
8709
8710 2002-04-26  Mark Mitchell  <mark@codesourcery.com>
8711
8712         PR c++/6497
8713         * method.c (do_build_assign_ref): Pass a derivation to
8714         build_method_call when calling base class assignment operators.
8715
8716 2002-04-26  Richard Henderson  <rth@redhat.com>
8717
8718         * parse.y (yyoverflow): Revert.
8719
8720 2002-04-26  Richard Henderson  <rth@redhat.com>
8721
8722         PR c/3581
8723         * parse.y (string): Remove.  Update all uses to use STRING
8724         instead, and not call combine_strings.
8725         * rtti.c (tinfo_name): Use fix_string_type.
8726         * semantics.c (finish_asm_stmt): Don't call combine_strings.
8727         * spew.c (yylexstring): New.
8728         (read_token): Use it.
8729
8730 2002-04-25  Richard Henderson  <rth@redhat.com>
8731
8732         PR c/2161
8733         * parse.y (yyoverflow): New.
8734
8735 2002-04-25  Jason Merrill  <jason@redhat.com>
8736
8737         PR c++/5607
8738         * search.c (check_final_overrider): No longer static.
8739         * class.c (update_vtable_entry_for_fn): Call it.
8740         * cp-tree.h: Adjust.
8741
8742 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
8743
8744         * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
8745         * cp-tree.h (cxx_set_yydebug): Die.
8746         * lex.c (YYDEBUG): Get from c-lex.h.
8747         (cxx_set_yydebug): Remove.
8748         * parse.y: Include c-lex.h.
8749         (YYDEBUG): Get from c-lex.h.
8750
8751 2002-04-24  Mark Mitchell  <mark@codesourcery.com>
8752
8753         PR c++/6438.
8754         * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
8755         void.
8756
8757 2002-04-24  Neil Booth  <neil@daikokuya.demon.co.uk>
8758
8759         * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
8760         LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
8761         Redefine.
8762         * cp-tree.h (cp_attribute_table): Rename.
8763         * decl.c (lang_attribute_table): Remove declaration.
8764         (cxx_init_decl_processing): Don't set it.
8765         * tree.c (cp_attribute_table): Rename.
8766
8767 2002-04-24  Jason Merrill  <jason@redhat.com>
8768
8769         PR c++/6331
8770         * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
8771         * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
8772         The pedwarn for array assignment is now unconditional.
8773         * tree.c (build_cplus_array_type_1): Still process simple array types
8774         normally in templates.
8775
8776         PR c++/6395
8777         * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
8778         stuff for comdats.
8779
8780 2002-04-23  Jakub Jelinek  <jakub@redhat.com>
8781
8782         * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
8783         node with attributes.
8784
8785 2002-2-23  David O'Brien  <obrien@FreeBSD.org>
8786
8787         * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
8788         Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
8789
8790 2002-04-23  Mark Mitchell  <mark@codesourcery.com>
8791
8792         PR c++/6256:
8793         * pt.c (tsubst_friend_class): Handle templates with explicit
8794         nested names.
8795
8796         PR c++/6331:
8797         * typeck.c (merge_types): Remember the cv-qualification of pointer
8798         types when merging them.
8799
8800 2002-04-20  Neil Booth  <neil@daikokuya.demon.co.uk>
8801
8802         * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
8803         LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
8804         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
8805         cxx_mark_function_context): New.
8806         * decl.c (push_cp_function_context, pop_cp_function_context,
8807         mark_cp_function_context): Rename for consistency.
8808         (cxx_init_decl_processing): Don't set old hooks.
8809
8810 2002-04-19  Neil Booth  <neil@daikokuya.demon.co.uk>
8811
8812         * call.c (convert_type_from_ellipsis): Rename, update.
8813         * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
8814         * cp-tree.h (convert_type_from_ellipsis): Rename.
8815         * decl.c (cxx_init_decl_processing): Don't set hook.
8816
8817 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
8818
8819         * call.c (build_new_method_call): Update.
8820         * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
8821         * cp-tree.h (cxx_incomplete_type_error): New.
8822         * decl.c (grokdeclarator, grokparms): Update.
8823         * decl2.c (check_classfn): Update.
8824         * pt.c (tsubst): Update.
8825         * typeck.c (complete_type_or_else, expr_sizeof,
8826         decay_conversion): Update.
8827         * typeck2.c (incomplete_type_error): Rename.
8828         (add_exception_specifier): Update.
8829
8830 2002-04-18  Jason Merrill  <jason@redhat.com>
8831
8832         PR c++/5658
8833         * search.c (setup_class_bindings): A class template qualifies as a
8834         type binding.
8835
8836 2002-04-17  Jakub Jelinek  <jakub@redhat.com>
8837
8838         PR c++/6316
8839         * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
8840         before expanding.
8841
8842 2002-04-16  Mark Mitchell  <mark@codesourcery.com>
8843
8844         * init.c (begin_init_stmts): Remove commented out code.
8845         (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
8846         * semantics.c (begin_gobal_stmt_expr): Adjust call to
8847         expand_start_stmt_expr.
8848
8849 2002-04-15  Mark Mitchell  <mark@codesourcery.com>
8850
8851         * decl.c (register_dtor_fn): Pass the address of dso_handle, not
8852         dso_handle itself, to __cxa_atexit.
8853
8854 2002-04-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
8855
8856         * error.c (cxx_print_error_function): Adjust call to macros.
8857
8858 2002-04-14  Jakub Jelinek  <jakub@redhat.com>
8859
8860         * class.c (layout_virtual_bases): Do all dsize computation on trees.
8861
8862 2002-04-14  Jason Merrill  <jason@redhat.com>
8863
8864         * typeck.c (get_member_function_from_ptrfunc): Don't do
8865         gratuitious division and multiplication on
8866         ptrmemfunc_vbit_in_delta targets.
8867
8868 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
8869
8870         PR c++/5373.
8871         * semantics.c (finish_expr_stmt): Remember the type of the
8872         expression before any conversions are performed.
8873
8874 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
8875
8876         PR c++/5189.
8877         * call.c (add_template_candidate_real): Do not treat member
8878         templates as copy constructors.
8879
8880 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
8881
8882         * decl.c (duplicate_decls): Do not copy the RTL for a variable
8883         declaration if the old variable had an incomplete type and the new
8884         variable does not.
8885         (complete_vars): Do not call layout_decl for completed variables.
8886
8887 2002-04-12  Richard Sandiford  <rsandifo@redhat.com>
8888
8889         * decl.c (duplicate_decls): Don't try to unify an implicit typedef
8890         with an explicit one.
8891         (follow_tag_typedef): New.
8892         (lookup_tag): Use it to extract the tag of an explicit typedef.
8893         (xref_tag): Likewise.
8894
8895 2002-04-11  Andrew Haley  <aph@redhat.com>
8896
8897         * typeck.c (type_after_usual_arithmetic_conversions):
8898         If two types have the same variant, return immediately.
8899         When two floating-point operands are the same precision:
8900           convert to float if one of the operands is float;
8901           if neither operand is one of the standard types, return the type
8902           of the first operand.
8903
8904 2002-04-10  Nathan Sidwell  <nathan@codesourcery.com>
8905
8906         PR c++/5507
8907         * decl.c (make_typename_type): Remove implicit typenameness.
8908
8909 2002-04-09  Jason Merrill  <jason@redhat.com>
8910
8911         PR optimization/6189
8912         * semantics.c (genrtl_start_function): Don't free
8913         DECL_SAVED_FUNCTION_DATA for inline functions.
8914
8915         * init.c (build_member_call): For now, don't convert to
8916         intermediate base if it would cause an error.
8917
8918 2002-04-08  Paolo Carlini  <pcarlini@unitus.it>
8919
8920         * parse.y (namespace_qualifier, maybe_identifier,
8921         begin_explicit_instantiation, end_explicit_instantiation,
8922         apparent_template_type, .finish_template_type,
8923         do_id, maybe_init, defarg_again, component_decl_1):
8924         Add ending ';', in accordance with POSIX.
8925
8926 2002-04-06  Mark Mitchell  <mark@codesourcery.com>
8927
8928         PR c++/5571
8929         * class.c (layout_class_type): Remember incomplete static
8930         variables.
8931         (finish_struct_1): Call complete_vars, not
8932         hack_incomplete_structures.
8933         * cp-tree.h (hack_incomplete_structures): Rename to ...
8934         (complete_vars): ... this.
8935         (struct saved_scope): Remove incomplete.
8936         (namespace_scope_incomplete): Remove.
8937         * decl.c (struct binding_level): Remove incomplete.
8938         (incomplete_vars): New variable.
8939         (mark_binding_level): Don't mark incomplete.
8940         (print_binding_level): Don't print it.
8941         (mark_saved_scope): Don't mark incomplete.
8942         (pushdecl): Use maybe_register_incopmlete_var.
8943         (cxx_init_decl_processing): Register incomplete_vars for GC.
8944         (start_decl_1): Clarify error message.
8945         (hack_incomplete_vars): Remove.
8946         (maybe_register_incomplete_var): New function.
8947         (complete_vars): Likewise.
8948
8949 2002-04-06  Jason Merrill  <jason@redhat.com>
8950
8951         PR c++/4934
8952         * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
8953         set before checking it.
8954
8955         PR c++/525
8956         * init.c (build_member_call): Use build_scoped_ref.
8957         (resolve_offset_ref): Likewise.
8958         * call.c (build_scoped_method_call): Likewise.
8959         * tree.c (maybe_dummy_object): Kludge around current_class_type being
8960         wrong.
8961         * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
8962         * cp-tree.h: Adjust.
8963
8964         * init.c (push_base_cleanups): Just use build_scoped_method_call.
8965
8966         PR c++/6179
8967         * method.c (implicitly_declare_fn): Pass unqualified type to
8968         synthesize_exception_spec.
8969
8970 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
8971
8972         * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
8973         * cvt.c: Update comment.
8974         * init.c (expand_cleanup_for_base): Update.
8975         * semantics.c (finish_parenthesized_expr): Update.
8976         * typeck.c (cp_truthvalue_conversion): Update.
8977
8978 2002-04-04  Jason Merrill  <jason@redhat.com>
8979
8980         * semantics.c (finish_eh_cleanup): New fn.
8981         * cp-tree.h: Add prototype.
8982         * init.c (perform_member_init, expand_cleanup_for_base): Use
8983         finish_eh_cleanup.
8984         * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
8985         * cp-tree.h: Remove references.
8986         * decl.c (begin_constructor_body, end_constructor_body): Likewise.
8987         * dump.c (cp_dump_tree): Likewise.
8988         * pt.c (tsubst_expr): Likewise.
8989         * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
8990         (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
8991         * tree.c (cp_statement_code_p): Likewise.
8992
8993         * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
8994
8995         PR c++/5636
8996         * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
8997         cleanup for nrv.
8998
8999         PR c++/5104
9000         * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
9001         specifiers.
9002         [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
9003
9004 2002-04-03  Richard Henderson  <rth@redhat.com>
9005
9006         * cp-lang.c (cxx_warn_unused_global_decl): New.
9007         (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
9008
9009 2002-04-03  Neil Booth  <neil@daikokuya.demon.co.uk>
9010
9011         * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
9012         * tree.c (init_tree): Don't set hook.
9013
9014 2002-04-03  Roger Sayle  <roger@eyesopen.com>
9015
9016         PR c++/5998:
9017         * decl.c (duplicate_decls): Don't mess with assembler names when
9018         redeclaring builtin functions as static.
9019
9020 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
9021
9022         * call.c (build_addr_func): Update.
9023         * class.c (resolve_address_of_overloaded_function): Update.
9024         * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
9025         * cp-tree.h (cxx_mark_addressable): New.
9026         * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
9027         * decl2.c (build_cleanup): Update.
9028         * except.c (build_throw): Update.
9029         * init.c (resolve_offset_ref): Update.
9030         * pt.c (convert_nontype_argument): Update.
9031         * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
9032         * typeck.c (decay_conversion, build_array_ref, build_unary_op,
9033         unary_complex_lvalue): Update.
9034         (mark_addressable): Rename.
9035
9036 2002-04-01  Roger Sayle  <roger@eyesopen.com>
9037
9038         PR c++/5998:
9039         * decl.c (duplicate_decls):  Overwrite the RTL when (and only
9040         when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
9041         but follow the SET_DECL_RTL idiom used elsewhere in the function.
9042
9043 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
9044
9045         * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
9046         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
9047         * decl.c (grokdeclarator): Update.
9048         * mangle.c (write_integer_cst): Update.
9049         * typeck.c (build_binary_op): Update.
9050
9051 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
9052
9053         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
9054         * lex.c (cxx_init): Don't set hook.
9055
9056 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
9057
9058         * Make-lang.in (error.o): Update.
9059         * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
9060         * cp-tree.h (struct diagnostic_context): Predeclare.
9061         (cxx_print_error_function): New.
9062         * error.c: Include langhooks-def.h.
9063         (lang_print_error_function): Rename.  Update.
9064         (init_error): Don't set hook.
9065
9066 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
9067
9068         * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
9069         Redefine.
9070         * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
9071         * decl.c (finish_enum): Similarly.
9072         * error.c (dump_type): Similarly.
9073         * lex.c (cxx_init): Similarly.
9074         * mangle.c (write_builtin_type): Similarly.
9075         * typeck.c (comptypes): Similarly.
9076
9077 2002-03-28  Roger Sayle  <roger@eyesopen.com>
9078
9079         PR c++/5998:
9080         * decl.c (cxx_init_decl_processing): Re-enable built-in functions
9081         in the g++ front-end.
9082         (duplicate_decl): Allow redefinition of anticipated built-ins.
9083         Fix inlining problem by over-writing the old DECL_RTL.
9084         (lookup_namespace_name): Fail to find an identifier in the
9085         specified namespace if its still anticipated.
9086         (builtin_function_1): New function split out from builtin_function
9087         to create a builtin in the current namespace with given context.
9088         (builtin_function): Call builtin_function_1 to define the
9089         appropriate builtins in both the std and global namespaces.
9090         (select_decl): Don't test for anticipated decls here.
9091         (unqualified_namespace_lookup): Instead ignore them whilst
9092         searching through scopes and namespaces.
9093         * decl2.c (do_nonmember_using_decl): If a using declaration
9094         specifies an anticipated built-in function, mark it as no longer
9095         anticipated in that scope.
9096         (ambiguous_decl):  Avoid resolving to an anticipated decl.
9097         * lex.c (do_scoped_id): Fail to find an identifier in the global
9098         namespace if its still anticipated.
9099
9100 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
9101
9102         * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
9103         * cp-tree.h (cp_make_lang_type): Rename.
9104         * lex.c (cp_make_lang_type): Rename.
9105         (make_aggr_type): Update.
9106         * tree.c (init_tree): Don't set make_lang_type_fn.
9107
9108 2002-03-29  Jakub Jelinek  <jakub@redhat.com>
9109
9110         PR c++/6073
9111         * class.c (finish_struct_1): Update static field's DECL_MODE even
9112         if its type is a variant of t.
9113
9114 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
9115
9116         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
9117         * cp-tree.h (cxx_insert_default_attributes): New.
9118         * decl.c (insert_default_attributes): Rename.
9119
9120 2002-03-27  Mark Mitchell  <mark@codesourcery.com>
9121
9122         PR c++/4884
9123         * call.c (build_op_delete_call): Allow for the fact the placement
9124         may be a COMPOUND_EXPR.
9125
9126 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
9127
9128         * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
9129         * cp-tree.h (init_cplus_expand): Remove.
9130         (cxx_expand_expr): New.
9131         * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
9132         fix prototype.
9133         (init_cplus_expand): Remove.
9134         * lex.c (cxx_init): Don't call init_cplus_expand.
9135
9136 2002-03-26  Mark Mitchell  <mark@codesourcery.com>
9137
9138         PR c++/4884.
9139         * init.c (build_new_1): Allow for the fact the result of
9140         build_function_call may be a COMPOUND_EXPR.
9141
9142 2002-03-26  Nathan Sidwell  <nathan@codesourcery.com>
9143
9144         PR c++/5682
9145         * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
9146         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
9147         (dfs_skip_nonprimary_vbases_markedp): Remove.
9148         * search.c (get_shared_vbase_if_not_primary): Remove.
9149         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
9150         (dfs_skip_nonprimary_vbases_markedp): Remove.
9151         (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
9152         (dfs_marked_real_bases_queue_p): Likewise.
9153
9154 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
9155
9156         * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
9157         * cp-tree.h (cxx_mark_tree): New.
9158         * decl.c (lang_mark_tree): Rename cxx_mark_tree.
9159
9160 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
9161
9162         * cp-tree.h (cxx_maybe_build_cleanup): New.
9163         * decl.c (destroy_local_var, hack_incomplete_structures): Update.
9164         (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
9165         * tree.c (build_target_expr): Update.
9166         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
9167
9168 2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
9169
9170         * decl2.c (cxx_decode_option): Handle -E.
9171         * lang-specs.h (default_compilers): Preprocess with cc1plus.
9172         * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
9173
9174 2002-03-23  Jakub Jelinek  <jakub@redhat.com>
9175
9176         PR c++/6037
9177         * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
9178
9179 2002-03-23  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
9180
9181         * error.c (dump_type): Be careful about implicit typenames.
9182
9183 2002-03-21  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
9184
9185         PR C++/3656
9186         * semantics.c (finish_base_specifier): Handle erronous base
9187         classes.
9188
9189 2002-03-22  Zack Weinberg  <zack@codesourcery.com>
9190
9191         * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
9192         REAL_IS_NOT_DOUBLE.
9193
9194 2002-03-22  Jeff Knaggs  <jknaggs@redhat.com>
9195
9196         * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
9197         an index into the vtable_entry array regardless of
9198         TARGET_PTRMEMFUNC_VBIT_LOCATION.
9199
9200 2002-03-21  Aldy Hernandez  <aldyh@redhat.com>
9201
9202         * tree.c (cp_cannot_inline_tree_fn): Same.
9203
9204 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
9205
9206         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
9207         insert_block, getdecls, global_bindings_p): New.
9208
9209 2002-03-20  Nathan Sidwell  <nathan@codesourcery.com>
9210
9211         PR c++/4361
9212         * mangle.c (struct globals) Add internal_mangling_p member.
9213         (write_template_param): Do internal mangling, if needed.
9214         (mangle_conv_op_name_for_type): Request internal mangling.
9215
9216 2002-03-20  Jason Merrill  <jason@redhat.com>
9217
9218         PR c++/2136
9219         * init.c (build_delete): Check access for a member op delete here.
9220         * decl2.c (delete_sanity): Not here.
9221
9222 2002-03-19  Jason Merrill  <jason@redhat.com>
9223
9224         PR c++/5118
9225         * class.c (get_vfield_name): Use the constructor_name.
9226
9227 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
9228
9229         * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
9230         * cp-tree.h (lang_printable_name): Rename.
9231         * error.c (lang_decl_name): Use new hook.
9232         * lex.c (cxx_init): Remove old hook.
9233         * pt.c (tsubst_decl): Use new hook.
9234         * tree.c (lang_printable_name): Rename.
9235
9236 2002-03-18  Eric Botcazou  <ebotcazou@multimania.com>
9237
9238         PR c++/3882
9239         * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
9240         (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
9241         only after recording the declaration.
9242
9243 2002-03-18  Jason Merrill  <jason@redhat.com>
9244
9245         PR c++/2039
9246         * init.c (resolve_offset_ref): Hand off to build_component_ref.
9247
9248         PR c++/4222, c++/5995
9249         * call.c (build_over_call): Fix empty class logic.
9250
9251         PR c++/3870
9252         * cp-tree.h (struct saved_scope): Add last_parms field.
9253         * decl.c (maybe_push_to_top_level): Save last_function_parms.
9254         (pop_from_top_level): Restore it.
9255
9256         PR c++/4377
9257         * mangle.c (write_expression): Strip NOP_EXPRs sooner.  Also strip
9258         NON_LVALUE_EXPRs.
9259
9260         PR c++/4003
9261         * pt.c (tsubst_friend_function): Use decl_namespace_context.
9262
9263         PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
9264         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
9265         type with a nontrivial destructor.
9266
9267 2002-03-17  Jason Merrill  <jason@redhat.com>
9268
9269         PR c++/4460
9270         * class.c (build_base_path): Virtual base layout is fixed in
9271         in-charge [cd]tors.
9272
9273 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
9274
9275         * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
9276         * parse.y (yyparse): Remove macro.
9277
9278 2002-03-17  Jason Merrill  <jason@redhat.com>
9279
9280         PR c++/5757
9281         * init.c (build_new_1): Pass the right pointer to op delete.
9282
9283 2002-03-16  Nathan Sidwell  <nathan@codesourcery.com>
9284
9285         PR c++/4361
9286         * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
9287         conversion operators go.
9288         (struct lang_decl_flags): Add template_conv_p and unused
9289         bitfields.
9290         (DECL_TEMPLATE_CONV_FN_P): New macro.
9291         * call.c (build_user_type_conversion_1): Don't check second type
9292         conversion of overload set first.
9293         * class.c (add_method): Make sure templated conversion operators
9294         all end up on slot 2.
9295         * lex.c (do_identifier): A conversion operator token might be
9296         satisfied by a templated conversion operator.
9297         * pt.c (check_explicit_specialization): Use
9298         CLASSTYPE_FIRST_CONVERSION_SLOT.
9299         (template_parm_this_level_p): New function.
9300         (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
9301         * search.c (lookup_fnfields_1): Template conversions will be on
9302         the first slot.
9303         * typeck.c (build_component_ref): Preserve the type of an
9304         conversion operator name on the overload type.
9305         (build_x_function_call): Retrieve the conversion operator name.
9306
9307 2002-03-15  Richard Henderson  <rth@redhat.com>
9308
9309         * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
9310
9311 2002-03-15  Mark Mitchell  <mark@codesourcery.com>
9312
9313         * cp-tree.h (CLEANUP_DECL): Remove.
9314         (CLEANUP_EXPR): Likewise.
9315         * decl.c (destroy_local_var): Simplify.
9316         (maybe_build_cleanup): Tidy.
9317         * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
9318         * semantics.c (cp_expand_stmt): Likewise.
9319         * cp/tree.c (cp_statement_code_p): Likewise.
9320
9321 2002-03-15  Jason Merrill  <jason@redhat.com>
9322
9323         PR c++/5857
9324         * decl.c (duplicate_decls): Use merge_types instead of common_type.
9325         * typeck.c (common_type): Just hand off to
9326         type_after_usual_arithmetic_conversions and
9327         composite_pointer_type.
9328         (merge_types): New fn.
9329         (commonparms): Use it instead of common_type.
9330         (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
9331         (composite_pointer_type): Also handle attributes.
9332         * cp-tree.h: Declare merge_types.
9333
9334         * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
9335         variables.
9336         * decl2.c (maybe_make_one_only): Also mark the decl as needed.
9337
9338 2002-03-14  Richard Henderson  <rth@redhat.com>
9339
9340         * decl.c: Include c-pragma.h.
9341         (start_decl, start_function): Invoke maybe_apply_pragma_weak.
9342         * Make-lang.in: Update dependencies.
9343
9344 2002-03-14  Jakub Jelinek  <jakub@redhat.com>
9345
9346         PR c++/5908
9347         * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
9348         * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
9349
9350 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
9351
9352         * mangle.c (write_builtin_type): Handle 128-bit integers even if
9353         they are not a standard integer type.
9354
9355 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
9356
9357         * cp-tree.h (init_init_processing): Remove declaration.
9358         * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
9359         * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
9360
9361 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9362
9363         * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
9364         Define.
9365         * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
9366         tree_code_length.
9367         * lex.c (cplus_tree_code_type, cplus_tree_code_length,
9368         cplus_tree_code_name): Delete.
9369         (cxx_init): Don't call add_c_tree_codes, instead set
9370         lang_unsafe_for_reeval.  Don't try to copy into the various
9371         tree_code arrays.
9372
9373 2002-03-12  Nathan Sidwell  <nathan@codesourcery.com>
9374
9375         PR c++/5659
9376         * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
9377         * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
9378         definitions.
9379
9380 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
9381
9382         Revert 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>,
9383         DR209 is now not a defect.
9384         * cp-tree.h (skip_type_access_control): Remove.
9385         * decl.c (grokdeclarator): Do type access control for friend
9386         declarations.
9387         * semantics.c (decl_type_access_control): Don't reset
9388         current_type_lookups.
9389         (save_type_access_control): Always save the lookups.
9390         (skip_type_access_control): Remove.
9391         (finish_class_definition): Don't change type_lookups.
9392
9393 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
9394
9395         Revert 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>,
9396         It is incorrect.
9397         * typeck.c (build_static_cast): Compare non-qualified types
9398         with pointer to member conversions.
9399
9400 2002-03-11  Dan Nicolaescu  <dann@ics.uci.edu>
9401             Daniel Berlin  <dan@dberlin.org>
9402
9403         * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
9404         (cxx_get_alias_set): Use it.
9405
9406 2002-03-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9407
9408         * cp-tree.h (stabilize_expr): Prototype.
9409
9410 2002-03-08  Craig Rodrigues  <rodrigc@gcc.gnu.org>
9411
9412         * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
9413         conditional return void.
9414
9415 2002-03-08  Neil Booth  <neil@daikokuya.demon.co.uk>
9416
9417         * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
9418         * cp-tree.h (cxx_unsave): New.
9419         * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
9420         (init_tree): Update.
9421
9422 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9423
9424         * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
9425         explicit sizeof/sizeof.
9426         * decl2.c (cxx_decode_option): Likewise.
9427         * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
9428
9429 2002-03-02  Nathan Sidwell  <nathan@codesourcery.com>
9430
9431         PR c++/775
9432         * decl.c (lookup_tag): Only reject enum/class mismatch, not
9433         class/union mismatch.
9434         * parse.y (check_class_key): New function.
9435         (structsp): Call it.
9436
9437 2002-03-01  Michael Matz  <matz@suse.de>
9438
9439         * typeck.c (cp_pointer_int_sum): Complete inner type which is
9440         used later by size_in_bytes().
9441
9442 2002-03-01  Phil Edwards  <pme@gcc.gnu.org>
9443
9444         * cp-tree.h:  Require __GNUC__ to be #defined.
9445         (build_init):  Add missing prototype.
9446
9447 2002-03-01  Jason Merrill  <jason@redhat.com>
9448
9449         * except.c: Don't include decl.h or obstack.h.  Do include
9450         tree-inline.h.
9451         (build_throw): Destroy temporaries from the thrown
9452         expression before calling __cxa_throw.  Construct a thrown
9453         temporary directly into the exception object.
9454         (stabilize_throw_expr): New function.
9455         (wrap_cleanups_r): New function.
9456         * tree.c (stabilize_expr): New function.
9457         * init.c (build_init): New function.
9458         * Make-lang.in (cp/except.o): Adjust .h deps.
9459
9460 2002-02-28  Jason Merrill  <jason@redhat.com>
9461
9462         * search.c (lookup_base_r): Don't clear is_non_public just because
9463         we found a friendly scope.
9464
9465         * decl.c (finish_function): Only warn about missing return
9466         statement with -Wreturn-type.
9467
9468 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
9469
9470         * class.c (build_clone): Update.
9471         * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
9472         * cp-tree.h (cxx_dup_lang_specific_decl): New.
9473         * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
9474         (copy_decl): Update.
9475         * method.c (make_thunk): Update.
9476
9477 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
9478
9479         * decl2.c: Delete traditional-mode-related code copied from
9480         the C front end but not used, or used only to permit the
9481         compiler to link.
9482
9483 2002-02-24 Craig Rodrigues  <rodrigc@gcc.gnu.org>
9484
9485         PR c++/4093
9486         * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
9487         to void.
9488
9489 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
9490
9491         PR other/5746
9492         * semantics.c (finish_switch_cond): Don't call get_unwidened
9493         if error_mark_node.
9494
9495 2002-02-22  Nathan Sidwell  <nathan@codesourcery.com>
9496
9497         PR c++/2645, DR 295
9498         * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
9499         tf_keep_type_decl.
9500         (make_typename_type): Use tsubst_flags_t.
9501         * decl.c (make_typename_type): Adjust. Return non-artificial
9502         TYPE_DECLs, if required.
9503         (grokdeclarator): Simplify CVR qualification handling. Allow bad
9504         qualifiers on typedef types.
9505         * decl2.c (handle_class_head): Adjust make_typename_type call.
9506         * parse.y (nested_name_specifier): Likewise.
9507         (typename_sub0): Likewise.
9508         (typename_sub1): Likewise.
9509         * pt.c (convert_template_argument): Adjust make_typename_type
9510         return value.
9511         (tsubst): Adjust cp_build_qualified_type_real calls.
9512         (check_cv_quals_for_unify): Cope with allowing bad qualifications
9513         on template type parms.
9514         (instantiate_decl): Recheck substitutions to give warnings on bad
9515         qualifications.
9516         * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
9517
9518 2002-02-21  Aldy Hernandez  <aldyh@redhat.com>
9519
9520         * cp/decl.c (duplicate_decls): Merge always_inline attribute.
9521
9522         * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
9523         unless DECL_ALWAYS_INLINE.
9524
9525 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
9526
9527         * typeck.c (cp_pointer_int_sum): Renamed from
9528         pointer_int_sum, call pointer_int_sum.
9529
9530 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
9531
9532         * decl.c (duplicate_decls): Return 0 if issued error about
9533         redeclaration.
9534
9535 2002-02-19  Jason Merrill  <jason@redhat.com>
9536
9537         ABI change: Mangle `void (A::*)() const' as
9538         M1AKFvvE, not MK1AFvvE.
9539         * mangle.c (write_function_type): Write cv-quals for member
9540         function type here.
9541         (write_pointer_to_member_type): Not here.
9542
9543 2002-02-18  Jason Merrill  <jason@redhat.com>
9544
9545         * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
9546         (do_decl_instantiation): Likewise.
9547
9548 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
9549
9550         PR c++/5685
9551         * decl.c (duplicate_decls): Make warning unconditional
9552         if duplicate default argument declarations are present.
9553
9554 2002-02-17  Jakub Jelinek  <jakub@redhat.com>
9555
9556         * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
9557         shortening.
9558
9559 2002-02-15  Nathan Sidwell  <nathan@codesourcery.com>
9560
9561         * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
9562         remove incorrect comment. Move #if 0'd code to common path. Use
9563         IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
9564
9565 2002-02-13  Jason Merrill  <jason@redhat.com>
9566
9567         * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
9568         (finish_function): Don't warn if current_function_returns_null.
9569
9570         * typeck2.c (digest_init): Do handle values of vector type.
9571
9572         * typeck2.c (digest_init, process_init_constructor): Treat vectors
9573         like arrays.
9574
9575 2002-02-11  Jason Merrill  <jason@redhat.com>
9576
9577         * parse.y (reserved_declspecs): Don't handle attributes.
9578         (reserved_typespecquals): Handle them here.
9579         * Make-lang.in (parse.c): Adjust expected conflicts.
9580
9581 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
9582
9583         * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
9584         instead of compstmt.
9585         (compstmt_or_stmtexpr): Renamed from compstmt.
9586         (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
9587
9588 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
9589
9590         Rename instantiate_type_flags to tsubst_flags_t & expand use.
9591         * cp-tree.h (instantiate_type_flags): Rename to ...
9592         (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
9593         add tf_warning flag.
9594         (instantiate_type): Adjust prototype.
9595         (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
9596         do_type_instantiation, cp_build_qualified_type_real): Likewise.
9597         cp_build_qualified_type: Adjust.
9598         * class.c (instantiate_type): Adjust parameter. Rename itf_* to
9599         tf_*.
9600         * call.c (standard_conversion): Rename itf_* to tf_*.
9601         (reference_binding): Likewise.
9602         (convert_like_real): Likewise.
9603         * cvt.c (cp_convert_to_pointer): Likewise.
9604         (convert_to_reference): Likewise.
9605         * decl.c (lookup_namespace_name): Use tf_* flags.
9606         (make_typename_type): Likewise.
9607         (grokdeclarator): Likewise.
9608         * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
9609         (coerce_template_template_parms, convert_template_argument,
9610         coerce_template_parms, maybe_get_template_decl_from_type_decl,
9611         lookup_template_class, tsubst_friend_function, tsubst_friend_class,
9612         instantiate_class_template, tsubst_template_arg_vector,
9613         tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
9614         tsubst_decl, tsubst_arg_types, tsubst_function_type,
9615         tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
9616         instantiate_template, fn_type_unification,
9617         resolve_overloaded_unification, verify_class_unification,
9618         unify, get_bindings_real, do_type_instantiation,
9619         regenerate_decl_from_template, instantiate_decl,
9620         tsubst_initializer_list, tsubst_enum,
9621         get_mostly_instantiated_function_type,
9622         invalid_nontype_parm_type_p): Likewise.
9623         * tree.c (cp_build_qualified_type_real): Likewise.
9624         * typeck.c (build_binary_op): Rename itf_* to tf_*.
9625         (build_ptrmemfunc): Likewise.
9626         (convert_for_assignment): Likewise.
9627
9628 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
9629
9630         PR c++/109
9631         * decl.c (grokdeclarator): Allow friend declarations from
9632         dependent types.
9633         * decl2.c (handle_class_head): Don't push into template parm contexts.
9634         * pt.c (push_template_decl_real): Template parm contexts are never
9635         being defined.
9636
9637 2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
9638
9639         * class.c: Include target.h.
9640         (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
9641         BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
9642         bit-field layout.
9643         * Make-lang.in: Adjust deps.
9644
9645 2002-02-05  Jason Merrill  <jason@redhat.com>
9646
9647         * error.c (dump_type): Be more helpful about VECTOR_TYPE.
9648
9649 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
9650
9651         * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
9652         (finish_switch_cond): Set SWITCH_TYPE.
9653
9654 2002-02-04  Richard Henderson  <rth@redhat.com>
9655
9656         * method.c (use_thunk): Always initialize the block tree.  Reindent.
9657         * semantics.c (expand_body): Emit thunks after function, not before.
9658
9659 2002-02-04  Jason Merrill  <jason@redhat.com>
9660
9661         * decl.c (start_function): Call cplus_decl_attributes immediately
9662         after grokdeclarator.
9663
9664         * decl.c (start_function): Combine DECL_RESULT handling code.
9665
9666 2002-02-03  Jason Merrill  <jason@redhat.com>
9667
9668         * xref.c: Remove.
9669         * Make-lang.in (CXX_OBJS): Remove cp/xref.o
9670         (cp/xref.o): Remove dependencies.
9671         * class.c (finish_struct_1, check_methods): Don't call xref fns.
9672         (finish_struct_1): Likewise.
9673         * friend.c (make_friend_class): Likewise.
9674         * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
9675         * spew.c (read_process_identifier): Likewise.
9676
9677 2002-02-01  Jason Merrill  <jason@redhat.com>
9678
9679         PR c++/4872
9680         * decl.c (finish_function): Warn about a non-void function with
9681         no return statement and no abnormal exit.
9682         * cp-tree.h (struct cp_language_function): Add returns_abnormally.
9683         (current_function_returns_abnormally): New macro.
9684         * call.c (build_call): Set it.
9685
9686         * typeck.c (build_component_ref): Always complain about offsetof
9687         constructs on non-PODs.  Only make it an error for members of
9688         virtual bases.
9689
9690         * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
9691         (dump_function_decl): Always dump parms.
9692
9693         * decl2.c (finish_static_data_member_decl): Complain about a local
9694         class with a static data member.
9695
9696         PR c++/4286
9697         * search.c (lookup_field_1): Don't xref a static data member
9698         just because we looked it up.
9699
9700 2002-01-31  Jason Merrill  <jason@redhat.com>
9701
9702         * Make-lang.in (parse.c): Handle .output file.
9703
9704         PR c++/3395
9705         * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
9706         not TREE_TYPE.
9707         * semantics.c (finish_class_definition): Adjust.
9708
9709         Allow attributes in parms and casts.
9710         * parse.y (named_parm): Don't strip attrs.
9711         (declmods): Remove 'attributes' production.
9712         (nonempty_cv_qualifiers): Accept attributes.
9713         (ATTRIBUTE): Give precedence.
9714         * decl.c (groktypename): Handle attributes.
9715         (grokparms): Likewise.
9716
9717 2002-01-29  Jakub Jelinek  <jakub@redhat.com>
9718
9719         * decl2.c (cxx_decode_option): Pass 0 as last argument to
9720         cpp_handle_option.
9721         * lang-specs.h: Use cpp_unique_options instead of cpp_options
9722         when used together with cc1_options.
9723
9724 2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
9725
9726         PR c++/5132
9727         * typeck2.c (digest_init): Make sure non-array core type is
9728         instantiated.
9729         * decl2.c (reparse_absdcl_as_casts): Just store the type in the
9730         constructor, rather than build a new one.
9731         (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
9732         PURPOSE of constructor elts.
9733
9734 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
9735
9736         * Make-lang.in (parse.c): Adjust expected number of
9737         shift-reduce conflicts.
9738         (decl.o): Depend on diagnostic.h.
9739         * decl.c: Include diagnostic.h.
9740         (grokdeclarator): Check for null pointer.
9741         (finish_function): Don't abort when
9742         current_binding_level->parm_flag != 1, if errors have
9743         occurred; throw away the statement tree and extra binding
9744         levels, and continue.
9745         * lex.c (note_list_got_semicolon): Check for null pointer.
9746         * method.c (hack_identifier): Just return error_mark_node if
9747         value is error_mark_node.
9748         * parse.y (primary: TYPEID(type_id)): No need to use
9749         TYPE_MAIN_VARIANT here.
9750         (handler_seq): Accept an empty list of catch clauses and
9751         generate a fake handler block to avoid later crashes.
9752         (ansi_raise_identifier): Accept the error token too.
9753         * semantics.c (begin_class_definition,
9754         finish_class_definition): Check for error_mark_node.
9755
9756 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
9757
9758         * typeck2.c (friendly_abort): Delete definition.
9759         * cp-tree.h (friendly_abort): Don't prototype.
9760         (my_friendly_assert): Use fancy_abort.
9761
9762 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
9763
9764         * cp-tree.h (my_friendly_abort): Remove.
9765
9766 2002-01-23  Jakub Jelinek  <jakub@redhat.com>
9767
9768         * spew.c (pending_inlines, pending_inlines_tail,
9769         processing_these_inlines): Make static.
9770         (mark_pending_inlines): Remove static.
9771         (begin_parsing_inclass_inline): If in function, save pi
9772         for GC to cp_function_chain->unparsed_inlines instead.
9773         (process_next_inline): Likewise.
9774         * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
9775         (mark_pending_inlines): Add prototype.
9776         * decl.c (spew_debug): Remove unused extern.
9777         (mark_lang_function): Call mark_pending_inlines.
9778
9779 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
9780
9781         * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
9782         init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
9783         semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
9784         Change my_fancy_abort() to abort().
9785
9786 2002-01-23  Jason Merrill  <jason@redhat.com>
9787
9788         PR c++/5453
9789         * class.c (fixed_type_or_null): Fix thinko.
9790
9791         PR c++/3331
9792         * init.c (resolve_offset_ref): Use build_indirect_ref.
9793
9794         * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
9795
9796 2002-01-22  Jason Merrill  <jason@redhat.com>
9797
9798         * parse.y (function_body): Suppress the block for the outermost
9799         curly braces.
9800         * decl.c (pushdecl): Don't try to skip it.
9801         (begin_function_body): Keep the block we create, not the next one.
9802         * init.c (emit_base_init): Don't mess with keep_next_level.
9803
9804         * class.c (build_base_path): Tweak formatting.
9805
9806 2002-01-19  Nathan Sidwell  <nathan@codesourcery.com>
9807
9808         Fix regression introduced with patch for c++/775
9809         * parse.y (class_head_defn): Check for template specializations
9810         with a different class-key.
9811
9812 2002-01-17  Jason Merrill  <jason@redhat.com>
9813
9814         * decl.c (begin_constructor_body, begin_destructor_body): New fns.
9815         (begin_function_body): Call them and keep_next_level.
9816         * init.c (emit_base_init): Call keep_next_level.
9817         * semantics.c (setup_vtbl_ptr): Lose.
9818         * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
9819         (vtbls_set_up_p): Lose.
9820         * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
9821         * method.c (do_build_copy_constructor): Likewise.
9822         (synthesize_method): Call finish_mem_initializers.
9823         * parse.y (nodecls): Likewise.
9824
9825         * error.c (dump_type_suffix): Print the exception specs before
9826         recursing.
9827         (dump_function_decl): Here, too.
9828
9829         * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
9830
9831 2002-01-10  Ira Ruben   <ira@apple.com>
9832
9833         PR c++/907
9834         * decl.c (start_method): Handle attrlist.
9835
9836 2002-01-10  Jakub Jelinek  <jakub@redhat.com>
9837
9838         * decl2.c (max_tinst_depth): Increase default limit to 500.
9839
9840 2002-01-10  Graham Stott  <grahams@redhat.com>
9841
9842         * spew.c (YYCHAR): Uppercase macro parameter and add
9843         parenthesis.
9844         (YYCODE): Likewise.
9845         (NAME): Uppercase macro parameter.
9846
9847 2002-01-09  Graham Stott  <grahams@redhat.com>
9848
9849         * decl.h (grokdeclarator): Wrap long line.
9850
9851         * semantics.c (FINISH_COND): Uppercase macro paramaters and
9852         add parenthesis.
9853
9854 2002-01-08  Graham Stott  <grahams@redhat.com>
9855
9856         * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
9857         (PALLOC): Uppercase macro parameter and whitespace.
9858         (SALLOC): Uppercase macro parameter.
9859         (SFREE): Uppercase macros parameter, add parenthese and
9860         whitespace.
9861         (STREQL): Uppercase macro parameter and whitespace.
9862         (STRNEQ): Likewise.
9863         (STRLSS): Likewise.
9864         (STRLEQ): Likewise.
9865         (STRGTR): Likewise.
9866         (STRGEQ): Likewise.
9867
9868         * call.c (convert_like): Add parenthesis and wrap.
9869         (convert_like_with_context): Likewise.
9870         (ICS_RANK): Whitespace.
9871         (NEED_TEMPORARY_P): Remove parenthesis.
9872
9873         * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
9874         whitespace.
9875         (VTT_MARKED_BINFO_P): Likewise.
9876
9877         * decl.c (BINDING_LEVEL): Add parenthesis.
9878         (DEF_OPERATOR): Likewise.
9879
9880         * mangle.c (MANGLE_TRACE): Add parenthesis.
9881         (MANGLE_TRACE_TREE): Likewise.
9882         (write_signed_number): Likewise.
9883         (write_unsigned_number): Likewise.
9884
9885         * pt.c (ccat): Uppercase macro parameter.
9886         (cat): Likewise
9887
9888         * search.c (SET_BINFO_ACCESS): Add parenthesis.
9889
9890 2002-01-07  Jason Merrill  <jason@redhat.com>
9891
9892         * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
9893         to pedwarn.
9894
9895         PR c++/3536
9896         * method.c (make_thunk): If !flag_weak, give the thunk the
9897         function's linkage.
9898         (use_thunk): Here, too.
9899
9900 2002-01-07  Graham Stott  <grahams@redhat.com>
9901
9902         * error.c: Update copyright date.
9903         (print_scope_operator): Add parenthesis.
9904         (print_left_paren): Likewise.
9905         (print_right_paren): Likewise.
9906         (print_left_bracket): Likewise.
9907         (print_right_bracket): Likewise.
9908         (print_template_argument_list_start): Likewise.
9909         (print_template_argument_list_end): Likewise.
9910         (print_non_consecutive_character): Likewise.
9911         (print_tree_identifier): Likewise.
9912         (print_identifier): Likewise.
9913         (NEXT_CODE): Uppercase macro parameter.
9914         (ident_fndecl): Delete unused.
9915         (GLOBAL_THING): Likewise.
9916
9917 2002-01-06  Graham Stott  <grahams@redhat.com>
9918
9919         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
9920         (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
9921         (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
9922         (RECORD_OR_UNION_TYPE_CHECK): Likewise.
9923         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
9924         (C_IS_RESERVED_WORD): Uppercase macro parameter.
9925         (C_RID_YYCODE) Likewise.
9926         (ptrmem_cst): Use rtx.
9927         (LOCAL_BINDING_P): Add whitespace.
9928         (INHERITED_VALUE_BINDING_P): Likewise.
9929         (BINDING_SCOPE): Wrap long line.
9930         (BINDING_HAS_LEVEL_P): Remove parenthesis.
9931         (BINDING_VALUE): Wrap long line.
9932         (BINDING_TYPE): Whitespace.
9933         (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
9934         (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
9935         (IDENTIFIER_NAMESPACE_VALUE): Likewise.
9936         (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
9937         (same_type_p): Uppercase macro parameters.
9938         (same_type_ignoring_top_level_qualifiers_p): Likewise.
9939         (OVL_FUNCTION): Wrap long line.
9940         (OVL_CHAIN): Whitespace.
9941         (OVL_CURRENT): Add parenthesis and whitespace.
9942         (OVL_NEXT): Whitespace.
9943         (OVL_USED): Likewise.
9944         (IDENTIFIER_TYPE_VALUE): Likewise.
9945         (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
9946         (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
9947         (LANG_ID_FIELD): Whitespace.
9948         (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
9949         (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
9950         (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
9951         (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
9952         (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
9953         (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
9954         (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
9955         (IDENTIFIER_VIRTUAL_P): Likewise.
9956         (IDENTIFIER_OPNAME_P): Likewise.
9957         (IDENTIFIER_TYPENAME_P): Remove parenthesis.
9958         (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
9959         (C_SET_EXP_ORIGINAL_CODE): Likewise.
9960         (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
9961         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
9962         (IS_AGGR_TYPE): Uppercase macro parameter.
9963         (CLASS_TYPE_P): Likewise.
9964         (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
9965         (IS_AGGR_TYPE_2): Whitespace.
9966         (TAGGED_TYPE_P): Uppercase macro parameter.
9967         (TYPE_BUILT_IN): Whitespace.
9968         (TYPE_FOR_JAVA): Likewise.
9969         (FUNCTION_ARG_CHAIN): Remove parenthesis.
9970         (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
9971         (FUNCTION_FIRST_USER_PARAM): Likewise.
9972         (PROMOTES_TO_AGGR_TYPE): Whitespace.
9973         (DERIVED_FROM_P): Add parenthesis and wrap.
9974         (UNIQUELY_DERIVED_FROM_P): Likewise.
9975         (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
9976         (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
9977         (CLASSTYPE_USE_TEMPLATE): Whitespace.
9978         (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
9979         (TYPE_GETS_DELETE): Add parenthesis.
9980         (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
9981         (TYPE_HAS_ASSIGN_REF): Likewise,
9982         (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
9983         (TYPE_HAS_INIT_REF): Likewise.
9984         (TYPE_HAS_CONST_INIT_REF): Likewise.
9985         (TYPE_BEING_DEFINED): Likewise.
9986         (TYPE_LANG_SPECIFIC): Likewise.
9987         (CLASSTYPE_RTTI): Likewise.
9988         (TYPE_OVERLOADS_CALL_EXPR): Likewise.
9989         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
9990         (TYPE_OVERLOADS_ARROW): Likewise.
9991         (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
9992         (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
9993         (CLASSTYPE_METHOD_VEC): Likewise.
9994         (CLASSTYPE_MARKED_N): Likewise.
9995         (CLASSTYPE_MARKED): Likewise.
9996         (CLASSTYPE_MARKED2): Likewise.
9997         (CLASSTYPE_MARKED3): Likewise.
9998         (CLASSTYPE_MARKED4): Likewise.
9999         (CLASSTYPE_MARKED5): Likewise.
10000         (CLASSTYPE_MARKED6): Likewise.
10001         (SET_CLASSTYPE_MARKED): Whitespace.
10002         (CLEAR_CLASSTYPE_MARKED): Likewise.
10003         (SET_CLASSTYPE_MARKED2): Likewise.
10004         (CLEAR_CLASSTYPE_MARKED2): Likewise.
10005         (SET_CLASSTYPE_MARKED3): Likewise.
10006         (CLEAR_CLASSTYPE_MARKED3): Likewise.
10007         (SET_CLASSTYPE_MARKED4): Likewise.
10008         (CLEAR_CLASSTYPE_MARKED4): Likewise.
10009         (SET_CLASSTYPE_MARKED5): Likewise.
10010         (CLEAR_CLASSTYPE_MARKED5): Likewise.
10011         (SET_CLASSTYPE_MARKED6): Likewise.
10012         (CLEAR_CLASSTYPE_MARKED6): Likewise.
10013         (CLASSTYPE_TAGS): Likewise.
10014         (CLASSTYPE_VSIZE): Likewise.
10015         (CLASSTYPE_VBASECLASSES): Likewise.
10016         (CANONICAL_BINFO): Add parenthesis.
10017         (CLASSTYPE_SIZE(NODE): Likewise.
10018         (CLASSTYPE_SIZE_UNIT): Likewise.
10019         (CLASSTYPE_ALIGN(NODE): Likewise.
10020         (CLASSTYPE_USER_ALIGN): Likewise.
10021         (TYPE_JAVA_INTERFACE): Likewise.
10022         (CLASSTYPE_PURE_VIRTUALS): Likewise.
10023         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
10024         (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
10025         (CLASSTYPE_HAS_MUTABLE): Likewise.
10026         (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
10027         (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
10028         (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
10029         (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
10030         (CLASSTYPE_INTERFACE_ONLY): Likewise.
10031         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
10032         (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10033         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
10034         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10035         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
10036         (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
10037         (BINFO_UNSHARED_MARKED): Whitespace.
10038         (BINFO_MARKED): Whitespace and wrap.
10039         (SET_BINFO_MARKED): Likewise.
10040         (CLEAR_BINFO_MARKED): Likewise.
10041         (BINFO_VTABLE_PATH_MARKED): Likewise.
10042         (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
10043         (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
10044         (BINFO_SUBVTT_INDEX): Remove parenthesis.
10045         (BINFO_VPTR_INDEX): Likewise.
10046         (BINFO_PRIMARY_BASE_OF): Likewise,
10047         (CLASSTYPE_VFIELDS): Whitespace.
10048         (VF_DERIVED_VALUE): Wrap long line.
10049         (NAMESPACE_LEVEL): Whitespace.
10050         (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
10051         (DEFARG_POINTER): Whitespace.
10052         (DECL_NEEDED_P): Remove parenthesis.
10053         (DECL_LANGUAGE): Whitespace.
10054         (SET_DECL_LANGUAGE): Add parenthesis.
10055         (DECL_CONSTRUCTOR_P): Whitespace and wrap.
10056         (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
10057         (DECL_IN_AGGR_P): Whitespace.
10058         (DECL_FRIEND_P): Likewise.
10059         (DECL_BEFRIENDING_CLASSES): Likewise.
10060         (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
10061         (DECL_NONCONVERTING_P): Whitespace.
10062         (DECL_PURE_VIRTUAL_P): Likewise.
10063         (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
10064         (DECL_PENDING_INLINE_INFO): Whitespace.
10065         (DECL_SORTED_FIELDS): Likewise.
10066         (DECL_DEFERRED_FN): Likewise.
10067         (DECL_TEMPLATE_INFO): Likewise.
10068         (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
10069         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
10070         (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
10071         (TMPL_ARGS_LEVEL): Likewise.
10072         (SET_TMPL_ARGS_LEVEL): Likewise.
10073         (INNERMOST_TEMPLATE_PARMS): Whitespace.
10074         (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
10075         (INTEGRAL_CODE_P(CODE): Add parenthesis.
10076         (CP_INTEGRAL_TYPE_P): Remove parenthesis.
10077         (TYPE_HAS_CONSTRUCTOR): Whitespace.
10078         (TREE_HAS_CONSTRUCTOR): Likewise.
10079         (TYPE_HAS_DESTRUCTOR): Likewise.
10080         (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
10081         (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
10082         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
10083         (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
10084         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
10085         (TYPE_PTRMEMFUNC_P): Likewise.
10086         (TYPE_PTRMEMFUNC_FLAG): Likewise.
10087         (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
10088         (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
10089         (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
10090         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
10091         (DECL_ACCESS): Whitespace.
10092         (DECL_GLOBAL_CTOR_P): Remove parenthesis.
10093         (DECL_GLOBAL_DTOR_P): Likewise.
10094         (GLOBAL_INIT_PRIORITY): Likewise.
10095         (DECL_TEMPLATE_PARMS): Likewise.
10096         (DECL_TEMPLATE_RESULT): Likewise.
10097         (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
10098         (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
10099         (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
10100         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
10101         (PRIMARY_TEMPLATE_P): Add parenthesis.
10102         (DECL_USE_TEMPLATE): Whitespace.
10103         (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
10104         (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
10105         (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
10106         (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
10107         (CALL_DECLARATOR_PARMS): Remove parenthesis.
10108         (CALL_DECLARATOR_QUALS): Likewise.
10109         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
10110         (TEMP_NAME_P): Wrap.
10111         (VFIELD_NAME_P): Likewise.
10112         (B_SET): Uppercase macro parameters and add parenthesis.
10113         (B_CLR): Likewise.
10114         (B_TST): Likewise.
10115         (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
10116         (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
10117         (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
10118         (same_or_base_type_p): Likewise.
10119         (cp_deprecated): Likewise.
10120
10121 2002-01-05  Richard Henderson  <rth@redhat.com>
10122
10123         * semantics.c (expand_body): Revert last change.
10124
10125 2002-01-04  Jason Merrill  <jason@redhat.com>
10126
10127         PR c++/4122
10128         * class.c (update_vtable_entry_for_fn): Set delta to zero for a
10129         lost primary.
10130
10131         * class.c (build_vtbl_initializer): Check for a lost primary
10132         before calculating the vtable entry to throw away.
10133
10134 2002-01-02  Jason Merrill  <jason@redhat.com>
10135
10136         * semantics.c (expand_body): Call outlining_inline_function when
10137         emitting an inline function out of line.
10138
10139 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10140
10141         PR c++/5116, c++/764 reversion
10142         * call.c (build_new_op): Revert the instantiations. They are
10143         incorrect.
10144
10145 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10146
10147         PR c++/5089
10148         * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
10149
10150 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10151
10152         PR c++/3716
10153         * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
10154         (tsubst, case POINTER_TYPE): Handle pmfs here.
10155         (tsubst, case OFFSET_TYPE): Check it is not an offset to
10156         reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
10157
10158 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10159
10160         PR c++/35
10161         * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
10162         (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
10163         * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
10164         PARM_DECL.
10165         (tsubst_template_parms): Break up loop statements.
10166         (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
10167         parm PARM_DECLs don't get promoted.
10168
10169 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10170
10171         PR c++/5123
10172         * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
10173         (build_x_function_call): Cope with a COMPONENT_REF containing a
10174         TEMPLATE_ID_EXPR.
10175
10176 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10177
10178         PR c++/5213
10179         * pt.c (convert_template_argument): Be more careful determining
10180         when RECORD_TYPE templates are or are not templates.
10181
10182 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10183
10184         PR c++/775
10185         * cp-tree.h (handle_class_head): Adjust prototype.
10186         * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
10187         parameters. Use for all class heads.
10188         * parse.y (named_class_head_sans_basetype, named_class_head,
10189         named_complex_class_head_sans_basetype,
10190         named_class_head_sans_basetype_defn,
10191         unnamed_class_head): Remove.
10192         (class_head, class_head_apparent_template): Recognize class heads
10193         (class_head_decl, class_head_defn): New reductions. Process class
10194         heads.
10195         (structsp): Adjust class definition and class declaration
10196         reductions.
10197         (maybe_base_class_list): Give diagnostic on empty list.
10198
10199 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10200
10201         PR c++/4379
10202         * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
10203         single non-static member.
10204         (unary_complex_lvalue): If it cannot be a pointer to member, don't
10205         make it so. Check it is not pointer to reference.
10206
10207 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10208
10209         PR c++/5132
10210         * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
10211         are processing a template decl.
10212
10213 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10214
10215         PR c++/5116, c++/764
10216         * call.c (build_new_op): Make sure template class operands are
10217         instantiated. Simplify arglist construction.
10218
10219 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
10220
10221         * call.c (build_user_type_conversion_1): Use my_friendly_assert
10222         rather than if ... abort.
10223         * cvt.c (convert_to_reference): Likewise.
10224         * semantics.c (setup_vtbl_ptr): Likewise.
10225         * pt.c (lookup_template_class): Comment typo.
10226
10227 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
10228
10229         PR c++/5125
10230         * pt.c (push_template_decl_real): Make sure DECL has
10231         DECL_LANG_SPECIFIC.
10232
10233 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
10234
10235         PR c++/335
10236         * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
10237         for non-reference fields.
10238         * typeck.c (require_complete_type): Use resolve_offset_ref).
10239
10240 2001-12-26  Nathan Sidwell  <nathan@codesourcery.com>
10241
10242         PR c++/196
10243         * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
10244
10245 2001-12-24  Nathan Sidwell  <nathan@codesourcery.com>
10246
10247         PR c++/160
10248         * typeck.c (build_modify_expr): Remove old unreachable code & tidy
10249         up. Don't stabilize_references when initializing a reference.
10250
10251 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10252
10253         * decl2.c (lang_f_options): Const-ify.
10254
10255 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
10256
10257         * config-lang.in (diff_excludes): Remove.
10258
10259 2001-12-19  Nathan Sidwell  <nathan@codesourcery.com>
10260
10261         PR c++/90
10262         * typeck.c (build_function_call_real): Use original function
10263         expression for errors.
10264
10265 2001-12-18  Jason Merrill  <jason@redhat.com>
10266
10267         PR c++/3242
10268         * class.c (add_method): Do compare 'this' quals when trying to match a
10269         used function.  Don't defer to another used function.
10270
10271 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
10272
10273         * pt.c (instantiate_clone): Remove, fold into ...
10274         (instantiate_template): ... here. Simplify by removing mutual
10275         recursion.
10276         * typeck2.c (build_m_component_ref): Don't cv qualify the function
10277         pointed to by a pointer to function.
10278         * class.c (delete_duplicate_fields_1): Typo.
10279
10280 2001-12-18  Jason Merrill  <jason@redhat.com>
10281
10282         C++ ABI change: destroy value arguments in caller.
10283         * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
10284         create an extra binding level for the parameters.
10285         * decl.c (store_parm_decls): Don't do parameter cleanups.
10286
10287 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
10288
10289         * call.c (build_new_method_call): Use '%#V'.
10290         * error.c (cv_to_string): Use V parameter to determine padding.
10291
10292 2001-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
10293
10294         * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
10295         spellings in messages.
10296
10297 2001-12-17  Zack Weinberg  <zack@codesourcery.com>
10298
10299         * cp-tree.h: Delete #defines for cp_error, cp_warning,
10300         cp_pedwarn, and cp_compiler_error.
10301         * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
10302         except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
10303         rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
10304         typeck2.c: Change calls to the above macros to use their
10305         language-independent equivalents: error, warning, pedwarn, and
10306         internal_error respectively.
10307
10308 2001-12-16  Neil Booth  <neil@daikokuya.demon.co.uk>
10309
10310         * decl2.c (finish_file): Remove back_end_hook.
10311
10312 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
10313
10314         * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
10315         cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
10316         pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
10317
10318 2001-12-15  Joseph S. Myers  <jsm28@cam.ac.uk>
10319
10320         * lang-options.h: Use American spelling in messages.
10321
10322 2001-12-13  Jason Merrill  <jason@redhat.com>
10323
10324         * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
10325
10326         Use cleanups to run base and member destructors.
10327         * init.c (push_base_cleanups): New function, split out from...
10328         (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
10329         * decl.c (finish_destructor_body): Move vbase destruction code to
10330         push_base_cleanups.
10331         (begin_function_body, finish_function_body): New fns.
10332         (finish_function): Move [cd]tor handling and call_poplevel to
10333         finish_function_body.
10334         (pushdecl): Skip the new level.
10335         * semantics.c (genrtl_try_block): Don't call end_protect_partials.
10336         (setup_vtbl_ptr): Call push_base_cleanups.
10337         * method.c (synthesize_method): Call {begin,end}_function_body.
10338         * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
10339         * cp-tree.h: Declare new fns.
10340         * parse.y (function_body, .begin_function_body): New nonterminals.
10341         (fndef, pending_inline, function_try_block): Use function_body.
10342         (ctor_initializer_opt, function_try_block): No longer has a value.
10343         (base_init): Remove .set_base_init token.
10344         (.set_base_init, compstmt_or_error): Remove.
10345         * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
10346
10347         * optimize.c (maybe_clone_body): Fix parameter updating.
10348
10349 2001-12-12  Jason Merrill  <jason@redhat.com>
10350
10351         * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
10352         * semantics.c (genrtl_start_function): Don't pass
10353         parms_have_cleanups or push an extra binding level.
10354         (genrtl_finish_function): Lose cleanup_label cruft.
10355
10356         * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
10357         (ctor_label): Remove.
10358         * semantics.c (finish_return_stmt): Lose ctor_label support.
10359         * decl.c (finish_constructor_body, mark_lang_function): Likewise.
10360         * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
10361         dtor_label.
10362
10363         * call.c (build_new_method_call): Let resolves_to_fixed_type_p
10364         check for [cd]tors.
10365         * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
10366
10367         * decl.c (finish_function): Check VMS_TARGET, not VMS.
10368
10369         * decl.c (start_cleanup_fn): Remove redundant pushlevel.
10370         (end_cleanup_fn): And poplevel.
10371
10372         * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
10373         if we're in a template.
10374
10375 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
10376
10377         * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
10378         ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
10379         THIS_NAME_P): Delete.
10380         * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
10381         THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
10382         with internal naming scheme.
10383         * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
10384
10385 2001-12-12  Nathan Sidwell  <nathan@codesourcery.com>
10386
10387         * decl.c (grokdeclarator): Deprecated implicit typename use.
10388
10389 2001-12-11  Nathan Sidwell  <nathan@codesourcery.com>
10390
10391         PR g++/51
10392         * parse.y (frob_specs): Indicate it is a language linkage which
10393         contained the extern.
10394         * decl.c (grokdeclarator): Allow extern language linkage with
10395         other specifiers.
10396
10397 2001-12-10  Nathan Sidwell  <nathan@codesourcery.com>
10398
10399         PR g++/72
10400         * decl.c (add_binding): Don't reject duplicate typedefs involving
10401         template parameters.
10402
10403 2001-12-10  Neil Booth  <neil@daikokuya.demon.co.uk>
10404
10405         * parse.y, semantics.c: Similarly.
10406
10407 2001-12-09  Nathan Sidwell  <nathan@codesourcery.com>
10408
10409         PR g++/87
10410         * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
10411         (copy_args_p): Rename to ...
10412         (copy_fn_p): ... here.
10413         (grok_special_member_properties): New function.
10414         (grok_op_properties): Lose VIRTUALP parameter.
10415         (copy_assignment_arg_p): Remove.
10416         * call.c (build_over_call): Use copy_fn_p.
10417         * decl.c (grokfndecl): Reformat. Adjust call to
10418         grok_op_properties.
10419         (copy_args_p): Rename to ...
10420         (copy_fn_p): ... here. Reject template functions. Check for pass
10421         by value.
10422         (grok_special_member_properties): Remember special functions.
10423         (grok_ctor_properties): Don't remember them here, just check.
10424         (grok_op_properties): Likewise.
10425         (start_method): Call grok_special_member_properties.
10426         * decl2.c (grokfield): Likewise.
10427         (copy_assignment_arg_p): Remove.
10428         (grok_function_init): Don't remember abstract assignment here.
10429         * pt.c (instantiate_class_template): Call
10430         grok_special_member_properties.
10431         (tsubst_decl): Adjust grok_op_properties call.
10432
10433 2001-12-08  Aldy Hernandez  <aldyh@redhat.com>
10434
10435         * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
10436         RID_TYPES_COMPATIBLE_P.
10437
10438 2001-12-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
10439
10440         * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
10441         call to build_aggr_init.
10442         * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
10443
10444 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
10445
10446         * parse.y: Replace uses of the string non-terminal with STRING.
10447         Don't perform string concatentaion here.
10448         (string): Remove non-terminal.
10449         * semantics.c (finish_asm_stmt): Don't concatenate strings here.
10450
10451 2001-12-05  Jason Merrill  <jason@redhat.com>
10452
10453         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
10454         (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
10455         * tree.c (cp_start_inlining, cp_end_inlining): New fns.
10456         * pt.c (push_tinst_level): No longer static.
10457         * cp-tree.h: Declare them.
10458
10459         * init.c (resolve_offset_ref): Don't check access for the base
10460         conversion to access a FIELD_DECL.
10461
10462         * cp-tree.h (TYPE_REFFN_P): New macro.
10463         * decl.c (bad_specifiers): Check it, too.
10464
10465         * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
10466         on the __*_type_info type if we haven't seen a definition.
10467
10468 2001-12-05  Neil Booth  <neil@daikokuya.demon.co.uk>
10469
10470         * decl.c: Include c-common.h.
10471         (shadow_warning): Move to c-common.c.
10472
10473 2001-12-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10474
10475         * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
10476
10477 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
10478
10479         * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
10480
10481 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
10482
10483         PR g++/164
10484         * init.c (sort_base_init): Allow binfos to be directly specified.
10485         * method.c (do_build_copy_constructor): Explicitly convert to the
10486         base instance.
10487         (do_build_assign_ref): Likewise.
10488
10489 2001-12-03  Hans-Peter Nilsson  <hp@bitrange.com>
10490
10491         * decl.c (xref_basetypes): Don't use C99 construct in tag_code
10492         declaration and initialization.
10493
10494 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
10495
10496         * typeck2.c: Remove leading capital from diagnostic messages, as
10497         per GNU coding standards.
10498
10499 2001-12-03  Mumit Khan  <khan@nanotech.wisc.edu>
10500
10501         PR c++/3394
10502         * decl.c (xref_basetypes): Handle attributes between
10503         'class' and name.
10504
10505 2001-12-03  Nathan Sidwell  <nathan@codesourcery.com>
10506
10507         PR g++/3381
10508         * parse.y (named_complex_class_head_sans_basetype): Add new
10509         reduction.
10510         * Make-lang.in (parse.c): Adjust expected conflict count.
10511
10512 2001-12-03  Jason Merrill  <jason@redhat.com>
10513
10514         * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
10515         immediate binfos for our virtual bases.
10516
10517 2001-12-02  Neil Booth  <neil@daikokuya.demon.co.uk>
10518
10519         * call.c (build_java_interface_fn_ref): Similarly.
10520         * except.c (is_admissible_throw_operand): Similarly.
10521         * init.c (build_java_class_ref): Similarly.
10522         * xref.c (open_xref_file): Similarly.
10523
10524 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
10525
10526         * class.c (finish_struct): Remove trailing periods from messages.
10527         * decl.c (check_tag_decl): Similarly.
10528         * lex.c (cxx_set_yydebug): Similarly.
10529         * typeck2.c (friendly_abort): Similarly.
10530
10531 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
10532
10533         PR c++/3048
10534         * cp-tree.h (ovl_member): Remove.
10535         * decl2.c (merge_functions): Handle extern "C" functions
10536         specially.
10537         * tree.c (ovl_member): Remove.
10538
10539 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
10540
10541         PR c++/4842
10542         * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
10543         FUNCTION_DECL, as input.
10544         (mark_overriders): Remove.
10545         (warn_hidden): Rework for the new ABI.
10546
10547 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
10548
10549         PR c++/3471
10550         * call.c (convert_like_real): Do not build additional temporaries
10551         for rvalues of class type.
10552
10553 2001-11-28  Nathan Sidwell  <nathan@codesourcery.com>
10554
10555         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
10556         (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
10557         (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
10558         (DERIVED_FROM_P): Likewise.
10559         (enum base_access): Renumber, add ba_quiet bit mask.
10560         (get_binfo): Remove.
10561         (get_base_distance): Remove.
10562         (binfo_value): Remove.
10563         (ACCESSIBLY_DERIVED_FROM_P): Remove.
10564         * call.c (standard_conversion): Use lookup_base.
10565         * class.c (strictly_overrides): Likewise.
10566         (layout_virtual_bases): Likewise.
10567         (warn_about_ambiguous_direct_bases): Likewise.
10568         (is_base_of_enclosing_class): Likewise.
10569         (add_vcall_offset_vtbl_entries_1): Likewise.
10570         * cvt.c (build_up_reference): Adjust comment.
10571         * init.c (build_member_call): Reformat.
10572         * search.c (get_binfo): Remove.
10573         (get_base_distance_recursive): Remove.
10574         (get_base_distance): Remove.
10575         (lookup_base_r): Tweak.
10576         (lookup_base): Add ba_quiet control. Complete the types here.
10577         (covariant_return_p): Use lookup_base.
10578         * tree.c (binfo_value): Remove.
10579         (maybe_dummy_object): Use lookup_base.
10580         * typeck.c (build_static_cast): Use lookup_base.
10581         (get_delta_difference): Likewise.
10582         * typeck2.c (binfo_or_else): Use lookup_base.
10583         (build_scoped_ref): Add back error_mark_check.
10584         (build_m_component_ref): Use lookup_base.
10585
10586 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
10587
10588         * Make-lang.in (c++.generated-manpages): New dummy target.
10589
10590 2001-11-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10591
10592         * Make-lang.in (cp-lang.o): Depends on c-common.h.
10593         * cp-lang.c (c-common.h): Include.
10594         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
10595         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
10596         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
10597
10598 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
10599
10600         * decl2.c (c_language): Move to c-common.c.
10601         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
10602         functions.
10603         (cxx_init): Update.
10604
10605 2001-11-26  Jason Merrill  <jason@redhat.com>
10606
10607         * call.c (joust): Remove COND_EXPR hack.
10608
10609 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
10610
10611         * search.c (lookup_base_r): Declare bk in variable declaration
10612         space.
10613
10614 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
10615
10616         PR g++/3145
10617         * class.c (build_vbase_pointer): Remove.
10618         (build_vbase_path): Remove.
10619         (build_base_path): New function.
10620         * cp-tree.h (base_access, base_kind): New enumerations.
10621         (build_base_path): Declare.
10622         (convert_pointer_to_real): Remove.
10623         (convert_pointer_to): Remove.
10624         (lookup_base): Declare.
10625         (convert_pointer_to_vbase): Remove.
10626         * call.c (build_scoped_method_call): Use lookup_base &
10627         build_base_path instead of convert_pointer_to_real,
10628         get_base_distance & get_binfo.
10629         (build_over_call): Likewise.
10630         * cvt.c (cp_convert_to_pointer): Likewise.
10631         (convert_to_pointer_force): Likewise.
10632         (build_up_reference): Likewise.
10633         (convert_pointer_to_real): Remove.
10634         (convert_pointer_to): Remove.
10635         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
10636         instead of convert_pointer_to_vbase & build_vbase_path.
10637         (emit_base_init): Use build_base_path instead of
10638         convert_pointer_to_real.
10639         (expand_virtual_init): Lose unrequired conversions.
10640         (resolve_offset_ref): Use lookup_base and build_base_path
10641         instead of convert_pointer_to.
10642         * rtti.c (build_dynamic_cast_1): Use lookup_base &
10643         build_base_path instead of get_base_distance & build_vbase_path.
10644         * search.c (get_vbase_1): Remove.
10645         (get_vbase): Remove.
10646         (convert_pointer_to_vbase): Remove.
10647         (lookup_base_r): New function.
10648         (lookup_base): New function.
10649         * typeck.c (require_complete_type): Use lookup_base &
10650         build_base_path instead of convert_pointer_to.
10651         (build_component_ref): Likewise.
10652         (build_x_function_call): Likewise.
10653         (get_member_function_from_ptrfunc): Likewise.
10654         (build_component_addr): Likewise.
10655         * typeck2.c (build_scoped_ref): Likewise.
10656
10657 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
10658
10659         * cp-tree.h (CP_TYPE_QUALS): Removed.
10660         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
10661         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
10662         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
10663         * dump.c (cp_dump_tree): Use void* dump_info argument to match
10664         lang-hooks prototype.
10665         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
10666         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
10667         CP_TYPE_QUALS changed to cp_type_quals.
10668         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
10669         (CXX_C_OBJS): Remove c-dump.o.
10670
10671 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
10672
10673         PR c++/3637
10674         * pt.c (lookup_template_class): Ensure that all specializations
10675         are registered on the list corresponding to the most general
10676         template.
10677
10678 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
10679
10680         * call.c (non_reference): Add documentation.
10681         (convert_class_to_reference): Do not strip reference types
10682         from conversion operators.
10683         (maybe_handle_ref_bind): Simplify.
10684         (compare_ics): Correct handling of references.
10685
10686 2001-11-19  John Wilkinson <johnw@research.att.com>
10687
10688         * dump.c (dump_op): New function.
10689         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
10690         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
10691         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
10692
10693 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
10694
10695         PR4629
10696         * semantics.c (finish_sizeof): Make sure that expression created
10697         while processing a template do not have a type.
10698         (finish_alignof): Likewise.
10699         * typeck.c (c_sizeof): Likewise.
10700         (expr_sizeof): Likewise.
10701
10702 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
10703
10704         * lex.c (cxx_finish): Call c_common_finish.
10705         (finish_parse): Remove.
10706
10707 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10708
10709         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
10710         when displaying error message about missing array bounds.
10711
10712 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10713
10714         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
10715         CONST_CAST_EXPR.
10716         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
10717
10718 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
10719
10720         * cp-tree.h (print_class_statistics): Restore.
10721
10722 2001-11-15  Jason Merrill  <jason@redhat.com>
10723
10724         * method.c (use_thunk): Don't emit debugging information for thunks.
10725
10726         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
10727         * decl.c (make_typename_type): Handle getting a class template.
10728         * search.c (lookup_field_r): A class template is good enough for
10729         want_type.
10730
10731         * call.c (convert_like_real): Only use cp_convert for the bad part.
10732         (standard_conversion): Also allow bad int->enum.
10733         * typeck.c (ptr_reasonably_similar): Also allow functions to
10734         interconvert.  Pointers to same-size integers are reasonably
10735         similar.
10736
10737         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
10738         give it void type.
10739
10740 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
10741
10742         PR g++/3154
10743         * init.c (sort_base_init): Remove unreachable code.
10744         (expand_member_init): Adjust comment to reflect reality. Simplify
10745         and remove unreachable code.
10746
10747 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
10748
10749         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
10750         (cxx_init): Update prototype.
10751         * decl.c (init_decl_processing): Rename.  Move null node init
10752         to its creation time.
10753         * lex.c (cxx_init_options): Update.
10754         (cxx_init): Combine with old init_parse; also call
10755         cxx_init_decl_processing.
10756
10757 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
10758
10759         * decl.c (check_initializer): Try to complete the type of an
10760         array element before checking whether it's complete.  Don't
10761         complain about arrays with complete element types but an
10762         unknown size.
10763         (cp_finish_decl): Build the hierarchical constructor before
10764         calling maybe_deduce_size_from_array_init.
10765
10766 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
10767
10768         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
10769
10770 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
10771
10772         PR g++/4206
10773         * parse.y (already_scoped_stmt): Remove.
10774         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
10775
10776 2001-11-12  H.J. Lu <hjl@gnu.org>
10777
10778         * cvt.c (ocp_convert): Don't warn the address of a weak
10779         function is always `true'.
10780
10781 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
10782
10783         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
10784         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
10785         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
10786         * cp-tree.h (print_class_statistics): Remove.
10787         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
10788         cxx_print_identifier, cxx_set_yydebug): New.
10789         * lex.c (set_yydebug): Rename c_set_yydebug.
10790         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
10791         lang_print_xnode): Rename.
10792         * tree.c (print_lang_statistics): Rename.
10793
10794 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10795
10796         * class.c (dump_array): Fix format specifier warning.
10797
10798 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
10799
10800         * cp-lang.c (LANG_HOOKS_NAME): Override.
10801         (struct lang_hooks): Constify.
10802         * lex.c (cxx_init_options): Update.
10803         (lang_identify): Remove.
10804         * parse.y (language_string): Remove.
10805
10806 2001-11-08  Andreas Franck  <afranck@gmx.de>
10807
10808         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
10809         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
10810         suggested by autoconf.
10811         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
10812         (c++.install-common): Use the transformed target alias names.
10813
10814 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
10815
10816         * Make-lang.in: Update.
10817         * cp-lang.c: Include langhooks-def.h.
10818
10819 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10820
10821         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
10822
10823 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10824
10825         * lex.c (copy_lang_type): Add static prototype.
10826
10827 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10828
10829         * pt.c (unify): Handle SCOPE_REF.
10830
10831 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
10832
10833         * tree.c (cp_copy_res_decl_for_inlining): Adjust
10834         DECL_ABSTRACT_ORIGIN for the return variable.
10835
10836 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
10837
10838         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
10839
10840 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
10841
10842         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
10843         semantics.c, spew.c: Fix spelling errors.
10844
10845 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10846
10847         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
10848
10849 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
10850
10851         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
10852         pop_everything.
10853
10854 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10855
10856         * cp-lang.c (cxx_get_alias_set): New function.
10857         Point LANG_HOOKS_GET_ALIAS_SET to it.
10858
10859 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10860
10861         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
10862         * cp-tree.h (make_unbound_class_template): Prototype new function.
10863         * decl.c (make_unbound_class_template): New function.
10864         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
10865         * error.c (dump_type): Likewise.
10866         * mangle.c (write_type): Likewise.
10867         * parse.y (template_parm): Likewise.
10868         (template_argument): Use make_unbound_class_template.
10869         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
10870         (tsubst): Likewise.
10871         (tsubst_copy): Likewise.
10872         (unify): Likewise.
10873         * tree.c (walk_tree): Likewise.
10874         * typeck.c (comptypes): Likewise.
10875
10876 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10877
10878         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
10879         extra calls into fewer ones.
10880
10881 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
10882
10883         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
10884         Warn when merging inline with attribute noinline.
10885         (start_decl, start_function): Warn if inline and attribute
10886         noinline appear in the same declaration.
10887
10888 2001-10-16  H.J. Lu <hjl@gnu.org>
10889
10890         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
10891         for tree checking disabled.
10892
10893 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
10894
10895         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
10896         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
10897
10898 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
10899
10900         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
10901         (unify): Only handle MINUS_EXPR specially if the above flag is set
10902         and the subtracted constant is 1.  Clear the flag on recursive calls.
10903         Set it when unifying the maximum value in an INTEGER_TYPE's range.
10904
10905 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
10906
10907         * decl.c (bad_specifiers): Don't allow exception specifications
10908         on any typedefs.
10909
10910 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
10911
10912         * cp/lex.c (init_cp_pragma): Similarly.
10913
10914 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10915
10916         * pt.c (lookup_template_class): Build complete template arguments
10917         for BOUND_TEMPLATE_TEMPLATE_PARM.
10918
10919 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10920
10921         * cp-tree.h (TYPE_BINFO): Update comment.
10922         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
10923         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
10924         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
10925         (copy_type): Prototype new function.
10926         * lex.c (copy_lang_decl): Gather tree node statistics.
10927         (copy_lang_type): New function.
10928         (copy_type): Likewise.
10929         (cp_make_lang_type): Create lang_type for
10930         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
10931         and BOUND_TEMPLATE_TEMPLATE_PARM.
10932         * pt.c (tsubst): Use copy_type instead of copy_node.
10933         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
10934
10935 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10936
10937         * pt.c (determine_specialization): Ignore functions without
10938         DECL_TEMPLATE_INFO.
10939
10940 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
10941
10942         PR g++/4476
10943         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
10944
10945 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
10946
10947         * typeck2.c (store_init_value): Don't re-digest a bracketed
10948         initializer.
10949
10950         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
10951         ANON_AGGR_TYPE_P.
10952
10953 2001-10-11  Richard Henderson  <rth@redhat.com>
10954
10955         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
10956         of an asm statement.
10957         (build_vtbl_ref_1): Split out from build_vtbl_ref.
10958         (build_vfn_ref): Use it to handle vtable descriptors before
10959         calling build_vtable_entry_ref.
10960         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
10961
10962 2001-10-10  Richard Henderson  <rth@redhat.com>
10963
10964         * parse.y (asm_operand): Allow named operands.
10965         * semantics.c (finish_asm_stmt): Tweek for changed location
10966         of the operand constraint.
10967
10968 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
10969
10970         * call.c (standard_conversion): Add bad conversion between
10971         integers and pointers.
10972         (convert_like_real): Don't use convert_for_initialization for bad
10973         conversions; complain here and use cp_convert.
10974         (build_over_call): Don't handle bad conversions specially.
10975         (perform_implicit_conversion): Allow bad conversions.
10976         (can_convert_arg_bad): New fn.
10977         * cp-tree.h: Declare it.
10978         * typeck.c (convert_for_assignment): Use it.
10979         (ptr_reasonably_similar): Any target type is similar to void.
10980
10981 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
10982
10983         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
10984         (cp/cp-lang.o): New rule.
10985         * cp-tree.h: Declare hooks.
10986         * tree.c: Make hooks non-static.
10987         (init_tree): Don't initialize hooks here.
10988         * lex.c: Likewise.  Move definition of lang_hooks to...
10989         * cp-lang.c: ... new file.
10990
10991 2001-10-08  Richard Henderson  <rth@redhat.com>
10992
10993         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
10994         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
10995
10996 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10997
10998         * class.c (build_vtable_entry_ref): Const-ify.
10999         * decl.c (predefined_identifier,
11000         initialize_predefined_identifiers): Likewise.
11001         * init.c (build_new_1): Likewise.
11002         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
11003         Likewise.
11004
11005 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
11006
11007         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
11008         (INSNS_PER_STMT): Likewise.
11009         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
11010         (copy_body, initialize_inlined_parameters): Likewise.
11011         (declare_return_variable, inlinable_function_p): Likewise.
11012         (expand_call_inline, expand_calls_inline): Likewise.
11013         (optimize_inline_calls, clone_body): Likewise.
11014         * tree.c (walk_tree): Moved to ../tree-inline.c.
11015         (walk_tree_without_duplicates): Likewise.
11016         (copy_tree_r, remap_save_expr): Likewise.
11017
11018 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
11019
11020         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
11021         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
11022         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
11023         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
11024         (flag_inline_trees): Moved declaration to ../tree-inline.h.
11025         (walk_tree): Moved declaration to ../tree-inline.h.
11026         (walk_tree_without_duplicates, copy_tree_r): Likewise.
11027         (remap_save_expr): Likewise.
11028         * decl.c: Include tree-inline.h.
11029         (lang_mark_tree): Don't mark inlined_fns.
11030         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
11031         * optimize.c: Include tree-inline.h.
11032         (optimize_inline_calls): Move declaration to ../tree.h, as
11033         non-static.
11034         (remap_decl): Use language-independent constructs and hooks.
11035         (remap_block, copy_body_r, declare_return_variable): Likewise.
11036         (inlinable_function_p): Likewise.  Don't test for
11037         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
11038         no longer language-specific.
11039         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
11040         call of dump_function to...
11041         (optimize_function): Here...
11042         (clone_body): New function, extracted from...
11043         (maybe_clone_body): ... here.  Build decl_map locally and pass
11044         it on to clone_body.
11045         * pt.c, semantics.c: Include tree-inline.h.
11046         * tree.c: Likewise.
11047         (cp_walk_subtrees): New language-specific hook for tree inlining.
11048         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
11049         cp_is_overload_p, cp_auto_var_in_fn_p,
11050         cp_copy_res_decl_for_inlining): Likewise.
11051         (walk_tree): Move language-specific constructs into...
11052         (cp_walk_subtrees): this new function.
11053         (copy_tree_r): Use language-independent constructs and hooks.
11054         (init_tree): Initialize tree inlining hooks.
11055         (remap_save_expr): Adjust prototype so that the declaration
11056         does not require the definition of splay_tree.
11057
11058 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
11059
11060         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
11061         to build the declaration instead of the declaration itself.
11062
11063 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
11064
11065         * decl2.c (cxx_decode_option): Add 'else'.
11066
11067         * spew.c (end_input): No longer static.
11068         * cp-tree.h: Declare it.
11069         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
11070
11071 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
11072
11073         * call.c (build_over_call), typeck.c (build_function_call_real):
11074         Pass type attributes to check_function_format rather than name or
11075         assembler name.  Don't require there to be a name or assembler
11076         name to check formats.
11077
11078 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
11079
11080         * decl.c (init_decl_processing): Don't call
11081         init_function_format_info.  Initialize lang_attribute_table
11082         earlier.
11083         (builtin_function): Call decl_attributes.
11084         (insert_default_attributes): New.
11085
11086 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
11087
11088         * decl.c (grokdeclarator): Copy array typedef handling from C
11089         frontend.
11090
11091         * decl.c (grokdeclarator): Copy too-large array handling from C
11092         frontend.
11093
11094 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
11095
11096         * config-lang.in (target_libs): Added target-gperf, so that we
11097         don't try to build it if C++ is disabled.
11098
11099 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
11100
11101         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
11102         (cp/errfn.o): Delete rule.
11103         (cp/error.o): Depend on flags.h.
11104         * errfn.c: Delete file.
11105         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
11106         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
11107         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
11108         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
11109         internal_error respectively.  Make cp_deprecated into a macro.
11110         Don't define cp_printer typedef or declare cp_printers.
11111         * error.c: Include flags.h.
11112         Delete: struct tree_formatting_info, print_function_argument_list,
11113         print_declaration, print_expression, print_function_declaration,
11114         print_function_parameter, print_type_id, print_cv_qualifier_seq,
11115         print_type_specifier_seq, print_simple_type_specifier,
11116         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
11117         print_parameter_declaration_clause, print_exception_specification,
11118         print_nested_name_specifier, and definition of cp_printers.
11119         (locate_error): New function.
11120         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
11121         rewritten in terms of locate_error and diagnostic.c.
11122         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
11123         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
11124         (init_error): Adjust to match.
11125
11126 2001-09-22  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11127
11128         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
11129
11130 2001-09-21  Richard Henderson  <rth@redhat.com>
11131
11132         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
11133         (build_vtbl_initializer): Likewise.
11134         (build_vfn_ref): New.
11135         * cp-tree.h: Declare it.
11136         * call.c (build_over_call): Use it.
11137         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
11138         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
11139
11140 2001-09-21  J"orn Rennecke <amylaar@redhat.com>
11141
11142         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
11143
11144 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
11145
11146         Table-driven attributes.
11147         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
11148         * decl2.c (cplus_decl_attributes): Only take one attributes
11149         parameter.
11150         * cp-tree.c (cplus_decl_attributes): Update prototype.
11151         * class.c (finish_struct), decl.c (start_decl, start_function),
11152         decl2.c (grokfield), friend.c (do_friend), parse.y
11153         (parse_bitfield): Update calls to cplus_decl_attributes.
11154         * decl.c (grokdeclarator): Take a pointer to a single ordinary
11155         attribute list.
11156         * decl.h (grokdeclarator): Update prototype.
11157         * decl2.c (grokfield): Take a single ordinary attribute list.
11158         * friend.c (do_friend): Likewise.
11159         * decl.c (shadow_tag, groktypename, start_decl,
11160         start_handler_parms, grokdeclarator, grokparms, start_function,
11161         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
11162         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
11163         (process_template_parm, do_decl_instantiation): Pass single
11164         ordinary attribute lists around.
11165         * decl.c (grokdeclarator): Correct handling of nested attributes.
11166         Revert the patch
11167         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
11168                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
11169                 not the left.
11170         .
11171         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
11172         (cp_attribute_table): Declare.
11173         * decl.c (valid_lang_attribute): Don't define.
11174         (lang_attribute_table): Define.
11175         (init_decl_processing): Initialize lang_attribute_table instead of
11176         valid_lang_attribute.
11177         * tree.c (cp_valid_lang_attribute): Remove.
11178         (handle_java_interface_attribute, handle_com_interface_attribute,
11179         handle_init_priority_attribute): New functions.
11180         (cp_attribute_table): New array.
11181         * decl2.c (import_export_class): Don't use
11182         targetm.valid_type_attribute.
11183
11184 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
11185
11186         * Make-lang.in (cp/error.o): Depend on real.h
11187         * error.c: #include "real.h"
11188
11189 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11190
11191         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
11192         xmalloc/strcpy/strcat.
11193
11194 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11195
11196         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
11197         Const-ification.
11198         * pt.c (tsubst_decl): Likewise.
11199
11200 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11201
11202         * decl2.c (lang_f_options): Const-ification.
11203         * lex.c (cplus_tree_code_name): Likewise.
11204         * spew.c (yyerror): Likewise.
11205
11206 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
11207
11208         PR c++/3986
11209         * class.c (force_canonical_binfo_r): Check & move an indirect
11210         primary base first.
11211         (force_canonical_binfo): Check that it's not already
11212         canonical.
11213         (mark_primary_virtual_base): Remove BINFO parameter.
11214         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
11215
11216 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
11217
11218         Remove TYPE_NONCOPIED_PARTS.
11219         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
11220         CLASSTYPE_PURE_VIRTUALS.
11221         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
11222         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
11223         (layout_class_type): Don't call fixup_inline_methods here ...
11224         (finish_struct_1): ... call it here.
11225
11226 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
11227
11228         * decl.c (duplicate_decls): Remove code deadling with
11229         DECL_SAVED_INSNS.
11230         * decl2.c (finish_file): Likewise.
11231         * pt.c (instantiate_decl): Likewise.
11232         * semantics.c (expand_body): Don't defer local functions if
11233         they wouldn't be deferred for some other reason.  Don't
11234         generate RTL for functions that will not be emitted.
11235         (genrtl_start_function): Remove code deadling with
11236         DECL_SAVED_INSNS.
11237         (genrtl_finish_function): Likewise.
11238
11239 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
11240
11241         PR c++/4203
11242         * call.c (build_over_call): Do not optimize any empty base
11243         construction.
11244
11245 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11246
11247         * error.c (dump_template_decl): Output template parameters
11248         together with their specifiers.
11249         Output `class' prefix for template template parameter.
11250         (dump_decl): Fix formatting.
11251
11252 2001-08-30  Kurt Garloff  <garloff@suse.de>
11253
11254         * optimize.c (inlinable_function_p): Allow only smaller single
11255         functions. Halve inline limit after reaching recursive limit.
11256
11257 2001-08-30  Joern Rennecke <amylaar@redhat.com>
11258             Jason Merrill  <jason_merrill@redhat.com>
11259
11260         * class.c (build_vtable_entry_ref): Subtract in char*, not
11261         ptrdiff_t.
11262
11263 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
11264
11265         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
11266         (build_cplus_array_type): Use cp_build_qualified_type, not
11267         TYPE_MAIN_VARIANT, to get an unqualified version.
11268
11269         * decl2.c (grok_alignof): Lose.
11270         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
11271         * typeck.c (c_alignof): Lose.
11272         * semantics.c (finish_sizeof, finish_alignof): New.
11273         * parse.y: Use them.
11274         * cp-tree.h: Declare them.
11275
11276 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
11277
11278         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
11279         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
11280         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
11281
11282 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
11283
11284         * typeck2.c (add_exception_specifier): Only require complete type if
11285         not in processing template declaration.
11286
11287 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11288
11289         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
11290         GNU_xref_start_scope and GNU_xref_end_scope.
11291
11292         * tree.c (TYPE_HASH): Moved to ../tree.h.
11293
11294 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
11295
11296         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
11297         on COMPOUND_EXPRs.
11298
11299 2001-08-14  Richard Henderson  <rth@redhat.com>
11300
11301         * class.c, cp-tree.h (build_vfn_ref): Remove.
11302         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
11303
11304 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
11305
11306         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
11307         empty class assignment as having side-effects to avoid
11308         spurious warnings.
11309
11310 2001-08-13  Zack Weinberg  <zackw@panix.com>
11311
11312         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
11313         * except.c: Include libfuncs.h.
11314
11315 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
11316
11317         * decl.c (grokdeclarator): Clarify diagnostic message.
11318
11319 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11320
11321         * decl2.c (do_nonmember_using_decl): Replace using directive
11322         with using declaration in the error message.
11323
11324 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11325
11326         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
11327         criterion to avoid rebuilding expression tree instead of
11328         processing_template_decl.
11329
11330 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
11331
11332         Support named return value optimization for inlines, too.
11333         * decl.c (finish_function): Nullify returns here.
11334         * semantics.c (genrtl_start_function): Not here.
11335         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
11336         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
11337         Also nullify the CLEANUP_STMT for the nrv.
11338         * cp-tree.h: Declare it.
11339         * optimize.c (declare_return_variable): Replace the nrv with the
11340         return variable.
11341         * typeck.c (check_return_expr): Be more flexible on alignment check.
11342         Ignore cv-quals when checking for a matching type.
11343
11344 2001-08-09  Richard Henderson  <rth@redhat.com>
11345
11346         * decl2.c (finish_objects): Use target hooks instead of
11347         assemble_constructor and assemble_destructor.
11348
11349 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
11350
11351         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
11352
11353 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
11354
11355         PR c++/3820
11356         Stop using TYPE_NONCOPIED_PARTS.
11357         * call.c (build_over_call): Be careful when copy constructing
11358         or assigning to an empty class.
11359         * class.c (check_bases_and_members): It has a
11360         COMPLEX_ASSIGN_REF if it has a vptr.
11361         (layout_class_type): Don't add empty class padding to
11362         TYPE_NONCOPIED_PARTS.
11363         (finish_struct_1): Don't add the VFIELD either.
11364         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
11365         initialization.
11366
11367 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
11368
11369         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
11370
11371 2001-08-06  Richard Henderson  <rth@redhat.com>
11372
11373         * decl2.c (finish_objects): Pass a symbol_ref and priority to
11374         assemble_{constructor,destructor}.  Remove priority handling.
11375
11376 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
11377
11378         Don't allow template-id in using-declaration.
11379         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
11380         (do_class_using_decl): Likewise.
11381
11382 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
11383
11384         * cp/spew.c (read_token): No need to pop buffers.
11385
11386 2001-08-02  Stan Shebs  <shebs@apple.com>
11387
11388         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
11389         (fnaddr_from_vtable_entry): Remove decl.
11390         * method.c (use_thunk): Update comment.
11391
11392 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
11393
11394         * repo.c (get_base_filename): Change return value to const char
11395         pointer.
11396
11397 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
11398
11399         Kill -fhonor-std.
11400         * NEWS: Document.
11401         * cp-tree.h (flag_honor_std): Remove.
11402         (CPTI_FAKE_STD): Remove.
11403         (std_node): Remove comment about it being NULL.
11404         (fake_std_node): Remove.
11405         * decl.c (in_fake_std): Remove.
11406         (walk_namespaces_r): Remove fake_std_node check.
11407         (push_namespace): Remove in_fake_std code.
11408         (pop_namespace): Likewise.
11409         (lookup_name_real): Remove fake_std_node check.
11410         (init_decl_processing): Always create std_node. Always add
11411         std:: things there.
11412         (builtin_function): Always put non '_' fns in std.
11413         * decl2.c (flag_honor_std): Remove.
11414         (lang_f_options): Remove honor-std.
11415         (unsupported_options): Add honor-std.
11416         (set_decl_namespace): Remove fake_std_node check.
11417         (validate_nonmember_using_decl): Likewise.
11418         (do_using_directive): Likewise.
11419         (handle_class_head): Likewise.
11420         * dump.c (cp_dump_tree): Likewise.
11421         * except.c (init_exception_processing): Adjust.
11422         * init.c (build_member_call): Remove fake_std_node check.
11423         (build_offset_ref): Likewise.
11424         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
11425         * rtti.c (init_rtti_processing): Adjust.
11426
11427 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
11428
11429         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
11430         operand while calling cp_tree_equal.
11431
11432 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
11433
11434         The 3.0 ABI no longer has vbase pointer fields.
11435         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
11436         FORMAT_VBASE_NAME): Remove.
11437         * method.c (do_build_copy_constructor): Adjust.
11438         (do_build_assign_ref): Adjust.
11439         * search.c (lookup_field_r): Adjust.
11440         * typeck.c (build_component_ref): Adjust.
11441
11442         The 3.0 ABI always has a vtable pointer at the start of every
11443         polymorphic class.
11444         * rtti.c (build_headof_sub): Remove.
11445         (build_headof): Adjust.
11446         (get_tinfo_decl_dynamic): No need to check flag_rtti
11447         here. Adjust.
11448         (create_real_tinfo_var): Explain why we need a hidden name.
11449
11450 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
11451
11452         PR c++/3631
11453         * class.c (update_vtable_entry_for_fn): The fixed adjustment
11454         of a virtual thunk should be from declaring base.
11455
11456 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
11457
11458         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
11459         the shared virtual base, so preserving inheritance graph order.
11460
11461 2001-07-30  Andreas Jaeger  <aj@suse.de>
11462
11463         * decl2.c: Remove unused var global_temp_name_counter.
11464
11465 2001-07-28  Richard Henderson  <rth@redhat.com>
11466
11467         * method.c (pending_inlines): Remove.
11468
11469 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
11470
11471         * class.c (mark_primary_virtual_base): Don't adjust base
11472         offsets here.
11473         (dfs_unshared_virtual_bases): Adjust them here.
11474         (mark_primary_bases): Explain why we adjust at the end.
11475
11476 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
11477
11478         * class.c (finish_struct_1): When copying the primary base's
11479         VFIELD, make sure we find it is at offset zero.
11480
11481 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11482
11483         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
11484         tsubst_expr for default template arguments.
11485
11486 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
11487
11488         PR c++/3621
11489         * spew.c (yylex): Only copy the token's lineno, if it is
11490         nonzero.
11491
11492 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
11493
11494         PR c++/3624
11495         * call.c (resolve_args): Simplify, call
11496         convert_from_reference.
11497         (build_new_op): Resolve and convert from reference ARG1
11498         earlier. Adjust ARG2 & ARG3 resolve and conversion.
11499
11500 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
11501
11502         * decl.c (last_function_parm_tags): Remove.
11503         (current_function_parm_tags): Remove.
11504         (init_decl_processing): Adjust.
11505         (start_function): Adjust.
11506         (store_parm_decls): Adjust.
11507
11508         PR c++/3152
11509         * decl.c (grokdeclarator): Detect when a function typedef is
11510         declaring a function, and create last_function_parms correctly.
11511
11512 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
11513
11514         * call.c (joust): Only prefer a non-builtin candidate to a builtin
11515         one if they have the same signature.
11516
11517         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
11518         it rather than toplevel_bindings_p.  Give it a mangled name if static.
11519         (convert_to_reference): Adjust.
11520         * decl2.c (get_temp_name): Lose.
11521         * mangle.c (mangle_ref_init_variable): New fn.
11522         (mangle_guard_variable): Strip the ref-init header.
11523         * cp-tree.h: Adjust.
11524         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
11525         initializer.
11526         (grok_reference_init): Always use DECL_INITIAL.
11527
11528 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
11529
11530         PR c++/3416
11531         * call.c (build_conditional_expr): Recheck args after
11532         conversions.
11533         * cp-tree.h (build_conditional_expr): Move to correct file.
11534         * typeck.c (decay_conversion): Diagnose any unknown types
11535         reaching here.
11536         (build_binary_op): Don't do initial decay or default
11537         conversions on overloaded functions.
11538         (build_static_cast): Don't do a decay conversion here.
11539
11540 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
11541
11542         PR c++/3543
11543         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
11544         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
11545
11546 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
11547
11548         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
11549         (create_vtbl_ptr): ... here.
11550
11551 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
11552
11553         * class.c (build_vbase_offset_vbtl_entries): Look for
11554         non-primary base of which we are a sub vtable.
11555
11556 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
11557
11558         * semantics.c (finish_this_expr):  Remove unused code.
11559
11560 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
11561
11562         Simplify rtti, now we've only one ABI.
11563         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
11564         CPTI_TINFO_VAR_ID.
11565         (tinfo_decl_id, tinfo_var_id): Remove.
11566         (get_typeid_1): Remove.
11567         * rtti.c
11568         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
11569         (typeid_ok_p): New function.
11570         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
11571         (get_tinfo_decl): Remove old abi documentation.
11572         (tinfo_from_decl): Remove.
11573         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
11574         (get_typeid_1): Remove.
11575         (get_base_offset): Remove.
11576         (synthesize_tinfo_var): Absorb get_base_offset.
11577         (create_real_tinfo_var): Don't use tinfo_decl_id.
11578
11579 2001-07-23  Graham Stott  <grahams@redhat.com>
11580
11581         * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
11582         variable has_two_argument_delete_p.
11583
11584 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
11585
11586         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
11587         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
11588         (CPTI_INDEX_IDENTIFIER): Remove.
11589         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
11590         (delta2_identifier): Remove.
11591         (index_identifier): Remove.
11592         (pfn_or_delta2_identifier): Remove.
11593         (flag_vtable_thunks): Remove.
11594         (VTABLE_DELTA2_NAME): Remove.
11595         (VTABLE_INDEX_NAME): Remove.
11596         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
11597         (vfunc_ptr_type_node): Adjust.
11598         (VTABLE_NAME_PREFIX): Adjust.
11599         (build_vfn_ref): Lose first parameter.
11600         (fixup_all_virtual_upcast_offsets): Remove.
11601         * decl.c (initialize_predefined_identifiers): Remove
11602         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
11603         (init_decl_processing): Remove no-vtable-thunk code.
11604         * decl2.c (flag_vtable_thunks): Remove.
11605         (mark_vtable_entries): Remove no-vtable-thunk code.
11606         * error.c (dump_decl): Remove no-vtable-thunk code.
11607         (dump_expr): Adjust ptr to member function code.
11608         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
11609         code.
11610         * rtti.c (build_headof): Remove no-vtable-thunk code.
11611         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
11612         * search.c (get_base_distance): Remove expand_upcast_fixups case.
11613         (virtual_context) Remove.
11614         (expand_upcast_fixups): Remove.
11615         (fixup_virtual_upcast_offsets): Remove.
11616         (fixup_all_virtual_upcast_offsets): Remove.
11617         * typeck.c (get_member_function_from_ptrfunc): Remove
11618         no-vtable-thunk code.
11619         * call.c (build_over_call): Adjust call to build_vfn_ref.
11620         * class.c (build_vfn_ref): Lose first parameter. Remove
11621         no-vtable-thunk code.
11622         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
11623         (build_vtable_entry): Remove no-vtable-thunk code.
11624
11625 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
11626
11627         Remove old-abi remnants. Remove comments about old abi
11628         behavior. Remove references to 'new-abi' in comments.
11629         * cp-tree.h: Adjust comments.
11630         (vbase_offsets_in_vtable_p): Delete.
11631         (vcall_offsets_in_vtable_p): Delete.
11632         (vptrs_present_everywhere_p): Delete.
11633         (all_overridden_vfuns_in_vtables_p): Delete.
11634         (merge_primary_and_secondary_vtables_p): Delete.
11635         (TYPE_CONTAINS_VPTR_P): Adjust.
11636         (VTT_NAME_PREFIX): Remove.
11637         (CTOR_VTBL_NAME_PREFIX): Remove.
11638         (init_vbase_pointers): Remove.
11639         * class.c: Adjust coments.
11640         (build_vbase_pointer_fields): Delete.
11641         (build_vbase_pointer): Remove old-abi code.
11642         (build_secondary_vtable): Likewise.
11643         (modify_all_vtables): Likewise.
11644         (create_vtable_ptr): Likewise.
11645         (layout_class_type): Likewise.
11646         (finish_struct_1): Likewise.
11647         (finish_vtbls): Likewise.
11648         (dfs_finish_vtbls): Delete.
11649         (build_vbase_offset_vtbl_entries): Remove old-abi code.
11650         * cvt.c: Adjust comments.
11651         * decl.c: Adjust comments.
11652         * decl2.c: Adjust comments.
11653         * init.c: Adjust comments.
11654         (construct_virtual_bases): Remove old-abi code.
11655         * lang-specs.h: Remove -fno-new-abi.
11656         * mangle.c: Adjust comments.
11657         * rtti.c: Adjust comments.
11658         (get_base_offset): Remove old-abi-code.
11659         * search.c: Adjust comments.
11660         (dfs_init_vbase_pointers): Remove.
11661         (dfs_vtable_path_unmark): Remove.
11662         (init_vbase_pointers): Remove.
11663         * semantics.c: Adjust comments.
11664         (emit_associated_thunks): Remove old-abi code.
11665         * typeck.c: Adjust comments.
11666
11667 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
11668
11669         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
11670         params.h.
11671
11672 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
11673
11674         * class.c (finish_struct_anon): Forbid nested classes.
11675
11676 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
11677
11678         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
11679         * optimize.c: Include debug.h.
11680         (maybe_clone_body): Use debug hook.
11681         * semantics.c: Include debug.h.
11682         (expand_body): Use debug hook.
11683
11684 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
11685
11686         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
11687
11688 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
11689
11690         * class.c (type_requires_array_cookie): New function.
11691         (check_methods): Don't try to figure out whether the type needs a
11692         cookie here.
11693         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
11694         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
11695         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
11696         * pt.c (instantiate_class_template): Don't set
11697         TYPE_VEC_DELETE_TAKES_SIZE.
11698         * NEWS: Document ABI changes from GCC 3.0.
11699
11700 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
11701             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
11702
11703         * NEWS (Changes in GCC 3.0): Fix typo.
11704
11705 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
11706
11707         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
11708         which attributes are to be attached, and a flags argument.  Update
11709         call to decl_attributes.
11710         (grokfield): Update call to decl_attributes.
11711         * class.c (finish_struct): Update call to cplus_decl_attributes.
11712         * cp-tree.h (cplus_decl_attributes): Update prototype.
11713         * decl.c (start_decl, grokdeclarator, start_function): Update
11714         calls to decl_attributes and cplus_decl_attributes.
11715         * friend.c (do_friend): Update call to cplus_decl_attributes.
11716         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
11717
11718 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
11719
11720         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
11721         for `register' variables with an asm-specification.
11722
11723 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
11724
11725         * semantics.c (finish_asm_stmt): Mark the output operands
11726         to an asm addressable, if necessary.
11727
11728 2001-07-11  Ben Elliston  <bje@redhat.com>
11729
11730         * Revert this change -- there is a subtle bug.
11731
11732         PR c++/80
11733         * decl.c (finish_enum): New "attributes" argument; pass it to
11734         cplus_decl_attributes.  Use a narrower type if the enum is packed.
11735         * cp-tree.h (finish_enum): Adjust prototype.
11736         * parse.y (enum_head): New non-terminal.
11737         (structsp): Use it. Enums now may be preceded or followed by
11738         optional attributes -- pass their chained tree to finish_enum().
11739         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
11740
11741 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
11742
11743         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
11744         variables.
11745
11746 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
11747
11748         * semantics.c (cp_expand_stmt): Fix for null
11749         current_function_return_value.
11750
11751 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
11752
11753         * call.c (build_op_delete_call): Initialize fn.
11754         (convert_like_real): Delete conditional.
11755         (joust): Initialize *w and *l.
11756         * class.c: Add prototype for binfo_ctor_vtable.
11757         (get_primary_binfo): Initialize result.
11758         * init.c (build_java_class_ref): Initialize name.
11759
11760 2001-07-09  Erik Rozendaal  <dlr@acm.org>
11761
11762         * typeck.c (unary_complex_lvalue): Do not duplicate the
11763         argument to modify, pre-, or post-increment when used as an
11764         lvalue and when the argument has side-effects.
11765
11766 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
11767
11768         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
11769         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
11770         cplus_decl_attributes even if attrs is NULL.
11771         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
11772
11773 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
11774
11775         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
11776         calls to decl_attributes.
11777
11778 2001-07-06  Ira Ruben   <ira@apple.com>
11779
11780         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
11781         be DECL_TEMPLATE_RESULT.
11782
11783 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11784
11785         * cp-tree.h (copy_template_template_parm): Rename to ...
11786         (bind_template_template_parm): ... here.
11787         * tree.c (copy_template_template_parm): Rename to ...
11788         (bind_template_template_parm): ... here.  Remove the case when
11789         NEWARGS is NULL_TREE.
11790         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
11791         BOUND_TEMPLATE_TEMPLATE_PARM.
11792         * pt.c (lookup_template_class): Adjust.
11793
11794 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
11795
11796         * cvt.c (convert_lvalue): New fn.
11797         * cp-tree.h: Declare it.
11798         * method.c (do_build_assign_ref): Use it.
11799         (do_build_copy_constructor): Convert parm to base types
11800         before calling base constructors.
11801
11802         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
11803         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
11804         optimize.
11805         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
11806
11807 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
11808
11809         * optimize.c (optimize_inline_calls): New function, broken out
11810         of ...
11811         (optimize_function): ... here. Call it. Don't inline if it is
11812         a thunk.
11813         (dump_function): Print name of dump flag causing this dump.
11814         * semantics.c (expand_body): Move thunk inline check to
11815         optimize_function.
11816
11817 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
11818
11819         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
11820         (comptypes): Use target.comp_type_attributes.
11821
11822 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
11823
11824         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
11825
11826 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
11827
11828         * error.c (lang_print_error_function): Add a `diagnostic_context *'
11829         parameter. Tweak.
11830
11831 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
11832
11833         * decl2.c (import_export_class): Update.
11834
11835 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
11836
11837         * error.c (init_error): Adjust settings.
11838
11839 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
11840
11841         * error.c (init_error): Adjust settings.
11842
11843 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
11844
11845         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
11846         return pointers to data members by reference rather than by value.
11847
11848 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
11849
11850         Implement the Named Return Value optimization.
11851         * cp-tree.h (struct cp_language_function): Add x_return_value.
11852         (current_function_return_value): Now a macro.
11853         * decl.c: Don't define it.
11854         (define_label, finish_case_label): Don't clear it.
11855         (init_decl_processing): Don't register it with GC.
11856         * semantics.c (genrtl_finish_function): Don't check it for
11857         no_return_label.  Copy the RTL from the return value to
11858         current_function_return_value and walk, calling...
11859         (nullify_returns_r): ...this new fn.
11860         * typeck.c (check_return_expr): Set current_function_return_value.
11861
11862 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
11863
11864         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
11865         sharing a ctor vtable with.  Merge code for cases 1 and 2.
11866         (binfo_ctor_vtable): New fn.
11867         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
11868
11869 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
11870
11871         * class.c (dfs_find_final_overrider): Fix logic.
11872
11873         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
11874         virtual thunk instead of non-virtual.
11875         (get_matching_virtual): Uncomment.
11876
11877         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
11878         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
11879         PARM, not ARG.
11880
11881 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
11882
11883         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
11884         we've not emerged from the hierarchy of RTTI_BINFO on reaching
11885         a non-virtual base.
11886
11887 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
11888
11889         * NEWS: Update release number.
11890
11891 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
11892
11893         PR c++/3130, c++/3131, c++/3132
11894         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
11895         * class.c (force_canonical_binfo_r): Move
11896         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
11897         virtual bases unless they're primary and what they're primary
11898         too has been moved.
11899         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
11900         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
11901         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
11902         derived binfo.
11903         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
11904         (layout_nonempty_base_or_field): Add most derived type
11905         parameter. Adjust.
11906         (layout_empty_base): Likewise.
11907         (build_base_field): Likewise.
11908         (build_base_fields): Likewise.
11909         (propagate_binfo_offsets): Add most derived type
11910         parameter. Skip non canonical virtual bases too.
11911         (dfs_set_offset_for_unshared_vbases): Don't skip primary
11912         bases. Do skip canonical bases.
11913         (layout_virtual_bases): Adjust.
11914         (layout_class_type): Adjust.
11915         (dfs_get_primary_binfo): Build list of virtual primary base
11916         candidates.
11917         (get_primary_binfo): Check that the shared virtual primary
11918         base candidate was found first.
11919         (accumulate_vtbl_inits): Don't do anything for non-vptr
11920         containing binfos. For case 1 primary virtual bases, keep
11921         checking that we've not emerged from the hierarchy of RTTI_BINFO.
11922
11923 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
11924
11925         PR c++/3089
11926         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
11927         hierarchy looking for primary bases for a ctor
11928         vtable. Recursively call oneself, if we meet our primary via
11929         this route and haven't met it yet via inheritance graph order.
11930
11931 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
11932
11933         * lang-options.h: Emit documentation for -fno-honor-std, not
11934         -fhonor-std.
11935
11936 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
11937
11938         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
11939         Don't clobber delta.
11940         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
11941
11942 2001-06-10  Mark Mitchell <mark@codesourcery.com>
11943             Gabriel Dos Reis  <gdr@codesourcery.com>
11944
11945         * Make-lang.in (cp/call.o): Depend on diagnostic.h
11946         (cp/typeck.o): Depend on diagnostic.h
11947         (cp/typeck2.o): Depend on diagnostic.h
11948         (cp/repo.o): Depend on dignostic.h
11949         * typeck.c: #include diagnostic.h
11950         (convert_for_initialization): Remove extern declaration for
11951         warningcount and errorcount.
11952
11953         * call.c: #include diagnostic.h
11954         (convert_like_real): Remove extern declaration for warnincount and
11955         errorcount.
11956
11957         * repo.c: #include diagnostic.h
11958         * typeck2.c: #include diagnostic.h
11959
11960 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
11961
11962         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
11963         in previous change.
11964
11965 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
11966
11967         PR c++/2929
11968         * friend.c (do_friend): Use push_decl_namespace for classes at
11969         namespace scope.
11970
11971 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
11972             Jason Merrill <jason_merrill@redhat.com>
11973
11974         PR c++/3061
11975         * class.c (build_secondary_vtable): Use assert, rather than an error
11976         message.
11977         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
11978         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
11979         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
11980         Don't set BINFO_VTABLE for a primary virtual base.
11981
11982 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
11983
11984         * decl.c (duplicate_decls): Update source position information
11985         when a template function is defined.
11986
11987 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
11988
11989         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
11990
11991 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
11992
11993         PR c++/2914
11994         * decl.c (pushtag): Don't push into a complete type's scope.
11995
11996 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
11997
11998         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
11999         (struct lang_decl_flags): Lose generate_with_vtable_p.
12000         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
12001         * class.c (copy_virtuals): Adjust.
12002         * decl2.c (mark_vtable_entries): Adjust.
12003         * method.c (make_thunk, build_vtable_entry): Adjust.
12004         * class.c (update_vtable_entry_for_fn): Only look as far as the
12005         first defining class.
12006         (build_vtbl_initializer): Put nothing in the slot for a function only
12007         defined in a lost primary virtual base.
12008         (add_vcall_offset_vtbl_entries_1): Use the same code for
12009         the lost primary case and the normal case.
12010         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
12011         (get_vfield_offset, get_derived_offset): Lose.
12012         (dfs_find_final_overrider): Use look_for_overrides_here.
12013         (get_matching_virtual): New fn.
12014         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
12015         not BV_VCALL_INDEX.
12016         * search.c (look_for_overrides_here): Split out from...
12017         (look_for_overrides_r): Here.
12018
12019         * class.c (find_final_overrider): Return error_mark_node on error.
12020
12021         * decl2.c (key_method): #if 0 accidental change.
12022
12023 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
12024
12025         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
12026         (build_over_call): Likewise.
12027         * decl.c (grokparms): Likewise.
12028         * pt.c (tsubst_decl): Likewise.
12029         * typeck.c (convert_arguments): Likewise.
12030
12031 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
12032
12033         * semantics.c (begin_class_definition): Robustify.
12034
12035         * pt.c (instantiate_decl): Tell the repository code about the
12036         clones, not the cloned functions.
12037         * repo.c (repo_template_used): Explicitly instantiate the cloned
12038         function, not the clones.
12039
12040 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
12041
12042         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
12043         ICS_BAD_FLAG on created conversion.
12044         (compare_ics): Break out rank.
12045
12046 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
12047
12048         * decl.c (xref_tag): Remove extraneous %s on dependent name
12049         lookup warning.
12050
12051 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
12052
12053         * class.c (layout_vtable_decl): Fix off by one error on
12054         build_index_type.
12055         (build_vtt): Likewise.
12056         (build_ctor_vtbl_group): Likewise.
12057
12058 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
12059
12060         * class.c (maybe_indent_hierarchy): New function.
12061         (dump_class_hierarchy_r): Add flags. Dump extra binfo
12062         information, if enabled. Use maybe_indent_hierarchy. Adjust
12063         output format.
12064         (dump_class_hierarchy): Adjust prototype. Adjust output format.
12065         (dump_array, dump_vtable, dump_vtt): New functions.
12066         (finish_struct_1): Adjust hierarchy dumping.
12067         (initialize_vtable): Call dump_vtable.
12068         (build_vtt): Call dump_vtt.
12069         (build_ctor_vtbl_group): Call dump_vtable.
12070         * decl2.c (flag_dump_class_layout): Remove.
12071         (cxx_decode_option): Remove dump translation unit
12072         and dump class hierarchy check. Call dump_switch_p.
12073         (finish_file): Adjust dumping.
12074         (dump.c): Only dump base classes if not TDF_SLIM.
12075         Only dump namespace members if not TDF_SLIM.
12076         * optimize.c (dump_function): New function.
12077         (optimize_function): Call dump_function.
12078         * semantics.c (expand_body): Use dump_enabled_p.
12079
12080 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
12081
12082         PR g++/2936
12083         Part missed from first commit
12084         * decl2.c (finish_anon_union): Copy context.
12085
12086 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
12087
12088         PR g++/2936
12089         * optimize.c (remap_decl): Remap anonymous aggregate members too.
12090
12091 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
12092
12093         PR g++/2823
12094         * semantics.c (expand_body): Don't optimize thunks.
12095
12096 2001-05-25  Sam TH  <sam@uchicago.edu>
12097
12098         * cp-tree.h lex.h: Fix header include guards.
12099
12100 2001-05-25  Mark Mitchell <mark@codesourcery.com>
12101
12102         * decl.c (init_decl_processing): Tweak.
12103
12104 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
12105
12106         * decl.c (duplicate_decls): Tidy.
12107         (init_decl_processing): Always set flag_no_builtin.
12108
12109 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
12110
12111         PR c++/2184
12112         * decl2.c (do_local_using_decl): Push the decls, even in a
12113         template.
12114
12115 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
12116
12117         * optimize.c (initialize_inlined_parameters): Don't set
12118         TREE_READONLY for a VAR_DECL taking the place of an inlined
12119         PARM_DECL.
12120
12121 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
12122
12123         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
12124         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
12125         attribute.
12126
12127 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
12128
12129         * parse.y: Refer to compound literals as such, not as
12130         constructor-expressions.
12131
12132 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
12133
12134         * call.c (build_op_delete_call): Ignore exception-specifications
12135         when looking for matching delete operators.
12136         * init.c (build_new_1): Compute whether or not the allocation
12137         function used is a placement allocation function or not, and
12138         communicate this information to build_op_delete_call.
12139
12140 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
12141
12142         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
12143         (build_vtbl_ref): Adjust.
12144         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
12145         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
12146         Re-add vtable-gc.
12147         (unsupported_options): Correspondingly.
12148
12149         * decl2.c (maybe_make_one_only): Check flag_weak, not
12150         supports_one_only().
12151
12152         * cp-tree.def (START_CATCH_STMT): Lose.
12153         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
12154         * tree.c (cp_statement_code_p): Don't case it.
12155         * semantics.c (cp_expand_stmt): Likewise.
12156         * cp-tree.h (START_CATCH_TYPE): Lose.
12157         (HANDLER_TYPE): New.
12158         * except.c (expand_start_catch_block): Don't start any blocks.
12159         Return the type.
12160         (expand_end_catch_block): Don't end any blocks.
12161         * parse.y (handler): Don't pass anything from finish_handler_parms
12162         to finish_handler.
12163         * pt.c (tsubst_expr): Likewise.
12164         * semantics.c (begin_handler): Call note_level_for_catch here.
12165         (finish_handler_parms): Don't return anything.
12166         (genrtl_catch_block, begin_catch_block): Lose.
12167         (genrtl_handler): Call expand_start_catch here.
12168
12169 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
12170
12171         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
12172         (get_vtable_decl, build_vtt): Not here.
12173
12174 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
12175
12176         PR c++/2781
12177         * optimize.c (update_cloned_parm): Copy addressability and other
12178         flags.
12179
12180 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12181
12182         * pt.c (determine_specialization): Ignore artificial functions.
12183
12184 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
12185
12186         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
12187         (C_RID_CODE): Remove.
12188         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
12189         (init_parse): Don't do it here.
12190
12191 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
12192
12193         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
12194         function declaration to avoid stripping the symbol's attributes.
12195
12196 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
12197
12198         * decl.c (pushdecl): Adjust error string.
12199         (xref_tag): Adjust friend class injection warning. Remove the
12200         inherited name from the class shadowed scope.
12201
12202 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
12203
12204         * except.c (cp_protect_cleanup_actions): New function.
12205         (init_exception_processing): Don't set protect_cleanup_actions
12206         here.  Do set lang_protect_cleanup_actions.
12207
12208 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
12209
12210         * spew.c (read_token): Call yyerror on all unexpected tokens.
12211
12212 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
12213
12214         * init.c (member_init_ok_or_else): Take a tree rather than
12215         string for name.
12216         (expand_member_init): Adjust.
12217
12218 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
12219
12220         * decl.c (duplicate_decls): Suppress warning about duplicate
12221         decls if the first decl is a friend.
12222
12223 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
12224
12225         * except.c (choose_personality_routine): Export.  Add
12226         explanatory comment.  Take an enum languages, not a boolean.
12227         (initialize_handler_parm): Adjust to match.
12228         * cp-tree.h: Prototype choose_personality_routine.
12229         * lex.c (handle_pragma_java_exceptions): New function.
12230         (init_cp_pragma): Register #pragma GCC java_exceptions.
12231
12232 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
12233
12234         * method.c (build_mangled_C99_name): Remove unused prototype.
12235
12236 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
12237
12238         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
12239         * typeck.c (get_member_function_from_ptrfunc,
12240         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
12241         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
12242
12243         Reverted Geoff Keating's 2001-05-03's patch.
12244
12245 2001-05-11  Ira Ruben   <ira@apple.com>
12246
12247         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
12248
12249 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
12250
12251         * cp-tree.h (finish_label_expr, lookup_label): Delete.
12252         * parse.y: Update for '&&'; don't issue warning here.
12253         * semantics.c (finish_label_expr): Delete.
12254
12255 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
12256
12257         * splay-tree.h (splay_tree_max): New function.
12258         (splay_tree_min): Likewise.
12259
12260 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
12261
12262         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
12263         (pfn_vflag_identifier): Define.
12264         Update comment about layout of pointer functions.
12265         (build_ptrmemfunc1): Update prototype.
12266         (expand_ptrmemfunc_cst): Update prototype.
12267         * decl.c (initialize_predefined_identifiers): Initialize
12268         pfn_vflag_identifier.
12269         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
12270         an extra field to the type.
12271         * expr.c (cplus_expand_constant): Pass 'flag' between
12272         expand_ptrmemfunc_cst and build_ptrmemfunc1.
12273         * typeck.c (get_member_function_from_ptrfunc): When
12274         FUNCTION_BOUNDARY < 16, look at additional field to determine
12275         if a pointer-to-member is a real pointer or a vtable offset.
12276         (build_ptrmemfunc1): Add new parameter to contain extra field.
12277         (build_ptrmemfunc): Pass the extra field around.
12278         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
12279         (pfn_from_ptrmemfunc): Ignore the extra field.
12280
12281 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
12282
12283         * cp-tree.h (flag_inline_trees): Update documentation.
12284         * decl.c (init_decl_processing): Adjust handling of
12285         flag_inline_functions and flag_inline_trees to support -O3.
12286         (grokfndecl): Set DECL_INLINE on all functions if that's what
12287         the user requested.
12288         (save_function_data): Clear DECL_INLINE in
12289         current_function_cannot_inline is non-NULL.
12290         * decl2.c (flag_inline_trees): Update documentation.
12291
12292 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
12293
12294         * dump.c (cp_dump_tree, USING_STMT case): New case.
12295         * tree.c (cp_statement_code_p): Add USING_STMT.
12296         * decl2.c (do_using_directive): Add the using directive statement.
12297
12298         * tree.c (walk_tree): Reformat an if block.
12299
12300 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
12301
12302         * decl.c (compute_array_index_type): Don't try to do anything with
12303         the indices when processing a template.
12304
12305 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12306
12307         * call.c: NULL_PTR -> NULL.
12308         * class.c: Likewise.
12309         * cvt.c: Likewise.
12310         * decl.c: Likewise.
12311         * decl2.c: Likewise.
12312         * except.c: Likewise.
12313         * init.c: Likewise.
12314         * rtti.c: Likewise.
12315         * search.c: Likewise.
12316         * tree.c: Likewise.
12317         * typeck.c: Likewise.
12318         * typeck2.c: Likewise.
12319
12320 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
12321
12322         * decl2.c (do_using_directive): Revert previous patch.
12323
12324 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
12325
12326         * cp-tree.def (USING_STMT): New statement node.
12327         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
12328         * decl2.c (do_using_directive): Add USING_STMT to statement
12329         tree. Don't emit errors when processing template decl.
12330         * pt.c (tsubst_expr, USING_STMT case): New case.
12331         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
12332
12333 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
12334
12335         * call.c (build_new_op): Convert args from reference here.
12336         (build_conditional_expr): Don't convert here.
12337
12338 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
12339
12340         * spew.c (last_token_id): New static variable.
12341         (read_token): Set it here.
12342         (yyerror): Use it here.
12343
12344 2001-04-30  Richard Henderson  <rth@redhat.com>
12345
12346         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
12347         * decl.c: Likewise.
12348
12349 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
12350
12351         * gxxint.texi: Remove.
12352         * Make-lang.in: Remove all traces of gxxint.texi.
12353
12354 2001-04-30  Mark P Mitchell  <mark@codesourcery.com>
12355
12356         * decl2.c (start_static_initialization_or_destruction): Correct
12357         logic to handle the -fno-use-cxa-atexit case.
12358
12359 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
12360
12361         * optimize.c (update_cloned_parm): New function.
12362         (maybe_clone_body): Use it.  Update the `this' parameter too.
12363
12364 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
12365
12366         * decl2.c (unsupported_options): Add new-abi.
12367         * lang-options.h: Remove no longer supported options.
12368
12369 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
12370
12371         * except.c (can_convert_eh): Don't check template parms,
12372         typename types etc.
12373
12374 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
12375
12376         * optimize.c (maybe_clone_body): Copy parameter names and locations.
12377
12378 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
12379
12380         * cp-tree.h (adjust_clone_args): Prototype new function.
12381         * class.c (adjust_clone_args): New function.
12382         * decl.c (start_function): Call it for in charge ctors.
12383
12384 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
12385
12386         * method.c (use_thunk): Make sure that thunks really are emitted
12387         when requested.
12388
12389 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
12390
12391         * mangle.c (write_chars): New macro.
12392         (hwint_to_ascii): New function
12393         (write_number): Use it.
12394         (write_integer_cst): Deal with really big numbers.
12395
12396 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
12397
12398         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
12399         the clone.
12400
12401 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
12402
12403         * decl.c (grokdeclarator): Set context of namespace scope
12404         TYPE_DECLS.
12405
12406 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
12407
12408         * cp/optimize.c: Include hashtab.h.
12409         (struct inline_data): Add tree_pruner.
12410         (expand_call_inline, expand_calls_inline): Use it when calling
12411         walk_tree.
12412         (optimize_function): Initialize and free tree_pruner.
12413
12414 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
12415
12416         Lazy __FUNCTION__ generation.
12417         * cp-tree.def (FUNCTION_NAME): Remove.
12418         * cp-tree.h (function_name_declared_p): Remove.
12419         (cp_fname_init): Prototype.
12420         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
12421         don't call declare_function_name. Call start_fname_decls.
12422         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
12423         clobber the line number.
12424         (cp_fname_init): New function.
12425         (start_function): Call start_fname_decls.
12426         (finish_function): Call finish_fname_decls.
12427         * lex.c (reswords): Add slots for __FUNCTION__ et al.
12428         (rid_to_yy): Add mappings for __FUNCTION__ et al.
12429         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
12430         * parse.y (VAR_FUNC_NAME): New token.
12431         (primary): Add VAR_FUNC_NAME.
12432         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
12433         generation.
12434         (tsubst, FUNCTION_NAME case): Remove.
12435         (tsubst_copy, FUNCTION_NAME case): Remove.
12436         (tsubst_expr, DECL_STMT case): Be careful with a
12437         DECL_PRETTY_FUNCTION_P.
12438         (instantiate_decl): Remove function_name_declared_p.
12439         * semantics.c (begin_compound_statement): Don't call
12440         declare_function_name here.
12441         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
12442         (finish_translation_unit): Call finish_fname_decls.
12443         (expand_body): Remove function_name_declared_p.
12444         * typeck2.c (digest_init): Allow any ERROR_MARK.
12445
12446 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
12447
12448         * pt.c (tsubst_decl): Use VOID_TYPE_P.
12449         * semantics.c: Fix some typos.
12450
12451 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
12452
12453         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
12454
12455 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12456
12457         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
12458
12459 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
12460
12461         * except.c (build_throw): Wrap the initialization of the exception
12462         object in a MUST_NOT_THROW_EXPR.
12463         (do_free_exception): #if 0.
12464
12465 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
12466
12467         * cp-tree.h (finish_enum): Change prototype.
12468         * decl.c (finish_enum): Reorganize.
12469         * parse.y (structsp): Adjust calls to finish_enum.
12470
12471 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
12472
12473         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
12474         't' case.
12475
12476 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
12477
12478         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
12479         (layout_empty_base): Return at end flag.
12480         (build_base_field): Likewise.
12481         (build_base_fields): Likewise.
12482         (layout_virtual_bases): Don't add 1 to eoc value.
12483         (end_of_class): Use full size for empty bases.
12484         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
12485         empty bases. Don't add 1 to eoc value. Only add trailing padding
12486         if we're an empty class with no empty bases.
12487         (dump_class_hierarchy): Dump size and alignment.
12488
12489 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
12490
12491         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
12492         ICS_BAD_FLAG.
12493
12494 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
12495
12496         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
12497         is found, look first if name does not match the structure name.
12498
12499 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
12500
12501         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
12502         set.
12503         (SET_DECL_LANGUAGE): New macro.
12504         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
12505         (pushdecl): Likewise.
12506         (build_library_fn_1): Likewise.
12507         (build_cp_library_fn): Likewise.
12508         (grokfndecl): Likewise.
12509         (grokvardecl): Mark `extern "C"' variables as having C linkage.
12510         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
12511         * lex.c (retrofit_lang_decl): Likewise.
12512         * mangle.c (mangle_decl_string): Don't mangle the names of
12513         variables declared with C language linkage.
12514         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
12515
12516 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
12517
12518         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
12519         flag_access_control from uninitialized storage.
12520
12521 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
12522
12523         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
12524         * mangle.c (write_pointer_to_member_type): Fix mangling of
12525         pointers to cv-qualified member function types.
12526
12527         * init.c (build_delete): Create a SAVE_EXPR for the address if
12528         we're going to use it more than once.
12529
12530 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
12531
12532         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
12533         (expand_ptremfunc_cst): Change prototype.
12534         (delta2_from_ptrmemfunc): Remove.
12535         * expr.c (cplus_expand_constant): Adjust call to
12536         expand_ptrmemfunc_cst.
12537         * typeck.c (build_ptrmemfunc1): Simplify.
12538         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
12539         results in a constant.
12540         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
12541         (delta2_from_ptrmemfunc): Remove.
12542         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
12543
12544 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
12545
12546         * cp-tree.h (decl_namespace_list): New macro.
12547         (struct saved_scope): Add decl_ns_list.
12548         * decl.c (mark_saved_scope): Mark it.
12549         * decl2.c: Lose static decl_namespace_list.
12550         (init_decl2): Don't save it.
12551
12552 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12553
12554         * cp-tree.h (warn_return_type, yylex): Delete redundant
12555         declarations.
12556
12557         * decl.c (current_class_depth, global_namespace): Likewise.
12558
12559         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
12560
12561         * repo.c (flag_use_repository): Likewise.
12562
12563 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12564
12565         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
12566         set_block, pushdecl, getdecls, gettags, init_decl_processing,
12567         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
12568         lvalue_or_else, print_lang_statistics, comp_target_types,
12569         unsigned_type, signed_type, signed_or_unsigned_type,
12570         build_function_call, mark_addressable, incomplete_type_error):
12571         Delete redundant declarations.
12572
12573 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
12574
12575         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
12576         (TYPE_ANONYMOUS_P): New macro.
12577         (TAGGED_TYPE_P): New macro.
12578         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
12579         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
12580         * tree.c (no_linkage_helper): Likewise.
12581         * semantics.c (begin_class_definition): Likewise.
12582         * pt.c (convert_template_argument): Likewise.
12583         * lex.c (check_for_missing_semicolon): Likewise.
12584
12585 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
12586
12587         * class.c (dfs_unshared_virtual_bases): New function.
12588         (mark_primary_bases): Call it.
12589         (check_bases): Ignore virtual bases when determining
12590         nearly-emptiness.
12591
12592 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
12593
12594         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
12595
12596 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
12597
12598         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
12599         cloned function to the clone.
12600
12601 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12602
12603         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
12604
12605         * semantics.c: Include expr.h.
12606
12607 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
12608
12609         * method.c (implicitly_declare_fn): Commonize code for copy ctor
12610         and assignment op. Set TREE_USED for parameter.
12611
12612 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
12613
12614         * class.c (find_final_overrider_data): Add `candidates'.
12615         (dfs_find_final_overrider): Don't issue error messages
12616         prematurely.
12617         (find_final_overrider): Issue error messages here.
12618         (build_base_field): Don't warn about amgibuous direct bases here.
12619         (warn_about_ambiguous_direct_bases): New function.
12620         (layout_class_type): Use it.
12621
12622 2001-04-10  Richard Henderson  <rth@redhat.com>
12623
12624         * typeck.c (build_array_ref): Push the array reference inside
12625         COMPOUND_EXPR and COND_EXPR.
12626
12627 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
12628
12629         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
12630         * decl.c (duplicate_decls): Adjust accordingly.
12631         (maybe_commonize_var): Likewise.
12632         (grokfndecl): Likewise.
12633         (start_function): Likewise.
12634         (start_method): Likewise.
12635         * decl2.c (key_method): Likewise.
12636         (import_export_decl): Likewise.
12637         * method.c (implicitly_declare_fn): Likewise.
12638         * optimize.c (maybe_clone_body): Likewise.
12639
12640 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
12641
12642         * lang-specs.h: Add __DEPRECATED.
12643
12644 2001-04-05  J"orn Rennecke <amylaar@redhat.com>
12645
12646         * search.c (get_dynamic_cast_base_type): When building a new
12647         constant, set its type to ssizetype.
12648
12649 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
12650
12651         * optimize.c (expand_call_inline): Only add newly inlined statements
12652         into inlined_stmts.
12653
12654 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
12655
12656         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
12657         (OPERATOR_FORMAT): Likewise.
12658         (OPERATOR_TYPENAME_FORMAT): Likewise.
12659         * operators.def: Remove old name-mangling information.
12660         * decl.c (grok_op_properties): Adjust accordingly.
12661         * lex.c (init_operators): Likewise.
12662         * rtti.c (get_tinfo_decl): Issue error messages about types that
12663         have variable size.
12664
12665 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
12666
12667         * decl2.c (import_export_decl): Don't call import_export_class
12668         when processing an inline member function.
12669         * semantics.c (expand_body): Call import_export_decl before
12670         emitting inline functions.
12671
12672 2001-03-28  Richard Henderson  <rth@redhat.com>
12673
12674         IA-64 ABI Exception Handling:
12675         * cp-tree.def (EH_SPEC_BLOCK): New.
12676         (MUST_NOT_THROW_EXPR): New.
12677         * cp-tree.h: Update changed function declarations.
12678         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
12679         (CPTI_CALL_UNEXPECTED): New.
12680         (struct cp_language_function): Rename x_eh_spec_try_block
12681         to x_eh_spec_block.
12682         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
12683         * decl.c (current_binding_level): If no current function
12684         bindings, revert to scope_chain.
12685         (initialize_predefined_identifiers): Remove __cp_push_exception.
12686         (store_parm_decls): Use begin_eh_spec_block.
12687         (finish_function): Use finish_eh_spec_block.
12688         (mark_lang_function): Update for name changes.
12689         * decl2.c (finish_file): No mark_all_runtime_matches.
12690         * dump.c (cp_dump_tree): Handle new tree codes.
12691         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
12692         * except.c (catch_language_init, catch_language): Remove.
12693         (init_exception_processing): Don't set language code.
12694         Initialize call_unexpected_node, protect_cleanup_actions,
12695         eh_personality_libfunc, lang_eh_runtime_type.
12696         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
12697         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
12698         (prepare_eh_type): Split out type canonicalizations ...
12699         (build_eh_type_type): ... from here.
12700         (build_eh_type_type_ref): Remove.
12701         (mark_all_runtime_matches): Remove.
12702         (build_exc_ptr): New.
12703         (do_begin_catch, do_end_catch): New.
12704         (do_pop_exception): Remove.
12705         (build_terminate_handler): Remove.
12706         (choose_personality_routine): Split out language choice from ...
12707         (initialize_handler_parm): ... here.
12708         Use MUST_NOT_THROW_EXPR.
12709         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
12710         exception object handling.
12711         (expand_start_eh_spec, expand_end_eh_spec): Remove.
12712         (expand_exception_blocks, alloc_eh_object): Remove.
12713         (begin_eh_spec_block, finish_eh_spec_block): New.
12714         (do_allocate_exception, do_free_exception): New.
12715         (expand_throw): Merge into ...
12716         (build_throw): ... here.  Update for abi.
12717         * expr.c (cplus_expand_expr): No expand_internal_throw.
12718         Handle MUST_NOT_THROW_EXPR.
12719         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
12720         * semantics.c (*) Update for except.h name changes.
12721         (genrtl_try_block): No protect_with_terminate.
12722         (genrtl_eh_spec_block): New.
12723         (genrtl_handler): Don't emit the goto here.
12724         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
12725         (genrtl_finish_function): Don't expand_exception_blocks.
12726         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
12727
12728 2001-03-28  Richard Henderson  <rth@redhat.com>
12729
12730         * decl.c (struct named_label_list): Rename eh_region to
12731         in_try_scope, add in_catch_scope.
12732         (struct binding_level): Rename eh_region to is_try_scope,
12733         add is_catch_scope.
12734         (note_level_for_try): Rename from note_level_for_eh.
12735         (note_level_for_catch): New.
12736         (poplevel): Copy both is_try_scope and is_catch_scope to
12737         the named_label_list struct.
12738         (check_previous_goto_1): Don't check for catch block via
12739         DECL_ARTIFICIAL; use in_try_scope instead.
12740         (check_goto): Likewise.
12741         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
12742         * except.c (expand_start_catch_block): Call note_level_for_catch.
12743         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
12744
12745 2001-03-27  Richard Henderson  <rth@redhat.com>
12746
12747         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
12748         exceptions_via_longjmp.
12749
12750 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
12751
12752         * pt.c (check_default_tmpl_args):  Make error messages clearer.
12753
12754 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
12755
12756         * error.c:  Also undefine 'A' macro used for cp_printers definition.
12757
12758 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12759
12760         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
12761
12762 2001-03-26  Mike Yang <yang@research.att.com>
12763             Mark Mitchell  <mark@codesourcery.com>
12764
12765         * dump.c (dump_access): New function.
12766         (cp_dump_tree): Use it.  Dump basetype information for class
12767         types.
12768
12769 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
12770
12771         * Makefile.in (optimize.o): Depend on params.h.
12772         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
12773         (init_decl_processing): Set flag_no_inline when doing
12774         inlining-on-trees.
12775         * optimize.c: Include params.h.
12776         (struct inline_data): Improve documentation of FNS.  Add
12777         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
12778         (INSNS_PER_STMT): New macro.
12779         (remap_block): Use CLONING_P.
12780         (inlinable_function_p): Don't inline big functions.
12781         (expand_call_inline): Keep track of how much inlining we've done.
12782         (optimize_function): Set FIRST_INLINED_FN.
12783         (maybe_clone_body): Set CLONING_P.
12784         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
12785         tree nodes.
12786         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
12787         rest_of_compilation.  Clear DECL_RTL for local variables
12788         afterwards.
12789         (clear_decl_rtl): New function.
12790
12791 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
12792
12793         Implement DR 209
12794         * cp-tree.h (skip_type_access_control,
12795         reset_type_access_control): Prototype.
12796         * decl.c (grokdeclarator): Access of friends is not checked.
12797         * parse.y (component_decl_list): Reset type access control.
12798         * semantics.c (decl_type_access_control): Clear
12799         current_type_lookups.
12800         (save_type_access_control): Don't save if not deferring.
12801         (skip_type_access_control, reset_type_access_control): New
12802         functions.
12803         (begin_class_definition): Do type access control for basetypes.
12804         Start deferred access control.
12805         (finish_class_definition): Resume immediate access control if
12806         this is a local class.
12807
12808 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12809
12810         * class.c (add_method): Use memcpy/memmove, not bcopy.
12811
12812         * decl.c (duplicate_decls): Likewise.
12813
12814 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
12815
12816         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
12817         not `_'.
12818
12819 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
12820
12821         * decl.c (local_names): Define.
12822         (push_local_name): New.
12823         (grok_reference_init): Return init if initializing static reference
12824         variable with non-constant instead of emitting it.
12825         Move expand_static_init call to cp_finish_decl.
12826         (layout_var_decl): Call push_local_name.
12827         (maybe_commonize_var): Allow inlining functions even if they have
12828         static local variables, use comdat_linkage for them if flag_weak.
12829         (check_initializer): Call obscure_complex_init if
12830         grok_reference_init returned nonzero.
12831         (save_function_data): Clear x_local_names.
12832         (pop_cp_function_context): Free x_local_names.
12833         (mark_inlined_fns): Remove.
12834         (mark_lang_function): Mark x_local_names.
12835         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
12836         Mark inlined_fns as tree, remove call to mark_inlined_fns.
12837         * class.c (alter_access): Ensure DECL_ACCESS is never set if
12838         DECL_DISCRIMINATOR_P.
12839         * cp-tree.h (cp_language_function): Add x_local_names.
12840         (lang_decl_flags): Add discriminator into u2.
12841         (lang_decl_inlined_fns): Remove.
12842         (lang_decl): inlined_fns is now a TREE_VEC.
12843         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
12844         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
12845         TREE_VEC, not a custom structure.
12846         (optimize_function): Likewise.
12847         * mangle.c (discriminator_for_local_entity): Discriminate among
12848         VAR_DECL local entities.
12849         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
12850         is not valid.
12851
12852 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
12853
12854         Add support for Java interface method calls.
12855         * cp-tree.h (struct lang_type): Add java_interface flag.
12856         (TYPE_JAVA_INTERFACE): New macro.
12857         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
12858         by setting TYPE_JAVA_INTERFACE.
12859         * call.c (java_iface_lookup_fn): New static.
12860         (build_over_call): If calling a method declared in a
12861         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
12862         expression which resolves the function address.
12863         (build_java_interface_fn_ref): New function.
12864
12865 2001-03-22  Richard Henderson  <rth@redhat.com>
12866
12867         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
12868         * except.c: Don't include it.
12869
12870 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
12871             based on an idea from Joe Buck <jbuck@synopsys.com>
12872
12873         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
12874         New nonterminals.
12875         (data_def, component_decl): Add reductions to bad_decl.
12876
12877 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
12878
12879         * method.c (do_build_assign_ref): Don't use build_modify_expr for
12880         anonymous aggregates, since they don't have assignment operator
12881         method.
12882         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
12883         assignment operators for anonymous structure fields.
12884
12885 2001-03-21  Jason Merrill  <jason@redhat.com>
12886
12887         * pt.c (instantiate_decl): Abort if we see a member constant
12888         instantiation that doesn't already have its initializer.
12889         Downgrade explicit instantiation without definition to pedwarn.
12890
12891         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
12892         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
12893         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
12894
12895         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
12896         (pending_vtables): Remove.
12897         * decl2.c (pending_vtables): Remove.
12898         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
12899         CLASSTYPE_VTABLE_NEEDS_WRITING.
12900         (import_export_class): Likewise.
12901         (init_decl2): Don't mark pending_vtables.
12902         * lex.c (handle_pragma_vtable): Just sorry.
12903         * pt.c (instantiate_class_template): Don't mess with
12904         CLASSTYPE_VTABLE_NEEDS_WRITING.
12905         (mark_class_instantiated): Likewise.
12906         * ptree.c (print_lang_type): Don't print it.
12907         * semantics.c (begin_class_definition): Don't set it.
12908
12909         * pt.c (template_tail): Replace with last_pending_template.
12910         (maybe_templates, maybe_template_tail): Remove.
12911         (add_pending_template): Adjust.
12912         (instantiate_pending_templates): Adjust.
12913
12914         * cp-tree.h (struct saved_scope): Remove lang_stack field.
12915         (current_lang_stack): Remove.
12916         * decl.c (maybe_push_to_top_level): Don't initialize it.
12917         (duplicate_decls): Use current_lang_depth.
12918         (xref_basetypes): Likewise.
12919         * class.c (current_lang_depth): New fn.
12920         (push_lang_context): Use more varray functionality.
12921         (pop_lang_context): Likewise.
12922
12923         * error.c (GLOBAL_THING): Always use '__'.
12924
12925 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
12926
12927         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
12928
12929         * mangle.c (mangle_decl_string): Mangle the names of overloaded
12930         operators, even when they have `extern "C"' linkage.
12931
12932 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
12933
12934         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
12935         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
12936         where it's not necessary.
12937         (add_method): Remove optimization involving comparison of
12938         DECL_ASSEMBLER_NAME.
12939         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
12940         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
12941         where it's not necessary.
12942         (check_methods): Likewise.
12943         (build_clone): Likewise.
12944         (built_vtt): Likewise.
12945         * cp-tree.h (DECL_NEEDED_P): Likewise.
12946         * decl.c (pushtag): Likewise.
12947         (duplicate_decls): Likewise.
12948         (pushdecl): Likewise.
12949         (builtin_function): Likewise.
12950         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
12951         (build_cp_library_fn): Likewise.
12952         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
12953         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
12954         where it's not necessary.
12955         (make_rtl_for_nonlocal_decl): Likewise.
12956         (cp_finish_decl): Likewise.
12957         (grokfndecl): Likewise.
12958         (grokvardecl): Likewise.
12959         (grokdeclarator): Likewise.
12960         (start_function): Likewise.
12961         (cp_missing_return_ok_p): Likewise.
12962         * decl2.c (grokclassfn): Likewise.
12963         (check_classfn): Likewise.
12964         (finish_static_data_member_decl): Likewise.
12965         (grokfield): Likewise.
12966         * error.c (GLOBAL_IORD_P): Remove.
12967         (dump_global_iord): Improve output.
12968         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
12969         * except.c (nothrow_libfn_p): Summarily reject any function not in
12970         namespace-scope.
12971         * init.c (build_java_class_ref): Don't explicitly set
12972         DECL_ASSEMBLER_NAME after calling mangle_decl.
12973         * mangle.c (mangle_decl_string): Handle extern "C" functions.
12974         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
12975         * method.c (set_mangled_name_for_decl): Don't explicitly set
12976         DECL_ASSEMBLER_NAME after calling mangle_decl.
12977         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
12978         IDENTIFIER_GLOBAL_VALUE for the thunk.
12979         * pt.c (set_mangled_name_for_template_decl): Remove.
12980         (check_explicit_specialization): Don't use it.
12981         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
12982         (tsubst_friend_function): Likewise.
12983         (tsubst_decl): Likewise.
12984         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
12985         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
12986         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
12987         where it's not necessary.
12988         (tinfo_base_init): Likewise.
12989         (create_real_tinfo_var): Likewise.
12990         * search.c (looup_field_1): Likewise.
12991         * semantics.c (finish_named_return_value): Likewise.
12992         * tree.c (init_tree): Set lang_set_decl_assembler_name.
12993
12994 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
12995
12996         Correct semantics restrictions checking in throw-expression.
12997         * except.c (is_admissible_throw_operand): New function.
12998         (build_throw): Use it.
12999
13000 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
13001
13002         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
13003         and its ilk.
13004
13005 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
13006
13007         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
13008         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
13009         * decl.c (duplicate_decls): Likewise.
13010         (builtin_function): Likewise.
13011         (build_library_fn): Likewise.
13012         (build_cp_library_fn): Likewise.
13013         (check_initializer): Likewise.
13014         (cp_finish_decl): Likewise.
13015         * decl2.c (grokfield): Likewise.
13016         (grok_function_init): Remove #if 0'd code.
13017         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
13018         * friend.c (do_friend): Likewise.
13019         * init.c (get_temp_regvar): Likewise.
13020         * method.c (make_thunk): Likewise.
13021         * pt.c (tsubst_friend_function): Likewise.
13022         (tsubst_decl): Likewise.
13023         (regenerate_decl_from_template): Likewise.
13024         * semantics.c (genrtl_named_return_value): Likewise.
13025         (expand_body): Likewise.
13026         (genrtl_finish_function): Likewise.
13027         * tree.c (cp_tree_equal): Likewise.
13028
13029 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
13030
13031         * call.c (convert_like_real): Add extra semantics to INNER
13032         parameter. Don't convert to temporary if a user conversion
13033         gives us an lvalue that we're about to bind to a reference.
13034         Set INNER to indicate pending reference binding on recursive
13035         calls.
13036
13037 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
13038
13039         * cp/lex.c: Delete duplicate pending_lang_change.
13040
13041 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
13042
13043         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
13044         Similarly.
13045         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
13046         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
13047
13048 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
13049
13050         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
13051
13052 2001-03-08  Stan Shebs  <shebs@apple.com>
13053
13054         * cp-tree.h (set_identifier_local_value): Remove unused decl.
13055
13056 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
13057
13058         * spew.c: Remove references to CPP_OSTRING.
13059
13060 2001-03-06  Andrew Haley  <aph@redhat.com>
13061
13062         * typeck.c (convert_arguments): Check that we have an fndecl.
13063
13064 2001-03-05  Andrew Haley  <aph@redhat.com>
13065
13066         * typeck.c (convert_arguments): Don't do ellipsis conversion for
13067         __built_in_constant_p.
13068
13069 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
13070
13071         * typeck.c (build_static_cast): Allow enum to enum conversions
13072         as per DR 128.
13073
13074 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
13075
13076         * class.c (check_field_decls): Pointers to member do not a
13077         non-pod struct make, as per DR 148.
13078
13079 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
13080
13081         * call.c (joust): cp_pedwarn when using gnu extension concerning
13082         worst conversion sequences.
13083
13084 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
13085
13086         * decl.c: Replace all uses of 'boolean' with 'bool'.
13087
13088 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
13089
13090         * lang-specs.h: Add zero initializer for cpp_spec field to
13091         all array elements that need one.  Don't put an #ifdef inside
13092         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
13093         use it.
13094
13095 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
13096
13097         Implement using decls inside template functions.
13098         * decl2.c (validate_nonmember_using_decl): Don't special case
13099         fake_std_node in the global namespace. Don't reject early when
13100         processing a template.
13101         (do_local_using_decl): Add to statement tree. Don't do further
13102         processing when building a template.
13103         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
13104
13105 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
13106
13107         * decl2.c (do_nonmember_using_decl): Don't complain if we find
13108         same function. Do complain about ambiguating extern "C"
13109         declarations.
13110
13111 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
13112
13113         Remove floating point and complex type template constant parms.
13114         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
13115         COMPLEX_TYPE extensions.
13116         (invalid_nontype_parm_type_p): Likewise.
13117
13118 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
13119
13120         * except.c (call_eh_info): Revert "match_function"'s type.
13121
13122 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
13123
13124         Fix ctor vtable vcall offsets.
13125         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
13126         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
13127         (get_matching_base): Remove.
13128         (get_original_base): New function.
13129         (build_vtbl_initializer): Initialize vid.rtti_binfo.
13130         Use a virtual thunk for a ctor vtable with an index
13131         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
13132         primary base within a constructor vtable. Only set
13133         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
13134         when primary base has been lost.
13135         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
13136
13137 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
13138
13139         * call.c (joust): Ensure more_specialized()'s argument length
13140         parameter has correct value for constructors.
13141
13142 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
13143
13144         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
13145
13146         * decl.c (mark_inlined_fns): Prototype.
13147
13148 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
13149
13150         * spew.c (yylex): Correct handling of friends.
13151
13152 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
13153
13154         * mangle.c (write_encoding): Pass write_function_type the
13155         FUNCTION_DECL for the function being encoded.
13156         (write_function_type): Pass it along to write_bare_function_type.
13157         (write_bare_function_type): Pass it along to write_method_parms.
13158         (write_method_parms): Don't mangle the compiler-generated
13159         parameters to a constructor or destructor.
13160
13161 2001-02-22  Andreas Jaeger  <aj@suse.de>
13162
13163         * optimize.c: Include toplev.h for
13164         note_deferral_of_defined_inline_function prototype.
13165
13166 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
13167
13168         * cp-tree.h (struct lang_decl_inlined_fns): New.
13169         (struct lang_decls): Add inlined_fns.
13170         (DECL_INLINED_FNS): New macro.
13171         * optimize.c (struct inline_data): Add inlined_fns.
13172         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
13173         (inlinable_function_p): Likewise, fix typo in comment,
13174         function is not inlinable if it already inlined function currently
13175         being optimized.
13176         (expand_call_inline): Add fn to inlined_fns if necessary.
13177         (optimize_function): Initialize inlined_fns.
13178         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
13179         * decl.c (mark_inlined_fns): New function.
13180         (lang_mark_tree): Call it.
13181
13182 2001-02-21  Jason Merrill  <jason@redhat.com>
13183
13184         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
13185         (DECL_UNINLINABLE): Move to middle-end.
13186
13187         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
13188         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
13189         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
13190         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
13191         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
13192
13193         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
13194         second parm of op=.
13195
13196 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
13197
13198         * decl2.c (set_decl_namespace): Allow explicit instantiations in
13199         any namespace.
13200
13201 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
13202
13203         * optimize.c (expand_call_inline): Don't walk subtrees of type
13204         nodes.
13205
13206 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
13207
13208         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
13209         for a destructor.
13210
13211 2001-02-18  Jason Merrill  <jason@redhat.com>
13212
13213         Do put the VTT parameter in DECL_ARGUMENTS.
13214         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
13215         (current_vtt_parm): New macro.
13216         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
13217         (DECL_HAS_VTT_PARM_P): New macro.
13218         (DECL_VTT_PARM): Remove.
13219         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
13220         * decl.c (duplicate_decls): Only copy the operator code if
13221         appropriate.
13222         (start_function): Set current_vtt_parm.
13223         (lang_mark_tree): Don't mark vtt_parm.
13224         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
13225         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
13226         * class.c (build_clone): Maybe remove the VTT parm.
13227         * optimize.c (maybe_clone_body): Set up the VTT parm.
13228         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
13229         * call.c (build_over_call): Just allow the VTT arg.
13230         * method.c (make_thunk): Don't set DECL_VTT_PARM.
13231         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
13232         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
13233         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
13234         * error.c (dump_function_decl): Likewise.
13235         * call.c (build_user_type_conversion_1, convert_like_real): Abort
13236         if we try to call a constructor with in-charge or VTT parms.
13237         * method.c (skip_artificial_parms_for): New fn.
13238         * call.c (add_function_candidate, build_over_call): Call it.
13239         * call.c (build_new_method_call): Use current_vtt_parm.
13240         * init.c (expand_virtual_init): Likewise.
13241         * class.c (same_signature_p): No longer static.
13242         * cp-tree.h: Declare it.
13243         * search.c (look_for_overrides_r): Use it.
13244
13245 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
13246
13247         * cp-tree.h (new_abi_rtti_p): Remove.
13248         (name_mangling_version): Likewise.
13249         (flag_do_squangling): Likewise.
13250         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
13251         * decl.c (grokfndecl): Likewise.
13252         * decl2.c (name_mangling_version): Remove.
13253         (flag_do_squangling): Likewise.
13254         (lang_f_options): Remove `squangle'.
13255         (unsupported_options): Add `squangle'.
13256         (cxx_decode_option): Issue a warning about uses of
13257         -fname-mangling-version.
13258         (finish_file): Remove old ABI support.
13259         * pt.c (check_explicit_specialization): Likewise.
13260         (tsubst_decl): Likewise.
13261         * rtti.c (init_rtti_processing): Likewise.
13262         (build_headof): Likewise.
13263         (get_tinfo_decl_dynamic): Likewise.
13264         (tinfo_from_decl): Likewise.
13265         (build_dynamic_cast_1): Likewise.
13266         (synthesize_tinfo_var): Likewise.
13267         * init.c (build_new): Allow enumeration types for the array-bounds
13268         in a direct-new-declarator.
13269
13270         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
13271
13272         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
13273         TREE_PROTECTED from the template being specialized.
13274
13275 2001-02-17  Jason Merrill  <jason@redhat.com>
13276
13277         * decl2.c (build_artificial_parm): Set TREE_READONLY.
13278
13279         * decl.c (bad_specifiers): Allow throw specs on things with
13280         pointer-to-function or -member-function type.
13281         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
13282         a pmf.
13283
13284 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
13285
13286         * call.c (check_dtor_name): Handle template names correctly.
13287
13288 2001-02-16  Jason Merrill  <jason@redhat.com>
13289
13290         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
13291         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
13292         * optimize.c (maybe_clone_body): Don't substitute it.
13293         * call.c (build_new_method_call): Check in_chrg instead.
13294         * init.c (expand_virtual_init): Likewise.
13295
13296 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
13297
13298         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
13299         class-type introduces at least a type-name.
13300
13301 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
13302
13303         * call.c (convert_like_real): Create a temporary for non-lvalue.
13304
13305 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
13306
13307         * cp-tree.h: Fix typos in comments.
13308
13309 2001-02-16  Jason Merrill  <jason@redhat.com>
13310
13311         * optimize.c (remap_block): If we're compiling a clone, pass the
13312         new block to insert_block.
13313
13314 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
13315
13316         * semantics.c (finish_asm_stmt): Robustify.
13317
13318 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
13319
13320         * pt.c (push_template_decl_real): Don't remangle the name of a
13321         class template.
13322
13323 2001-02-15  Jim Meyering  <meyering@lucent.com>
13324
13325         * Make-lang.in (c++.install-common): Depend on installdirs.
13326         (c++.install-info): Likewise.
13327         (c++.install-man): Likewise.
13328
13329 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
13330
13331         * typeck2.c (build_m_component_ref): Robustify.
13332
13333 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
13334
13335         * friend.c (do_friend): Don't take the nested [template] class
13336         into account when deciding whether to warn about the friend
13337         function not referring to a template function.
13338
13339 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
13340
13341         * typeck.c (build_unary_op): Clarify error message.
13342
13343 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
13344
13345         * parse.y (component_constructor_declarator): allow optional
13346         parentheses around constructor class name.
13347
13348 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
13349
13350         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
13351         section.
13352         * init.c (emit_base_init): Remove incorrect comment about
13353         virtual bases.
13354         * method.c (make_thunk): Fix comment alignment.
13355
13356 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
13357
13358         Kill remnants of this is variable.
13359         * cp-tree.h (flag_this_is_variable): Remove.
13360         * decl2.c (flag_this_is_variable): Remove.
13361         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
13362         (build_vbase_path): The path is non-static, even in a cdtor.
13363         (resolves_to_fixed_type_p): Add additional return value.
13364         * search.c (init_vbase_pointers): Adjust.
13365         * tree.c (lvalue_p_1): Adjust.
13366         * typeck.c (mark_addressable): Adjust.
13367
13368 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
13369
13370         * pt.c (unify): Don't check cv quals of array types.
13371
13372 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
13373
13374         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
13375         check whether we already have the type.
13376
13377 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
13378
13379         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
13380         * call.c (build_op_delete_call): Simplify to remove duplicate
13381         code.
13382         * class.c (clone_function_decl): Don't build the deleting variant
13383         of a non-virtual destructor.
13384         * decl.c (finish_destructor_body): Don't call delete if this is a
13385         non-virtual destructor.
13386         * init.c (build_delete): Explicitly call `operator delete' when
13387         deleting an object with a non-virtual destructor.
13388
13389 2001-02-13  Jason Merrill  <jason@redhat.com>
13390
13391         * lang-specs.h: Add more __EXCEPTIONS.
13392
13393 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
13394
13395         * typeck2.c (process_init_constructor): Check
13396         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
13397
13398 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
13399
13400         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
13401         Remove spurious information in comment. Allow further
13402         adjustments of REFERENCE_TYPE args.
13403
13404 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
13405
13406         * errfn.c (cp_deprecated): Tweak diagnostic text.
13407         * parse.y (new_initializer): Deprecate initializer lists
13408         extension.
13409
13410 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
13411
13412         Remove old ABI support.
13413
13414 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
13415
13416         * decl2.c (flag_vtable_thunks): Always set it to 1.
13417         (flag_new_abi): Likewise.
13418         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
13419
13420         * Makefile.in (g++spec.o): Fix typo.
13421
13422 2001-02-09  Jason Merrill  <jason@redhat.com>
13423
13424         * lang-specs.h: Restore definition of __EXCEPTIONS.
13425
13426 2001-02-08  Jason Merrill  <jason@redhat.com>
13427
13428         * search.c (shared_member_p): New function.
13429         (lookup_field_r): Use it.
13430         * cp-tree.h (SHARED_MEMBER_P): Remove.
13431
13432         * method.c (process_overload_item): Handle template-dependent array
13433         bounds.
13434         * pt.c (type_unification_real): If we end up with undeduced nontype
13435         parms, try again.
13436
13437         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
13438         types.
13439
13440         * typeck2.c (friendly_abort): Don't say anything if we have
13441         earlier errors or sorries.
13442
13443         * decl.c (check_tag_decl): Notice attempts to redefine bool and
13444         wchar_t.  Ignore if in_system_header.
13445
13446         * decl.c (maybe_push_cleanup_level): New fn...
13447         (start_decl_1): ...split out from here.
13448         * cvt.c (build_up_reference): Use it.
13449         * cp-tree.h: Declare it.
13450
13451 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
13452
13453         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
13454         spec.
13455
13456 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
13457
13458         * pt.c (lookup_template_class): Make sure it's a primary
13459         template or template_template_parm when called from the parser.
13460         (instantiate_template_class): Add assertion.
13461
13462 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
13463
13464         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
13465         from error_mark_node.
13466
13467 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
13468
13469         Fix specification and implementation bugs in V3 ABI
13470         construction vtables.
13471         * cp-tree.h (flag_dump_class_layout): New flag.
13472         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
13473         (BINFO_LOST_PRIMARY_P): New flag.
13474         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
13475         (BINFO_PRIMARY_MARKED_P): Rename to ...
13476         (BINFO_PRIMARY_P): ... here.
13477         (binfo_via_virtual): New prototype.
13478         * decl2.c (flag_dump_class_layout): New flag.
13479         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
13480         use `=' as a file name separator.
13481         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
13482         bases.
13483         (build_vtbl_address): If this is a virtual primary base, then
13484         get the vtbl of what it is ultimately primary for.
13485         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
13486         for BINFO_PRIMARY_P.
13487         (dfs_skip_nonprimary_vbases_markedp): Likewise.
13488         (get_shared_vbase_if_not_primary): Likewise.
13489         (dfs_get_pure_virtuals): Likewise.
13490         (expand_upcast_fixups): Likewise.
13491         (fixup_virtual_upcast_offsets): Likewise.
13492         (dfs_find_vbase_instance): Likewise.
13493         (find_vbase_instance): Likewise.
13494         (binfo_from_vbase): Adjust comment to reflect reality.
13495         (binfo_via_virtual): New function.
13496         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
13497         for binfo walking during VTT construction.
13498         (dfs_mark_primary_bases): Remove.
13499         (force_canonical_binfo_r): New function.
13500         (force_canonical_binfo): New function.
13501         (mark_primary_virtual_base): New function.
13502         (mark_primary_bases): Walk in inheritance graph order, use
13503         mark_primary_virtual_base.
13504         (determine_primary_base): Use some more intermediate variables.
13505         (dfs_find_final_overrider): Don't check for overriding along a
13506         virtual path.
13507         (dfs_modify_vtables): Walk into primary virtual bases too.
13508         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
13509         (build_base_fields): Likewise.
13510         (dfs_set_offset_for_unshared_vbases): Likewise.
13511         (layout_virtual_bases): Likewise.
13512         (end_of_class): Likewise.
13513         (finish_struct_1): Call dump_class_hierarchy, if requested.
13514         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
13515         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
13516         (dump_class_hierarchy): Add file parameter. Append to file, if
13517         required.
13518         (finish_vtbls): Adjust accumulate_vtbl_inits call.
13519         Use canonical base for virtual bases.
13520         (build_vtt): Add more comments. Adjust build_vtt_inits call.
13521         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
13522         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
13523         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
13524         virtual VTTs.
13525         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
13526         from DATA.  We want virtual primary bases and all bases via virtual.
13527         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
13528         virtual base when not a construction vtable.
13529         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
13530         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
13531         Use canonical bases when processing virtual bases.
13532         (accumulate_vtbl_inits): We're interested in any base via a
13533         virtual path.
13534         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
13535         within a construction vtable, determine what is being overridden.
13536         (build_vtbl_initializer): Add more comments
13537         (add_vcall_offset_vtbl_entries_1): Adjust comment.
13538         (build_rtti_vtbl_entries): Check if the base has lost its
13539         primary.
13540
13541 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
13542
13543         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
13544
13545 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13546
13547         * decl.c (pushdecl): Call abort instead of fatal.
13548         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
13549         * init.c (build_new_1): Likewise.
13550         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
13551         * decl.c (build_typename_type): hash_table_init now returns void.
13552         decl.c (init_decl_processing): Make an error non-fatal.
13553
13554 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
13555
13556         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
13557         Document.
13558         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
13559         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
13560         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
13561         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
13562         * decl.c (maybe_commonize_var): Use the new name-mangling where
13563         appropriate.
13564         * decl2.c (comdat_linkage): Enhance comments.  Make all
13565         compiler-generated things static, if COMDAT is not available.
13566         (get_tinfo_decl): Do not make typeinfo objects that belong in the
13567         library COMDAT.
13568         (tinfo_base_init): Use the correct mangled name for typeinfo
13569         strings, and push them into the global scope.
13570         (typeinfo_in_lib_p): New function.
13571         (synthesize_tinfo_var): Use it.
13572         (create_real_tinfo_var): Likewise.
13573
13574 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
13575
13576         * decl.c (push_class_binding): Use context_for_name_lookup instead
13577         of CP_DECL_CONTEXT.
13578         * search.c (context_for_name_lookup): Remove static.  Check for NULL
13579         context in the loop.
13580         * cp-tree.h (context_for_name_lookup): Add prototype.
13581
13582 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
13583
13584         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
13585         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
13586         Remove.
13587         * call.c (convert_class_to_reference, build_user_type_conversion_1,
13588         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
13589
13590 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
13591
13592         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
13593         of macros used when compiling g++spec.c.
13594         * g++spec.c (lang_specific_driver): Link with the shared
13595         libgcc by default.
13596
13597 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
13598
13599         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
13600         make_reference_declarator, make_call_declarator), method.c
13601         (implicitly_declare_fn), parse.y (namespace_using_decl,
13602         notype_unqualified_id, expr_or_declarator, new_type_id,
13603         after_type_declarator, direct_after_type_declarator,
13604         notype_declarator, complex_notype_declarator,
13605         complex_direct_notype_declarator, qualified_id,
13606         notype_qualified_id, overqualified_id, direct_new_declarator,
13607         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
13608         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
13609         instead of build_parse_node.
13610
13611 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13612
13613         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
13614         (minus_one_node): Moved to top level gcc directory.  Renamed
13615         to integer_minus_one_node.
13616
13617         * init.c (init_init_processing): Don't set minus_one_node.
13618         (build_vec_init): Use integer_minus_one_node.
13619
13620         * rtti.c (get_tinfo_decl_dynamic): Likewise.
13621
13622 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
13623
13624         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
13625         identical and they would be replaced with constant, remove
13626         MODIFY_EXPR from the tree.
13627
13628 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13629
13630         * Make-lang.in: Remove all dependencies on defaults.h.
13631         * call.c: Don't include defaults.h.
13632         * decl.c: Likewise.
13633         * decl2.c: Likewise.
13634         * except.c: Likewise.
13635         * pt.c: Likewise.
13636         * rtti.c: Likewise.
13637         * tree.c: Likewise.
13638         * typeck.c: Likewise.
13639
13640 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
13641
13642         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
13643         operators even in "C" linkage.
13644         * method.c (set_mangled_name_for_decl): Likewise.
13645         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
13646         overloaded operators in "C" linkage.
13647
13648 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
13649
13650         * pt.c (tsubst_decl): Remove IN_DECL parameter.
13651         (tsubst_arg_types): Check parameter is not void.
13652         (tsubst): Adjust tsubst_decl call.
13653
13654 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
13655
13656         * call.c (add_builtin_candidate): Quote std properly, from
13657         previous change.
13658
13659 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
13660
13661         * pt.c (check_explicit_specialization): Clone constructors and
13662         destructors.
13663
13664 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
13665
13666         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
13667         indicates anything special about template depth. Make sure we
13668         only count the user visible template classes.
13669
13670 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
13671
13672         * call.c (build_conv): Typo in comment.
13673         (add_builtin_candidate): Add more explanation.
13674         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
13675         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
13676         when we have enumeral types.
13677         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
13678         candidates for relops and eqops.
13679         (joust): Simplify control flow. Allow a non-template user
13680         function to hide a builtin.
13681
13682 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
13683
13684         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
13685         (more_specialized): Add deduction parameter.
13686         * call.c (joust): Adjust more_specialized call.
13687         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
13688         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
13689         (get_bindings_order): Remove.
13690         (get_bindings_real): Add DEDUCE parameter.
13691         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
13692         REFERENCE_TYPE jig for DEDUCE_ORDER.
13693         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
13694         maybe_adjust_types_for_deduction.
13695         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
13696         directly.
13697         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
13698         (check_cv_quals_for_unify): Use new unify qualifier flags.
13699         (unify): Clear new unify qualifier flags.
13700         (get_bindings_real): Add DEDUCE parameter.
13701         (get_bindings): Adjust call to get_bindings_real.
13702         (get_bindings_overload): Likewise.
13703         (most_specialized_instantiation): Adjust call to
13704         more_specialized.
13705
13706 2001-01-19  Jason Merrill  <jason@redhat.com>
13707
13708         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
13709
13710         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
13711         -fnew-abi.
13712
13713 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
13714
13715         * decl2.c (arg_assoc_class): Fix double iteration logic.
13716
13717 2001-01-19  Jason Merrill  <jason@redhat.com>
13718
13719         * init.c (build_delete): Always call convert_force to strip cv-quals.
13720
13721         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
13722         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
13723         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
13724
13725 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
13726
13727         * search.c (get_vbase_1): Count only virtual bases.
13728
13729 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
13730
13731         * class.c (duplicate_tag_error): Robustify flag clearing.
13732
13733 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
13734
13735         * cp-tree.h (lookup_template_class): Add complain parm.
13736         * decl.c (lookup_namespace_name): Adjust call to
13737         lookup_template_class.
13738         (make_typename_type): Likewise.
13739         * semantics.c (finish_template_type): Likewise.
13740         * pt.c (lookup_template_class): Add complain parm. Adjust.
13741         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
13742         (tsubst): Likewise.
13743
13744 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
13745
13746         * pt.c (copy_default_args_to_explicit_spec): Preserve
13747         object's CV quals. Reorganize.
13748
13749 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
13750
13751         * typeck.c (build_modify_expr): Say `initialization' for
13752         INIT_EXPRs.
13753         * init.c (build_default_init): Convert to enumeral type, if
13754         needed.
13755
13756 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
13757
13758         * parse.y (nomods_initdcl0): Properly set things up for
13759         initdcl0_innards.
13760
13761 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
13762
13763         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
13764         (type_unification_real): Set it.
13765         (unify): Use it.
13766
13767 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
13768
13769         * decl.c (finish_destructor_body): Convert to vbase pointer here.
13770
13771 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
13772
13773         * semantics.c (begin_class_definition): Check we're not inside a
13774         template parm list.
13775
13776 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
13777
13778         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
13779         BASELINK_P.
13780
13781 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
13782
13783         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
13784         * call.c (build_over_call): Add comment.
13785
13786 2001-01-16 Daniel Berlin <dberlin@redhat.com>
13787
13788         * cvt.c (ocp_convert): Handle vector type conversion
13789         * typeck2.c (digest_init): Handle vector type initializations
13790
13791 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
13792
13793         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
13794           was given.
13795
13796 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
13797
13798         * pt.c (check_nontype_parm): Rename to ...
13799         (invalid_nontype_parm_type_p): ... here.
13800         (process_template_parm): Adjust.
13801         (convert_template_argument): Adjust.
13802
13803 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
13804
13805         * pt.c (check_nontype_parm): New function.
13806         (process_template_parm): Use it.
13807         (convert_template_argument): Use it.
13808         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
13809         member.
13810
13811 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
13812
13813         * tree.c: Add defaults.h
13814         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
13815         * Make-lang.in (cp/tree.o): Add defaults.h.
13816
13817 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
13818
13819         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
13820
13821 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
13822
13823         * g++.1: Change to be ".so man1/gcc.1".
13824
13825 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
13826
13827         * Make-lang.in (c++.info, c++.install-info): Build and install g++
13828         internals info.
13829         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
13830         ($(srcdir)/cp/g++int.info): New target.
13831         * gxxint.texi: Add info directory entry.  Use @@ in email address.
13832         * .cvsignore: Update.
13833
13834 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
13835
13836         * typeck.c (build_c_cast): Do template processing earlier.
13837         Always pedwarn on array casts.
13838
13839 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
13840
13841         * friend.c (make_friend_class): Make sure a templated class is
13842         actually a template.
13843
13844 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
13845
13846         * decl2.c (get_guard): Set linkage from guarded decl.
13847
13848 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
13849
13850         * call.c (convert_default_arg): Check for unprocessed
13851         DEFAULT_ARG.
13852         * cp-tree.h (replace_defarg): Move to spew.c.
13853         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
13854         spew.c, which is where they really are.
13855         (done_pending_defargs): Declare.
13856         (unprocessed_defarg_fn): Declare.
13857         * decl.c (replace_defarg): Move to spew.c
13858         * parse.y (structsp): Call done_pending_defargs.
13859         * spew.c (defarg_fns): Rearrange list structure.
13860         (defarg_fnsdone): New static variable.
13861         (defarg_depfns): New static variable.
13862         (init_spew): Adjust.
13863         (add_defarg_fn): Store the type in TREE_TYPE.
13864         (do_pending_defargs): Detect and deal with ordering constraints
13865         and circularity.
13866         (done_pending_defargs): New function.
13867         (unprocessed_defarg_fn): New function.
13868         (replace_defarg): Moved from decl.c. Robustify. Don't save
13869         if circularity detected.
13870
13871 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
13872
13873         * pt.c (unify): Check array has a domain, before checking
13874         whether it is variable sized.
13875
13876 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
13877
13878         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
13879         parameters with pointers to arrays of unknown bound.
13880
13881 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
13882
13883         * parse.y (template_parm_header, template_spec_header): New
13884         reductions. Split out from ...
13885         (template_header): ... here. Use them.
13886         (template_template_parm): Use template_parm_header.
13887         * semantics.c (finish_template_template_parm): Add assert.
13888
13889 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
13890
13891         * mangle.c (write_builtin_type): Fix thinko.
13892
13893         * pt.c (copy_default_args_to_explicit_spec_1): New function.
13894         (copy_default_args_to_explicit_spec): Likewise.
13895         (check_explicit_specialization): Use it.
13896
13897         * class.c (finish_struct_1):  Remove last argument in call to
13898         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
13899         * decl.c (builtin_function): Likewise.
13900         (build_cp_library_fn): Likewise.
13901         (check_initializer): Likewise.
13902         (make_rtl_for_nonlocal_decl): Likewise.
13903         (cp_finish_decl): Likewise.
13904         (start_function): Likewise.
13905         * decl2.c (finish_anon_union): Likewise.
13906         * friend.c (do_friend): Likewise.
13907         * init.c (build_java_class_ref): Likewise.
13908         * method.c (make_thunk): Likewise.
13909         * pt.c (tsubst_friend_function): Likewise.
13910         * semantics.c (expand_body): Likewise.
13911
13912 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
13913
13914         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
13915         looking at DECL_CLONED_FUNCTION for non-functions.
13916
13917 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
13918
13919         * error.c (dump_template_parameter): Use parm to determine how
13920         to print default value.
13921
13922 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
13923
13924         * class.c (duplicate_tag_error): Clear more flags.
13925
13926 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
13927
13928         * call.c (build_new_method_call): Use binfo_for_vbase.
13929
13930 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
13931
13932         * cp-tree.h (flag_cond_mismatch): Don't declare.
13933         * decl2.c (flag_cond_mismatch): Don't define.
13934         (lang_f_options): Remove cond-mismatch.
13935         (unsupported_options): Add cond-mismatch.
13936
13937 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
13938
13939         * class.c (handle_using_decl): Reject using of constructor name
13940         of sourcing class. Allow injecting of a method with same name as
13941         nested class. Fixup error messages.
13942
13943 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
13944
13945         * decl2.c (lang_decode_option): Handle -Wformat=2.
13946
13947 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
13948
13949         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
13950         initialized_in_class.
13951         (DECL_DEFINED_IN_CLASS_P): Rename to ...
13952         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
13953         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
13954         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
13955         * pt.c (check_default_tmpl_args): Adjust for
13956         DECL_INITIALIZED_IN_CLASS_P.
13957         (instantiate_class_template): Likewise.
13958         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
13959
13960         * class.c (finish_struct): Constify saved_filename.
13961
13962 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
13963
13964         * class.c (duplicate_tag_error): Adjust diagnostic.
13965         (finish_struct): Locally set location to start of struct.
13966         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
13967
13968 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
13969
13970         * decl.c (struct binding_level): Adjust class_shadowed comments
13971         to reflect reality.
13972         (push_class_level_binding): Adjust comments to reflect reality.
13973         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
13974         Don't set TREE_VALUE on the class_shadowed list.
13975
13976 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13977
13978         * decl2.c (acceptable_java_type): Allow references too.
13979         * init.c (build_java_class_ref): When using the new ABI, search
13980         `class$' and have it mangled with `mangle_decl.'
13981         * mangle.c (write_java_integer_type_codes): New function.
13982         (write_builtin_type): Detect and mangle Java integer and real
13983         types.
13984
13985 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
13986
13987         * decl2.c (grokfield): Don't accept `asm' specifiers for
13988         non-static data members.
13989
13990 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13991
13992         * expr.c (cplus_expand_expr): Don't reset `target'.
13993
13994 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
13995
13996         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
13997
13998 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
13999
14000         * parse.y (template_datadef): Check for error_mark_node.
14001
14002 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
14003
14004         * cp-tree.def (DEFAULT_ARG): Make `x' class.
14005
14006 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
14007
14008         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
14009         (record_builtin_type): Make non-static.
14010         (flag_short_double): Don't declare.
14011         (init_decl_processing): Remove the creation of many tree nodes now
14012         in c_common_nodes_and_builtins.
14013         (build_void_list_node): New function.
14014         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
14015         * cp-tree.h (flag_short_wchar): Don't declare.
14016
14017 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
14018
14019         * call.c (build_conv): Don't use build1 for USER_CONV.
14020         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
14021
14022 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
14023
14024         * lex.c (lang_init): Call c_common_lang_init.
14025
14026 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
14027
14028         * search.c (lookup_fnfields_here): Remove.
14029         (look_for_overrides_r): Use lookup_fnfields_1.
14030         Ignore functions from using declarations.
14031
14032 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
14033
14034         Implement exceptions specifiers for implicit member functions.
14035         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
14036         * method.c (synthesize_exception_spec): New function.
14037         (locate_dtor, locate_ctor, locate_copy): New functions.
14038         (implicitly_declare_fn): Generate the exception spec too.
14039         * search.c (check_final_overrider): Check artificial functions
14040         too.
14041         * typeck2.c (merge_exception_specifiers): New function.
14042
14043 2001-01-03  Jason Merrill  <jason@redhat.com>
14044
14045         * init.c (build_default_init): New fn.
14046         (perform_member_init): Split out from here.
14047         (build_new_1): Use it.  Simplify initialization logic.
14048         (build_vec_init): Take an array, rather than a pointer and maxindex.
14049         Speed up simple initializations.  Don't clean up if we're assigning.
14050         * cp-tree.h: Adjust.
14051         * decl2.c (do_static_initialization): Remove TREE_VEC case.
14052         * parse.y (new_initializer): Return void_zero_node for ().
14053         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
14054         * typeck2.c (digest_init): Only complain about user-written
14055         CONSTRUCTORs.
14056
14057 2000-12-22  Mike Stump  <mrs@wrs.com>
14058
14059         * decl2.c: (max_tinst_depth): Increase to 50.
14060
14061 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
14062
14063         * class.c (invalidate_class_lookup_cache): Zero the
14064         previous_class_values.
14065         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
14066         TREE_INT_CST_HIGH.
14067         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
14068         * decl.c (free_bindings): New variable.
14069         (push_binding): Don't create a new binding if we have one on the
14070         free list.
14071         (pop_binding): Put old bindings on the free list.
14072         (init_decl_processing): Use size_int, not build_int_2.
14073         Register free_bindings as a GC root.
14074         (cp_make_fname_decl): Use size_int, not build_int_2.
14075         (push_inline_template_parms_recursive): Likewise.
14076         (end_template_parm_list): Likewise.
14077         (for_each_template_parm): Do not use walk_tree_without_duplicates.
14078         (tsubst_template_parms): Use size_int, not build_int_2.
14079         (tsubst): Likewise.
14080         * rtti.c (get_vmi_pseudo_type_info): Likewise.
14081
14082 2001-01-02  Richard Henderson  <rth@redhat.com>
14083
14084         * parse.y (asm): Set ASM_INPUT_P.
14085
14086 2001-01-02  Jason Merrill  <jason@redhat.com>
14087
14088         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
14089         for v3 ABI.
14090
14091         * typeck.c (cp_truthvalue_conversion): New fn.
14092         * cvt.c (ocp_convert): Use it.
14093
14094         * cp-tree.h: Lose c-common.c decls.
14095
14096         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
14097         * cvt.c (convert_to_void): Use type_unknown_p.
14098
14099         * typeck.c (strip_all_pointer_quals): Also strip quals from
14100         pointer-to-member types.
14101
14102         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
14103         parse.y as C.
14104
14105         * call.c (build_new_method_call): Do evaluate the object parameter
14106         when accessing a static member.
14107         * typeck.c (build_component_ref): Likewise.
14108
14109 2001-01-02  Andreas Jaeger  <aj@suse.de>
14110
14111         * decl.c (cp_missing_noreturn_ok_p): New.
14112         (init_decl_processing): Set lang_missing_noreturn_ok_p.
14113
14114 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
14115
14116         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
14117
14118 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
14119
14120         * class.c (pushclass): Remove #if 0'd code.
14121         * cp-tree.h (overload_template_name): Remove.
14122         * decl.c (store_bindings): Simplify.
14123         (pop_from_top_level): Likewise.
14124         * pt.c (overload_template_name): Remove.
14125         (instantiate_decl): Don't call push_to_top_level if it's not
14126         needed.
14127
14128 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
14129
14130         * pt.c (register_local_specialization): Don't return a value.
14131         (lookup_template_class): Use move-to-front heuristic when looking
14132         up template instantiations.
14133         (instantiate_decl): Only push_to_top_level when we're actually
14134         going to instantiate the template.
14135
14136 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
14137
14138         * search.c (binfo_for_vtable): Return least derived class, not
14139         most.  Handle secondary vtables.
14140
14141 2000-12-22  Jason Merrill  <jason@redhat.com>
14142
14143         * pt.c (more_specialized): Don't optimize len==0.
14144         (fn_type_unification): If we're adding the return type, increase len.
14145
14146         * typeck.c (build_binary_op): Fix pmf comparison logic.
14147
14148         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
14149         DECL_STATIC_FUNCTION_P.
14150
14151         * semantics.c (genrtl_finish_function): Don't try to jump to
14152         return_label unless it exists.
14153
14154         In partial ordering for a call, ignore parms for which we don't have
14155         a real argument.
14156         * call.c (joust): Pass len to more_specialized.
14157         (add_template_candidate_real): Strip 'this', pass len.
14158         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
14159         (get_bindings_order): New fn.  Pass len down.
14160         (get_bindings_real): Strip 'this', pass len.
14161         (fn_type_unification): Likewise.
14162         (type_unification_real): Succeed after checking 'len' args.
14163         (most_specialized_instantiation): Lose explicit_args parm.
14164         * class.c (resolve_address_of_overloaded_function): Strip 'this',
14165         pass len.
14166
14167 2000-12-21  Jason Merrill  <jason@redhat.com>
14168
14169         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
14170         DECL_TEMPLATE_RESULT.
14171
14172         * search.c (lookup_field_r): Call lookup_fnfields_1, not
14173         lookup_fnfields_here.
14174
14175         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
14176
14177         * call.c (build_object_call): Also allow conversions that return
14178         reference to pointer to function.
14179         (add_conv_candidate): Handle totype being ref to ptr to fn.
14180         (build_field_call): Also allow members of type reference to function.
14181         Lose support for calling pointer to METHOD_TYPE fields.
14182
14183         * error.c (dump_expr): Handle *_CAST_EXPR.
14184
14185         * typeck2.c (build_scoped_ref): Always convert to the naming class.
14186
14187         * tree.c (break_out_cleanups): Lose.
14188         * cp-tree.h: Remove prototype.
14189         * typeck.c (build_component_ref): Don't break_out_cleanups.
14190         (build_compound_expr): Likewise.
14191         * semantics.c (finish_expr_stmt): Likewise.
14192
14193 2000-12-20  Richard Henderson  <rth@redhat.com>
14194
14195         * cp-tree.h: Update declarations.
14196         * decl.c (finish_case_label): Return the new stmt node.
14197         * semantics.c (finish_goto_stmt): Likewise.
14198         (finish_expr_stmt, finish_return_stmt): Likewise.
14199         (finish_break_stmt, finish_continue_stmt): Likewise.
14200         (finish_asm_stmt): Likewise.
14201         * parse.y (already_scoped_stmt): Set STMT_LINENO.
14202         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
14203         (simple_if, simple_stmt): Return the new stmt node.
14204         (save_lineno): New.
14205
14206 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
14207
14208         * cp-tree.h: Don't declare warn_long_long.
14209
14210 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14211
14212         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
14213         IS_AGGR_TYPE.
14214
14215 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14216
14217         * pt.c (unify): Handle when both ARG and PARM are
14218         BOUND_TEMPLATE_TEMPLATE_PARM.
14219
14220 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14221
14222         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
14223         DECL_TEMPLATE_PARM_P.
14224
14225 2000-12-15  Jason Merrill  <jason@redhat.com>
14226
14227         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
14228
14229         * init.c (build_new_1): Don't strip quals from type.
14230
14231         * decl.c (pushdecl): Don't check for linkage on a non-decl.
14232
14233         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
14234
14235         * call.c (build_new_function_call): Lose space before paren in
14236         error message.
14237         (build_new_method_call): Likewise.
14238
14239         * typeck2.c (build_m_component_ref): Propagate quals from datum.
14240
14241 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14242
14243         * pt.c (check_explicit_specialization): Propagate default
14244         function arguments to explicit specializations.
14245
14246 2000-12-13  DJ Delorie  <dj@redhat.com>
14247
14248         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
14249         and <? operators.
14250
14251 2000-12-08  Jason Merrill  <jason@redhat.com>
14252
14253         * error.c (dump_function_name): Don't let the user see __comp_ctor.
14254
14255         Clean up copy-initialization in overloading code.
14256         * call.c (build_user_type_conversion_1): Die if we are asked to
14257         convert to the same or a base type.
14258         (implicit_conversion): Avoid doing so.  Lose reference binding code.
14259         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
14260         direct-initialization.  Also do direct-init part of copy-init.
14261         (build_user_type_conversion): Don't provide context to convert_like.
14262         * cvt.c (ocp_convert): build_user_type_conversion will now provide
14263         the constructor call for copy-init.
14264
14265         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
14266         instantiation of a member template.
14267         (do_decl_instantiation): Not here.
14268
14269 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
14270
14271         * class.c (check_field_decls): Don't special case anonymous
14272         fields in error messages.
14273         (note_name_declared_in_class): Use %D on diagnostic.
14274
14275         * tree.c (pod_type_p): Use strip_array_types.
14276         (cp_valid_lang_attribute): Likewise.
14277         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
14278         multiple evaluations.
14279         (cp_has_mutable_p): Use strip_array_types.
14280
14281 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
14282
14283         * cp-tree.h (sufficient_parms_p): Declare new function.
14284         * call.c (sufficient_parms_p): New function, broken out of ...
14285         (add_function_candidate): ... here. Use it.
14286         (add_conv_candidate): Use it.
14287         * decl.c (grok_ctor_properties): Use it.
14288
14289 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
14290
14291         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
14292
14293 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
14294
14295         * decl2.c (lang_decode_option): Handle -Wformat-security.
14296
14297 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14298
14299         * pt.c (verify_class_unification): New function.
14300         (get_class_bindings): Use it.
14301         (try_class_unification): Tidy.
14302         (unify): Handle when argument of a template-id is not
14303         template parameter dependent.
14304         (template_args_equal): Handle when TREE_CODE's do not match.
14305
14306 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
14307
14308         * lang-specs.h (c++): When invoking the stand-alone preprocessor
14309         for -save-temps, pass all relevant -Defines to it, and then don't
14310         pass them to cc1plus.
14311
14312 2000-12-05  Will Cohen  <wcohen@redhat.com>
14313
14314         * decl.c (finish_case_label): Cleared
14315         more_cleanups_ok in surrounding function scopes.
14316         (define_label): Likewise.
14317
14318 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
14319
14320         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
14321         (get_matching_virtual): Remove.
14322         (look_for_overrides): Declare new function.
14323         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
14324         DECL_VINDEX here.
14325         * class.c (check_for_override): Move base class iteration code
14326         to look_for_overrides.
14327         * search.c (next_baselink): Remove.
14328         (get_virtuals_named_this): Remove.
14329         (get_virtual_destructor): Remove.
14330         (tree_has_any_destructors_p): Remove.
14331         (struct gvnt_info): Remove.
14332         (check_final_overrider): Remove `virtual' from error messages.
14333         (get_matching_virtuals): Remove. Move functionality to ...
14334         (look_for_overrides): ... here, and ...
14335         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
14336         to be overriding.
14337
14338 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
14339
14340         * typeck.c (get_delta_difference): If via a virtual base,
14341         return zero.
14342         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
14343         adjustment.
14344
14345 2000-12-04  Richard Henderson  <rth@redhat.com>
14346
14347         * error.c (dump_tree): Use output_add_string not OB_PUTS.
14348
14349 2000-12-04  Jason Merrill  <jason@redhat.com>
14350
14351         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
14352         (write_builtin_type): Pass intSI_type_node and the like through
14353         type_for_mode.
14354         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
14355         Pass intSI_type_node and the like through type_for_mode.
14356         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
14357         * pt.c (tsubst, unify): Likewise.
14358         * tree.c (walk_tree): Likewise.
14359         * error.c (dump_type): Likewise.
14360         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
14361
14362         * Make-lang.in: Tweak top comment for emacs.
14363         (cp/TAGS): Restore.
14364
14365         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
14366
14367         * class.c (clone_function_decl): Robustify.
14368
14369 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
14370
14371         * decl.c (store_bindings): Only search in the non modified
14372         old_bindings for duplicates.
14373
14374 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
14375
14376         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
14377         TYPE_POLYMORPHIC_P.
14378
14379         * typeck.c (build_static_cast): Remove unused variable.
14380
14381 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14382
14383         * pt.c: Fix typo in comment.
14384
14385 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
14386
14387         * decl2.c (warn_format): Remove definition.
14388         (lang_decode_option): Handle -Wformat-nonliteral,
14389         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
14390
14391 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
14392
14393         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
14394         (init_decl_processing): Don't create string_type_node,
14395         const_string_type_node, wint_type_node, intmax_type_node,
14396         uintmax_type_node, default_function_type, ptrdiff_type_node and
14397         unsigned_ptrdiff_type_node.  Adjust position of call to
14398         c_common_nodes_and_builtins.
14399         (identifier_global_value): New function.
14400
14401 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
14402
14403         * call.c (standard_conversion): Reject pointer to member
14404         conversions from ambiguous, inaccessible or virtual bases.
14405         * typeck.c (build_static_cast): Don't check pointers to members
14406         specially.
14407
14408 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
14409
14410         * method.c (do_build_copy_constructor): Preserve cv
14411         qualifications when accessing source object members.
14412         (do_build_assign_ref): Likewise. Remove separate diagnostics for
14413         unnamed fields.
14414
14415 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
14416
14417         * method.c (do_build_assign_ref): Construct appropriately
14418         CV-qualified base reference. Don't allow const casts in base
14419         conversion.
14420
14421 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
14422
14423         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
14424         incomplete return type.
14425
14426 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
14427
14428         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
14429         * semantics.c (finish_base_specifier): Accept a _TYPE not a
14430         _DECL.
14431
14432 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
14433
14434         * spew.c (yyerror): Cope if yylval.ttype is NULL.
14435
14436 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
14437
14438         * decl.c (grokdeclarator): Diagnose undefined template contexts.
14439
14440 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
14441
14442         * decl.c (grokdeclarator): Do type access control on friend
14443         class.
14444
14445 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
14446
14447         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
14448         bison parser ickiness.
14449         * pt.c (tsubst_friend_function): Enter namespace scope when
14450         tsubsting the function name.
14451         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
14452
14453 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
14454
14455         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
14456         * cvt.c (cp_convert_to_pointer): Add force parameter.
14457         Allow conversions via virtual base if forced.
14458         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
14459         (ocp_convert): Likewise.
14460         * search.c (binfo_from_vbase): Return the virtual base's binfo.
14461         * typeck.c (get_delta_difference): Adjust handling of virtual
14462         bases.
14463
14464 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
14465
14466         * tree.c (struct list_hash): Remove.
14467         (list_hash_table): Make it be an htab.
14468         (struct list_proxy): New type.
14469         (list_hash_eq): New function.
14470         (list_hash_pieces): Renamed from ...
14471         (list_hash): ... this.
14472         (list_hash_lookup): Remove.
14473         (list_hash_add): Remove.
14474         (hash_tree_cons): Use the generic hashtable.
14475         (mark_list_hash): Remove.
14476         (init_tree): Create the hashtable.
14477
14478 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
14479
14480         * method.c (build_mangled_C9x_name): Rename to
14481         build_mangled_C99_name.  Change C9X references in comments to
14482         refer to C99.
14483
14484 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
14485
14486         * parse.y (unary_expr): Move VA_ARG from here ...
14487         (primary): ... to here.
14488
14489 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
14490
14491         * semantics.c (finish_id_expr): If type is error_mark, return
14492         error_mark.
14493
14494 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
14495
14496         * pt.c (lookup_template_class): Simplify loop exit constructs.
14497         Cope when there is no partial instantiation of a template
14498         template member.
14499
14500 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
14501
14502         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
14503
14504 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
14505
14506         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
14507         prefix.
14508
14509         * pt.c (do_decl_instantiate): Explicitly clone constructors and
14510         destructors that haven't already been cloned.
14511
14512 2000-11-20  Richard Henderson  <rth@redhat.com>
14513
14514         * parse.y (yyparse_1): Rename the parser entry point.
14515
14516 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
14517
14518         * mangle.c (write_name): Use <unscoped-name> for names directly in
14519         function scope.
14520         (write_unscoped_name): Accept names directly in function scope.
14521
14522 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
14523
14524         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
14525         * parse.y (extdef): Add EXPORT reduction.
14526         * spew.c (yylex): Don't skip export here.
14527
14528 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
14529
14530         * decl.c (init_decl_processing): Correct name of pure virtual
14531         function under the new ABI.
14532         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
14533         (throw_bad_typeid): Likewise for bad typeid function.
14534
14535 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
14536
14537         * decl.c (grokparms): Don't even function types of `void' type,
14538         either.
14539         * mangle.c (write_type): Don't crash when confronted with the
14540         error_mark_node.
14541
14542         * decl.c (grokparms): Don't create parameters of `void' type.
14543
14544 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
14545
14546         * lex.c (mark_impl_file_chain): Delete.
14547         (init_parse): Remove call to ggc_add_string_root.  No need to
14548         ggc_strdup a string constant.  Do not add impl_file_chain to GC
14549         roots.
14550         (handle_pragma_implementation): No need to ggc_strdup main_filename.
14551
14552 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
14553
14554         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
14555
14556 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
14557
14558         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
14559         * decl.c (grokdeclarator): Don't reject void parms here.
14560         (require_complete_types_for_parms): Simplify, use
14561         complete_type_or_else.
14562         (grokparms): Remove bitrot. Remove funcdef parm.
14563         Deal with ellipsis parm lists here.
14564         * semantics.c (finish_parmlist): Don't append void_list_node
14565         here. Set PARMLIST_ELLIPSIS_P.
14566
14567 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
14568
14569         * typeck2.c (incomplete_type_error): Reorganize to avoid
14570         excessive diagnostics.
14571
14572 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
14573
14574         * lex.c (struct impl_files, internal_filename): Constify a char *.
14575
14576 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
14577
14578         * mangle.c (write_special_name_constructor): Don't generate
14579         assembler junk when confronted with an old-style constructor.
14580         (write_special_name_destructor): Likewise.
14581         (mangle_decl_string): Do it here instead.
14582
14583 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
14584
14585         * call.c (op_error): Make error messages clearer.
14586
14587 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
14588
14589         * decl.c (wrapup_globals_for_namespace): Don't mark things
14590         TREE_ASM_WRITTEN when they're not.
14591
14592 2000-11-15  Jason Merrill  <jason@redhat.com>
14593
14594         * typeck2.c (friendly_abort): Uncount the error before handing
14595         off to fancy_abort.
14596
14597 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
14598
14599         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
14600
14601 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
14602
14603         * class.c (build_vtbl_initializer): Fix typo in comment.
14604         * typeck.c (expr_sizeof): Don't crash on errors.
14605
14606 2000-11-14  Jim Wilson  <wilson@redhat.com>
14607
14608         * lang-specs.h: Add %2 after %(cc1_options).
14609
14610 2000-11-14  Richard Henderson  <rth@redhat.com>
14611
14612         * typeck.c (c_sizeof): Be strict about casting result value
14613         back to c_size_type_node.
14614         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
14615
14616 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
14617
14618         * typeck.c (build_unary_op): Use boolean_increment from
14619         c-common.c, moving the relevant code there.
14620
14621 2000-11-11  Jason Merrill  <jason@redhat.com>
14622
14623         * typeck.c (mark_addressable): Don't call put_var_into_stack.
14624
14625         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
14626         in inlines.
14627
14628 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14629
14630         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
14631         * lex.c (copy_lang_decl): Likewise.
14632
14633 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
14634
14635         * dump.c (cp_dump_tree): Don't dump function bodies here.
14636
14637         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
14638         (dump.o): Update dependency list.
14639         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
14640         (flag_dump_translation_unit): Likewise.
14641         (CP_TYPE_QUALS): Adjust definition.
14642         (DECL_C_BIT_FIELD): Remove.
14643         (SET_DECL_C_BIT_FIELD): Likewise.
14644         (CLEAR_DECL_C_BIT_FIELD): Likewise.
14645         (add_maybe_template): Likewise.
14646         (strip_array_types): Likewise.
14647         (dump_node_to_file): Likewise.
14648         (cp_dump_tree): New function.
14649         * decl.c (init_decl_processing): Set lang_dump_tree.
14650         * decl2.c (flag_dump_translation_unit): Remove.
14651         * dump.c: Move most of it to ../c-dump.c.
14652         (cp_dump_tree): New function.
14653         * pt.c (add_maybe_template): Remove.
14654         * typeck.c (strip_array_types): Likewise.
14655
14656 2000-11-07  Eric Christopher  <echristo@redhat.com>
14657
14658         * decl.c (init_decl_processing): Change definition of
14659         __wchar_t to wchar_t.  Remove artificial declaration of
14660         wchar_t.
14661         * lex.c: Change instances of __wchar_t to wchar_t.
14662
14663 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
14664
14665         * lex.c (do_identifier): Don't lookup_name for operators.
14666         * parse.y (operator): Save looking_for_typename.
14667         (unoperator): Restore it.
14668         * spew.c (frob_opname): Use nth_token for lookahead.
14669
14670 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
14671
14672         * decl.c (grok_op_properties): Always use coerce_new_type and
14673         coerce_delete_type.
14674         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
14675         exception specification. Tidy up.
14676         (coerce_delete_type): Preserve exception specification. Tidy up.
14677
14678 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
14679
14680         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
14681         (push_binding_level), error.c (cp_tree_printer), pt.c
14682         (process_partial_specialization, tsubst_template_arg_vector),
14683         search.c (lookup_member): Use memset () instead of bzero ().
14684
14685 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
14686
14687         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
14688
14689 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
14690
14691         * Make-lang.in (c++.distdir): Remove.
14692
14693 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
14694
14695         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
14696         declarations from different namespaces to be combined.
14697
14698 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
14699
14700         * decl.c: Include tm_p.h.
14701
14702 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
14703
14704         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
14705
14706 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
14707
14708         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
14709         (build_overload_value), repo.c (open_repo_file), xref.c
14710         (open_xref_file): Use strchr () and strrchr () instead of index ()
14711         and rindex ().
14712
14713 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
14714
14715         * call.c (build_over_call): Call fold on the CALL_EXPR.
14716
14717 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
14718
14719         * error.c (dump_template_decl): Separate template hearders with
14720         space not comma.
14721
14722 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
14723
14724         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
14725         TS_* flags with corresponding TFF_*.  Adjust prototypes of
14726         functions (which used to take a tree_string_flags) to take an int.
14727
14728         * cp-tree.h (enum tree_string_flags): Remove
14729         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
14730         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
14731         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
14732         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
14733         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
14734         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
14735         (type_as_string, decl_as_string, expr_as_string,
14736         context_as_string): Adjust prototype.
14737
14738         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
14739         instead of TS_PLAIN.
14740
14741         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
14742         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
14743         plain `0'.
14744
14745 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
14746
14747         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
14748         (linkage_kind): New enumeration.
14749         (decl_linkage): New function.
14750         * decl2.c (comdat_linkage): Extend comment.
14751         * error.c (dump_function_decl): Print the arguments used to
14752         instantiate a template, even when not printing the type of the
14753         function.
14754         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
14755         not TREE_PUBLIC, to test for external linkage.
14756         * tree.c (decl_linkage): New function.
14757
14758 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
14759
14760         * pt.c (instantiate_decl): Always instantiate static data members
14761         initialized in-class.
14762
14763 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
14764
14765         * Make-lang.in: Move all build rules here from Makefile.in,
14766         adapt to new context.  Wrap all rules that change the current
14767         directory in parentheses.  Expunge all references to $(P).
14768         When one command depends on another and they're run all at
14769         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
14770         all object-file generation rules.  Delete obsolete variables.
14771
14772         * Makefile.in: Delete.
14773         * config-lang.in: Delete outputs= line.
14774
14775 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
14776
14777         * error.c (dump_function_decl): Print no space between
14778         `ptr-operator' the `type-specifier' of the return type.
14779         (dump_type_prefix): Make sure we put space at the appropriate
14780         place.
14781
14782 2000-10-23  Jason Merrill  <jason@redhat.com>
14783
14784         * call.c (equal_functions): Also call decls_match for extern "C" fns.
14785
14786 2000-10-22  Jason Merrill  <jason@redhat.com>
14787
14788         * call.c (build_conditional_expr): Use ocp_convert to force
14789         rvalue conversion.
14790
14791 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
14792
14793         * call.c (standard_conversion): Use RVALUE_CONVs for all
14794         expressions that satisfy lvalue_p, not just those that satisfy
14795         real_lvalue_p.
14796
14797         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
14798
14799         * typeck.c (c_sizeof): Return an expression of `size_t' type,
14800         not one with TYPE_IS_SIZETYPE set.
14801         (dubious_conversion_warnings): Remove special-case code.
14802
14803 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
14804
14805         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
14806         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
14807         (dump_type_prefix): Print vector-of-int as 'int vector'.
14808         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
14809         * tree.c (walk_tree): Handle VECTOR_TYPE.
14810
14811         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
14812
14813 2000-10-21  Jason Merrill  <jason@redhat.com>
14814
14815         * parse.y (operator): Set got_object from got_scope.
14816         Set looking_for_typename.
14817         * decl.c (lookup_name_real): Clear val after setting from_obj.
14818         Reorganize diagnostic.
14819
14820 2000-10-20  Jason Merrill  <jason@redhat.com>
14821
14822         * tree.c (walk_tree): Don't walk into default args.
14823
14824         * error.c (dump_expr): Use host_integerp.
14825
14826 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
14827
14828         * typeck2.c (abstract_virtuals_error): Use "because" instead of
14829         "since" in error message.
14830
14831 2000-10-20  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14832
14833         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
14834
14835 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
14836
14837         * decl.c (revert_static_member_fn): Fixed typo.
14838
14839 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
14840
14841         * class.c (subobject_offset_fn): New type.
14842         (dfs_record_base_offsets): Remove.
14843         (record_base_offsets): Likewise.
14844         (dfs_search_base_offsets): Likewise.
14845         (record_subobject_offset): New function.
14846         (check_subobject_offset): Likewise.
14847         (walk_subobject_offsets): Likewise.
14848         (record_subobject_offsets): Likewise.
14849         (layout_conflict_p): Reimplement.
14850         (layout_nonempty_base_or_field): Correct handling of type
14851         conflicts during layout.
14852         (layout_empty_base): Likewise.
14853         (build_base_field): Adjust to handle new representation of empty
14854         base offset table.
14855         (build_base_fields): Likewise.
14856         (layout_virtual_bases): Likewise.
14857         (splay_tree_compare_integer_csts): New function.
14858         (layout_class_type): Use a splay_tree, rather than a varray, to
14859         represent the offsets of empty bases.
14860
14861         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
14862         * decl.c (select_decl): Don't return declarations that are
14863         DECL_ANTICIPATED.
14864
14865 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
14866
14867         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
14868         (fake_std_node): New macro.
14869         * decl.c (in_std): Rename to ...
14870         (in_fake_std): ... this.
14871         (flag_no_builtin): Remove.
14872         (flag_no_nonansi_builtin): Likewise.
14873         (walk_namespaces_r): Use fake_std_node.
14874         (push_namespace): Use std_identifier.
14875         (pop_namespace): Use in_fake_std.
14876         (lookup_name_real): Use fake_std_node.
14877         (init_decl_processing): When -fhonor-std, create the `std'
14878         namespace.  Don't create a dummy fake_std_node in that case.
14879         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
14880         (builtin_function): Put builtins whose names don't begin
14881         with `_' in the std namespace.
14882         * decl2.c (flag_no_builtin): Remove.
14883         (flag_no_nonansi_builtin): Likewise.
14884         (set_decl_namespace): Use fake_std_node.
14885         (validate_nonmember_using_decl): Likewise.
14886         (do_using_directive): Likewise.
14887         (handle_class_head): Likewise.
14888         * dump.c (dequeue_and_dump): Likewise.
14889         * except.c (init_exception_processing): Use std_identifier.
14890         * init.c (build_member_call): Use fake_std_node.
14891         * rtti.c (init_rtti_processing): Use std_identifier.
14892
14893 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
14894
14895         * cp-tree.h (back_end_hook): Remove declaration.
14896         * decl2.c (back_end_hook): Remove definition.
14897
14898         * dump.c (dequeue_and_dump): Dump TREE_USED.
14899
14900 2000-10-17  Brad Lucier <lucier@math.purdue.edu>
14901
14902         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
14903
14904 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
14905
14906         * decl.c (WINT_TYPE): Define.
14907         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
14908         c_size_type_node, signed_size_type_node and wint_type_node.
14909
14910 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
14911
14912         * decl2.c (warn_missing_format_attribute): New variable.
14913         (lang_decode_option): Decode -Wmissing-format-attribute.
14914
14915 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
14916
14917         * typeck.c (qualify_type): Remove.
14918         (composite_pointer_type): Fix handling of conversions to `cv void*'.
14919
14920 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14921
14922         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
14923
14924 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14925
14926         * Makefile.in (parse.c, parse.h): Create atomically.
14927
14928 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
14929
14930         * class.c (current_obstack): Remove.
14931         * decl.c (ggc_p): Remove.
14932         (start_decl): Don't use decl_tree_cons.
14933         (grokdeclarator): Don't use build_decl_list.
14934         (start_function): Don't use decl_tree_cons.
14935         (finish_function): Don't mess with obstacks.
14936         * decl2.c (grok_x_components): Don't use build_decl_list.
14937         * lex.c (make_call_declarator): Don't call decl_tree_cons.
14938         (implicitly_declare_fn): Don't call build_decl_list.
14939         * parse.y (frob_specs): Don't call build_decl_list or
14940         decl_tree_cons.
14941         (expr_or_declarator_intern): Don't call decl_tree_cons.
14942         (primary): Don't call build_decl_list.
14943         (fcast_or_absdcl): Likewise.
14944         (typed_declspecs): Don't call decl_tree_cons.
14945         (reserved_declspecs): Don't call build_decl_list.
14946         (declmods): Likewise.
14947         (reserved_typespecquals): Likewise.
14948         (aggr): Likewise.
14949         (new_type_id): Likewise.
14950         (cv_qualifiers): Likewise.
14951         (after_type_declarator_intern): Likewise.
14952         (notype_declarator_intern): Likewise.
14953         (absdcl_intern): Likewise.
14954         (named_parm): Likewise.
14955         * pt.c (most_specialized_class): Likewise.
14956         * repo.c (temporary_obstack): Make it a structure, not a pointer.
14957         (init_repo): Initialize it.
14958         * search.c (current_obstack): Remove.
14959         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
14960
14961 2000-10-09  Richard Henderson  <rth@cygnus.com>
14962
14963         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
14964         (c++ language support bits for libgcc): Remove.
14965         (c++.clean): Remove cplib2.txt cleanup.
14966         * config-lang.in (headers, lib2funcs): Remove.
14967
14968         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
14969         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
14970         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
14971         * inc/new.h, inc/typeinfo: Remove files.
14972
14973 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
14974
14975         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
14976         defined.
14977         (init_decl_processing): Initialize intmax_type_node and
14978         uintmax_type_node.
14979
14980 2000-10-06  Richard Henderson  <rth@cygnus.com>
14981
14982         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
14983         (original_result_rtx): Remove.
14984         * decl.c (save_function_data): Don't clear x_result_rtx.
14985         (mark_lang_function): Don't mark it either.
14986         * expr.c (fixup_result_decl): Remove.
14987         * semantics.c (genrtl_named_return_value): Frob the return decl
14988         before calling emit_local_var.
14989         (genrtl_finish_function): Don't call fixup_result_decl.
14990         Always emit the jump to return_label.
14991
14992 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
14993
14994         * pt.c (lookup_template_class): Set current access for enum.
14995         (tsubst_enum): Set file & line for enum decl.
14996
14997         * spew.c (yylex): Remove unused variable.
14998
14999 2000-10-05  Richard Henderson  <rth@cygnus.com>
15000
15001         * semantics.c (genrtl_finish_function): Don't init or check
15002         can_reach_end; remove noreturn and return value checks.
15003
15004 2000-10-05  Tom Tromey  <tromey@cygnus.com>
15005
15006         * init.c (build_java_class_ref): Use `build_static_name' with a
15007         suffix, not a prefix, to build the class object's name.
15008
15009 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
15010
15011         * cp-tree.h (access_kind): Fix comment typo.
15012         * decl2.c (grokfield): Fix diagnostic typo.
15013         * semantics.c (finish_template_type): Fix comment typo.
15014         (finish_qualified_object_call_expr): Likewise.
15015
15016 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
15017
15018         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
15019         tsubsting fails.
15020
15021 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
15022
15023         * spew.c (frob_id): New static function.
15024         (frob_opname): Use it.
15025         (yylex): Use it.
15026
15027 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
15028
15029         * decl.c (lang_mark_false_label_stack): Remove.
15030         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
15031
15032 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
15033
15034         * gxxint.texi: Use @email for formatting email addresses.
15035
15036 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
15037
15038         * error.c: Remove direct obstack manipulation.  Replace with
15039         output_buffer-based formatting.  Adjust calls to removed macros.
15040         (obstack_chunk_alloc, obstack_chunk_free): Remove.
15041         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
15042         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
15043
15044 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
15045
15046         * ir.texi: Move to ../c-tree.texi.
15047
15048 2000-09-20  Jason Merrill  <jason@redhat.com>
15049
15050         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
15051
15052 2000-09-21  Andreas Jaeger  <aj@suse.de>
15053
15054         * errfn.c: Move declaration of cp_printer and cp_printers to ...
15055         * cp-tree.h: ... here.
15056
15057         * error.c: Remove declaration of cp_printer.
15058
15059 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
15060
15061         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
15062
15063 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
15064
15065         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
15066         users.
15067
15068 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
15069
15070         * decl.c (start_function): Robustify.
15071
15072 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15073
15074         * cp-tree.h (check_function_format): Accept a `status' parameter.
15075
15076         * call.c, typeck.c: Updates calls to `check_function_format'.
15077
15078 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
15079
15080         * decl2.c (handle_class_head): Always push some scope even
15081         in the error case.
15082
15083 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
15084
15085         * cp-tree.h (struct cp_language_function): Remove
15086         x_scope_stmt_stack and name_declared.
15087         (current_scope_stmt_stack): Remove.
15088         (function_name_declared_p): New macro.
15089         (struct lang_decl_flags): Use c_lang_decl as a base class.
15090         (context): Remove.
15091         (struct lang_decl): Replace saved_tree with context.
15092         (DECL_FRIEND_CONTEXT): Adjust accordingly.
15093         (SET_DECL_FRIEND_CONTEXT): Likewise.
15094         (DECL_VIRTUAL_CONTEXT): Likewise.
15095         (DECL_SAVED_TREE): Remove.
15096         (C_DECLARED_LABEL_FLAG): Likewise.
15097         (cplus_expand_expr_stmt): Don't declare.
15098         (add_decl_stmt): Likewise.
15099         (add_scope_stmt): Likewise.
15100         * decl.c (mark_stmt_tree): Remove.
15101         (case_compare): Likewise.
15102         (finish_case_label): Use c_add_case_label.
15103         (init_decl_processing): Set more language-specific hooks.
15104         (build_enumerator): Fix typo in comment.
15105         (cplus_expand_expr_stmt): Remove.
15106         (mark_lang_function): Use mark_c_language_function.
15107         (lang_mark_tree): Use c_mark_lang_decl.
15108         * decl2.c: Change order of inclusion.
15109         * except.c: Likewise.
15110         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
15111         back on c_expand_expr.
15112         * friend.c: Include expr.h.
15113         * init.c: Change order of inclusion.
15114         * Makefile.in: Update dependencies.
15115         * lex.h (free_lang_decl_chain): Remove.
15116         * optimize.c (maybe_clone_body): Use function_name_declared_p.
15117         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
15118         it doesn't exist.
15119         (instantiate_decl): Use function_name_declared_p.
15120         * semantics.c (lang_expand_expr_stmt): Remove.
15121         (set_current_function_name_declared): Likewise.
15122         (current_function_name_declared): Likewise.
15123         (begin_compound_stmt): Use function_name_declared_p.
15124         (add_decl_stmt): Remove.
15125         (setup_vtbl_ptr): Use function_name_declared_p.
15126         (add_scope_stmt): Remove.
15127         (current_scope_stmt_stack): New function.
15128         (cp_expand_stmt): Don't handle SCOPE_STMTs.
15129         (expand_body): Use function_name_declared_p.
15130         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
15131         * typeck.c: Change order of includes.
15132         (convert_sequence): Remove.
15133
15134 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
15135
15136         * lex.c (reswords): Add _Complex.
15137
15138 2000-09-14  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15139
15140         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
15141
15142 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
15143
15144         * init.c (begin_init_stmts): Don't use // comments.
15145
15146 2000-09-12  Jason Merrill  <jason@redhat.com>
15147
15148         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
15149         all non-extern arrays.
15150
15151         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
15152         typenames, too.  Downgrade complaint to pedwarn.
15153         (xref_tag): Warn about surprising behavior of 'friend struct T'.
15154         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
15155         'class This::Inherited'.
15156
15157 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
15158
15159         * decl.c (finish_case_label): Given the LABEL_DECL a
15160         DECL_CONTEXT.
15161
15162 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
15163
15164         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
15165         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
15166         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
15167         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
15168         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
15169         New macros.
15170         (sorry_for_unsupported_tree, print_scope_operator,
15171         print_left_paren, print_right_paren, print_left_bracket,
15172         print_right_bracket, print_whitespace): Likewise.
15173         (aggr_variety): Rename to class_key_or_enum.
15174         (print_type): Rename to print_type_id.
15175         (print_type_specifier_seq, print_simple_type_specifier,
15176         print_elaborated_type_specifier,
15177         print_rest_of_abstract_declarator,
15178         print_parameter_declaration_clause, print_exception_specification,
15179         print_nested_name_specifier, print_template_id,
15180         typedef_original_name,  print_template_argument_list_start,
15181         print_template_argument_list_end): New functions.
15182
15183 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
15184
15185         * ir.texi: Add more documentation.
15186
15187 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
15188
15189         * cp-tree.h (struct saved_scope): Remove x_function_parms.
15190         (current_function_parms): Don't define.
15191         (struct cp_language_function): Remove parms_stored.
15192         (current_function_just_assigned_this): Don't define.
15193         (current_function_parms_stored): Likewise.
15194         (static_ctors): Declare.
15195         (static_dtors): Likewise.
15196         (SF_EXPAND): Don't define.
15197         (expand_start_early_try_stmts): Remove declaration.
15198         (store_parm_decls): Likewise.
15199         * decl.c (static_ctors): Don't declare.
15200         (static_dtors): Likewise.
15201         (struct binding_level): Remove this_block.
15202         (poplevel): Remove dead code.
15203         (set_block): Likewise.
15204         (mark_binding_level): Don't mark this_block.
15205         (mark_saved_scope): Don't mark x_function_parms.
15206         (init_decl_processing): Don't add current_function_parms as a GC
15207         root.
15208         (check_function_type): Change prototype.
15209         (start_function): Remove RTL-generation code.
15210         (expand_start_early_try_stmts): Remove.
15211         (store_parm_decls): Give it internal linkage.  Remove
15212         RTL-generation code.
15213         (finish_function): Remove RTL-generation code.
15214         * decl2.c (static_ctors): Fix formatting.
15215         (static_dtors): Likewise.
15216         * method.c (use_thunk): Don't call store_parm_decls.
15217         (synthesize_method): Likewise.
15218         * optimize.c (maybe_clone_body): Likewise.
15219         * parse.y (fn.def2): Likewise.
15220         (.set_base_init): Likewise.
15221         (nodecls): Likewise.
15222         * pt.c (instantiate_decl): Likewise.
15223         * rtti.c (synthesize_tinfo_fn): Likewise.
15224         * semantics.c (genrtl_try_block): Simplify.
15225         (expand_body): Use genrtl_start_function and
15226         genrtl_finish_function.
15227         (genrtl_start_function): New function.
15228         (genrtl_finish_function): Likewise.
15229
15230 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
15231
15232         * error.c (cp_tree_printer, case 'P'): Append break.
15233
15234 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
15235
15236         * cp-tree.h (frob_opname): Declare.
15237         * parse.y (saved_scopes): New static variable.
15238         (cp_parse_init): Adjust.
15239         (do_id): If lastiddecl is NULL, do do_identifier.
15240         (operator): Save scope information.
15241         (unoperator): New reduction. Restore scope information.
15242         (operator_name): Append unoperator. Call frob_opname.
15243         * spew.c (frob_opname): Define.
15244
15245 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
15246
15247         * decl.c, rtti.c: Include defaults.h if not already included.
15248         Don't define the *_TYPE_SIZE macros.
15249
15250 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
15251
15252         * cp-tree.h (push_switch): Change prototype.
15253         (check_cp_case_value): Remove declaration.
15254         (decl_constant_value): Likewise.
15255         * decl.c (struct cp_switch): Add switch_stmt and cases.
15256         (case_compare): New function.
15257         (push_switch): Set switch_stmt.  Initialize cases.
15258         (pop_switch): Clean up cases.
15259         (define_case_label): Rename to ...
15260         (finish_case_label): ... this.  Do semantic analysis for case
15261         labels here.
15262         (start_function): Correct comment.
15263         * decl2.c (check_cp_case_value): Remove.
15264         * expr.c (do_case): Remove.
15265         * pt.c (tsubst_expr): Adjust call to finish_case_label.
15266         * semantics.c (genrtl_do_poplevel): Remove declaration.
15267         (RECHAIN_STMTS): Remove.
15268         (finish_break_stmt): Use build_break_stmt.
15269         (finish_continue_stmt): Use build_continue_stmt.
15270         (finish_switch_cond): Adjust condition here, rater than in
15271         c_expand_start_case.
15272         (finish_case_label): Remove.
15273         * typeck.c (c_expand_return): Remove.
15274         (c_expand_start_case): Likewise.
15275
15276 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
15277
15278         * ir.texi: Document type nodes.
15279
15280 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
15281
15282         * cp-tree.h (init_cp_semantics): Declare.
15283         (genrtl_try_block): Don't declare.
15284         (genrtl_handler): Likewise.
15285         (genrtl_catch_block): Likewise.
15286         (genrtl_ctor_stmt): Likewise.
15287         (genrtl_subobject): Likewise.
15288         (genrtl_do_poplevel): Likewise.
15289         (genrtl_named_return_value): Likewise.
15290         * lex.c (init_parse): Call init_cp_semantics.
15291         * semantics.c (genrtl_try_block): Give it internal linkage.
15292         (genrtl_handler): Likewise.
15293         (genrtl_catch_block): Likewise.
15294         (genrtl_ctor_stmt): Likewise.
15295         (genrtl_subobject): Likewise.
15296         (genrtl_do_poplevel): Likewise.
15297         (genrtl_named_return_value): Likewise.
15298         (lang_expand_stmt): Rename to ...
15299         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
15300         (init_cp_semantics): Define.
15301
15302         * decl.c (initialize_local_var): Remove RTL-generating code.
15303         * semantics.c (genrtl_try_block): Fix formatting.
15304
15305         Move statement-tree facilities from C++ to C front-end.
15306         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
15307         (void_zero_node): Remove.
15308         (stmt_tree): Likewise.
15309         (scope_chain): Adjust.
15310         (language_function): Rename to cp_language_function.
15311         (cp_function_chain): Adjust.
15312         (current_stmt_tree): Remove.
15313         (last_tree): Likewise.
15314         (last_expr_type): Likewise.
15315         (struct lang_decl): Adjust.
15316         (STMT_IS_FULL_EXPR_P): Remove.
15317         (add_tree): Remove.
15318         (begin_stmt_tree): Likewise.
15319         (finish_stmt_tree): Likewise.
15320         (walk_tree_fn): Likewise.
15321         (walk_stmt_tree): Likewise.
15322         * class.c (finish_struct): Replace use of add_tree with add_stmt.
15323         * decl.c (mark_stmt_tree): Adjust type.
15324         (init_decl_processing): Don't build void_zero_node.
15325         (initialize_local_var): Adjust usage of current_stmt_tree.
15326         (finish_enum): Use add_stmt, not add_tree.
15327         (save_function_data): Adjust use of language_function.
15328         (finish_constructor_body): Use add_stmt, not add_tree.
15329         (finish_destructor_body): Likewise.
15330         (push_cp_function_context): Adjust use of language_function.
15331         (pop_cp_function_context): Likewise.
15332         (mark_lang_function): Likewise.
15333         (mark_cp_function_context): Likewise.
15334         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
15335         (build_vec_init): Likewise.
15336         * semantics.c (SET_LAST_STMT): Remove.
15337         (RECHAIN_STMTS): Don't use it.
15338         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
15339         (current_stmt_tree): Define.
15340         (add_tree): Remove.
15341         (finish_goto_stmt): Use add_stmt, not add_tree.
15342         (finish_expr_stmt): Likewise.
15343         (begin_if_stmt): Likewise.
15344         (finish_then_clause): Likewise.
15345         (begin_while_stmt): Likewise.
15346         (begin_do_stmt): Likewise.
15347         (finish_return_stmt): Likewise.
15348         (begin_for_stmt): Likewise.
15349         (finish_break_stmt): Likewise.
15350         (finish_continue_stmt): Likewise.
15351         (begin_switch_stmt): Likewise.
15352         (finish_case_label): Likewise.
15353         (begin_try_block): Likewise.
15354         (begin_function_try_block): Likewise.
15355         (begin_handler): Likewise.
15356         (begin_catch_block): Likewise.
15357         (begin_compound_stmt): Likewise.
15358         (begin_asm_stmt): Likewise.
15359         (finish_asm_stmt): Likewise.
15360         (finish_label_stmt): Likewise.
15361         (add_decl_stmt): Likewise.
15362         (finish_subobject): Likewise.
15363         (finish_decl_cleanup): Likewise.
15364         (finish_named_return_value): Likewise.
15365         (setup_vtbl_ptr): Likewise.
15366         (add_scope_stmt): Likewise.
15367         (finish_stmt_expr): Likewise.
15368         (prune_unused_decls): Remove.
15369         (begin_stmt_tree): Likewise.
15370         (finish_stmt_tree): Likewise.
15371         (prep_stmt): Adjust use of current_stmt_tree.
15372         (lang_expand_stmt): Likewise.
15373         * tree.c (statement_code_p): Remove.
15374         (cp_statement_code_p): New function.
15375         (walk_stmt_tree): Remove.
15376         (init_tree): Set lang_statement_code_p.
15377
15378 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
15379
15380         Integrated preprocessor.
15381
15382         * Make-lang.in, Makefile.in: Remove all references to input.c,
15383         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
15384         * gxx.gperf, hash.h, input.c: Delete.
15385         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
15386         initialized properly.
15387
15388         * class.c (fixup_pending_inline): Take a tree, not a
15389         struct pending_inline *.  All callers changed.
15390         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
15391         RID_PROTECTED entries in ridpointers[] array here.
15392         * decl.c (duplicate_decls): Do not refer to struct
15393         pending_inline.
15394         (record_builtin_type, init_decl_processing): Use RID_MAX not
15395         CP_RID_MAX.
15396         (grokdeclarator): Use C_IS_RESERVED_WORD.
15397         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
15398         cpplib.
15399         (grok_x_components): Do not inspect pending_inlines chain.
15400
15401         * cp-tree.h (struct lang_identifier): Add rid_code entry.
15402         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
15403         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
15404         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
15405         TIME_IDENTIFIER_FILEINFO): Kill.
15406         Update prototypes.
15407         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
15408         single 32-bit word.
15409         * parse.y: Call do_pending_inlines unconditionally.
15410         reinit_parse_for_method is now snarf_method.  fn.defpen is no
15411         longer necessary.  Remove unnecessary <itype> annotation on
15412         SCOPE.  Do not refer to end_of_file or struct pending_inline.
15413         * semantics.c (begin_inline_definitions): Call
15414         do_pending_inlines unconditionally.
15415
15416         * lex.c: Remove all code now shared with C front end.
15417         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
15418         into the get_identifier table.  Rewrite pragma handling to
15419         work with the registry.  Move code to save tokens for later
15420         processing to spew.c.
15421
15422         * spew.c: Rewrite everything in terms of token streams instead
15423         of text.  Move routines here from lex.c / input.c as
15424         appropriate.  GC-mark trees hanging off the pending inlines
15425         chain.
15426
15427 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
15428
15429         * NEWS: Mention that the named return value extension has been
15430         deprecated.
15431         * cp-tree.h (original_result_rtx): Define.
15432         (TREE_REFERENCE_EXPR): Remove.
15433         (DECL_VPARENT): Likewise.
15434         (pushdecl_nonclass_level): Likewise.
15435         (store_return_init): Likewise.
15436         (reinit_lang_specific): Likewise.
15437         (genrtl_named_return_value): Change prototype.
15438         * decl.c (original_result_rtx): Remove.
15439         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
15440         Do not generate RTL for local variables here.
15441         (store_return_init): Remove.
15442         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
15443         store_return_init.
15444         (finish_named_return_value): Adjust accordingly.  Warn that this
15445         extension is deprecated.
15446         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
15447
15448 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
15449
15450         * pt.c (type_unification_real): Replace switch with if.
15451         (unify): Tsubst non-type parms before comparing.
15452
15453 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
15454
15455         * error.c (dump_typename): New function, broken out of ...
15456         (dump_type): ... here. Use it.
15457         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
15458
15459 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
15460
15461         * init.c (build_offset_ref): Deal with namespace scoped
15462         TEMPLATE_ID_EXPRs.
15463
15464 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
15465
15466         * class.c (resolve_address_of_overloaded_function): Add
15467         explanation message.
15468         * decl.c (define_case_label): Reformat explanation.
15469         * decl2.c (finish_static_data_member_decl): Likewise.
15470         (grokfield): Likewise.
15471         * friend.c (do_friend): Likewise.
15472
15473 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
15474
15475         * tree.c (walk_tree): Expose tail recursion.
15476         (walk_stmt_tree): New function.
15477         * cp-tree.h: Prototype walk_stmt_tree.
15478         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
15479         the BLOCKs directly.  If a BLOCK has no variables after
15480         pruning, discard it.
15481         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
15482         restore the line number.
15483
15484 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
15485
15486         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
15487         (pt.o): Remove dependency on HTAB_H.
15488         * cp-tree.h: Include hashtab.h.
15489         (walk_tree): Change prototype.
15490         (walk_tree_without_duplicates): New function.
15491         * decl.c (check_default_argument): Use it.
15492         * optimize.c (remap_decl): Adjust calls to walk_tree.
15493         (copy_body): Likewise.
15494         (expand_calls_inline): Likewise.
15495         (calls_setjmp_p): Use walk_tree_without_duplicates.
15496         * pt.c: Don't include hashtab.h.
15497         (for_each_template_parm): Use walk_tree_without_duplicates.
15498         * semantics.c (finish-stmt_tree): Likewise.
15499         (expand_body): Likewise.
15500         * tree.c (walk_tree): Add additional parameter.
15501         (walk_tree_without_duplicates): New function.
15502         (count_trees): Use it.
15503         (verify_stmt_tree): Adjust call to walk_tree.
15504         (find_tree): Use walk_tree_without_duplicates.
15505         (no_linkage_check): Likewise.
15506         (break_out_target_exprs): Adjust call to walk_tree.
15507         (cp_unsave): Likewise.
15508
15509 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
15510
15511         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
15512         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
15513         * cp-tree.h (TYPE_BINFO): Adjust comment.
15514         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
15515         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
15516         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
15517         (TYPE_TEMPLATE_INFO): Likewise.
15518         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
15519         * class.c (push_nested_class): Likewise.
15520         * decl.c (lookup_name_real): Likewise.
15521         (grokdeclarator): Likewise.
15522         (grok_op_properties): Likewise.
15523         (xref_tag): Likewise.
15524         (xref_basetypes): Likewise.
15525         * decl2.c (constructor_name_full): Likewise.
15526         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
15527         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
15528         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
15529         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15530         (dump_type_suffix): Likewise.
15531         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
15532         instead.
15533         (get_aggr_from_typedef): Likewise.
15534         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
15535         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15536         (write_template_parm): Likewise.
15537         (write_template_template_parm): Check tree code instead of
15538         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
15539         * method.c (build_overload_nested_name): Add
15540         BOUND_TEMPLATE_TEMPLATE_PARM.
15541         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
15542         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15543         * pt.c (convert_template_argument): Check tree code instead of
15544         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
15545         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
15546         (for_each_template_parm): Adjust comment.
15547         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
15548         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15549         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
15550         template_args_equal to compare template template parameter cases.
15551         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15552         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
15553         instead.
15554         * tree.c (copy_template_template_parm): Decide whether to create
15555         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
15556         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15557         (copy_tree_r): Likewise.
15558         * typeck.c (comptypes): Likewise.  Check tree code instead of
15559         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
15560
15561 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
15562
15563         * decl.c (finish_function): Move the code for handling functions
15564         marked with the constructor and destructor attributes inside the
15565         expand_p block.
15566
15567 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
15568
15569         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
15570
15571 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
15572
15573         * pt.c (lookup_template_class): Remove abort.
15574         * tree.c (get_type_decl): Allow error_mark_node.
15575
15576 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
15577
15578         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
15579         TEMPLATE_ID_EXPRs.
15580
15581 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
15582
15583         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
15584         new ABI mangling.
15585
15586 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
15587
15588         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
15589         union tag mismatch error reporting.
15590
15591 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
15592
15593         * call.c (build_scoped_method_call): Check it is not a namespace.
15594
15595 2000-08-30  Jason Merrill  <jason@redhat.com>
15596
15597         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
15598
15599         * tree.c (bot_manip): Check TREE_CONSTANT rather than
15600         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
15601         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
15602
15603         * decl.c (start_function): Always call make_function_rtl.
15604
15605 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
15606
15607         * semantics.c (prune_unused_decls): New function.
15608         (finish_stmt_tree): Call it via walk_tree.
15609
15610 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
15611
15612         * class.c (build_secondary_vtable): Constify a char *.
15613         * decl.c (init_decl_processing): Initialize function_id_node,
15614         pretty_function_id_node, and func_id_node.
15615         * input.c (struct input_source): Constify 'str'.
15616         (feed_input): Constify first argument.
15617         * mangle.c (write_identifier): Constify argument.
15618         * pt.c (mangle_class_name_for_template): Constify argument.
15619
15620 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
15621
15622         * typeck.c (mark_addressable): Remove code that pokes around in
15623         RTL.
15624
15625 2000-08-28  Jason Merrill  <jason@redhat.com>
15626
15627         * lex.c (file_name_nondirectory): Move to toplev.c.
15628
15629         * cp-tree.h (LOCAL_CLASS_P): New macro.
15630         * class.c (finish_struct_1): Use it.
15631
15632 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
15633
15634         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
15635         (write_encoding): Pass another argument to write_name.
15636         (write_name): Add ignore_local_scope parameter.  Fix handling of
15637         local names.
15638         (write_nested_name): Use write_unqualified_name.
15639         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
15640         (write_template_prefix): Use write_unqualified_name.
15641         (write_component): Remove.
15642         (write_local_name): Add parameter.  Use direct local entity to
15643         discriminator calculation.
15644         (write_class_enum_type): Pass another argument to write_name.
15645         (write_template_template_arg): Likewise.
15646         (make_guard_variable): Likewise.
15647
15648 2000-08-27  Jason Merrill  <jason@redhat.com>
15649
15650         * decl.c (pushdecl): Matching decls for local externs are found in
15651         the current level.  Propagate linkage information from previous
15652         declarations.
15653
15654 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
15655
15656         * ir.texi (Expressions): Fix typo.
15657
15658 2000-08-25  Greg McGary  <greg@mcgary.org>
15659
15660         * tree.c (init_tree): Use ARRAY_SIZE.
15661
15662 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
15663
15664         * error.c (cp_tree_printer): Rework.
15665
15666 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
15667
15668         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
15669         dyn-string.o.
15670         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
15671         (cp-demangle.o): Remove target.
15672         (dyn-string.o): Likewise.
15673
15674         * decl.c (grokfndecl): Require that `main' return an `int'.
15675         * mangle.c (write_encoding): Don't mangle return types for
15676         conversion functions.
15677
15678 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
15679
15680         * error.c (tree_formatting_info): New data type.
15681         (tree_being_formatted): New macro.
15682         (tree_formatting_flags): Likewise.
15683         (put_whitespace): Likewise.
15684         (print_tree_identifier): Likewise.
15685         (print_identifier): Likewise.
15686         (cp_tree_printer, print_function_argument_list, print_declaration,
15687         print_expression, print_function_declaration,
15688         print_function_parameter, print_type, print_cv_qualifier): New
15689         functions.
15690         (init_error): Initialize lang_printer.
15691
15692 2000-08-24  Jason Merrill  <jason@redhat.com>
15693
15694         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
15695         adjustment necessary.
15696
15697 2000-08-24  Greg McGary  <greg@mcgary.org>
15698
15699         * cp-tree.h (MAIN_NAME_P): Remove macro.
15700
15701 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
15702
15703         * error.c (print_instantiation_context): Don't forget to flush the
15704         buffer.
15705
15706 2000-08-23  Jason Merrill  <jason@redhat.com>
15707
15708         * typeck.c (build_ptrmemfunc): Save the input pmf.
15709
15710         * method.c (process_modifiers): Use same_type_p.
15711
15712 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
15713
15714         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
15715         * mangle.c (write_function_type): Change prototype.
15716         (write_encoding): Don't mangle return types for
15717         constructors or destructors.
15718         (write_type): Adjust call to write_function_type.
15719         * pt.c (instantiate_template): Instantiate alternate entry points
15720         when instantiating the main function.
15721
15722 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
15723
15724         * error.c (cp_print_error_function): Don't use embedded '\n' in
15725         output_printf.
15726
15727 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
15728
15729         * decl.c (init_decl_processing): Remove bogus initialization.
15730         * error.c (lang_print_error_function): Restore here.
15731         (init_error): Initialize print_error_function.
15732
15733 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
15734
15735         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
15736
15737 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
15738
15739         * Makefile.in (error.o): Depends on diagnostic.h
15740
15741         * cp-tree.h (problematic_instantiation_changed,
15742         record_last_problematic_instantiation, current_instantiation,
15743         print_instantiation_context): Declare.
15744         (maybe_print_template_context): Remove.
15745
15746         * decl.c (init_decl_processing): Set print_error_function to NULL.
15747         (lang_print_error_function): Remove, since we're using a new
15748         machinery.
15749
15750         * error.c: #include diagnostic.h
15751         (function_category): New function.
15752         (cp_diagnostic_starter): Likewise.
15753         (cp_diagnostic_finalizer): Likewise.
15754         (cp_print_error_function): Likewise.
15755         (maybe_print_instantiation_context): Likewise.
15756         (print_instantiation_full_context): Likewise.
15757         (print_instantiation_partial_context): Likewise.
15758         (print_instantiation_context): Define.
15759         (init_error): Initialize diagnostic pager and finalizer.
15760
15761         * pt.c (problematic_instantiation_changed): Define.
15762         (record_last_problematic_instantiation): Likewise.
15763         (current_instantiation): Likewise.
15764         (maybe_print_template_context): Remove.
15765         (print_template_context): Likewise.
15766         (current_tinst_level): Make static to reflect Brendan Kehoe's
15767         change of 1995-04-13.
15768         (push_tinst_level): Call print_instantiation_context.
15769
15770 2000-08-21  Nix  <nix@esperi.demon.co.uk>
15771
15772         * lang-specs.h: Do not process -o or run the assembler if
15773         -fsyntax-only.
15774
15775 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
15776
15777         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
15778         variables.
15779         * decl2.c (lang_decode_option): Disable gettext attributes for
15780         -ansi.
15781
15782 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
15783
15784         * lex.c (lang_init_options): Default diagnostic message maximum
15785         length to 80, when line-wrapping.
15786
15787 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
15788
15789         * class.c (build_vtbl_initializer): Clear the entire
15790         vtbl_init_data.  Start keeping track of the functions for which we
15791         have created vcall offsets here.
15792         (dfs_build_vcall_offset_vtbl_entries): Remove.
15793         (build_vcall_offset_vtbl_entries): Reimplement.
15794         (add_vcall_offset_vtbl_entries_r): New function.
15795         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
15796         computing when vcall offsets are necessary.
15797
15798 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
15799
15800         * decl.c (member_function_or_else): Use cp_error ... %T.
15801         (grokdeclarator): Likewise.
15802         (start_method): Likewise.
15803         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
15804
15805 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
15806
15807         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
15808         TYPE_DECLs.
15809
15810 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
15811
15812         * cp-tree.h (PTRMEM_OK_P): New macro.
15813         (itf_ptrmem_ok): New enumeration value.
15814         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
15815         argument. Diagnose implicit pointer to member.
15816         (instantiate_type): Don't diagnose implicit pointer to member
15817         here. Pass itf_ptrmem_ok if ok. Adjust calls to
15818         resolve_address_of_overloaded_function.
15819         * init.c (build_offset_ref): Set PTRMEM_OK_P.
15820         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
15821         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
15822         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
15823         (build_unary_op): Deal with single non-static member in
15824         microsoft-land.
15825
15826 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
15827
15828         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
15829
15830 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
15831
15832         * cp-tree.h (enum_name_string): Remove prototype.
15833         (report_case_error): Remove prototype.
15834         * cp/typeck2.c (enum_name_string): Remove.
15835         (report_case_error): Remove.
15836         * error.c (dump_expr): Deal with enum values directly.
15837         Correctly negate integer constant.
15838
15839 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
15840
15841         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
15842         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
15843         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
15844         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
15845         (__cxa_vec_new): Use __cxa_vec_new2.
15846         (__cxa_vec_delete): Use __cxa_vec_delete2.
15847
15848 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
15849
15850         * vec.cc (__cxa_vec_new): Set "C" linkage.
15851         (__cxa_vec_ctor): Likewise.
15852         (__cxa_vec_cctor): Likewise.
15853         (__cxa_vec_dtor): Likewise.
15854         (__cxa_vec_delete): Likewise.
15855         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
15856         (__cxa_vec_ctor): Likewise.
15857         (__cxa_vec_cctor): Likewise.
15858         (__cxa_vec_dtor): Likewise.
15859         (__cxa_vec_delete): Likewise.
15860
15861 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
15862
15863         * class.c (instantiate_type): Reinstate local variable
15864         deleted in previous change.
15865
15866         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
15867         itf_no_attributes.
15868
15869 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
15870
15871         * cp-tree.h (instantiate_type_flags): New enumeration.
15872         (instantiate_type): Change parameter.
15873         * class.c (instantiate_type): Adjust prototype. Adjust.
15874         * call.c (standard_conversion): Adjust instantiate_type call.
15875         (reference_binding): Likewise.
15876         (build_op_delete_call): Likewise.
15877         (convert_like_real): Likewise.
15878         * cvt.c (cp_convert_to_pointer): Likewise.
15879         (convert_to_reference): Likewise.
15880         * pt.c (convert_nontype_argument): Likewise.
15881         * typeck.c (build_binary_op): Likewise.
15882         (build_ptrmemfunc): Likewise.
15883         (convert_for_assignment): Likewise.
15884
15885 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
15886
15887         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
15888         (current_aggr): Define.
15889         * decl.c (grokdeclarator): Make sure a friend class is an
15890         elaborated type specifier.
15891         * parse.y (current_aggr): Remove static definition.
15892         (cp_parse_init): Adjust.
15893         (structsp): Clear and restore current_aggr.
15894         (component_decl_list): Clear current_aggr.
15895
15896         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
15897         aggregate tag on the typename's context.
15898
15899         * pt.c (tsubst_friend_class): Return error_mark_node, if
15900         parms becomes NULL.
15901         (instantiate_class_template): Ignore error_mark_node friend types.
15902
15903 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
15904
15905         * cvt.c (warn_ref_binding): New static function, broken out of ...
15906         (convert_to_reference): ... here. Use it.
15907
15908 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
15909
15910         * parse.y (template_arg): Add rule for template qualified with
15911         global scope.
15912
15913 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
15914
15915         * decl2.c (add_function): Reorganize.
15916         (arg_assoc): Do not consider function template decls.
15917
15918 2000-08-11  Jason Merrill  <jason@redhat.com>
15919
15920         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
15921         looking inside.
15922
15923 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
15924
15925         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
15926         (lookup_nested_tag): Likewise.
15927
15928         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
15929         can be produced.
15930
15931 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
15932
15933         * parse.y (named_complex_class_head_sans_basetype): Remove
15934         always true if.
15935
15936 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
15937
15938         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
15939         explicit TEMPLATE_ID_EXPR args.
15940         (build_expr_from_tree, case CALL_EXPR): Likewise.
15941
15942 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
15943
15944         * decl.c (check_tag_decl): Diagnose typename's which don't
15945         declare anything.
15946
15947 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
15948
15949         * init.c (build_aggr_init): Reject bogus array initializers
15950         early.
15951
15952 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
15953
15954         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
15955         runtime.
15956         * cp/tinfo.cc (__dynamic_cast): Likewise.
15957         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
15958
15959 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
15960
15961         * cvt.c (convert_to_pointer_force): Fix error message when
15962         attempting to cast from ambiguous base.
15963
15964 2000-08-08  Jason Merrill  <jason@redhat.com>
15965
15966         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
15967         (tsubst_template_arg_vector): Likewise.
15968
15969         * decl2.c (build_anon_union_vars): Choose the largest field; don't
15970         assume that one will be as large as the union.
15971
15972 2000-08-07  Kazu Hirata  <kazu@hxi.com>
15973
15974         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
15975         * decl.c (pop_labels): Likewise.
15976
15977 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
15978
15979         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
15980         specifications.
15981         (__pointer_to_member_type_info): Likewise.
15982         (__base_class_info): Likewise.
15983         (__class_type_info): Likewise.
15984         (__si_class_type_info): Likewise.
15985         (__vmi_class_type_info): Likewise.
15986         * tinfo.cc (__si_class_type_info::__do_find_public_src):
15987         Changed member names to match specifications.
15988         (__vmi_class_type_info::__do_find_public_src): Likewise.
15989         (__si_class_type_info::__do_dyncast): Likewise.
15990         (__vmi_class_type_info::__do_dyncast): Likewise.
15991         (__si_class_type_info::__do_upcast): Likewise.
15992         (__vmi_class_type_info::__do_upcast): Likewise.
15993         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
15994         (__pbase_type_info::__pointer_catch): Likewise.
15995         (__pointer_type_info::__pointer_catch): Likewise.
15996         (__pointer_to_member_type_info::__pointer_catch): Likewise.
15997
15998 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
15999
16000         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
16001         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
16002         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
16003
16004 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
16005
16006         * cp-tree.h (add_method): Change prototype.
16007         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
16008         Don't double the size of the method vector in the error case.
16009         (handle_using_decl): Adjust call to add_method.
16010         (add_implicitly_declared_members): Likewise.
16011         (clone_function_decl): Likewise.
16012         * decl2.c (check_classfn): Likewise.
16013         * semantics.c (finish_member_declaration): Likewise.
16014
16015 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
16016
16017         * decl.c (flag_isoc94): New variable.
16018
16019 2000-08-02  Jason Merrill  <jason@redhat.com>
16020
16021         * pt.c (do_type_instantiation): Add complain parm; don't complain
16022         if called recursively.
16023         * cp-tree.h, parse.y: Adjust.
16024
16025 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
16026
16027         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
16028         -Wno-strict-prototypes.
16029
16030         * g++spec.c: Adjust type of second argument to
16031         lang_specific_driver, and update code as necessary.
16032
16033         * cp-tree.h: Don't prototype min_precision here.
16034         (my_friendly_assert): Cast expression to void.
16035         * semantics.c (do_poplevel): Initialize scope_stmts.
16036
16037 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
16038
16039         * cp-tree.h (DECL_NEEDED_P): Tweak.
16040
16041 2000-07-28  Jason Merrill  <jason@redhat.com>
16042
16043         * lang-specs.h: Use %i in rule for .ii files.
16044
16045 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
16046
16047         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
16048
16049 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
16050
16051         Allow indirect primary bases.
16052         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
16053         primary_base.
16054         (CLASSTYPE_VFIELD_PARENT): Remove.
16055         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
16056         (BINFO_PRIMARY_BINFO): Remove.
16057         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
16058         (BINFO_VBASE_PRIMARY_P): Likewise.
16059         (BINFO_PRIMARY_BASE_OF): New macro.
16060         (BINFO_INDIRECT_PRIMARY_P): Likewise.
16061         (get_primary_binfo): New function.
16062         * decl.c (lang_mark_tree): Make lang_type::primary_base.
16063         * class.c (vcall_offset_data_s): Rename to ...
16064         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
16065         and add ctor_vtbl_p.
16066         (get_derived_offset): Use get_primary_binfo.
16067         (dfs_mark_primary_bases): Adjust handling of virtual primary
16068         bases.
16069         (mark_primary_bases): Likewise.
16070         (set_primary_base): Take a binfo, not an integer, as a
16071         representation of the primary base.
16072         (indirect_primary_base_p): Remove.
16073         (determine_primary_base): Adjust for indirect primary bases.
16074         (dfs_find_final_overrider): Fix typo in coment.
16075         (update_vtable_entry_for_fn): Use get_primary_binfo.
16076         (layout_nonempty_base_or_field): Tweak.
16077         (build_base_fields): Adjust for new primary base semantics.
16078         (dfs_propagate_binfo_offsets): Remove.
16079         (propagate_binfo_offsets): Rewrite.
16080         (dfs_set_offset_for_shared_vbases): Remove.
16081         (layout_virtual_bases): Don't use it.
16082         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
16083         ABI.
16084         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
16085         CLASSTYPE_VFIELD_PARENT.
16086         (dfs_get_primary_binfo): New function.
16087         (get_primary_binfo): Likewise.
16088         (dump_class_hierarchy_r): Tweak printing of primary bases.
16089         (build_vtbl_initializer): Fix typo in comments.  Use
16090         vtbl_init_data.
16091         (build_vcall_and_vbase_vtbl_entries): Likewise.
16092         (build_vbaes_offset_vtbl_entries): Likewise.
16093         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
16094         BV_VCALL_INDEX to handle indirect primary bases.
16095         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
16096         (build_rtti_vtbl_entries): Likewise.
16097         * search.c (get_shared_vbase_if_not_primary): Tweak.
16098         (find_vbase_instance): Likewise.
16099         (binfo_for_vtable): Simplify.
16100         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
16101         (make_binfo): Make it have 11 entries.
16102
16103 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
16104
16105         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
16106         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
16107         ascertaining primaryness.
16108         (G): Remove template_args.
16109         (decl_is_template_id): New function.
16110         (write_encoding): Use decl_is_template_id.
16111         (write_name): Likewise.  Handle type_decls.  Get main variant of
16112         type decls.
16113         (write_nested_name): Likewise.
16114         (write_prefix): Likewise.
16115         (write_template_prefix): Likewise.
16116         (write_special_name_constructor): Remove defunct production from
16117         comment.
16118         (write_bare_function_type): Remove comment about absent parameter.
16119         (write_template_template_arg): Add missing grammar production to
16120         comment.
16121
16122 2000-07-27  Jason Merrill  <jason@redhat.com>
16123
16124         * decl.c (duplicate_decls): If common_type produces a non-typedef
16125         type for a typedef, just use the old type.
16126
16127 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
16128
16129         * cp-tree.h (function_depth): Declare.
16130         (verify_stmt_tree): Likewise.
16131         (find_tree): Likewise.
16132         * decl.c (function_depth): Give it external linkage.
16133         * optimize.c (optimize_function): Increment and decrement it.
16134         * tree.c (verify_stmt_tree_r): New function.
16135         (verify_stmt_tree): Likewise.
16136         (find_tree_r): Likewise.
16137         (find_tree): Likewise.
16138
16139 2000-07-27  Jason Merrill  <jason@redhat.com>
16140
16141         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
16142         TYPE_PTRMEMFUNC_P.
16143         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
16144
16145 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
16146
16147         * decl.c (start_cleanup_fn): Mark the function as `inline'.
16148         * decl2.c (get_guard): Call cp_finish_decl, not
16149         rest_of_decl_compilation, for local guards.
16150         * lex.c (do_identifier): Remove unused variable.
16151
16152 2000-07-26      Marc Espie <espie@cvs.openbsd.org>
16153
16154         * parse.y:  Add missing ';'.
16155
16156 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
16157
16158         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
16159         of `extern "C++"'.
16160
16161 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
16162
16163         Kill strict_prototype. Backwards compatibility only for
16164         non NO_IMPLICIT_EXTERN_C systems.
16165         * cp-tree.h (flag_strict_prototype): Remove.
16166         (strict_prototype): Remove.
16167         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
16168         * decl.c (maybe_push_to_top_level): Adjust.
16169         (pop_from_top_level): Adjust.
16170         (decls_match): Only allow sloppy parm matching for ancient
16171         system headers.
16172         (init_decl_processing): Adjust.
16173         (grokdeclarator): Adjust.
16174         * decl2.c (flag_strict_prototype): Remove.
16175         (strict_prototype): Remove.
16176         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
16177         (lang_f_options): Remove "strict-prototype".
16178         (unsupported-options): Add "strict-prototype".
16179         * lex.c (do_identifier): Adjust.
16180         (do_scoped_id): Adjust.
16181         * parse.y (empty_parms): Adjust.
16182         * class.c (push_lang_context): Adjust.
16183         (pop_lang_context): Adjust.
16184         * typeck.c (comp_target_parms): Adjust.
16185
16186 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
16187
16188         * decl.c (poplevel): Deal with anonymous variables at for scope.
16189         (maybe_inject_for_scope_var): Likewise.
16190
16191 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
16192
16193         * decl.c: Remove all signal handling code, now done in toplev.c.
16194
16195 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
16196
16197         * decl.c (make_rtl_for_nonlocal_decl): Rework.
16198
16199         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
16200         correctly.
16201
16202 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
16203
16204         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
16205         Define my_friendly_assert and my_friendly_abort as macros
16206         which may call friendly_abort.  Prototype friendly abort, not
16207         my_friendly_abort or my_friendly_assert.
16208         * decl.c (signal_catch): Report the signal caught in the error
16209         message.  Call fatal directly.
16210         * typeck2.c (ack, my_friendly_assert): Delete.
16211         (my_friendly_abort): Rename to friendly_abort.  Expect file,
16212         line, and function parameters.  Report the abort code, then
16213         call fancy_abort.  Do not mask an abort if errors have
16214         already occurred.
16215
16216 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
16217
16218         * typeck.c (comp_target_parms): Remove obsolete parameter.
16219         (comp_target_types): Adjust.
16220
16221 2000-07-17  Jason Merrill  <jason@redhat.com>
16222
16223         * typeck.c (mark_addressable): Never set TREE_USED.
16224         * call.c (build_call): Don't abort on calls to library functions
16225         that have been declared normally.
16226
16227         * typeck.c (build_binary_op): Fix grammar in warning.
16228
16229         * exception.cc (__eh_free): Fix prototype.
16230
16231         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
16232
16233         * decl.c (pushdecl): Handle seeing an OVERLOAD in
16234         IDENTIFIER_NAMESPACE_VALUE.
16235
16236 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
16237
16238         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
16239         * method.c (use_thunk): Correct handling of vcall offsets.
16240
16241 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
16242
16243         * .cvsignore: parse.h and parse.c have no cp- prefix.
16244
16245 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
16246
16247         * .cvsignore: New file.
16248
16249 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
16250
16251         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
16252
16253 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
16254
16255         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
16256         * parse.c: Remove.
16257         * parse.h: Likewise.
16258
16259 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
16260
16261         * class.c (layout_class_type): Add pointers to virtual bases after
16262         base classes under the old ABI.
16263
16264 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
16265
16266         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
16267         (finish_continue_stmt): Likewise.
16268         (begin_for_stmt): Remove call to note_level_for_for.
16269         (finish_goto_stmt): Change call from build_min_nt
16270         to build_stmt.
16271         (finish_expr_stmt): Likewise.
16272         (begin_if_stmt): Likewise.
16273         (begin_while_stmt): Likewise.
16274         (finish_while_stmt): Likewise.
16275         (finish_return_stmt): Likewise.
16276         (begin_for_stmt): Likewise.
16277         (finish_for_stmt): Likewise.
16278         (finish_break_stmt): Likewise.
16279         (begin_switch_stmt): Likewise.
16280         (finish_case_label): Likewise.
16281         (genrtl_try_block): Likewise.
16282         (begin_try_block): Likewise.
16283         (begin_handler): Likewise.
16284         (begin_compound_stmt): Likewise.
16285         (finish_asm_stmt): Likewise.
16286         (finish_label_stmt): Likewise.
16287         (add_decl_stmt): Likewise.
16288         (finish_subobject): Likewise.
16289         (finish_decl_cleanup): Likewise.
16290         (finish_named_return_value): Likewise.
16291         (setup_vtbl_ptr): Likewise.
16292         (add_scope_stmt): Likewise.
16293         * decl.c (finish_constructor_body): Likewise.
16294         (finish_destructor_body): Likewise.
16295         * optimize.c (copy_body_r): Likewise.
16296         (initialize_inlined_parameters): Likewise.
16297         (declare_return_variable): Likewise.
16298         (expand_call_inline): Likewise.
16299
16300 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
16301
16302         * semantics.c (expand_body): Sync interface information
16303         at the end of function body expansion.
16304
16305 2000-07-09  Jason Merrill  <jason@redhat.com>
16306
16307         * init.c (build_new_1): Bail early if the call to new fails.
16308
16309         * decl.c (compute_array_index_type): Check specifically for
16310         an INTEGER_CST, not just TREE_CONSTANT.
16311
16312         * decl.c (duplicate_decls): Don't call duplicate_decls on
16313         the DECL_TEMPLATE_RESULT.
16314         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
16315         codes.
16316
16317         * error.c (dump_template_bindings): Don't crash if we had an
16318         invalid argument list.
16319
16320         * typeck.c (c_expand_start_case): Do narrowing here.
16321         * semantics.c (finish_switch_cond): Not here.
16322
16323 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
16324
16325         * parse.y (asm_clobbers): Do string concatenation.
16326
16327 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
16328
16329         * decl.c (pushtag): Don't put local classes in template functions
16330         on the local_classes list.
16331
16332 2000-07-04  Scott Snyder  <snyder@fnal.gov>
16333
16334         * decl2.c (get_guard): Add missing return for old ABI local
16335         variable case.
16336
16337 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
16338
16339         * cp-tree.h (char_type_p): New function.
16340         * decl.c (init_decl_processing): Don't initialize
16341         signed_wchar_type_node or unsigned_wchar_type_node.
16342         (complete_array_type): Handle brace-enclosed string-constants.
16343         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
16344         * tree.c (char_type_p): New function.
16345         * typeck2.c (digest_init): Use char_type_p.
16346
16347 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
16348
16349         * pt.c (tsubst): Don't layout type, if it's error_mark.
16350
16351 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
16352
16353         * pt.c (instantiate_pending_templates): Reset template level.
16354
16355 2000-07-05  Jason Merrill  <jason@redhat.com>
16356
16357         * call.c (joust): Don't complain about `operator char *()' beating
16358         `operator const char *() const'.
16359
16360 2000-07-04  scott snyder  <snyder@fnal.gov>
16361             Jason Merrill  <jason@redhat.com>
16362
16363         * repo.c (repo_get_id): Handle the case where a class with virtual
16364         bases has a null TYPE_BINFO_VTABLE.
16365
16366 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
16367             Jason Merrill  <jason@redhat.com>
16368
16369         * parse.y (member_init): Just pass in the type.
16370         * init.c (expand_member_init): Handle getting a type.
16371
16372 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16373             Jason Merrill  <jason@redhat.com>
16374
16375         * decl.c (finish_function): Warn if a function has no return
16376         statement.
16377         Suggested by Andrew Koenig.
16378         * typeck.c (check_return_expr): Do set current_function_returns_value
16379         if we got an error_mark_node.
16380
16381 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
16382
16383         * decl2.c (push_decl_namespace): Push the original namespace.
16384
16385 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
16386
16387         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
16388         * semantics.c (begin_class_definition): Clear it.
16389
16390 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
16391
16392         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
16393         (genrtl_expr_stmt): Likewise.
16394         (genrtl_decl_stmt): Likewise.
16395         (genrtl_if_stmt): Likewise.
16396         (genrtl_while_stmt): Likewise.
16397         (genrtl_do_stmt): Likewise.
16398         (genrtl_return_stmt): Likewise.
16399         (genrtl_for_stmt): Likewise.
16400         (genrtl_break_stmt): Likewise.
16401         (genrtl_continue_stmt): Likewise.
16402         (genrtl_scope_stmt): Likewise.
16403         (genrtl_switch_stmt): Likewise.
16404         (genrtl_case_label): Likewise.
16405         (genrtl_begin_compound_stmt): Likewise.
16406         (genrtl_finish_compound_stmt): Likewise.
16407         (genrtl_compound_stmt): Likewise.
16408         (genrtl_asm_stmt): Likewise.
16409
16410         * init.c (begin_init_stmts): Remove call to
16411         genrtl_begin_compound_stmt.
16412         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
16413
16414         * semantics.c (lang_expand_stmt): Changed call to
16415         genrtl_compound_stmt to ignore return value.
16416
16417 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
16418
16419         * mangle.c (canonicalize_for_substitution): Return the canonical
16420         variant of a type.
16421
16422         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
16423         TYPE_DECL.
16424         * typeck.c (commonparms): Remove obstack manipulations.
16425
16426 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
16427
16428         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
16429
16430         * Makefile.in (OBJS): Added ../c-semantics.o.
16431         (OBJDEPS): Likewise.
16432
16433         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
16434         ../c-common.h.
16435         (struct stmt_tree): Added comment.
16436         (current_function_name_declared): Removed.
16437         (stmts_are_full_exprs_p): Likewise.
16438         (genrtl_do_pushlevel): Likewise.
16439         (genrtl_clear_out_block): Likewise.
16440         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
16441         (DECL_ANON_UNION_ELEMS): Likewise.
16442         (emit_local_var): Likewise.
16443         (make_rtl_for_local_static): Likewise.
16444         (do_case): Likewise.
16445         (expand_stmt): Likewise.
16446         (genrtl_decl_cleanup): Likewise.
16447         (c_expand_asm_operands): Likewise.
16448         (c_expand_return): Likewise.
16449         (c_expand_start_case): Likewise.
16450
16451         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
16452         (emit_local_var): Likewise.
16453         (initialize_local_var): Change reference to
16454         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
16455         Change reference to stmts_are_full_exprs_p to
16456         current_stmt_tree->stmts_are_full_exprs_p.
16457         (push_cp_function_context): Likewise.
16458
16459         * expect.c (expand_throw): Change reference to
16460         stmts_are_full_exprs_p.
16461
16462         * init.c (build_aggr_init): Change reference to
16463         stmts_are_full_exprs_p.
16464         (build_vec_init): Likewise.
16465
16466         * optimize.c (maybe_clone_body): Change reference to
16467         current_function_name_declared to
16468         cp_function_chain->name_declared.
16469
16470         * pt.c (instantiate_decl): Change reference to
16471         current_function_name_declared to
16472         cp_function_chain->name_declared.
16473
16474         * semantics.c (expand_cond): Moved declaration to c-common.h.
16475         (genrtl_do_pushlevel): Moved to c-semantics.c.
16476         (genrtl_clear_out_block): Likewise.
16477         (genrtl_goto_stmt): Likewise.
16478         (genrtl_expr_stmt): Likewise.
16479         (genrtl_decl_stmt): Likewise.
16480         (gerntl_if_stmt): Likewise.
16481         (genrtl_while_stmt): Likewise.
16482         (genrtl_do_stmt): Likewise.
16483         (genrtl_return_stmt): Likewise.
16484         (genrtl_for_stmt): Likewise.
16485         (genrtl_break_stmt): Likewise.
16486         (genrtl_continue_stmt): Likewise.
16487         (genrtl_scope_stmt): Likewise.
16488         (genrtl_switch_stmt): Likewise.
16489         (genrtl_case_label): Likewise.
16490         (genrtl_begin_compound_stmt): Likewise.
16491         (genrtl_finish_compound_stmt): Likewise.
16492         (genrtl_compound_stmt): Likewise.
16493         (genrtl_asm_stmt): Likewise.
16494         (genrtl_decl_cleanup): Likewise.
16495         (expand_cond): Likewise.
16496         (expand_stmt): Renamed to ...
16497         (lang_expand_stmt): ... this.
16498         (lang_expand_expr_stmt): Initialize.
16499         (set_current_function_name_declared): Likewise.
16500         (stmts_are_full_exprs_p): Likewise.
16501         (current_function_name_declared): Likewise.
16502         (anon_aggr_type_p): Likewise.
16503         (do_poplevel): Change reference to
16504         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
16505         Change reference to stmts_are_full_exprs_p to
16506         current_stmt_tree->stmts_are_full_exprs_p.
16507         (add_tree): Likewise.
16508         (finish_expr_stmt): Likewise.
16509         (prep_stmt): Likewise.
16510         (lang_expand_stmt): Likewise.
16511         (begin_compound_stmt): Change reference to
16512         current_function_name_declared to
16513         cp_function_chain->name_declared and call to
16514         current_function_name_declared().
16515         (setup_vtbl_ptr): Likewise.
16516         (genrtl_do_poplevel): Removed.
16517
16518 2000-06-30  Jason Merrill  <jason@redhat.com>
16519
16520         * init.c (init_init_processing): Go back to aligning like
16521         double_type_node for old ABI.
16522         (get_cookie_size): Make cookie larger if we get a type that needs
16523         more alignment.
16524         (build_vec_delete): Call it.
16525
16526         * typeck.c (qualify_type_recursive): New fn.
16527         (composite_pointer_type): Use it.
16528         (build_binary_op): Use composite_pointer_type.
16529
16530 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
16531             Jason Merrill  <jason@redhat.com>
16532
16533         * typeck.c (check_return_expr): Don't complain about returning
16534         NULL from operator new if -fcheck-new.
16535         * cp-tree.h: Declare flag_check_new here.
16536         * init.c: Not here.
16537
16538 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
16539
16540         * mangle.c (find_substitution): Use same_type_p.
16541         (write_encoding): Don't check for substitutions.
16542
16543 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
16544
16545         * parse.y (expr_no_comma_rangle): New non-terminal.
16546         (template_parm): Use it for default parameter case.
16547         (template_arg): Use it.
16548         (expr_no_commas): Remove commented out undefined extensions.
16549         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
16550         * parse.h, parse.c: Rebuilt.
16551
16552 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
16553
16554         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
16555         (finish_asm_stmt): Do it here, instead.
16556
16557         * cp-tree.h (ridpointers): Don't declare.
16558         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
16559         (record_builtin_java_type): Likewise.
16560         (init_decl_processing): Likewise.
16561         * lex.c: Move inclusion of lex.h.
16562         (ridpointers): Don't define.
16563         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
16564         RID_MAX.
16565         * lex.h (enum rid): Rename to ...
16566         (enum cp_rid): ... this.
16567         (ridpointers): Don't declare.
16568         * parse.y: Move inclusion of lex.h.
16569         * parse.c: Regenerated.
16570         * spew.c: Move inclusion of lex.h.
16571
16572         * cp-tree.h (struct language_function): Remove temp_name_counter.
16573         (temp_name_counter): Remove.
16574         (get_temp_name): Change prototype.
16575         (get_guard): New function.
16576         (get_guard_cond): Likewise.
16577         (set_guard): Likewise.
16578         * cvt.c (build_up_reference): Adjust call to get_temp_name.
16579         * decl.c (expand_static_init): Use get_guard and friends to
16580         implement guard variables.
16581         * decl2.c (get_temp_name): Assume that the variables created are
16582         always static.
16583         (get_sentry): Rename to ...
16584         (get_guard): ... this.  Implement new ABI guard variables.
16585         (get_guard_bits): New function.
16586         (get_guard_cond): Likewise.
16587         (set_guard): Likewise.
16588         (start_static_initialization_or_destruction): Use them.
16589         (do_static_initialization): Replace sentry with guard throughout.
16590         (do_static_destruction): Likewise.
16591         * init.c (create_temporary_var): Add comment.
16592
16593 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
16594
16595         * mangle.c (find_substitution): Use same_type_p.
16596         (write_encoding): Don't check for substitutions.
16597
16598 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
16599
16600         * parse.y (expr_no_comma_rangle): New non-terminal.
16601         (template_parm): Use it for default parameter case.
16602         (template_arg): Use it.
16603         (expr_no_commas): Remove commented out undefined extensions.
16604         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
16605         * parse.h, parse.c: Rebuilt.
16606
16607 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
16608
16609         * cp-tree.h (flag_const_strings): Remove.
16610         (warn_parentheses): Likewise.
16611         (warn_format): Likewise.
16612         (common_type): Likewise.
16613         (default_conversion): Likewise.
16614         (build_binary_op): Likewise.
16615         (cp_build_binary_op): New macro.
16616         * call.c (build_new_op): Use cp_build_binary_op instead of
16617         build_binary_op.
16618         * class.c (build_vtable_entry_ref): Likewise.
16619         * decl.c (expand_static_init): Likewise.
16620         (compute_array_index_type): Likewise.
16621         (build_enumerator): Likewise.
16622         * decl2.c (delete_sanity): Likewise.
16623         (start_static_initialization_or_destruction): Likewise.
16624         * error.c (dump_type_suffix): Likewise.
16625         * init.c (resolve_offset_ref): Likewise.
16626         (build_new): Likewise.
16627         (build_new_1): Likewise.
16628         (build_vec_delete_1): Likewise.
16629         (build_vec_init): Likewise.
16630         (build_delete): Likewise.
16631         * rtti.c (synthesize_tinfo_fn): Likewise.
16632         (synthesize_tinfo_var): Likewise.
16633         * search.c (expand_upcast_fixups): Likewise.
16634         (fixup_all_virtual_upcast_offsets): Likewise.
16635         * typeck.c (build_array_ref): Likewise.
16636         (get_member_function_from_ptrfunc): Likewise.
16637         (build_binary_op): Add parameter.
16638         (pointer_int_sum): Use cp_build_binary_op.
16639         (pointer_diff): Likewise.
16640         (build_modify_expr): Likewise.
16641         (get_delta_difference): Likewise.
16642         (build_ptrmemfunc): Likewise.
16643
16644 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
16645
16646         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
16647         * decl.c (create_implicit_typedef): Adjust.
16648         * decl2.c (build_artificial_parm): Adjust.
16649         * method.c (implicitly_declare_fn): Adjust.
16650         * pt.c (push_inline_template_parms_recursive): Adjust.
16651         (process_template_parm): Adjust.
16652         (overloaded_template_name): Adjust.
16653         * semantics.c (finish_template_template_parm): Adjust.
16654
16655 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
16656
16657         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
16658         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
16659         where to emit thunks.
16660         (build_vtt): Adjust call to build_vtt_inits.
16661         (build_vtt_inits): Add parameter to indicate whether or not
16662         sub-VTTs for virtual bases should be included.  Adjust handling of
16663         construction vtables.
16664         (get_matching_base): New function.
16665         (dfs_build_vtt_inits): Rename to ...
16666         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
16667         construction vtables.
16668         (dfs_fixup_binfo_vtbls): Likewise.
16669         (build_ctor_vtbl_groups): Build construction vtables for virtual
16670         bases, too.
16671         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
16672         to build construction vtbls.
16673         (dfs_accumulate_vtbl_inits): Adjust handling of
16674         construction vtables.
16675
16676         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
16677         types correctly.
16678
16679 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
16680
16681         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
16682
16683 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
16684
16685         * search.c (hides): Remove.
16686         (is_subobject_of_p): Add most_derived parameter. Use
16687         CANONICAL_BINFO.
16688         (lookup_field_queue_p): Adjust.
16689         (lookup_field_r): Adjust.
16690
16691 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
16692
16693         * decl2.c (handle_class_head): Bash typedefs to the type's main
16694         decl.
16695
16696 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
16697
16698         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
16699         (begin_global_stmt_expr): ... this.
16700         (genrtl_finish_stmt_expr): Rename to ...
16701         (finish_global_stmt_expr): ... this.
16702         * init.c (begin_init_stmts): Adjust calls.
16703         (finish_init_stmts): Likewise.
16704         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
16705         (begin_global_stmt_expr): ... this.
16706         (genrtl_finish_stmt_expr): Rename to ...
16707         (finish_global_stmt_expr): ... this.
16708
16709 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16710
16711         * search.c (lookup_member): Fix typo in comment.
16712
16713 2000-06-24  Jason Merrill  <jason@redhat.com>
16714
16715         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
16716         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
16717
16718 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16719
16720         * parse.y (complex_direct_notype_declarator): Support global_scope.
16721         * Makefile.in: Adjust conflict count.
16722
16723 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
16724
16725         * parse.y (template_arg): Convert TEMPLATE_DECL
16726         that is a template template parameter to
16727         TEMPLATE_TEMPLATE_PARM here.
16728
16729         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
16730         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
16731         (copy_template_template_parm): Adjust prototype.
16732         * decl.c (grokdeclarator): Remove dead code.
16733         * pt.c (process_template_parm): Tidy.
16734         (lookup_template_class): Construct nodes in
16735         copy_template_template_parm.
16736         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
16737         lookup_template_class.  Use TYPE_TI_TEMPLATE.
16738         * tree.c (copy_template_template_parm): Add NEWARGS
16739         parameter.
16740         (mapcar): Adjust call to copy_template_template_parm.
16741         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
16742         * method.c (build_template_template_parm_names): Change error
16743         code to avoid compilation warning.
16744
16745         * gxxint.texi: Document template template parameter
16746         name mangling.
16747
16748 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
16749
16750         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
16751         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
16752         (cp-demangle.o): New rule.
16753         (dyn-string.o): Likewise.
16754         * inc/cxxabi.h (__cxa_demangle): New declaration.
16755
16756 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
16757
16758         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
16759         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
16760         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
16761         a tree, not an int.
16762         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
16763         (make_thunk): Change prototype.
16764         (emit_thunk): Rename to use_thunk.
16765         (mangle_thunk): Change prototype.
16766         * class.c (get_derived_offset): Simplify.
16767         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
16768         BV_GENERATE_THUNK_WITH_VTABLE_P.
16769         (build_primary_vtable): Simplify.
16770         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
16771         (dfs_find_base): Remove.
16772         (update_vtable_entry_for_fn): Correct bug in finding the base
16773         where a virtual function was first declared.  Figure out whether
16774         or not to emit a vcall-thunk with the vtables in which it appears.
16775         Correct logic for deciding whether to use an ordinary thunk, or a
16776         vcall thunk.
16777         (finish_struct_1): Remove unnecssary code.
16778         (build_vtbl_initializer): Use ssize_int for the running counter of
16779         negative indices.
16780         (build_vtbl_initializer): Only use vcall thunks where necessary.
16781         Mark thunks as needing to be emitted with their vtables, or not.
16782         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
16783         indices.  Use size_binop.
16784         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
16785         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
16786         size_binop.
16787         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
16788         (build_vtable_entry): Mark thunks as needing to be emitted with
16789         their vtables, or not.
16790         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
16791         * decl2.c (mark_vtable_entries): Use use_thunk instead of
16792         emit_thunk.
16793         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
16794         information.
16795         * error.c (dump_expr): Use BV_FN.
16796         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
16797         not an int.
16798         * method.c (make_thunk): Likewise.
16799         (emit_thunk): Rename to use_thunk.  Allow callers to decide
16800         whether or not to actually emit the thunk.  Adjust for changes in
16801         representation of vcall offsets.
16802         * search.c (dfs_get_pure_virtuals): Use BV_FN.
16803         * semantics.c (emit_associated_thunks): New function.
16804         (expand_body): Use it.
16805         * ir.texi: Adjust decriptions of thunks.
16806
16807 2000-06-22  Jason Merrill  <jason@redhat.com>
16808
16809         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
16810         (tsubst_friend_function): Copy it here.
16811
16812         * decl.c (grok_op_properties): Fix typo.
16813
16814         * decl2.c (delete_sanity): Clarify warning, avoid failure on
16815         deleting void*.
16816
16817         * pt.c (check_explicit_specialization): Clarify error.
16818
16819         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
16820         an old OVERLOAD when we're declaring a non-function.
16821         (pushdecl, destroy_local_var): Check for error_mark_node.
16822         (warn_extern_redeclared_static): Also bail early if
16823         we're a CONST_DECL.
16824         (push_overloaded_decl): Ignore an old error_mark_node.
16825
16826 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
16827
16828         * call.c (build_x_va_arg): Check if in a template decl.
16829         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
16830
16831 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16832
16833         * class.c (push_lang_context): TYPE_NAME gets you to the Java
16834         types DECLs.
16835         * decl.c (check_goto): Computed gotos assumed OK.
16836
16837 2000-06-20  Jason Merrill  <jason@redhat.com>
16838
16839         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
16840         for which we don't need to look for instantiations.
16841
16842 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
16843
16844         * parse.y (program): Always call finish_translation_unit.
16845         * parse.c, parse.h: Rebuilt.
16846
16847 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
16848
16849         * method.c: Don't include hard-reg-set.h.
16850
16851 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
16852
16853         * rtti.c (get_base_offset): Cope when vbase field is in a base.
16854
16855 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
16856
16857         * call.c (build_conditional_expr): Use VOID_TYPE_P.
16858         * cvt.c (cp_convert_to_pointer): Likewise.
16859         (convert_to_void): Likewise.
16860         * error.c (dump_expr): Likewise.
16861         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
16862         * init.c (build_delete): Likewise.
16863         * method.c (emit_thunk): Likewise.
16864         * optmize.c (declare_return_variable): Likewise.
16865         * rtti.c (get_tinfo_decl_dynamic): Likewise.
16866         (get_typeid): Likewise.
16867         (build_dynamic_cast_1): Likewise.
16868         * typeck.c (composite_pointer_type): Likewise.
16869         (common_type): Likewise.
16870         (build_indirect_ref): Likewise.
16871         (build_binary_op): Likewise.
16872         (build_x_compound_expr): Likewise.
16873         (check_return_expr): Likewise.
16874         * typeck2.c (add_exception_specifier): Likewise.
16875
16876         * mangle.c (write_method_parms): Use direct comparison for end
16877         of parmlist.
16878
16879 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
16880
16881         * cp-tree.h (genrtl_try_block): Declare function.
16882         (genrtl_handler): Likewise.
16883         (genrtl_catch_block): Likewise.
16884         (genrtl_ctor_stmt): Likewise.
16885         (genrtl_subobject): Likewise.
16886         (genrtl_decl_cleanup): Likewise.
16887         (genrtl_do_poplevel): Likewise.
16888         (genrtl_do_pushlevel): Likewise.
16889         (genrtl_clear_out_block): Likewise.
16890         (genrtl_goto_stmt): Likewise.
16891         (genrtl_expr_stmt): Likewise.
16892         (genrtl_decl_stmt): Likewise.
16893         (genrtl_if_stmt): Likewise.
16894         (genrtl_while_stmt): Likewise.
16895         (genrtl_do_stmt): Likewise.
16896         (genrtl_return_stmt): Likewise.
16897         (genrtl_for_stmt): Likewise.
16898         (genrtl_break_stmt): Likewise.
16899         (genrtl_continue_stmt): Likewise.
16900         (genrtl_scope_stmt): Likewise.
16901         (genrtl_switch_stmt): Likewise.
16902         (genrtl_case_label): Likewise.
16903         (genrtl_begin_compound_stmt): Likewise.
16904         (genrtl_finish_compound_stmt): Likewise.
16905         (genrtl_compound_stmt): Likewise.
16906         (genrtl_asm_stmt): Likewise.
16907         (genrtl_named_return_value): Likewise.
16908         (genrtl_begin_stmt_expr): Likewise.
16909         (genrtl_finish_stmt_expr): Likewise.
16910         (finish_for_stmt): Removed first argument.
16911         (finish_switch_stmt): Likewise.
16912
16913         * semantics.c (genrtl_try_block): Define function.
16914         (genrtl_handler): Likewise.
16915         (genrtl_catch_block): Likewise.
16916         (genrtl_ctor_stmt): Likewise.
16917         (genrtl_subobject): Likewise.
16918         (genrtl_decl_cleanup): Likewise.
16919         (genrtl_do_poplevel): Likewise.
16920         (genrtl_do_pushlevel): Likewise.
16921         (genrtl_clear_out_block): Likewise.
16922         (genrtl_goto_stmt): Likewise.
16923         (genrtl_expr_stmt): Likewise.
16924         (genrtl_decl_stmt): Likewise.
16925         (genrtl_if_stmt): Likewise.
16926         (genrtl_while_stmt): Likewise.
16927         (genrtl_do_stmt): Likewise.
16928         (genrtl_return_stmt): Likewise.
16929         (genrtl_for_stmt): Likewise.
16930         (genrtl_break_stmt): Likewise.
16931         (genrtl_continue_stmt): Likewise.
16932         (genrtl_scope_stmt): Likewise.
16933         (genrtl_switch_stmt): Likewise.
16934         (genrtl_case_label): Likewise.
16935         (genrtl_begin_compound_stmt): Likewise.
16936         (genrtl_finish_compound_stmt): Likewise.
16937         (genrtl_compound_stmt): Likewise.
16938         (genrtl_asm_stmt): Likewise.
16939         (genrtl_named_return_value): Likewise.
16940         (genrtl_begin_stmt_expr): Likewise.
16941         (genrtl_finish_stmt_expr): Likewise.
16942         (finish_for_stmt): Removed first argument and generate rtl
16943         specific code.
16944         (finish_switch_stmt): Likewise.
16945         (do_poplevel): Removed generate rtl specific code.
16946         (do_pushlevel): Likewise.
16947         (add_tree): Likewise.
16948         (finish_goto_stmt): Likewise.
16949         (finish_expr_stmt): Likewise.
16950         (begin_if_stmt): Likewise.
16951         (finish_if_stmt_cond): Likewise.
16952         (finish_then_clause): Likewise.
16953         (begin_else_clause): Likewise.
16954         (finish_else_clause): Likewise.
16955         (finish_if_stmt): Likewise.
16956         (clear_out_block): Likewise.
16957         (begin_while_stmt): Likewise.
16958         (finish_while_stmt_cond): Likewise.
16959         (finish_while_stmt): Likewise.
16960         (begin_do_stmt): Likewise.
16961         (finish_do_body): Likewise.
16962         (finish_do_stmt): Likewise.
16963         (finish_return_stmt): Likewise.
16964         (begin_for_stmt): Likewise.
16965         (finish_for_init_stmt): Likewise.
16966         (finish_for_cond): Likewise.
16967         (finish_for_expr): Likewise.
16968         (finish_break_stmt): Likewise.
16969         (finish_continue_stmt): Likewise.
16970         (begin_switch_stmt): Likewise.
16971         (finish_switch_cond): Likewise.
16972         (finish_case_label): Likewise.
16973         (begin_try_block): Likewise.
16974         (begin_function_try_block): Likewise.
16975         (finish_try_block): Likewise.
16976         (finish_cleanup_try_block): Likewise.
16977         (finish_cleanup): Likewise.
16978         (finish_function_try_block): Likewise.
16979         (finish_handler_sequence): Likewise.
16980         (finish_function_handler_sequence): Likewise.
16981         (begin_handler): Likewise.
16982         (finish_handler_parms): Likewise.
16983         (begin_catch_block): Likewise.
16984         (finish_handler): Likewise.
16985         (begin_compound_stmt): Likewise.
16986         (finish_compound_stmt): Likewise.
16987         (finish_asm_stmt): Likewise.
16988         (finish_label_stmt): Likewise.
16989         (finish_label_decl): Likewise.
16990         (finish_subobject): Likewise.
16991         (finish_decl_cleanup): Likewise.
16992         (finish_named_return_value): Likewise.
16993         (begin_stmt_expr): Likewise.
16994         (finish_stmt_expr): Likewise.
16995
16996         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
16997         to call genrtl_expr_stmt when appropriate.
16998
16999         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
17000         begin_compound_expr to call genrtl_begin_stmt_expr and
17001         genrtl_begin_compound_expr when appropriate.
17002         (finish_init_stmts): Changed calls to finish_compound_expr and
17003         finish_stmt_expr to call genrtl_finish_compound_expr and
17004         genrtl_finish_stmt_expr when appropriate.
17005         (expand_default_init): Changed call to finish_expr_stmt to call
17006         genrtl_expr_stmt when appropriate.
17007         (build_vec_init): Likewise.
17008
17009         * parse.y (simple_stmt): Removed first argument from call to
17010         finish_for_stmt. Removed first argument from call to
17011         finish_switch_stmt.
17012
17013         * parse.c: Regenerated.
17014
17015         * pt.c (tsubst_expr): Removed first argument from call to
17016         finish_for_stmt. Removed first argument from call to
17017         finish_switch_stmt.
17018
17019 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
17020
17021         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
17022         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
17023
17024         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
17025         (cplus_tree_code_length[]): Likewise.
17026         (cplus_tree_code_name[]): Likewise.
17027         (init_parse): Added call to add_c_tree_codes. Changed
17028         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
17029
17030 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
17031
17032         * cp-tree.h (finish_mem_initializers): Declare.
17033         (count_trees): Likewise.
17034         * parse.y (base_init): Use finish_mem_initializers.
17035         * semantics.c (finish_mem_initializers): New function.
17036
17037         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
17038         the number of trees.
17039         (n_trees): Remove.
17040         (count_trees): Don't use it.
17041
17042 2000-06-15  Jason Merrill  <jason@redhat.com>
17043
17044         * tree.c (count_trees): New debugging function.
17045
17046         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
17047         * init.c (build_member_call): Pull out the name of a DECL.
17048
17049         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
17050         * semantics.c (expand_body): Push to TV_INTEGRATION here.
17051         * optimize.c (optimize_function): Not here.
17052         * pt.c (instantiate_decl): Push to TV_PARSE.
17053
17054 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
17055
17056         * cp-tree.h (struct language_function): Remove x_base_init_list
17057         and x_member_init_list.
17058         (current_base_init_list): Remove.
17059         (current_member_init_list): Likewise.
17060         (setup_vtbl_ptr): Change prototype.
17061         (emit_base_init): Likewise.
17062         (expand_member_init): Likewise.
17063         (reinit_parse_for_function): Remove.
17064         * decl.c (save_function_data): Don't clear x_base_init_list and
17065         x_member_init_list.
17066         (mark_language_function): Don't mark them.
17067         * init.c (perform_member_init): Tweak comment.
17068         (sort_member_init): Take the list of initializers as an argument.
17069         (sort_base_init): Likewise.
17070         (emit_base_init): Likewise.
17071         (expand_member_init): Return the initializer.  Don't use global
17072         variables.
17073         * lex.c (reinit_parse_for_function): Remove.
17074         * method.c (build_template_parm_names): Correct substitution.
17075         (do_build_copy_constructor): Don't use current_member_init_list
17076         and current_base_init_list.
17077         (synthesize_method): Likewise.
17078         * parse.y (base_init): Split mem-initializers into
17079         base-initializers and field-initializers.
17080         (member_init_list): Build up the list here.
17081         (member_init): Return the initializer.
17082         (fn.depfn): Don't use reinit_parse_for_function.
17083         * parse.c: Regenerated.
17084         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
17085         ERROR_MARK.
17086         (tsubst_expr): Don't use current_member_init_list
17087         and current_base_init_list.
17088         (tsubst_expr_values): Rename to ...
17089         (tsubst_initializer_list): ... this.  Use convert_from_reference.
17090         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
17091         and current_base_init_list.
17092         (begin_function_definition): Don't call reinit_parse_for_function.
17093
17094         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
17095
17096         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
17097         correctly.
17098
17099         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
17100
17101 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
17102
17103         * cp-tree.h (IF_COND): Move to c-common.h.
17104         (THEN_CLAUSE): Likewise.
17105         (ELSE_CLAUSE): Likewise.
17106         (WHILE_COND): Likewise.
17107         (WHILE_BODY): Likewise.
17108         (DO_COND): Likewise.
17109         (DO_BODY): Likewise.
17110         (RETURN_EXPR): Likewise.
17111         (EXPR_STMT_EXPR): Likewise.
17112         (FOR_INIT_STMT): Likewise.
17113         (FOR_COND): Likewise.
17114         (FOR_EXPR): Likewise.
17115         (FOR_BODY): Likewise.
17116         (SWITCH_COND): Likewise.
17117         (SWITCH_BODY): Likewise.
17118         (CASE_LOW): Likewise.
17119         (CASE_HIGH): Likewise.
17120         (GOTO_DESTINATION): Likewise.
17121         (COMPOUND_BODY): Likewise.
17122         (ASM_CV_QUAL): Likewise.
17123         (ASM_STRING): Likewise.
17124         (ASM_OUTPUTS): Likewise.
17125         (ASM_INPUTS): Likewise.
17126         (ASM_CLOBBERS): Likewise.
17127         (DECL_STMT_DECL): Likewise.
17128         (STMT_EXPR_STMT): Likewise.
17129         (LABEL_STMT_LABEL): Likewise.
17130         (SCOPE_BEGIN_P): Likewise.
17131         (SCOPE_END_P): Likewise.
17132         (SCOPE_STMT_BLOCK): Likewise.
17133         (SCOPE_NULLIFIED_P): Likewise.
17134         (SCOPE_NO_CLEANUPS_P): Likewise.
17135         (SCOPE_PARTIAL_P): Likewise.
17136         (ASM_VOLATILE_P): Likewise.
17137         (STMT_LINENO): Likewise.
17138         (STMT_LINENO_FOR_FN_P): Likewise.
17139
17140         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
17141         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
17142         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
17143         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
17144         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
17145
17146         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
17147
17148         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
17149         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
17150
17151         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
17152         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
17153         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
17154
17155 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
17156
17157         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
17158         * class.c (dfs_find_final_overrider): Set it appropriately.
17159         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
17160         avoid unneeded secondary vptrs.
17161
17162 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
17163
17164         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
17165         (check_bitfield_decl, check_field_decl): Likewise.
17166         (build_vtbl_or_vbase_field, build_base_field): Likewise.
17167         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
17168         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
17169         (xfer_tag, finish_enum): Likewise.
17170         * decl2.c (finish_builtin_type): Likewise.
17171         * init.c (init_init_processing): Likewise.
17172         * pt.c (instantiate_class_template): Likewise.
17173         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
17174         * cp-tree.h (struct lang_type): Add user_align member.
17175         (CLASSTYPE_USER_ALIGN): Define.
17176
17177 2000-06-13  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
17178
17179         * Make-lang.in (c++.install-common): Install g++-cross in
17180         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
17181         $(target_alias)-g++ and $(target_alias)-c++.
17182
17183 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
17184
17185         * class.c (vcall_offset_data_s): Add last_init and fns.
17186         (overrides): Rename to same_signature_p.
17187         (dfs_find_final_overrider): Adjust accordingly.
17188         (mark_overriders): Likewise.
17189         (warn_hidden): Likewise.
17190         (build_vtbl_initializer): Reorganize machinery for building things
17191         at negative offsets.
17192         (build_vcall_and_vbase_vtbl_entries): Likewise.
17193         (build_vbase_offset_vtbl_entries): Likewise.
17194         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
17195         offset entries.  Do not create two entries for functions with the
17196         same signature.
17197         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
17198         (build_rtti_vtbl_entries): Reorganize machinery for building things
17199         at negative offsets.
17200
17201         * optimize.c (expand_call_inline): Don't recurse into the code
17202         used to initialize the parameters more than once.
17203
17204 2000-06-11  Mark Mitchell <mark@codesourcery.com>
17205
17206         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
17207         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
17208         (find_substitution): Only use the `Sa' substitution for
17209         std::allocator, not instantiations of it.
17210         (write_template_prefix): Move comment.  Only use a TREE_LIST to
17211         represent substitutions for a member template.
17212         (write_array_type): Mangle array dimensions correctly.
17213         * optimize.c (maybe_clone_body): Copy more information from the
17214         cloned function.
17215         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
17216         on the regenerated declaration.
17217
17218 2000-06-11  Chip Salzenberg  <chip@valinux.com>
17219             Mark Mitchell <mark@codesourcery.com>
17220
17221         * class.c (build_vtable): Clarify comment.
17222         (build_ctor_vtbl_group): Pass the most derived type to
17223         build_vtable.
17224
17225 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17226
17227         * decl2.c (compare_options): Don't needlessly cast away const-ness.
17228
17229 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
17230
17231         * decl.c (add_binding): Handle duplicate declarations of external
17232         variables.
17233
17234 2000-06-09  Chip Salzenberg  <chip@valinux.com>
17235             Mark Mitchell <mark@codesourcery.com>
17236
17237         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
17238         argument.
17239         (write_signed_number): New macro.
17240         (write_unsigned_number): Likewise.
17241         (write_source_name): Use them.
17242         (write_number): Handle signed and unsigned values.
17243         (write_integer_cst): Use tree_int_cst_sgn, and use
17244         write_unsigned_number or write_signed_number as appropriate.
17245         (write_discriminator): Use write_unsigned_number or
17246         write_signed_number as appropriate.
17247         (write_template_arg_literal): Likewise.
17248         (write_array_type): Use tree_low_cst.
17249         (write_template_parm):  Use write_unsigned_number or
17250         write_signed_number as appropriate.
17251         (write_substitution): Adjust call to write_number.
17252         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
17253         (write_expression): Handle non-type template arguments of
17254         reference type correctly.
17255         (mangle_thunk): Use write_signed_number.
17256
17257 2000-06-09  Chip Salzenberg  <chip@valinux.com>
17258
17259         * mangle.c (find_substition): Don't mangle objects with typename
17260         substitutions (e.g. "cin" as "Si").
17261
17262 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
17263
17264         * call.c (add_candidate): Use ggc_alloc_cleared.
17265         * decl.c (lookup_label): Likewise.
17266         * lex.c (retrofit_lang_decl): Likewise.
17267
17268 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
17269
17270         * semantics.c (expand_body): Push to TV_EXPAND.
17271         * optimize.c (optimize_function): Push to TV_INTEGRATION.
17272         * decl.c (start_function): Always call announce_function.
17273
17274         * tinfo2.cc: Just declare abort.
17275
17276 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
17277
17278         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
17279         whenever @ is a symbolic name.
17280
17281 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
17282
17283         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
17284
17285 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
17286
17287         * decl.c (pushdecl): Look up functions by DECL_NAME, not
17288         DECL_ASSEMBLER_NAME.
17289
17290 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
17291
17292         * decl2.c (c_language): Define.
17293
17294 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
17295
17296         * lex.c (lang_init_options): Tweak.
17297
17298         * decl2.c: Remove #inclusion of diagnostic.h
17299         (lang_decode_option): Move diagnostic formatting options to
17300         toplevel.
17301
17302         * lang-options.h: Remove documentation for diagnostic options.
17303
17304         * Makefile.in (lex.o): Depends upon diagnostic.h
17305
17306 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
17307
17308         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
17309         the same DECL_RESULT, it's not a redefinition.
17310         * pt.c (tsubst_decl): Remove code to handle illegal
17311         specializations.
17312
17313 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
17314
17315         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
17316
17317 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
17318
17319         * search.c (maybe_suppress_debug_info): Don't check
17320         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
17321
17322         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
17323         here if extern_p.
17324
17325         Remember instantiation context in deferred instantiations.
17326         * cp-tree.h (struct tinst_level): Remove.
17327         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
17328         * pt.c (current_tinst_level): Now a tree.
17329         (print_template_context, push_tinst_level, pop_tinst_level,
17330         tinst_for_decl): Adjust.
17331         (reopen_tinst_level): New fn.
17332         (init_pt): Register current_tinst_level as a root.
17333         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
17334         of the pending templates list.
17335         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
17336         * lex.c (extract_interface_info): Adjust.
17337         * decl2.c (warn_if_unknown_interface): Adjust.
17338
17339 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
17340
17341         * class.c (indirect_primary_base_p): New function.
17342         (determine_primary_base): Use it.
17343
17344 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
17345
17346         Update new-abi dynamic cast algorithm.
17347         * tinfo.cc (__class_type_info::__dyncast_result): Add
17348         whole_details. Adjust constructor.
17349         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
17350         Avoid unnecessary searching.
17351         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
17352
17353 2000-06-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17354
17355         * decl.c (init_decl_processing): Don't call record_component_aliases.
17356         * tree.c (build_cplus_array_type_1): Likewise.
17357
17358 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
17359
17360         * ir.texi: Correct typo.
17361         * mangle.c (write_expression): Handle non-type template arguments
17362         with reference type.
17363         * method.c (build_overload_value): Likewise.
17364         * pt.c (convert_nontype_argument): Explicitly represent conversion
17365         to a reference with an ADDR_EXPR.
17366         (unify): Always unify arguments in left-to-right order.
17367
17368 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
17369             Mark Mitchell  <mark@codesourcery.com>
17370
17371         * Make-lang.in (CXX_SRCS): Add mangle.c.
17372         * Makefile.in (CXX_OBJS): Add mangle.o.
17373         (mangle.o): New rule.
17374
17375         * class.c (local_classes): New variable.
17376         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
17377         (get_vtt_name): Use mangle_vtt_name for new ABI.
17378         (init_class_processing): Initialize local_classes.
17379         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
17380         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
17381         (std_identifier): New macro.
17382         (DECL_VOLATILE_MEMFUNC_P): New macro.
17383         (DECL_NAMESPACE_STD_P): Likewise.
17384         (local_classes): Declare.
17385         (get_mostly_instantiated_function_type): Declare.
17386         (init_mangle): Declare.
17387         (mangle_decl): Likewise.
17388         (mangle_type_string): Likewise.
17389         (mangle_type): Likewise.
17390         (mangle_typeinfo_for_type): Likewise.
17391         (mangle_typeinfo_string_for_type): Likewise.
17392         (mangle_vtbl_for_type): Likewise.
17393         (mangle_vtt_for_type): Likewise.
17394         (mangle_ctor_vtbl_for_type): Likewise.
17395         (mangle_thunk): Likewise.
17396         (mangle_conv_op_name_for_type): Likewise.
17397         (mangle_guard_variable): Likewise.
17398         * decl.c (pushtag): Keep track of local classes.
17399         (initialize_predefined_identifiers): Initialize std_identifier.
17400         (init_decl_processing): Use std_identifier.
17401         (start_decl): Don't treat instantiations as specializations.
17402         (grokdeclarator): Likewise.
17403         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
17404         name for fully-instantiated templates.
17405         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
17406         destructors with the new ABI.
17407         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
17408         (grokfield): Use mangle_type for new ABI.
17409         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
17410         (get_sentry): Use mangle_guard_variable for new ABI.
17411         (start_static_initialization_or_destruction): Likewise.
17412         * expr.c (extract_aggr_init): Remove.
17413         (extract_scalar_init): Likewise.
17414         (extract_init): Remove #if 0'd code.
17415         * mangle.c: New function.
17416         * method.c (build_mangled_name): Assert not flag_new_abi.
17417         (build_static_name): Likewise.
17418         (build_decl_overload_real): Likewise.
17419         (build_typename_overload): Likewise.
17420         (build_overload_with_type): Likewise.
17421         (build_overload_name): Likewise.
17422         (get_ctor_vtbl_name): Likewise.
17423         (start_squangling): Likewise.
17424         (get_id_2): Likewise.
17425         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
17426         (init_method): Call init_mangle for new ABI.
17427         (make_thunk): Call mangle_thunk for new ABI.
17428         * operators.def: Correct new ABI manglings for the `%' operator.
17429         Add `::' operator.
17430         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
17431         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
17432         (lookup_template_class): Call mangle_decl for new ABI.
17433         (get_mostly_instantiated_function_type): New function.
17434         (set_mangled_name_for_template_decl): Use it.
17435         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
17436         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
17437         conversion op names.
17438         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
17439         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
17440         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
17441         mangle_typeinfo_string_for_type.
17442
17443 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
17444
17445         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
17446         (INNERMOST_TEMPLATE_ARGS): New macro.
17447         (innermost_args): Remove.
17448         (get_innermost_template_args): New function.
17449         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
17450         * error.c (dump_function_decl): Be caution when using
17451         most_general_template.
17452         * method.c (build_template_parm_names):  Use
17453         INNERMOST_TEMPLATE_ARGS.
17454         * pt.c (add_to_template_args): Tidy comment
17455         (get_innermost_template_args): New function.
17456         (check_explicit_specialization): Clear DECL_INITIAL for a new
17457         specialization.
17458         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
17459         Tidy.
17460         (push_template_decl): Always register specializations of the most
17461         general template.
17462         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
17463         (coerce_template_parms): Likewise.
17464         (lookup_template_class): Likewise.
17465         (innermost_args): Remove.
17466         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
17467         (tsubst_decl): Handle tricky specializations.  Use
17468         get_innermost_template_args.
17469         (instantiate_template): Simplify handling of partial
17470         instantiations.
17471         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
17472         (most_general_template): Reimplement, in a more straightforward
17473         manner.
17474         (regenerate_decl_from_template): Tweak formatting.  Use
17475         TMPL_ARGS_DEPTH for clarity.
17476         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
17477
17478         * dump.c (dequeue_and_dump): Dump information about thunks.
17479
17480 2000-06-01  Richard Henderson  <rth@cygnus.com>
17481
17482         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
17483
17484 2000-06-01  Richard Henderson  <rth@cygnus.com>
17485
17486         * decl2.c (unsupported_options): Fix typo, make const.
17487         (lang_decode_option): Fix bsearch argument order.
17488
17489 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
17490
17491         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
17492         on FIELD_DECLs.
17493
17494 2000-05-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17495
17496         * cp-tree.h (c_get_alias_set): Deleted.
17497         * Makefile.in (decl.o): Include ../expr.h.
17498         * decl.c (expr.h): Include.
17499         (init_decl_processing): Call record_component_aliases for arrays.
17500         (grokdeclarator): Likewise.
17501         Set TREE_ADDRESSABLE for fields that aren't bitfields.
17502         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
17503
17504 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
17505
17506         Remove guiding declaration support.
17507         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
17508         (flag_guiding_decls): Remove.
17509         * call.c (build_user_type_conversion_1): Remove support for
17510         guiding decls.
17511         (build_new_function_call): Likewise.
17512         (build_new_op): Likewise.
17513         (build_new_method_call): Likewise.
17514         * decl.c (start_function): Likewise.
17515         * friend.c (is_friend): Likewise.
17516         (do_friend): Likewise.
17517         * decl2.c ((flag_dump_translation_unit): Make it const.
17518         (flag_guiding_decls): Remove.
17519         (unsupported_options): New variable
17520         (compare_options): New function.
17521         (lang_decode_option): Use them.
17522
17523         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
17524
17525         * method.c (mangle_expression): Adjust test for legal expression
17526         operators.
17527
17528         * pt.c (instantiate_decl): Save and restore the local
17529         specializations list.
17530
17531 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
17532
17533         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
17534
17535 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
17536
17537         * call.c (add_template_candidate_real): Handle member template
17538         constructors for classes with virtual bases.
17539         (build_user_type_conversion_1): Use in_charge_arg_for_name.
17540         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
17541
17542         * ir.texi: Update thunk documentation.
17543
17544         * call.c (joust): Fix handling of overloaded builtin operators.
17545
17546 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
17547
17548         * cp-tree.h (DECL_ANTICIPATED): New macro.
17549         Document new use of DECL_LANG_FLAG_7.
17550         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
17551         in the user namespace.
17552         * lex.c (do_identifier): If the identifier's declaration has
17553         DECL_ANTICIPATED on, it has not yet been declared.  But do not
17554         replace it with an ordinary implicit declaration.
17555
17556         * tinfo2.cc: Include stdlib.h.
17557
17558 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
17559
17560         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
17561         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
17562         CLASSTYPE_ALIGN.
17563
17564 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
17565
17566         * decl2.c (lang_decode_option): Use skip_leading_substring instead
17567         of plain strncmp.
17568
17569 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
17570
17571         * operators.def (<?): Duplicated, should have been...
17572         (>?): this.  Fixed.
17573
17574 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
17575             Mark Mitchell  <mark@codesourcery.com>
17576
17577         * cp-tree.h (ansi_opname): Make it a macro.
17578         (ansi_assopname): Likewise.
17579         (struct lang_decl_flags): Add assignment_operator_p.
17580         (struct lang_decl): Add operator_code.
17581         (DECL_VTT_PARM): Adjust.
17582         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
17583         overloaded operator.
17584         (SET_OVERLOADED_OPERATOR_CODE): New macro.
17585         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
17586         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
17587         (opname_tab): Remove.
17588         (assignop_tab): Likewise.
17589         (operator_name_info_t): New type.
17590         (operator_name_info): New variable.
17591         (assignment_operator_name_info): Likewise.
17592         (build_cp_library_fn): Remove declaration.
17593         (push_cp_library_fn): Likewise.
17594         (operator_name_string): Likewise.
17595         (build_decl_overload): Likewise.
17596         * call.c (print_z_candidates): Simplify.
17597         (build_object_call): Adjust usage of ansi_opname.  Use
17598         DECL_OVERLOADED_OPERATOR_P.
17599         (op_error): Adjust operator name lookup.
17600         (build_conditional_expr): Adjust usage of ansi_opname.
17601         (build_new_op): Likewise.
17602         (build_op_delete_call): Likewise.
17603         (build_over_call): Likewise.
17604         (joust): Use DECL_OVERLOADED_OPERATOR_P.
17605         * decl.c (duplicate_decls): Copy operator_code.
17606         (init_decl_processing): Adjust parameters to push_cp_library_fn.
17607         (builtin_function): Adjust parameters to build_library_fn_1.
17608         (build_library_fn_1): Accept an overloaded operator code.
17609         (build_library_fn): Pass ERROR_MARK.
17610         (build_cp_library_fn): Accept an overloaded operator code.
17611         (push_cp_library_fn): Likewise.
17612         (grokfndecl): Tweak.
17613         (grokdeclarator): Simplify code to compute names of overloaded
17614         operators.  Adjust use of ansi_opname.
17615         (ambi_op_p): Work on tree_codes, not identifiers.
17616         (unary_op_p): Likewise.
17617         (grok_op_properties): Likewise.
17618         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
17619         (lang_mark_tree): Don't try to mark the operator_code.
17620         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
17621         * error.c (dump_decl): Remove special handling for operator
17622         names.
17623         (dump_function_name): Likewise.
17624         (dump_expr): Adjust name lookup of operators.
17625         (op_to_string): Simplify.
17626         (assop_to_string): Likewise.
17627         * init.c (build_new_1): Adjust use of ansi_opname.
17628         * lex.c (opname_tab): Remove.
17629         (assignop_tab): Likewise.
17630         (ansi_opname): Likewise.
17631         (ansi_assopname): Likewise.
17632         (operator_name_string): Likewise.
17633         (reinit_lang_specific): Likewise.
17634         (operator_name_info): New variable.
17635         (assignment_operator_name_info): Likewise.
17636         (init_operators): New function.
17637         (init_parse): Use it.
17638         (do_identifier): Adjust use of ansi_opname.
17639         * method.c (mangle_expression): Don't use ansi_opname for
17640         mangling.
17641         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
17642         (build_decl_overload): Remove.
17643         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
17644         (do_build_assign_ref): Adjust use of ansi_opname.
17645         (synthesize_method): Likewise.
17646         (implicitly_declare_fn): Likewise.
17647         * operators.def: New file.
17648         * parse.y (operator): Adjust use of ansi_opname.
17649         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
17650         (set_mangled_name_for_template_decl): Don't play games with
17651         current_namespace.
17652         (special_function_p): Adjust use of ansi_opname.
17653         * typeck.c (check_return_expr): Likewise.
17654         * Make-lang.in (cc1plus): Depend on operators.def.
17655         * Makefile.in (lex.o): Likewise.
17656         (decl.o): Likewise.
17657
17658 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
17659
17660         * Make-lang.in (cplib2.ready): Eradicate.
17661
17662 2000-05-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17663
17664         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
17665         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
17666         (built_min, cp_tree_equal): Likewise.
17667
17668 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
17669
17670         * class.c (layout_nonempty_base_or_field): Replace
17671         `record_layout_info' with `record_layout_info_s'.
17672
17673 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
17674
17675         Fix goto checking.
17676         * cp-tree.h (struct language_function): x_named_labels is now
17677         a struct named_label_list*.
17678         * decl.c (struct named_label_use_list): Renamed from...
17679         (struct named_label_list): ...this.  New struct.
17680         (push_binding_level): Don't set eh_region.
17681         (note_level_for_eh): New fn.
17682         (pop_label): Take label and old value directly.
17683         (pop_labels): Adjust for new named_labels format.
17684         (lookup_label): Likewise.
17685         (poplevel): Note characteristics of a binding level containing a
17686         named label.  Mess with named label lists earlier.
17687         (mark_named_label_lists): New fn.
17688         (mark_lang_function): Call it.
17689         (use_label): New fn, split out from...
17690         (make_label_decl): ...here.  Don't call it.
17691         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
17692         check_previous_gotos): New fns, split out from...
17693         (define_label): ...here.
17694         (check_switch_goto): New fn.
17695         (define_case_label): Call it.
17696         (check_goto): New fn.
17697         * semantics.c (finish_goto_stmt): Call it and use_label.
17698         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
17699         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
17700
17701 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
17702
17703         * class.c (build_vtable_entry_ref): Correct usage of
17704         get_vtbl_decl_for_binfo.
17705
17706         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
17707         * method.c (implicitly_declare_fn): Not here.
17708
17709 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
17710
17711         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
17712         (CPTI_PTMD_DESC_TYPE): ... here.
17713         (ptmd_desc_type_node): Rename to ...
17714         (ptm_desc_type_node): ... here.
17715         * decl.c: Likewise.
17716         * rtti.c (ptmd_initializer): Rename to ...
17717         (ptm_initializer): ... here.
17718         (sythesize_tinfo_var): Adjust. Deal with pointer to member
17719         function.
17720         (create_tinfo_types): Adjust.
17721
17722 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
17723
17724         Finish implementation of VTTs.
17725         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
17726         CPTI_VTT_PARM_IDENTIFIER.
17727         (vtt_parm_identifier): New macro.
17728         (vtt_parm_type): Likewise.
17729         (BINFO_SUBVTT_INDEX): Likewise.
17730         (BINFO_VPTR_INDEX): Likewise.
17731         (struct lang_decl): Add vtt_parm.
17732         (DECL_VTT_PARM): New macro.
17733         (DECL_USE_VTT_PARM): Likewise.
17734         (DECL_NEEDS_VTT_PARM_P): Likewise.
17735         (get_vtt_name): Declare.
17736         (build_artificial_parm): Likewise.
17737         (fixup_all_virtual_upcast_offsets): Likewise.
17738         (expand_indirect_vtbls_init): Remove.
17739         * call.c (build_new_method_call): Pass the vtt to subobject
17740         constructors and destructors.
17741         * class.c (get_vtt_name): Give it external linkage.
17742         (build_clone): Handle the magic VTT parameters for clones.
17743         (clone_function_decl): Fix typo in comment.
17744         (build_vtt): Keep track of the indices in the VTTs where various
17745         entities are stored.
17746         (build_vtt_inits): Likewise.
17747         (dfs_build_vtt_inits): Likewise.
17748         (build_ctor_vtbl_group): Tweak type of construction vtables.
17749         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
17750         primary bases, when building construction vtables.
17751         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
17752         (initialize_predefined_identifiers): Add vtt_parm_identifier.
17753         (init_decl_processing): Initialize vtt_parm_type.
17754         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
17755         (lang_mark_tree): Make vtt_parm.
17756         * decl2.c (build_artificial_parm): New function.
17757         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
17758         (grokclassfn): Use build_artificial_parm.
17759         * init.c (initialize_vtbl_ptrs): Call
17760         fixup_all_virtual_upcast_offsets directly.
17761         (perform_member_init): Use the complete subobject destructor for
17762         member cleanups.
17763         (build_vtbl_address): New function.
17764         (expand_virtual_init): Handle VTTs.
17765         * optimize (maybe_clone_body): Likewise.
17766         * search.c (fixup_all_virtual_upcast_offsets): Give it external
17767         linkage.
17768         (expand_indirect_vtbls_init): Remove.
17769         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
17770         * tree.c (make_binfo): Make them bigger.
17771
17772 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
17773
17774         * inc/cxxabi.h (__pbase_type_info): Define, based on
17775         __pointer_type_info.
17776         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
17777         (__pointer_to_member_type_info): Likewise.
17778         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
17779         (__pointer_to_member_type_info::__is_pointer_p): Remove.
17780         (__pointer_type_info::__do_catch): Rename to ...
17781         (__pbase_type_info::__do_catch): ... here. Adjust.
17782         (__pbase_type_info::__pointer_catch): Implement.
17783         (__pointer_type_info::__pointer_catch): Adjust.
17784         (__pointer_to_member_type_info::__pointer_catch): Adjust.
17785
17786 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
17787
17788         * tinfo.h (__user_type_info::contained_virtual_p): New
17789         predicate.
17790         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
17791         shaped hierarchy.
17792         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
17793         diamond shaped hierarchy. Add early out for mixed diamond and
17794         duplicate shaped hierarchy.
17795
17796 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
17797
17798         * cp-tree.h (build_delete): Change prototype.
17799         (build_vec_delete): Likewise.
17800         * call.c (build_scoped_method_call): Use special_function_kind
17801         values to indicate the kind of destruction to be done.
17802         (build_method_call): Likewise.
17803         * decl.c (finish_destructor_body): Likewise.
17804         (maybe_build_cleanup_1): Likewise.  Rename to ...
17805         (maybe_build_cleanup): ... this.
17806         * decl2.c (delete_sanity): Use special_function_kind
17807         values to indicate the kind of destruction to be done.
17808         (build_cleanup): Likewise.
17809         * init.c (perform_member_init): Likewise.
17810         (build_vec_delete_1): Likewise.
17811         (build_dtor_call): Simplify.
17812         (build_delete): Use special_function_kind
17813         values to indicate the kind of destruction to be done.
17814         (build_vbase_delete): Likewise.
17815         (build_vec_delete): Likewise.
17816
17817         * init.c (sort_member_init): Fix typo in error message generation
17818         code.
17819
17820 2000-05-15  Donald Lindsay  <dlindsay@cygnus.com>
17821
17822         * semantics.c (begin_class_definition): make the packed
17823         attribute be sensitive to the "-fpack-struct" command line flag
17824
17825 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
17826
17827         Update new-abi upcast algorithm.
17828         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
17829         prototype and meaning of return value.
17830         (__si_class_type_info::__do_upcast): Likewise.
17831         (__vmi_class_type_info::__do_upcast): Likewise.
17832         * tinfo.cc (__class_type_info::__upcast_result): Replace
17833         whole2dst with part2dst. Adjust ctor.
17834         (__class_type_info::__do_upcast): Adjust call of worker function.
17835         (__class_type_info::__do_upcast): Adjust.
17836         (__si_class_type_info::__do_upcast): Adjust. Use parent's
17837         __do_upcast.
17838         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
17839         virtual base in diamond hierarchy bug.
17840
17841 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
17842
17843         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
17844         and bitfield to tinfo_fn_p.
17845         (DECL_TINFO_FN_P): Adjust.
17846         (SET_DECL_TINFO_FN_P): Likewise.
17847         (DECL_MUTABLE_P): Likewise.
17848         (DECL_C_BIT_FIELD): Likewise.
17849         (SET_DECL_C_BIT_FIELD): Likewise.
17850         (CLEAR_DECL_C_BIT_FIELD): Likewise.
17851         (DECL_UNINLINABLE): Likewise.
17852         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
17853         (handle_using_decl): Remove assertion.
17854         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
17855         to build FIELD_DECLs.
17856         (build_base_field): Likewise.
17857         (layout_class_type): Likewise.
17858         * decl.c (init_decl_processing): Likewise.
17859         (build_ptrmemfunc_type): Likewise.
17860         (grokdeclarator): Likewise.
17861         * decl2.c (grok_x_components): Likewise.
17862         * except.c (call_eh_info): Likewise.
17863         * init.c (init_init_processing): Likewise.
17864         * rtti.c (expand_class_desc): Likewise.
17865         (create_pseudo_type_info): Likewise.
17866         (get_vmi_pseudo_type_info): Likewise.
17867         (create_tinfo_types): Likewise.
17868         * ptree.c (print_lang_decl): Adjust.
17869         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
17870         before checking DECL_MUTABLE_P.
17871
17872         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
17873         parameters for template functions.
17874         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
17875         destructors as well as constructors.
17876
17877 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
17878
17879         * class.c (build_ctor_vtbl_group): Set inits.
17880         * optimize.c (maybe_clone_body): Set DECL_INLINE and
17881         DECL_THIS_INLINE appropriately for clones.
17882
17883         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
17884         (DECL_CONV_FN_P): Simplify.
17885         (DECL_OPERATOR): Remove.
17886         (language_to_string): Declare.
17887         * decl.c (duplicate_decls): Fix typo in comment.
17888         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
17889         (grok_op_properties): Use DECL_CONV_FN_P instead of
17890         IDENTIFIER_TYPENAME_P.
17891         * dump.c (dequeue_and_dump): Dump the language linkage of
17892         declarations.
17893         * error.c (language_to_string): Give it external linkage.
17894         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
17895         (implicitly_declare_fn): Set DECL_LANGUAGE.
17896         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
17897         IDENTIFIER_TYPENAME_P.
17898         (tsubst_decl): Likewise.
17899         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
17900         * semantics.c (finish_member_declaration): Don't mark members of
17901         classes declared in an extern "C" region as extern "C".
17902
17903 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17904
17905         * decl2.c (qualified_lookup_using_namespace): Look through
17906         namespace aliases.
17907
17908         * decl.c (push_using_decl): Return the old decl on namespace level.
17909
17910 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
17911
17912         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
17913         (VTT_NAME_PREFIX): New macro.
17914         (CTOR_VTBL_NAME_PREFIX): Likewise.
17915         (get_ctor_vtbl_name): New function.
17916         * class.c (get_vtable_name): Simplify.
17917         (get_vtt_name): New function.
17918         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
17919         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
17920         when a virtual base becomes primary.
17921         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
17922         VTTs.
17923         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
17924         additional parameters.
17925         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
17926         (initialize_array): New function.
17927         (build_vtt): Likewise.
17928         (build_vtt_inits): Likewise.
17929         (dfs_build_vtt_inits): Likewise.
17930         (dfs_fixup_binfo_vtbls): Likewise.
17931         (build_ctor_vtbl_group): Likewise.
17932         (initialize_vtable): Use initialize_array.
17933         (accumulate_vtbl_inits): Reimplement to handle construction
17934         vtables.
17935         (dfs_accumulate_vtbl_inits): Likewise.
17936         (bulid_vtbl_initializer): Adjust parameter name.
17937         * method.c (build_typename_overload): Remove #if 0'd code.
17938         (get_ctor_vtbl_name): New function.
17939         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
17940         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
17941
17942         * cp-tree.h (struct lang_type): Remove search_slot.
17943         (CLASSTYPE_SEARCH_SLOT): Remove.
17944         (emit_base_init): Change prototype.
17945         (initialize_vtbl_ptrs): Likewise.
17946         (expand_indirect_vtbls_init): Likewise.
17947         (clear_search_slots): Remove.
17948         * decl.c (lang_mark_tree): Don't mark search_slot.
17949         * init.c (initialize_vtbl_ptrs): Simplify.
17950         (emit_base_init): Likewise.
17951         * search.c (struct vbase_info): Document decl_ptr.
17952         (convert_pointer_to_single_level): Remove.
17953         (dfs_find_vbases): Remove.
17954         (dfs_init_base_pointers): Simplify.
17955         (dfs_clear_vbase_slots): Remove.
17956         (dfs_vtable_path_unmark): New function.
17957         (init_vbase_pointers): Simplify.
17958         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
17959         (expand_indirect_vtbls_init): Simplify.  Don't call
17960         mark_all_temps_used.
17961         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
17962         initialize_vtbl_ptrs.
17963
17964 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
17965
17966         * except.c: Add static prototypes.
17967
17968 2000-05-20  H.J. Lu  <hjl@gnu.org>
17969
17970         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
17971
17972 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
17973
17974         Don't create a separate copy of virtual bases for the
17975         CLASSTYPE_VBASECLASSES list.
17976         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
17977         (BINFO_FOR_VBASE): Remove.
17978         (CANONICAL_BINFO): Adjust.
17979         (binfo_for_vbase): New function.
17980         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
17981         instead of BINFO_FOR_VBASE.
17982         (build_vbase_pointer): Likewise.
17983         (build_secondary_vtable): Likewise.
17984         (dfs_mark_primary_bases): Likewise.
17985         (mark_primary_bases): Likewise.
17986         (layout_nonempty_base_or_field): Likewise.
17987         (dfs_set_offset_for_shared_vbases): Likewise.
17988         (dfs_set_offset_for_unshared_vbases): Likewise.
17989         (layout_virtual_bases): Likewise.  Adjust for changes to the
17990         CLASSTYPE_VBASECLASSES list.
17991         (dump_class_hierarchy_r): Use binfo_for_vbase
17992         instead of BINFO_FOR_VBASE.
17993         (dump_class_hierarchy): Likewise.
17994         (finish_vtbls): Likewise.
17995         (build_vtbl_initializer): Adjust for changes to the
17996         CLASSTYPE_VBASECLASSES list.
17997         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
17998         * decl.c (finish_destructor_body): Adjust for changes to the
17999         CLASSTYPE_VBASECLASSES list.
18000         * init.c (sort_base_init): Use binfo_for_vbase.
18001         (construct_virtual_bases): Adjust for changes to the
18002         CLASSTYPE_VBASECLASSES list.
18003         (expand_member_init): Use binfo_for_vbase.
18004         (build_vbase_delete):  Adjust for changes to the
18005         CLASSTYPE_VBASECLASSES list.
18006         * method.c (do_build_copy_constructor): Likewise.
18007         * rtti.c (get_base_offset): Use binfo_for_vbase.
18008         (expand_class_desc): Remove #if 0'd code.
18009         * search.c (struct vbase_info): Remove vbase_types.
18010         (get_base_distance):  Use binfo_for_vbase.
18011         (lookup_field_queue_p): Use CANONICAL_BINFO.
18012         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
18013         (get_pure_virtuals): Adjust for changes to the
18014         CLASSTYPE_VBASECLASSES list.
18015         (dfs_find_vbases): Use binfo_for_vbase.
18016         (dfs_init_vbase_pointers): Likewise.
18017         (init_vbase_pointers): Don't initialize vi.vbase_types.
18018         (virtual_context): Use binfo_for_vbase.
18019         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
18020         CLASSTYPE_VBASECLASSES list.
18021         (expand_indirect_vtbls_init): Simplify.
18022         (dfs_get_vbase_types): Don't replicate virtual bases.
18023         (find_vbase_instance): Use binfo_for_vbase.
18024         (binfo_for_vbase): New function.
18025         * typeck.c (get_delta_difference): Use binfo_for_vbase.
18026
18027 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
18028
18029         * decl2.c (finish_anon_union): Generalize error messages to handle
18030         anonymous structures.
18031         * init.c (perform_member_init): Remove `name' parameter.
18032         (build_field_list): New function.
18033         (sort_member_init): Handle anonymous union initialization order
18034         correctly.  Check for multiple initializations of the same union.
18035         (emit_base_init): Don't look up fields by name here.
18036         (expand_member_init): Record the result of name lookup for future
18037         reference.
18038         * typeck.c (build_component_ref): Fix formatting.
18039
18040 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
18041
18042         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
18043         * typeck.c (build_x_compound_expr): Replace warn_unused with
18044         warn_unused_value.
18045
18046         * decl2.c (lang_decode_option): Update -Wall unused flags by
18047         calling set_Wunused.
18048
18049 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
18050
18051         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
18052         * init.c (dfs_vtable_path_unmark): Remove.
18053         * search.c (marked_new_vtable_p): Likewise.
18054         (unmarked_new_vtable_p): Likewise.
18055         (dfs_search_slot_nonempty_p): Likewise.
18056         (dfs_mark): Likewise.
18057         (dfs_vtable_path_unmark): Likewise.
18058         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
18059         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
18060         (dfs_init_vbase_pointers): Remove special-case new ABI code.
18061         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
18062         (init_vbase_pointers): Simplify.
18063         (expand_indirect_vtbls_init): Likewise.
18064
18065         * class.c (copy_virtuals): New function.
18066         (build_primary_table): Use it.
18067         (build_secondary_vtable): Likewise.
18068         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
18069         indicate that no vcall offset is required.
18070         (add_virtual_function): Likewise.
18071         (modify_all_vtables): Likewise.
18072         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
18073         (dfs_accumulate_vtbl_inits): Likewise.
18074         (build_vtbl_initializer): Make changes to handle construction
18075         vtables.
18076         (dfs_build_vcall_offset_vtbl_entries): Likewise.
18077         (build_rtti_vtbl_entries): Likewise.
18078         (build_vtable_entries): Handle a NULL vcall_index.
18079
18080 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
18081
18082         * decl2.c (lang_decode_option): Fix thinko.
18083
18084 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
18085
18086         * except.c (check_handlers): New fn.
18087         * cp-tree.h: Declare it.
18088         * semantics.c (finish_handler_sequence): Call it.
18089         (finish_function_handler_sequence): Likewise.
18090         (finish_handler_parms): Set TREE_TYPE on the handler.
18091         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
18092         * search.c (get_base_distance_recursive): If protect>1, ignore
18093         special access.
18094         (get_base_distance): Don't reduce watch_access.
18095
18096 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
18097
18098         * lex.c: #include diagnostic.h.
18099         (lang_init_options): Set default prefixing rules.
18100
18101         * lang-options.h: Add -fdiagnostics-show-location=.
18102
18103         * decl2.c: #include diagnostic.h.
18104         (lang_decode_option): Handle -fdiagnostics-show-location=.
18105
18106 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
18107
18108         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
18109         * vec.cc: Revert my 2000-05-07 change.
18110
18111 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
18112
18113         * class.c (check_field_decls): Complain about non-static data
18114         members with same name as class in class with constructor.
18115
18116 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
18117
18118         * decl.c (grokdeclarator): Allow non-static data members with
18119         same name as class.
18120
18121 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
18122
18123         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
18124         and pending_inline.filename.  Update prototypes.
18125         * decl.c (define_label): Constify filename parameter.
18126         * decl2.c (warn_if_unknown_interface): Constify local char *.
18127         * input.c Constify input_source.filename. Don't declare
18128         input_filename or lineno.  Constify filename parameter to feed_input.
18129         * lex.c (init_parse): Constify parameter and return value.
18130         (cp_pragma_interface, cp_pragma_implementation): Constify
18131         filename argument.
18132         (reinit_parse_for_method, reinit_parse_for_block,
18133         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
18134         Constify local char *.
18135         * pt.c: Don't declare lineno or input_filename.
18136         (print_template_context, tsubst_friend_function, tsubst_decl,
18137         tsubst, instantiate_decl): Constify local char *.
18138         * semantics.c (expand_body): Constify local char *.
18139         * tree.c (build_srcloc): Constify filename parameter.
18140         * typeck.c (c_expand_asm_operands): Constify filename
18141         parameter.
18142
18143 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
18144
18145         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
18146         offsetof expansion.
18147
18148 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
18149
18150         * inc/cxxabi.h:  Fix typos in comment.
18151         (__base_class_info::__offset): Use a static_cast.
18152
18153 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
18154
18155         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
18156         of std::size_t and std::ptrdiff_t respectively.
18157         * tinfo.cc: Likewise.
18158         * vec.cc: Likewise.
18159
18160 2000-05-06  Richard Henderson  <rth@cygnus.com>
18161
18162         * typeck.c (build_c_cast): Don't warn integer->pointer size
18163         mismatch for constants.
18164
18165 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
18166
18167         * rtti.c (ptmd_initializer): Set non-public, if class is
18168         incomplete.
18169
18170         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
18171         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
18172         __cxa_vec_delete): Likewise.
18173         * tinfo.cc (__dynamic_cast): Likewise.
18174         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
18175         __cxa_vec_delete): Likewise.
18176
18177 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
18178
18179         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
18180         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
18181         (lang_decl_flags): Add vcall_offset.
18182         (THUNK_VCALL_OFFSET): Use it.
18183         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
18184         * method.c (make_thunk): Create the lang_decl here, not in
18185         emit_thunk.
18186         (emit_thunk): Make generic thunks into ordinary functions once
18187         they have been fed to expand_body.
18188         * semantics.c (expand_body): Set current_function_is_thunk here.
18189
18190 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18191
18192         * class.c (update_vtable_entry_for_fn): Prototype.
18193
18194         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
18195         and `tmpl'.
18196
18197         * search.c (dfs_build_inheritance_graph_order): Prototype.
18198
18199 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
18200
18201         * cp-tree.h (special_function_kind): Add various kinds of
18202         destructors.
18203         (special_function_p): New function.
18204         * class.c (overrides): Don't let one kind of destructor override
18205         another.
18206         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
18207         whether or not to instantiate a template.
18208         * tree.c (special_function_p): Define.
18209
18210 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
18211
18212         * cp-tree.def (THUNK_DECL): Remove.
18213         * cp-tree.h (DECL_THUNK_P): New macro.
18214         (DECL_NON_THUNK_FUNCTION_P): Likewise.
18215         (DECL_EXTERN_C_FUNCTION_P): Likewise.
18216         (SET_DECL_THUNK_P): Likewise.
18217         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
18218         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
18219         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
18220         * decl.c (decls_match): Use DECL_EXTERN_C_P.
18221         (duplicate_decls): Likewise.
18222         (pushdecl): Likewise.  Adjust thunk handling.
18223         (grokfndecl): Use DECL_EXTERN_C_P.
18224         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
18225         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
18226         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
18227         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
18228         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
18229         DECL_NO_STATIC_CHAIN.
18230         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
18231         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
18232         * search.c (covariant_return_p): Remove THUNK_DECL handling.
18233         * ir.texi: Update.
18234
18235 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
18236
18237         * tree.c (walk_tree): Set lineno.
18238
18239 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
18240
18241         * exception.cc: Update license notice.
18242         * new.cc: Likewise.
18243         * new1.cc: Likewise.
18244         * new2.cc: Likewise.
18245         * tinfo.cc: Likewise.
18246         * tinfo2.cc: Likewise.
18247         * vec.cc: Likewise.
18248         * inc/cxxabi.h: Likewise.
18249         * inc/exception: Likewise.
18250         * inc/new: Likewise.
18251         * inc/new.h: Likewise.
18252         * inc/typeinfo: Likewise.
18253
18254 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
18255
18256         * tree.c (build_target_expr_with_type): If we already have a
18257         TARGET_EXPR, just return it.
18258
18259         * optimize.c (initialize_inlined_parameters): Don't generate an
18260         EXPR_STMT if we can just use DECL_INITIAL.
18261         * decl.c (emit_local_var): Only make the initialization a
18262         full-expression if stmts_are_full_exprs_p.
18263
18264 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
18265
18266         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
18267         macro.
18268         * call.c (standard_conversion): Use it.
18269         (direct_reference_binding): Likewise.
18270         (build_over_call): Likewise.
18271         (is_properly_derived_from): Likewise.
18272         (compare_ics): Likewise.
18273         * class.c (resolves_to_fixed_type_p): Likewise.
18274         * optimize.c (declare_return_variable): Likewise.
18275         * pt.c (is_specialization_of): Likewise.
18276         (unify): Likewise.
18277         * typeck.c (comp_target_parms): Likeiwse.
18278         (build_static_cast): Likewise.
18279         (build_reinterpret_cast): Likewise.
18280         (build_const_cast): Likewise.
18281         (comp_ptr_ttypes_real): Likewise.
18282         (comp_ptr_ttypes_const): Likewise.
18283         * typeck2.c (process_init_constructor): Likewise.
18284
18285 2000-04-30  Scott Snyder <snyder@fnal.gov>
18286
18287         * decl.c (finish_destructor_body): Use the base destructor when
18288         destroying virtual bases.
18289
18290 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
18291
18292         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
18293         STMT_EXPRs.
18294         * optimize.c (struct inline_data): Add target_exprs field.
18295         (declare_return_variable): When a function returns an aggregate,
18296         use the variable declared in the TARGET_EXPR as the remapped
18297         DECL_RESULT.
18298         (expand_call_inline): Update the pending target_exprs stack.
18299         (optimize_function): Initialize the stack.
18300
18301         * decl2.c (finish_file): Fix typo in comment.
18302
18303         * method.c (emit_thunk): Don't try to return a `void' value.
18304
18305         * optimize.c (initialize_inlined_parameters): If the parameter is
18306         addressable, we need to make a new VAR_DECL, even if the
18307         initializer is constant.
18308
18309 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
18310
18311         * decl.c (grok_op_properties): Add an extra check of argtypes.
18312
18313 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
18314
18315         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
18316         variables.
18317         (initialize_inlined_parameters): Try to avoid creating new
18318         VAR_DECLs.
18319
18320 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
18321
18322         * lex.c (my_get_run_time): Remove.
18323         (init_filename_times): Use get_run_time instead of my_get_run_time.
18324         (check_newline): Likewise.
18325         (dump_time_statistics): Likewise.
18326         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
18327         of computing elapsed time explicitly.
18328
18329 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
18330
18331         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
18332         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
18333         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
18334         before calling decl_constant_value.
18335         * class.c (check_bitfield_decl): Likewise.
18336         * cvt.c (ocp_convert): Likewise.
18337         (convert): Likewise.
18338         * decl.c (compute_array_index_type): Likewise.
18339         (build_enumerator): Likewise.
18340         * decl2.c (check_cp_case_value): Likewise.
18341         * pt.c (convert_nontype_argument): Likewise.
18342         (tsubst): Likewise.
18343         * typeck.c (decay_conversion): Likewise.
18344         (build_compound_expr): Likewise.
18345         (build_reinterpret_cast): Likewise.
18346         (build_c_cast): Likewise.
18347         (convert_for_assignment): Likewise.
18348
18349 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
18350
18351         * decl.c (finish_function): Don't play games with DECL_INLINE.
18352
18353 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
18354
18355         * ir.texi: Correct typo.
18356
18357 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
18358
18359         * decl.c (grokdeclarator): Reject VLAs as members.
18360
18361 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
18362
18363         * call.c (standard_conversion): Accept conversion between
18364         COMPLEX_TYPEs.
18365
18366         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
18367
18368 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
18369
18370         * decl2.c (finish_file): Remove double setup for accounting
18371         compile time.
18372
18373 2000-04-24  Robert Lipe <robertlipe@usa.net>
18374
18375         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
18376
18377 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
18378
18379         * new.cc (set_new_handler): Needs to be in std::.
18380
18381 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
18382
18383         * cp-tree.h (lang_decl): Remove pretty_function_p.
18384         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
18385         language-specific node.
18386         * decl.c (cp_make_fname_decl): Use build_decl, not
18387         build_lang_decl, to build the variables.
18388         (grokvardecl): Don't call build_lang_decl for local variables in
18389         templates.
18390         (grokdeclarator): Don't call build_lang_decl for local type
18391         declarations in templates.
18392         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
18393         zero'd memory, rather than calling memset.
18394         * pt.c: Include hashtab.h.
18395         (local_specializations): New variable.
18396         (retrieve_local_specialization): Use it.
18397         (register_local_specialization): Likewise.
18398         (tsubst_decl): Don't assume local variables have
18399         DECL_LANG_SPECIFIC.
18400         (instantiate_decl): Set up local_specializations.
18401         * Makefile.in (HTAB_H): New variable.
18402
18403 2000-04-23  Richard Henderson  <rth@cygnus.com>
18404
18405         * typeck.c (c_expand_asm_operands): Restore the original
18406         contents of the output list.
18407
18408 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
18409
18410         * ir.texi:  Document complex number representation.
18411
18412 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
18413
18414         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
18415         (target_incomplete_p): New function.
18416         (tinfo_base_init): Create comdat NTBS name variable.
18417         (ptr_initializer): Add non_public parameter. Calculate it.
18418         (ptmd_initializer): Likewise.
18419         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
18420         (create_real_tinfo_var): Add non_public parameter. Use it.
18421         Push proxy into global namespace.
18422         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
18423         New enumeration.
18424         * inc/typeinfo (type_info::before, type_info::operator==):
18425         Compare __name addresses.
18426
18427         * tinfo2.cc: Remove new-abi builtins comment.
18428
18429 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
18430
18431         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
18432
18433         * call.c (joust): Exit early if we get the same function, too.
18434
18435         * decl2.c (key_method): Return NULL_TREE for template classes.
18436         (import_export_class): Don't need to check for template classes.
18437
18438 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
18439
18440         * lex.c: Remove references to cccp.c.
18441
18442 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
18443
18444         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
18445         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
18446         (DECL_DESTRUCTOR_P): Use destructor_attr.
18447         (DECL_CONST_MEMFUNC_P): Reimplement.
18448         (DECL_VOLATILE_MEMFUNC_P): Remove.
18449         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
18450         (overrides): Use DECL_DESTRUCTOR_P.
18451         (check_for_override): Likewise.
18452         * decl.c (start_function): Likewise.
18453         * decl2.c (grokfclassfn): Likewise.
18454         (check_classfn): Likewise.
18455         (grok_function_init): Likewise.
18456
18457 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
18458
18459         * decl2.c (grokfield): Issue error on illegal data member
18460         declaration.
18461
18462 2000-04-17  Mark P Mitchell  <mark@codesourcery.com>
18463
18464         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
18465
18466 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
18467
18468         * class.c (build_vtable_entry): Don't build thunks for type-info
18469         functions.
18470
18471 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
18472
18473         * decl.c (decls_match): Allow a redeclaration of a builtin to
18474         specify args while the builtin did not.
18475
18476 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
18477
18478         * cp-tree.def (THUNK_DECL): Add to documentation.
18479         * cp-tree.h (flag_huge_objects): Declare.
18480         * class.c (modify_vtable_entry): Tidy.
18481         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
18482         Calculate delta appropriately for the new ABI.
18483         (dfs_modify_vtables): Use it.
18484         (modify_all_vtables): Fix thinko in code to add overriding copies
18485         of functions to primary vtables.
18486         (build_clone): Fix typo in comment.
18487         (clone_function_decl): Correct order of destructors in vtable.
18488         (build_vbase_offset_vtbl_entries): Adjust comment.
18489         (dfs_vcall_offset_queue_p): Remove.
18490         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
18491         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
18492         (build_vtable_entry): Correct check for pure virtual functions.
18493         Don't declare flag_huge_objects.
18494         * decl.c (flag_huge_objects): Remove declaration.
18495         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
18496         Use int_size_in_bytes.
18497         (emit_thunk): Handle vcall offset thunks.
18498
18499 2000-04-15  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18500
18501         * decl2.c (parse_time, varconst_time): Delete declarations.
18502         (finish_file): Delete LINENO declaration.
18503         START_TIME and THIS_TIME now long.
18504
18505 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
18506
18507         * class.c (build_base_field): Reformat comment.
18508
18509         * inc/cxxabi.h (stddef.h): Comment inclusion.
18510         (__base_class_info::__offset): Comment shift.
18511
18512 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
18513
18514         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
18515         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
18516         (cp_push_exception_identifier): New macro.
18517         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
18518         (DECL_BASE_DESTRUCTOR_P): Likewise.
18519         (DECL_DELETING_DESTRUCTOR_P): Likewise.
18520         (get_vtbl_decl_for_binfo): Fix formatting.
18521         (in_charge_arg_for_name): New macro.
18522         (maybe_build_cleanup_and_delete): Remove declaration.
18523         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
18524         (in_charge_arg_for_name): New function.
18525         (build_new_method_call): Use it.  Handle cloned destructors.
18526         (build_clone): Don't make the base constructor virtual.
18527         Automatically defer generated functions.
18528         (clone_function_decl): Handle destructors, too.
18529         (clone_constructors_and_destructors): Likewise.
18530         (create_vtable_ptr): Don't create a vtable entry for a cloned
18531         function.
18532         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
18533         (initialize_predefined_identifiers): Update appropriately.
18534         (finish_destructor_body): Simplify.
18535         (maybe_build_cleanup_and_delete): Remove.
18536         * except.c (expand_throw): Handle new-ABI destructors.
18537         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
18538         (build_dtor_call): New function.
18539         (build_delete): Use it.  Simplify.
18540         * optimize.c (maybe_clone_body): Handle destructors.
18541         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
18542
18543         * exception.cc (cleanup_fn): New typedef.
18544         (CALL_CLEANUP): New macro.
18545         (cp_eh_info): Use them.
18546         (__cp_push_exception): Likewise.
18547         (__cp_pop_exception): Likewise.
18548
18549 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
18550
18551         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
18552         (complete_dtor_identifier): New macro.
18553         (CLASSTYPE_FIRST_CONVERSION): Remove.
18554         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
18555         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
18556         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
18557         (CLASSTYPE_CONSTRUCTORS): Likewise.
18558         (CLASSTYPE_DESTRUCTORS): Likewise.
18559         (lang_decl): Add cloned_function.
18560         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
18561         (DECL_BASE_CONSTRUCTOR_P): Likewise.
18562         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
18563         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
18564         (DECL_CLONED_FUNCTION_P): Likewise.
18565         (DECL_CLONED_FUNCTION): Likewise.
18566         (clone_function_decl): Declare.
18567         (maybe_clone_body): Likewise.
18568         * call.c (build_user_type_conversion_1): Call complete object
18569         constructors in the new ABI.
18570         (build_new_method_call): Don't add in-charge parameters under the
18571         new ABI.
18572         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
18573         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
18574         CLASSTYPE_DESTRUCTOR_SLOT.
18575         (build_clone): New function.
18576         (clone_function_decl): Likewise.
18577         (clone_constructors_and_destructors): Likewise.
18578         (check_bases_and_members): Use it.
18579         * decl.c (iniitialize_predefined_identifiers): Initialize
18580         complete_dtor_identifier.
18581         (finish_function): Don't add extra code to a clone.
18582         (lang_mark_tree): Mark cloned_function.
18583         * decl2.c (mark_used): Don't bother trying to instantiate things
18584         we synthesized.
18585         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
18586         * method.c (set_mangled_name_for_decl): Don't treat clones as
18587         constructors.
18588         (synthesize_method): Sythesize cloned functions, not the clones.
18589         * optimize.c (inline_data): Update comment on ret_label.
18590         (remap_block): Don't assume DECL_INITIAL exists.
18591         (copy_body_r): Allow ret_label to be NULL.
18592         (maybe_clone_body): Define.
18593         * pt.c (tsubst_decl): Handle clones.
18594         (instantiate_clone): New function.
18595         (instantiate_template): Use it.
18596         (set_mangled_name_for_template_decl): Don't treat clones as
18597         constructors.
18598         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
18599         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
18600         * semantics.c (expand_body): Clone function bodies as necessary.
18601
18602         * optimize.c (remap_decl): Avoid sharing structure for arrays
18603         whose size is only known at run-time.
18604         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
18605
18606         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
18607         to has_in_charge_parm_p.
18608         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
18609         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
18610         (DECL_COPY_CONSTRUCTOR_P): New macro.
18611         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
18612         (build_user_type_conversion_1): Likewise.
18613         (convert_like_real): Likewise.
18614         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
18615         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
18616         (copy_args_p): Likewise.
18617         (grok_ctor_properties): Likewise.
18618         (start_function): Likewise.
18619         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
18620         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
18621         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
18622         * method.c (do_build_copy_constructor): Use
18623         DECL_HAS_IN_CHARGE_PARM_P.
18624         (synthesize_method): Likewise.
18625         * pt.c (instantiate_template): Remove goto.
18626         * tree.c (build_cplus_method_type): Remove mention of obstacks in
18627         comment.
18628
18629         * cp-tre.h (finish_function): Change prototype.
18630         * decl.c (end_cleanup_fn): Adjust caller.
18631         (finish_function): Take only one parameter.
18632         * decl2.c (finish_objects): Adjust caller.
18633         (finish_static_storage_duration_function): Likewise.
18634         * method.c (emit_thunk): Likewise.
18635         * parse.y: Likewise.
18636         * parse.c: Regenerated.
18637         * pt.c (instantiate_decl): Likewise.
18638         * rtti.c (synthesize_tinfo_fn): Likewise.
18639         * semantics.c (expand_body): Likewise.
18640
18641         * cp-tree.h (copy_decl): New function.
18642         * class.c (finish_struct_1): Use it.
18643         * lex.c (copy_decl): Define it.
18644         * pt.c (tsubst_decl): Likewise.
18645         * tree.c (copy_template_template_parm): Likewise.
18646
18647         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
18648         has_nonpublic_assign_ref.
18649         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
18650         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
18651         * class.c (finish_struct_methods): Don't set
18652         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
18653         (interface_only): Don't declare.
18654         (interface_unknown): Likewise.
18655
18656 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
18657
18658         * tree.h (HAVE_TEMPLATES): Remove definition.
18659         * lang-options.h (-fthis-is-variable): Remove documentation.
18660
18661 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
18662
18663         * class.c (instantiate_type): Handle object-relative template-id.
18664
18665         * semantics.c (finish_expr_stmt): Call convert_to_void here.
18666         * decl.c (cplus_expand_expr_stmt): Not here.
18667
18668         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
18669         Initialize exprtype earlier.
18670
18671         * parse.y (fn.def1): Check for defining types in return types.
18672
18673         * decl.c (check_tag_decl): Notice extra fundamental types.
18674         Diagnose empty decls in classes, too.
18675
18676         * decl.c (grokdeclarator): Don't override an anonymous name if no
18677         declarator was given.
18678
18679         * cvt.c (convert_to_void): Call resolve_offset_ref.
18680
18681         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
18682
18683         * decl2.c (decl_namespace): Handle getting a type.
18684
18685         * typeck.c (build_c_cast): Re-enable warning for cast between
18686         pointer and integer of different size.
18687
18688 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
18689
18690         * inc/cxxabi.h (__pointer_type_info): Add restrict and
18691         incomplete flags.
18692         (__pointer_type_info::__pointer_catch): New virtual function.
18693         (__pointer_to_member_type_info): Derive from
18694         __pointer_type_info. Adjust.
18695         (__pointer_to_member_type_info::__do_catch): Remove.
18696         (__pointer_to_member_type_info::__is_pointer_p): Declare.
18697         (__pointer_to_member_type_info::__pointer_catch): Declare.
18698         * rtti.c (qualifier_flags): Add restrict flag.
18699         (ptmd_initializer): Reorder members.
18700         (create_tinfo_types): Expand comments. Reorder
18701         ptmd_desc_type_node members.
18702         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
18703         Implement.
18704         (__pointer_type_info::__do_catch): Move specific code into
18705         __pointer_catch. Call it.
18706         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
18707         specific catch checking. Fix void conversion check.
18708         (__pointer_to_member_type_info::__do_catch): Remove.
18709         (__pointer_to_member_type_info::__pointer_catch): Implement.
18710
18711 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
18712
18713         * lex.c (init_parse): Remove traces of classof and headof.
18714         * decl2.c (flag_operator_names): Default to 1.
18715         (lang_decode_option): Do not set it for -ansi.
18716
18717 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
18718
18719         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
18720         (DECL_MAIN_VARIANT): Remove.
18721         * decl.c (duplicate_decls): Don't set it.
18722         (start_function): Likewise.
18723         (lang_mark_tree): Don't mark it.
18724         * decl2.c (defer_fn): Don't use it.
18725         * lex.c (retrofit_lang_decl): Don't set it.
18726         * pt.c (tsubst_decl): Likewise.
18727         * ptree.c (print_lang_decl): Don't print it.
18728         * typeck.c (mark_addressable): Don't use it.
18729
18730 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
18731
18732         * vec.cc: Include <new> and <exception>.
18733         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
18734         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
18735         terminate.
18736         (__cxa_vec_delete): Catch dtor exceptions.
18737
18738 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
18739
18740         Prepend __ to implementation defined names.
18741         * inc/typeinfo (type_info): Rename _name to __name.
18742         (type_info::type_info): Rename parameter.
18743         (type_info::operator==, type_info::operator!=,
18744         type_info::before): Likewise.
18745         (type_info::is_pointer_p, type_info::is_function_p,
18746         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
18747         parameters.
18748         * inc/cxxabi.h
18749         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
18750         (__pointer_type_info::__pointer_type_info): Likewise.
18751         (__pointer_type_info::is_pointer_p,
18752         __pointer_type_info::do_catch): Prepend __. Rename parameters.
18753         (__array_type_info::__array_type_info): Rename parameters.
18754         (__function_type_info::__function_type_info): Likewise.
18755         (__function_type_info::is_function_p): Prepend __.
18756         (__enum_type_info::__enum_type_info): Rename parameters.
18757         (__pointer_to_member_type_info::__pointer_to_member_type_info):
18758         Likewise.
18759         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
18760         parameters.
18761         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
18762         (__class_type_info::__class_type_info): Rename parameters.
18763         (__class_type_info::sub_kind): Prepend __. Adjust member names.
18764         (__class_type_info::upcast_result,
18765         __class_type_info::dyncast_result): Prepend __. Move definition
18766         into tinfo.cc.
18767         (__class_type_info::do_upcast, __class_type_info::do_catch,
18768         __class_type_info::find_public_src,
18769         __class_type_info::do_dyncast,
18770         __class_type_info::do_find_public_src): Prepend __. Rename
18771         parameters.
18772         (__si_class_type_info::__si_class_type_info): Rename parameters.
18773         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
18774         __si_class_type_info::do_find_public_src): Prepent __. Rename
18775         parameters.
18776         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
18777         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
18778         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
18779         parameters.
18780         (__dynamic_cast): Rename parameters.
18781         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
18782         type_info::do_catch, type_info::do_upcast): Prepend __.
18783         (contained_p, public_p, virtual_p, contained_public_p,
18784         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
18785         (__class_type_info::do_catch,
18786         __class_type_info::do_upcast): Prepend __. Adjust.
18787         (__class_type_info::__upcast_result,
18788         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
18789         Adjust.
18790         (__class_type_info::find_public_src): Prepend __. Adjust.
18791         (__class_type_info::do_find_public_src,
18792         __si_class_type_info::do_find_public_src,
18793         __vmi_class_type_info::do_find_public_src): Likewise.
18794         (__class_type_info::do_dyncast,
18795         __si_class_type_info::do_dyncast,
18796         __vmi_class_type_info::do_dyncast): Likewise.
18797         (__class_type_info::do_upcast,
18798         __si_class_type_info::do_upcast,
18799         __vmi_class_type_info::do_upcast): Likewise.
18800         (__dynamic_cast): Adjust.
18801         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
18802         (__function_type_info::is_function_p): Likewise.
18803         (__pointer_type_info::do_catch): Likewise. Adjust.
18804         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
18805         (__throw_type_match_rtti_2): Adjust.
18806         (__is_pointer): Adjust.
18807
18808 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
18809
18810         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
18811         (complete_ctor_identifier): New macro.
18812         (special_function_kind): Add sfk_copy_constructor and
18813         sfk_assignment_operator.
18814         (LOOKUP_HAS_IN_CHARGE): Remove.
18815         (cons_up_default_function): Rename to ...
18816         (implicitly_declare_fn): ... this.
18817         * call.c (build_new_method_call): Add in-charge parameters for
18818         constructors here.
18819         * class.c (add_implicitly_declared_members): Change parameter name
18820         from cant_have_assignment to cant_have_const_assignment.
18821         Replace calls to cons_up_default_function to implicitly_declare_fn.
18822         * cvt.c (ocp_convert): Use complete_ctor_identifier.
18823         * decl.c (initialize_predefined_identifiers): Initialize it.
18824         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
18825         complex expression.
18826         * init.c (expand_default_init): Don't calculate the in-charge
18827         parameter here.
18828         (build_new_1): Likewise.
18829         * lex.c (cons_up_default_function): Move to method.c.
18830         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
18831         (implicitly_declare_fn): New function.
18832         * typeck.c (build_static_cast): Use complete_ctor_identifier.
18833         (build_modify_expr): Likewise.
18834         * typeck2.c (build_functional_cast): Likewise.
18835
18836         Under the new ABI, constructors don't return `this'.
18837         * cp-tree.h (warn_reorder): Declare.
18838         (special_function_kind): New enum.
18839         (global_base_init_list): Remove declaration.
18840         (emit_base_init): Don't return a value.
18841         (check_base_init): Don't declare.
18842         (is_aggr_typedef): Likewise.
18843         * decl.c (check_special_function_return_type): New function.
18844         (return_types): Remove.
18845         (grokdeclarator): Use check_special_function_return_type.
18846         (start_function): Don't initialize ctor_label under the new ABI.
18847         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
18848         * init.c (begin_init_stmts): Move to top of file.
18849         (finish_init_stmts): Likewise.
18850         (warn_reorder): Don't declare.
18851         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
18852         value.
18853         (check_base_init): Remove.
18854         (is_aggr_typedef): Likewise.
18855         (build_new_1): Don't use the return value of a constructor.
18856         * semantics.c (setup_vtbl_ptr): Don't use the return value
18857         of emit_base_init.
18858         * typeck.c (check_return_expr): Don't magically convert return
18859         statements into `return this' in constructors under the new ABI.
18860
18861         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
18862         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
18863         (base_ctor_identifier): New macro.
18864         (base_dtor_identifier): Likewise.
18865         (deleting_dtor_identifier): Likewise.
18866         * decl.c: Don't include obstack.h.
18867         (obstack_chunk_alloc): Don't define.
18868         (obstack_chunk_free): Likewise.
18869         (struct predefined_identifier): New type.
18870         (initialize_predefined_identifiers): New function.
18871         (init_decl_processing): Use it.
18872         (debug_temp_inits): Remove.
18873         (start_method): Don't call preserve_data.
18874         (hack_incomplete_structures): Update comment.
18875         * init.c (init_init_processing): Don't initialize
18876         nelts_identifier.
18877         (build_offset_rf): Remove dead code.
18878         (build_delete): Use CLASSTYPE_N_BASECLASSES.
18879         * search.c (init_search_processing): Don't initialize
18880         vptr_identifier.
18881
18882 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18883
18884         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
18885         some sign_compare warnings.
18886
18887 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
18888
18889         Rename abi::__vmi_class_type_info members.
18890         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
18891         base_list, detail_masks members to vmi_flags, vmi_base_count,
18892         vmi_bases and vmi_flags_masks respectively.
18893         (__vmi_class_type_info::vmi_flags_masks): Rename
18894         details_unknown_mask to flags_unknown_mask.
18895         * tinfo.cc (__class_type_info::do_upcast): Adjust.
18896         (__vmi_class_type_info::do_find_public_src): Adjust.
18897         (__vmi_class_type_info::do_dyncast): Adjust.
18898         (__vmi_class_type_info::do_upcast): Adjust.
18899
18900 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
18901
18902         * tinfo.cc (convert_to_base): New function.
18903         (get_vbase_offset): Remove. Move into convert_to_base.
18904         (__vmi_class_type_info::do_find_public_src): Adjust.
18905         (__vmi_class_type_info::do_dyncast): Adjust.
18906         (__vmi_class_type_info::do_upcast): Adjust.
18907
18908 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
18909
18910         * tinfo.cc (operator=): Use __builtin_strcmp.
18911         * tinfo2.cc (before): Likewise.
18912
18913 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
18914
18915         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
18916         (DECL_SAVED_INLINE): Rename to ...
18917         (DECL_DEFERRED_FN): ... this.
18918         (in_function_p): Remove declaration.
18919         (mark_inline_for_output): Rename to ...
18920         (defer_fn): ... this.
18921         * decl.c (finish_function): Adjust call to mark_inline_for_output.
18922         (in_function_p): Remove definition.
18923         * decl2.c (saved_inlines): Rename to ...
18924         (deferred_fns): ... this.
18925         (saved_inlines_used): Rename to ...
18926         (deferred_fns_used): ... this.
18927         (mark_inline_for_output): Rename to ...
18928         (defer_fn): ... this.
18929         (finish_file): Adjust accordingly.
18930         (init_decl2): Likewise.
18931         * lex.c (cons_up_default_function): Likewise.
18932         * pt.c (mark_decl_instantiated): Likewise.
18933         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
18934         circumstances.
18935         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
18936         * semantics.c (expand_body): Defer more functions.
18937
18938 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
18939
18940         * vec.cc: New file.
18941         * Make-lang.in (CXX_LIB2FUNCS): Add it.
18942         (vec.o): Build it.
18943         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
18944         __cxa_vec_delete): Declare.
18945
18946 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
18947
18948         * rtti.c (dfs_class_hint_mark): New static function.
18949         (dfs_class_hint_unmark): New static function.
18950         (class_hint_flags): Use them.
18951
18952 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
18953
18954         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
18955
18956 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
18957
18958         * cp-tree.h (instantiate_decl): Change prototype.
18959         * decl2.c (mark_used): Adjust call.
18960         * optimize.c (inlinable_function_p): Adjust handling of templates.
18961         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
18962         (do_type_instantiation): Likewise.
18963         (instantiate_decl): Defer more templates.
18964         (instantiate_pending_templates): Adjust logic to handle inline
18965         friend functions.
18966
18967         * Makefile.in (GGC_H): New variable.  Use it throughout in place
18968         of ggc.h.
18969
18970         * call.c: Don't include obstack.h.  Include ggc.h.
18971         (obstack_chunk_alloc): Don't define.
18972         (obstack_chunk_free): Likewise.
18973         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
18974         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
18975         (pop_switch): Free it.
18976
18977         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
18978
18979         * dump.c (dequeue_and_dump): Don't try to print the bit_position
18980         if we don't have a DECL_FIELD_OFFSET.
18981
18982 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
18983
18984         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
18985         special_function_p.
18986
18987 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18988
18989         * cfns.gperf (hash, libc_name_p): Prototype.
18990
18991         * rtti.c (build_dynamic_cast_1): Constification.
18992
18993         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
18994
18995         * semantics.c (deferred_type_access_control): Prototype.
18996
18997 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
18998
18999         Correct many new ABI issues regarding vbase and vcall offset
19000         layout.
19001         * cp-tree.h (BINFO_VTABLE): Document.
19002         (struct lang_type): Tweak formatting.
19003         (BINFO_PRIMARY_BINFO): Add to documentation.
19004         (CLASSTYPE_VSIZE): Fix typo in comment.
19005         (CLASSTYPE_VBASECLASSES): Update documentation.
19006         (BINFO_VBASE_MARKED): Remove.
19007         (SET_BINFO_VBASE_MARKED): Likewise.
19008         (CLEAR_BINFO_VBASE_MARKED): Likewise.
19009         (BINFO_FIELDS_MARKED): Remove.
19010         (SET_BINFO_FIELDS_MARKED): Likewise.
19011         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
19012         (enum access_kind): New enumeration.
19013         (num_extra_vtbl_entries): Remove declaration.
19014         (size_extra_vtbl_entries): Likewise.
19015         (get_vtbl_decl_for_binfo): New function.
19016         (dfs_vbase_unmark): Remove declaration.
19017         (mark_primary_bases): Likewise.
19018         * class.c (SAME_FN): Remove.
19019         (struct vcall_offset_data_s): Move definition.
19020         (build_vbase_pointer): Use `build', not `build_binary_op', to
19021         access the vbase pointer under the new ABI.
19022         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
19023         (build_primary_vtable): Likewise.
19024         (dfs_mark_primary_bases): Move here from search.c.
19025         (mark_primary_bases): Likewise.
19026         (determine_primary_bases): Under the new ABI, don't make a base
19027         class a primary base just because we don't yet have any virtual
19028         functions.
19029         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
19030         (num_vfun_entries): Remove.
19031         (dfs_count_virtuals): Likewise.
19032         (num_extra_vtbl_entries): Likewise.
19033         (size_extra_vtbl_entries): Likewise.
19034         (layout_virtual_bases): Iterate in inheritance graph order under
19035         the new ABI.
19036         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
19037         indicate that a vfield is present.
19038         (init_class_processing): Initialize access_public_node, etc., from
19039         ak_public, etc.
19040         (get_vtbl_decl_for_binfo): New function.
19041         (dump_class_hierarchy_r): Likewise.
19042         (dump_class_hierarchy): Use it.
19043         (finish_vtbls): Build the vtbls in inheritance graph order.
19044         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
19045         (initialize_vtable): Use get_vtbl_decl_for_binfo.
19046         (accumulate_vtbl_inits): Add comments explaining why a pre-order
19047         walk is required.
19048         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
19049         where the vptr points, even for primary vtables.
19050         (build_vtbl_initializer): Adjust handling of vbase and vcall
19051         offsets.
19052         (build_vcall_and_vbase_vtable_entries): New function.
19053         (dfs_build_vbase_offset_vtbl_entries): Remove.
19054         (build_vbase_offset_vtbl_entries): Reimplement.
19055         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
19056         were already handled in a primary base class vtable.
19057         (build_vcall_offset_vtbl_entries): Adjust.
19058         (build_rtti_vtbl_entries): Adjust.
19059         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
19060         * init.c (expand_virtual_init): Simplify.
19061         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
19062         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
19063         * search.c (BINFO_ACCESS): New macro.
19064         (SET_BINFO_ACCESS): Likewise.
19065         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
19066         (access_in_type): Likewise.
19067         (dfs_accessible_p): Likewise.
19068         (protected_accessible_p): Likewise.
19069         (lookup_fnfields_1): Adjust documentation.
19070         (dfs_mark_primary_bases): Move to class.c
19071         (mark_primary_bases): Likewise.
19072         (dfs_vbase_unmark): Remove.
19073         (virtual_context): Use BINFO_FOR_VBASE.
19074         (dfs_get_vbase_types): Simplify.
19075         (dfs_build_inheritance_graph_order): New function.
19076         (get_vbase_types): Use it.
19077         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
19078
19079         * tinfo.cc (get_vbase_offset): New function.
19080         (__vmi_class_type_info::do_find_public_src): Use it.
19081         (__vmi_class_type_info::do_dyncast): Likewise.
19082         (__vmi_class_type_info::do_upcast): Likewise.
19083
19084 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
19085
19086         * lang-specs.h: Pass -fno-show-column to the preprocessor.
19087
19088 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
19089
19090         * rtti.c (class_hint_flags): Rename flags.
19091         (class_initializer): Remove flags.
19092         (synthesize_tinfo_var): Combine offset and flags. Add flags
19093         for __vmi_class_type_info.
19094         (create_tinfo_types): Remove flags from __class_type_info and
19095         __si_class_type_info. Merge flags and offset from
19096         base_class_type_info.
19097         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
19098         (__base_class_info::is_virtual_p): Adjust.
19099         (__base_class_info::is_public_p): Adjust.
19100         (__base_class_info::offset): New accessor.
19101         (__class_type_info::details): Remove member.
19102         (__class_type_info::__class_type_info): Lose details.
19103         (__class_type_info::detail_masks): Remove.
19104         (__si_class_type_info::__si_class_type_info): Lose details.
19105         (__vmi_class_type_info::details): New member.
19106         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
19107         (__vmi_class_type_info::detail_masks): New member.
19108         * tinfo.cc (__class_type_info::do_upcast): Initialize result
19109         with unknown_details_mask.
19110         (__vmi_class_type_info::do_find_public_src): Adjust
19111         (__vmi_class_type_info::do_dyncast): Adjust.
19112         (__vmi_class_type_info::do_upcast): Set result details, if
19113         needed. Adjust.
19114         (__dynamic_cast): Temporarily #if out optimization.
19115
19116 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
19117
19118         * rtti.c (get_tinfo_decl): Mark used.
19119         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
19120         mark as dealt with, if we output it.
19121
19122 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
19123
19124         * class.c: Reorganize to put virtual function table initialization
19125         machinery at the end of the file.
19126
19127 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
19128
19129         * class.c (finish_struct): Use bitsize_zero_node.
19130         * pt.c (instantiate_class_template): Likewise.
19131
19132 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
19133
19134         Put RTTI entries at negative offsets in new ABI.
19135         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
19136         vbase offset at index -3, not -1.
19137         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
19138         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
19139         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
19140         (build_rtti_vtbl_entries): New function.
19141         (set_rtti_entry): Remove.
19142         (build_primary_vtable): Don't use it.
19143         (build_secondary_vtable): Likewise.
19144         (start_vtable): Remove.
19145         (first_vfun_index): New function.
19146         (set_vindex): Likewise.
19147         (add_virtual_function): Don't call start_vtable.  Do call
19148         set_vindex.
19149         (set_primary_base): Rename parameter.
19150         (determine_primary_base): Likewise.
19151         (num_vfun_entries): Don't use skip_rtti_stuff.
19152         (num_extra_vtbl_entries): Include RTTI information.
19153         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
19154         (skip_rtti_stuff): Remove.
19155         (dfs_modify_vtables): Don't use it.
19156         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
19157         (layout_nonempty_base_or_field): Update size handling.
19158         (create_vtable_ptr): Tweak.
19159         (layout_class_type): Adjust parameter names.
19160         (finish_struct_1): Simplify.
19161         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
19162         (skip_rtti_stuff): Remove.
19163         (first_vfun_index): New function.
19164         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
19165         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
19166         (marked_vtable_pathp): Declare.
19167         (unmarked_vtable_pathp): Likewise.
19168         * error.c (dump_expr): Use first_vfun_index to calculate vtable
19169         offsets.
19170         * rtti.c (build_headof): Look for RTTI at negative offsets.
19171         (get_tinfo_decl_dynamic): Likewise.
19172         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
19173         here.
19174         (create_pseudo_type_info): Do it here instead.  Adjust so that
19175         vptr points at first virtual function.
19176         * search.c (marked_vtable_pathp): Make it global.
19177         (unmarked_vtable_pathp): Likewise.
19178         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
19179         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
19180         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
19181         (get_pure_virtuals): Likewise.
19182         (expand_upcast_fixups): Likewise.
19183         * tree.c (debug_binfo): Likewise.
19184         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
19185         negative offset.
19186
19187 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19188
19189         * class.c (check_field_decl): Fix typo.
19190         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
19191         (check_methods): Likewise.
19192         (check_field_decls): Likewise.
19193         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
19194         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
19195         Use DECL_RESULT_FLD, not DECL_RESULT.
19196         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
19197         * lex.c (identifier_type): Likewise.
19198         * pt.c (determine_specialization, lookup_template_class): Likewise.
19199         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
19200         (resolve_overloaded_unification, more_specialized): Likewise.
19201         * semantics.c (finish_member_declaration): Likewise.
19202         * typeck.c (build_x_function_call): Likewise.
19203
19204 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
19205
19206         * class.c (layout_empty_base): Handle empty bases with non-byte
19207         alignment.
19208         (build_base_field): Likewise.
19209         (layout_virtual_bases): Likewise.
19210
19211         * class.c (finish_struct_1): Fix typo in this change:
19212
19213         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19214
19215 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
19216
19217         * decl.c (grokdeclarator): Count partial specializations when
19218         keeping track of how many template classes have been seen.
19219
19220         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
19221
19222 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19223
19224         * class.c (build_vbase_pointer_fields): layout_field now place_field.
19225         (get_vfield_offset): Use byte_position.
19226         (set_rtti_entry): Set OFFSET to ssizetype zero.
19227         (get_binfo_offset_as_int): Deleted.
19228         (dfs_record_base_offsets): Use tree_low_cst.
19229         (dfs_search_base_offsets): Likewise.
19230         (layout_nonempty_base_or_field): Reflect changes in RLI format
19231         and call byte_position.
19232         (layout_empty_base): Convert offset to ssizetype.
19233         (build_base_field): use rli_size_unit_so_far.
19234         (dfs_propagate_binfo_offsets): Do computation in proper type.
19235         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
19236         (layout_class_type): Reflect changes in RLI names and fields.
19237         (finish_struct_1): Set DECL_FIELD_OFFSET.
19238         * dump.c (dequeue_and_dump): Call bit_position.
19239         * expr.c (cplus_expand_constant): Use byte_position.
19240         * rtti.c (expand_class_desc): Use bitsize_one_node.
19241         * typeck.c (build_component_addr): Use byte_position and don't
19242         special case for zero offset.
19243
19244 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
19245
19246         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
19247
19248         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
19249         tinfo object.
19250         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
19251         vtable.
19252
19253 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
19254
19255         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
19256         DECL_P macros.
19257         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
19258         make_typename_type, check_initializer, cp_finish_decl,
19259         xref_tag): Likewise.
19260         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
19261         decl_namespace, arg_assoc_template_arg, arg_assoc,
19262         validate_nonmember_using_decl, do_class_using_decl): Likewise.
19263         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
19264         args_to_string): Likewise.
19265         * friend.c (is_friend): Likewise.
19266         * lex.c (note_got_semicolon, note_list_got_semicolon,
19267         is_global): Likewise.
19268         * method.c (build_overload_nested_name, build_overload_value,
19269         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
19270         * parse.y (typename_sub, typename_sub1): Likewise.
19271         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
19272         process_partial_specialization, convert_template_argument,
19273         template_args_equal, add_pending_template, lookup_template_class,
19274         for_each_template_parm_r, maybe_fold_nontype_arg,
19275         tsubst, instantiate_template, type_unification_real, unify,
19276         instantiate_pending_templates, set_mangled_name_for_template_decl):
19277         Likewise.
19278         * repo.c (repo_get_id, repo_template_used): Likewise.
19279         * search.c (lookup_field_1): Likewise.
19280         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
19281         * xref.c (classname): Likewise.
19282
19283 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
19284
19285         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
19286         (CANONICAL_BINFO): New macro.
19287         (BINFO_NEW_VTABLE_MARKED): Use it.
19288         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
19289         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
19290         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
19291         not TREE_TYPE.
19292         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
19293         (build_secondary_vtable): Likewise.
19294         (dfs_finish_vtbls): Likewise.
19295         (dfs_accumulate_vtbl_inits): Likewise.
19296         (accumulate_vtbl_inits): New function.
19297         (finish_vtbls): Make sure that virtual bases come after
19298         non-virtual bases in the vtable group.
19299         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
19300         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
19301         * search.c (struct vbase_info): Move definition.
19302         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
19303         (unmarked_new_vtable_p): Likewise.
19304         (dfs_mark_vtable_path): Remove.
19305         (dfs_mark_new_vtable): Remove.
19306         (dfs_unmark_new_vtable): Likewise.
19307         (dfs_clear_search_slot): Likewise.
19308         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
19309         (dfs_clear_vbase_slots): Likewise.
19310         (init_vbase_pointers): LIkewise.
19311
19312 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
19313
19314         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
19315         SIZETYPE to a non-SIZETYPE.
19316
19317 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
19318
19319         * class.c (layout_virtual_bases): Adjust names in conditionally
19320         compiled code.
19321
19322         * class.c (record_base_offsets): New function.
19323         (layout_conflict_p): Likewise.
19324         (layout_nonempty_base_or_field): Use it.
19325         (layout_empty_base): New function.
19326         (build_base_field): Use it.
19327         (build_base_fields): Update comment.
19328         (layout_virtual_bases): Fold in a little code form
19329         layout_basetypes.  Use layout_empty_base.
19330         (layout_basetypes): Remove.
19331         (end_of_class): New function.
19332         (layout_class_type): Use it.  Adjust.
19333
19334         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
19335         (fntype_p): Remove.
19336         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
19337         comment.
19338         (dfs_skip_nonprimary_vbases_markedp): Likewise.
19339         * typeck.c (fntype_p): Remove.
19340
19341         * cp-tree.h (TI_SPEC_INFO): Remove.
19342         (CLASSTYPE_TI_SPEC_INFO): Likewise.
19343         * pt.c (process_partial_specialization): Likewise.
19344
19345         * class.c (build_base_field): Fix thinko in computation of binfo
19346         offsets.
19347
19348         * tree.c (mark_local_for_remap_p): Mark variables declared in
19349         TARGET_EXPRs as well.
19350
19351 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
19352
19353         * typeck.c (require_complete_type, complete_type,
19354         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
19355         build_array_ref, convert_arguments, pointer_diff,
19356         build_x_unary_op, build_unary_op, build_c_cast,
19357         build_modify_expr): Use COMPLETE_TYPE_P etc.
19358         * call.c (is_complete, convert_like_real,
19359         build_new_method_call): Likewise.
19360         * class.c (build_vbase_pointer_fields, check_bases,
19361         build_base_field, finish_struct_1, pushclass): Likewise.
19362         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
19363         * decl.c (maybe_process_template_type_declaration, pushtag,
19364         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
19365         layout_var_decl, check_initializer, cp_finish_decl,
19366         grokdeclarator, require_complete_types_for_parms,
19367         grok_op_properties, xref_tag, xref_basetypes,
19368         check_function_type): Likewise.
19369         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
19370         * friend.c (do_friend): Likewise.
19371         * init.c (build_offset_ref): Likewise.
19372         * parse.y (structsp): Likewise.
19373         * pt.c (maybe_process_partial_specialization,
19374         tsubst_friend_function, instantiate_class_template, tsubst,
19375         do_type_instantiation, instantiate_pending_templates): Likewise.
19376         * repo.c (repo_get_id): Likewise.
19377         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
19378         synthesize_tinfo_var, emit_support_tinfos): Likewise.
19379         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
19380         * semantics.c (begin_class_definition): Likewise.
19381         * tree.c (build_cplus_method_type): Likewise.
19382         * typeck2.c (digest_init, build_functional_cast,
19383         add_exception_specifier): Likewise.
19384         * parse.h, parse.c: Regenerated.
19385
19386 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
19387
19388         * inc/cxxabi.h: New header file. Define new-abi entry points.
19389         (__pointer_type_info::target): Rename member to ...
19390         (__pointer_type_info::type): ... here.
19391         (__base_class_info::type): Rename member to ...
19392         (__base_class_info::base): ... here.
19393         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
19394         * cp-tree.h (CPTI_ABI): New global tree enumeration.
19395         (abi_node): New global tree node.
19396         * decl.c (abi_node): Document.
19397         (init_decl_processing): Initialize abi_node.
19398         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
19399         (get_vmi_pseudo_type_info): Likewise.
19400         (create_tinfo_types): Likewise.
19401         (emit_support_tinfos): Likewise.
19402         * tinfo.h (cxxabi.h): Include for new-abi.
19403         Move rtti class definitions to new header file.
19404         * tinfo.cc (abi): Use the namespace.
19405         (std): Move new abi rtti classes from here ...
19406         (__cxxabiv1): ... to here.
19407         * tinfo2.cc (cxxabi.h): Include for new-abi.
19408         Move rtti class definitions to new header file.
19409         (std): Move new abi rtti classes from here ...
19410         (__cxxabiv1): ... to here.
19411         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
19412         namespace.
19413
19414 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
19415             Jason Merrill  <jason@casey.cygnus.com>
19416
19417         * method.c (build_overload_int): Use host_integerp.
19418
19419 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
19420
19421         * init.c (build_offset_ref): Handle the case of a templated member
19422         function.
19423
19424 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
19425
19426         * except.c (expand_exception_blocks): Clear catch_clauses_last.
19427
19428 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
19429
19430         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
19431         * class.c (check_bitfield_decl): Turn illegal bitfields into
19432         non-bitfields.
19433         (dfs_propagate_binfo_offsets): Adjust for new size_binop
19434         semantics.
19435         (dfs_offset_for_unshared_vbases): Likewise.
19436         * cvt.c (cp_convert_to_pointer): Convert NULL to a
19437         pointer-to-member correctly under the new ABI.
19438         * expr.c (cplus_expand_constant): Don't use cp_convert when
19439         turning an offset into a pointer-to-member.
19440         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
19441         when dereferencing them under the new ABI.
19442         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
19443         of pointers-to-members under the new ABI.
19444
19445         * class.c (check_bitfield_decl): Remove restriction on really long
19446         bitfields.
19447         (layout_class_type): Implement new ABI handling of bitfields
19448         longer than their types.
19449
19450 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
19451
19452         * parse.y (extdefs): Call ggc_collect.
19453         * parse.c: Regenerated.
19454
19455 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
19456
19457         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
19458         (note_name_declared_in_class): Use OVL_CURRENT to get at a
19459         potential overload.
19460
19461 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19462
19463         * class.c (build_vbase_path): Use integer_zerop.
19464         (build_vtable_entry): Use tree_low_cst.
19465         (get_vfield_offset): Use bit_position.
19466         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
19467         Use tree_low_cst.
19468         (check_bitfield_decl): Set DECL_SIZE using convert.
19469         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
19470         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
19471         Use tree_low_cst.
19472         (finish_struct_1): Use bit_position.
19473         (dump_class_hierarchy): Use tree_low_cst.
19474         * cp-tree.h (min_precision): Add declaration.
19475         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
19476         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
19477         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
19478         * expr.c (cplus_expand_constant): Use bit_position.
19479         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
19480         * rtti.c (get_base_offset): Use bit_position.
19481         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
19482         host_integerp, and tree_low_cst.
19483         (pointer_int_sum): Use integer_zerop.
19484         (build_component_addr): Use bit_position.
19485
19486 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
19487
19488         * typeck.c (require_complete_type): Don't assume size_zero_node.
19489         (complete_type_or_else): Likewise.
19490
19491 2000-03-16  Steven Grady <grady@digitaldeck.com>
19492             Jason Merrill  <jason@casey.cygnus.com>
19493
19494         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
19495
19496 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
19497
19498         * decl2.c (grokfield): Bail out if type is error_mark_node.
19499
19500 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
19501
19502         * tinfo2.cc (__ptr_to_member_data): Rename to ...
19503         (__pointer_to_member_data): ... here. Adjust.
19504         * rtti.c (create_tinfo_types): Adjust.
19505
19506 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
19507
19508         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
19509         * decl.c (ref_desc_type_node): Undocument.
19510         * rtti.c (ptr_ref_initializer): Rename to ...
19511         (ptr_initializer): ... here. Adjust comments.
19512         (ptmd_initializer): Fix comment thinko.
19513         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
19514         (create_tinfo_types): Remove ref_desc_type_node init.
19515         * tinfo2.cc (__reference_type_info): Remove.
19516
19517 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
19518
19519         * decl.c (cp_finish_decl): Remove obsolete comment.
19520
19521         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
19522
19523 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
19524
19525         * cp-tree.h: Tweak documentation.
19526         * class.c (build_vbase_pointer_fields): Layout the fields, too.
19527         (avoid_overlap): Remove.
19528         (get_binfo_offset_as_int): New function.
19529         (dfs_serach_base_offsets): Likewise.
19530         (layout_nonempty_base_or_field): Likewise.
19531         (build_base_field): Layout fields here.  Avoid placing two objects
19532         of the same type at the same address, under the new ABI.
19533         (build_base_fields): Adjust accordingly.
19534         (create_vtable_ptr): Return the new field, but don't attach it to
19535         TYPE_FIELDS.
19536         (remove_base_field): Remove.
19537         (remove_base_fields): Remove.
19538         (layout_basetypes): Adjust accordingly.
19539         (layout_class_type): Call layout_field for each field, rather than
19540         just making a wholesale call to layout_type.
19541
19542 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
19543
19544         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
19545
19546 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
19547
19548         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
19549
19550         * except.c (dtor_nothrow): New fn.
19551         (do_pop_exception): Use it.  Take type parm.
19552         (push_eh_cleanup): Take type parm.
19553         (expand_start_catch_block): Pass it.
19554         (build_eh_type_type_ref): Accept null type.
19555
19556 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
19557
19558         * cp-tree.h (revert_static_member_fn): Change prototype.
19559         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
19560         (grok_op_properties): Likewise.
19561         (start_function): Likewise.
19562         (revert_static_member_fn): Simplify.
19563         * pt.c (check_explicit_specialization): Adjust call to
19564         revert_static_member_fn.
19565
19566 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
19567
19568         * cp-tree.h (scope_kind): New type.
19569         (tmpl_spec_kind): Likewise.
19570         (declare_pseudo_global_level): Remove.
19571         (pseudo_global_level_p): Rename to template_parm_scope_p.
19572         (pushlevel): Remove declaration.
19573         (begin_scope): New function.
19574         (finish_scope): Likewise.
19575         (current_tmpl_spec_kind): Likewise.
19576         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
19577         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
19578         Add template_spec_p.
19579         (toplevel_bindings_p): Adjust.
19580         (declare_pseudo_global_level): Remove.
19581         (pseudo_global_level_p): Rename to template_parm_scope_p.
19582         (current_tmpl_spec_kind): New function.
19583         (begin_scope): Likewise.
19584         (finish_scope): Likewise.
19585         (maybe_push_to_top_level): Adjust.
19586         (maybe_process_template_type_declaration): Likewise.
19587         (pushtag): Likewise.
19588         (pushdecl_nonclass_level): Likewise.
19589         (lookup_tag): Likewise.
19590         (grokfndecl): Handle member template specializations.  Share
19591         constructor and non-constructor code.
19592         * decl2.c (check_classfn): Handle member template specializations.
19593         * pt.c (begin_template_parm_list): Use begin_scope.
19594         (begin_specialization): Likewise.
19595         (end_specialization): Likewise.
19596         (check_explicit_specialization): Use current_tmpl_spec_kind.
19597         Handle member template specializations.
19598         (end_template_decl): Use finish_scope.  Remove call to
19599         get_pending_sizes.
19600         (push_template_decl_real): Remove bogus error message.
19601         (tsubst_decl): Fix typo in code contained in comment.
19602         (instantiate_template): Handle member template specializations.
19603         (most_general_template): Likewise.
19604
19605 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
19606
19607         * lex.c (whitespace_cr): Compress consecutive calls to warning().
19608         (do_identifier): Ditto for error().
19609
19610         * pt.c (convert_nontype_argument): Ditto for cp_error().
19611         (convert_template_argument): Ditto for cp_pedwarn().
19612
19613 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
19614
19615         * exception.cc (__check_null_eh_spec): New fn.
19616         * except.c (expand_end_eh_spec): Call it if the spec is throw().
19617
19618 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
19619
19620         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
19621         * except.c (expand_end_eh_spec): Add the return type.
19622         * rtti.c (throw_bad_cast): Add the parmtypes.
19623         (throw_bad_typeid): Likewise.
19624
19625         * semantics.c (expand_stmt): Only leave out rtl for unused
19626         artificials, and set DECL_IGNORED_P on them as well.
19627         * decl.c (wrapup_globals_for_namespace): Likewise.
19628
19629 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
19630
19631         * decl.c (maybe_commonize_var): Skip all artificial decls.
19632         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
19633
19634 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
19635
19636         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
19637         * cp-tree.h: Declare flag_enforce_eh_specs.
19638         * decl.c (store_parm_decls, finish_function): Check it.
19639
19640         C library functions don't throw.
19641         * Makefile.in (cfns.h): New target.
19642         (except.o): Depend on it.
19643         * Make-lang.in (cc1plus): Depend on cfns.gperf.
19644         * cfns.gperf: New file.
19645         * cfns.h: Generated.
19646         * except.c: Include it.
19647         (nothrow_libfn_p): New fn.
19648         * decl.c (grokfndecl): Use it.
19649         * cp-tree.h: Declare it.
19650
19651         * decl.c (push_overloaded_decl_1, auto_function,
19652         define_function): Lose.
19653         (build_library_fn_1): New static fn.
19654         (builtin_function): Use it.
19655         (get_atexit_node): Use build_library_fn_ptr.
19656         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
19657         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
19658         push_void_library_fn, push_throw_library_fn): New fns.
19659         * cp-tree.h: Declare them.
19660         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
19661         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
19662         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
19663         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
19664         * rtti.c (build_runtime_decl): Lose.
19665         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
19666         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
19667         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
19668
19669         * call.c (build_call): Remove result_type parm.
19670         Call mark_used on unused artificial fns.
19671         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
19672
19673 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
19674
19675         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
19676         appropriate.
19677         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
19678         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
19679         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
19680         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
19681         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
19682         expand_generic_desc): Likewise.
19683
19684 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
19685
19686         * exception.cc (__cp_pop_exception): Cleanup the original object.
19687
19688 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
19689
19690         * decl.c (grok_op_properties): Merge conversion to void warning
19691         with other silly op warnings.
19692
19693 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
19694
19695         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
19696         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
19697
19698 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
19699
19700         * decl.c (cp_make_fname_decl): New function.
19701         (wrapup_globals_for_namespace): Don't emit unused static vars.
19702         (init_decl_processing): Remove comment about use of
19703         array_domain_type. Set make_fname_decl.
19704         (cp_finish_decl): Remove __FUNCTION__ nadgering.
19705         * semantics.c (begin_compound_stmt): Remove
19706         current_function_name_declared flagging.
19707         (expand_stmt): Don't emit unused local statics.
19708         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
19709         specially.
19710
19711 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
19712
19713         * typeck.c (convert_for_assignment): Don't look at array
19714         initializer.
19715         * call.c (convert_like_real): Likewise.
19716
19717 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
19718
19719         Add initial support for '\uNNNN' specifier.
19720         * lex.c (read_ucs): New fn.
19721         (readescape, skip_white_space): Call it.
19722         (is_extended_char, is_extended_char_1): New fns.
19723         (utf8_extend_token): New fn, #if 0'd out.
19724         (real_yylex): Treat extended chars like letters.
19725
19726         * search.c (note_debug_info_needed): Walk the bases even if we
19727         weren't deferring the type itself.
19728
19729 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19730
19731         * decl2.c (finish_objects): Constify a char*.
19732
19733         * method.c (emit_thunk): Likewise.
19734
19735 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
19736
19737         * typeck.c (dubious_conversion_warnings): Look through
19738         REFERENCE_TYPE.
19739
19740 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19741
19742         * class.c (dfs_modify_vtables): I is now unsigned.
19743         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
19744         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
19745         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
19746         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
19747         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
19748         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
19749         Call integer_all_onesp.
19750         * typeck2.c (process_init_constructor): Use compare_tree_int.
19751
19752         * lang-specs.h (as): Don't call if -syntax-only.
19753
19754 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
19755
19756         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
19757         RTL_EXPR_HAS_NO_SCOPE after all.
19758
19759 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
19760
19761         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
19762         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
19763         RTL_EXPR_HAS_NO_SCOPE.
19764
19765         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
19766         later.
19767
19768         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
19769
19770 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
19771
19772         * call.c (convert_like): Macrofy.
19773         (convert_like_with_context): New macro.
19774         (convert_like_real): Renamed from convert_like.  Add calling
19775         context parameters, for diagnostics. Add recursive flag.  Call
19776         dubious_conversion_warnings for outer conversion.
19777         (build_user_type_conversion): Use convert_like_with_context.
19778         (build_over_call): Likewise. Don't warn about dubious
19779         conversions here. Adjust convert_default_arg calls.
19780         (convert_default_arg): Add context parameters for diagnostics.
19781         Pass through to convert_like_with_context.
19782         * cp-tree.h (convert_default_arg): Add context parameters.
19783         (dubious_conversion_warnings): Prototype new function.
19784         * typeck.c (convert_arguments): Adjust convert_default_arg call.
19785         (dubious_conversion_warnings): New function, broken
19786         out of convert_for_assignment.
19787         (convert_for_assignment): Adjust.
19788
19789 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
19790
19791         * decl2.c (key_method): Break out from...
19792         (import_export_vtable, import_export_class): ...here.
19793
19794         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
19795         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
19796
19797         * search.c (note_debug_info_needed, dfs_debug_mark,
19798         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
19799         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
19800
19801 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
19802
19803         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
19804         typos.
19805
19806 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
19807
19808         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
19809         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
19810         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
19811         (lang_type): Split gets_new into has_new and has_array_new.
19812         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19813         (TYPE_GETS_NEW): Split into ...
19814         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
19815         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
19816         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
19817         (build_op_new_call): Don't declare.
19818         (build_new_1): Likewise.
19819         * call.c (build_op_new_call): Remove.
19820         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
19821         instead of TYPE_NEEDS_DESTRUCTOR.
19822         (finish_struct_bits): Likewise.
19823         (add_implicitly_declared_members): Likewise.
19824         (check_field_decl): Likewise.
19825         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
19826         correctly under the new ABI.
19827         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
19828         instead of TYPE_NEEDS_DESTRUCTOR.
19829         (initialize_local_var): Likewise.
19830         (destroy_local_var): Likewise.
19831         (cp_finish_decl): Likewise.
19832         (register_dtor_fn): Likewise.
19833         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
19834         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
19835         TYPE_VEC_DELETE_TAKES_SIZE here.
19836         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
19837         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
19838         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19839         (finish_destructor_body): Likewise.
19840         (maybe_build_cleanup_1): Likewise.
19841         * decl2.c (do_static_destruction): Likewise.
19842         * init.c (build_new_1): Make it static.
19843         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19844         (expand_cleanup_for_base): Likewise.
19845         (get_cookie_size): New function.
19846         (build_new_1): Handle array-new cookies correctly under the new
19847         ABI.
19848         (build_vec_delete_1): Likewise.
19849         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19850         (build_delete): Likewise.
19851         (build_vec_delete): Handle array-new cookies correctly under the new
19852         ABI.
19853         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19854         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
19855         TYPE_HAS_ARRAY_NEW_OPERATOR.
19856         * ptree.c (print_lang_type): Check them.
19857         * search.c (context_for_name_lookup): Fix typo in comment.
19858         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19859         * tree.c (break_out_cleanups): Likewise.
19860         (build_cplus_array_test_1): Likewise.
19861         (cp_build_qualified_type_real): Likewise.
19862         * typeck.c (complete_type): Likewise.
19863
19864         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
19865         the command-line, not the end.
19866
19867 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
19868
19869         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
19870
19871 2000-03-02  Tom Tromey  <tromey@cygnus.com>
19872
19873         * cp-tree.h (build_java_class_ref): Declare.
19874         * init.c (build_java_class_ref): No longer static.
19875         * except.c (expand_throw): Generate a Java-style `throw' if the
19876         thrown object is a "Java" object.
19877         (initialize_handler_parm): Generate a Java-style lookup of
19878         exception info if the caught object is a "Java" object.
19879         (catch_language, catch_language_init): New globals.
19880         (decl_is_java_type): New function.
19881         (expand_start_catch_block): Don't call push_eh_info() or
19882         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
19883         class reference to build_catch_block.
19884
19885 2000-03-02  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19886
19887         * typeck.c (comptypes): Treat sizetype like its language equivalent.
19888
19889 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
19890
19891         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
19892         to merge reference/pointer code and fix incorrect warnings.
19893
19894 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
19895
19896         * search.c (protected_accessible_p): Use context_for_name_lookup.
19897
19898         * init.c (construct_virtual_bases): Fix thinko.
19899         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
19900
19901 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
19902
19903         * decl.c (current_function_decl): Move to toplev.c.
19904
19905 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
19906
19907         * pt.c (fn_type_unification): Unify return type, whenever
19908         provided.
19909         (get_bindings_real): Only pass return type when necessary.
19910         Remove explicit return type check.
19911         * class.c (resolve_address_of_overloaded_function): Pass desired
19912         return type to fn_type_unification.
19913
19914 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19915
19916         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
19917         DECL_FIELD_SIZE.
19918         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
19919         DECL_FIELD_SIZE.
19920         * rtti.c (expand_class_desc): Likewise.
19921         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
19922         (THUNK_VCALL_OFFSET): Likewise.
19923         (THUNK_DELTA): Reflect changes in ../tree.h.
19924
19925 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
19926
19927         * search.c (protected_accessible_p): Also allow the access if
19928         the member is public in DERIVED.  Lose TYPE parm.
19929         (friend_accessible_p): Lose TYPE parm.
19930         (accessible_p): Adjust.
19931
19932 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19933
19934         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
19935         on things that are not sizes; ssize_binop deleted.
19936         Call size_diffop when appropriate.
19937         (dfs_build_vcall_offset_vtbl_entries): Likewise.
19938         (build_primary_vtable, build_secondary_vtable): Likewise.
19939         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
19940         Variable I is HOST_WIDE_INT.
19941         (get_vfield_offset): Pass proper types to size_binop.
19942         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
19943         (finish_struct_1): Likewise.
19944         (skip_rtti_stuff): Arg N is now pointer to signed.
19945         (layout_class_type): Use size_zero_node.
19946         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
19947         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
19948         * decl.c (complete_arry_type): Pass proper types to size_binop.
19949         (xref_basetypes): BINFO_OFFSET is sizetype.
19950         * error.c (dump_expr): Don't use size_binop non-sizes.
19951         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
19952         * init.c (construct_virtual_bases): Fix type error.
19953         (build_vec_delete_1): Pass proper type to size_binop and don't
19954         fold result.
19955         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
19956         * rtti.c (get_base_offset): Pass proper type to size_binop.
19957         * search.c (dfs_find_vbases): Fix type error.
19958         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
19959         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
19960         * tree.c (debug_binfo): Variable N is signed.
19961         Use HOST_WIDE_INT_PRINT_DEC.
19962         * typeck.c (comptypes): sizetype is same as equivalent integer type.
19963         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
19964         size_one_node and size_zero_node.
19965         (c_alignof): Use size_one_node.
19966         (build_component_addr): Pass proper types to size_binop.
19967         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
19968
19969 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
19970
19971         Implement class scope using-declarations for functions.
19972         * class.c (handle_using_decl): Call add_method for used functions.
19973         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
19974         (add_method): Used functions are hidden by local functions.
19975         (check_bases_and_members): Handle using-decls before finalizing
19976         CLASSTYPE_METHOD_VEC.
19977         * call.c (add_function_candidate): Add ctype parm; if nonzero,
19978         override the type of 'this' accordingly.
19979         (add_template_candidate, add_template_candidate_real): Add ctype parm.
19980         (convert_class_to_reference, build_user_type_conversion_1,
19981         build_new_function_call, build_object_call, build_new_op,
19982         build_new_method_call): Pass ctype parm.
19983
19984         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
19985         the baselink.
19986         * call.c (convert_class_to_reference, build_user_type_conversion_1,
19987         build_new_function_call, build_object_call, build_new_op,
19988         build_new_method_call, build_op_delete_call): Don't get basetype_path
19989         from a baselink.
19990         * typeck.c (build_component_ref): Likewise.
19991         * init.c (build_offset_ref): Likewise.
19992         (resolve_offset_ref): Don't call enforce_access.
19993         Call build_scoped_ref.
19994         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
19995         would cause an error or if -pedantic.
19996         * class.c (alter_access): Lose binfo parm.
19997
19998 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
19999
20000         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
20001         types.
20002
20003 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
20004
20005         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
20006         pseudo_type_info creation into the std namespace
20007
20008 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
20009
20010         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
20011         (import_export_class): Remove declaration.
20012         * decl2.c (import_export_class): Make it static.
20013         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
20014         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
20015         EXPR_WITH_FILE_LOCATION.
20016         * lex.c (check_newline): Tweak filename/lineno setting.
20017         * semantics.c (begin_while_stmt): Fix typo in comment.
20018
20019 2000-02-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20020
20021         * lang-options.h (-fmessage-length=): Add missing option.
20022
20023         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
20024
20025 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
20026
20027         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
20028
20029 2000-02-25  Jim Wilson  <wilson@cygnus.com>
20030
20031         * optimize.c (expand_call_inline): Emit the return label before
20032         evaluating the return value.
20033
20034 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
20035
20036         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
20037         than duplicating functionality here.
20038         * optimize.c: Include input.h.
20039         (expand_call_inline): Use push_srcloc and pop_srcloc.
20040         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
20041         * parse.c: Regenerated.
20042         * Makefile.in (lex.o): Depend on input.h.
20043         (optimize.o): Likewise.
20044
20045 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
20046
20047         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
20048         function type, rather than ICE.
20049
20050 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
20051
20052         * decl.c (grokdeclarator): Call decl_type_access_control.
20053         * parse.y (parse_end_decl): Don't call decl_type_access_control if
20054         decl is null.
20055
20056 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
20057
20058         * decl.c (decls_match): Remove obsolete static member nadgering.
20059
20060 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
20061
20062         * decl.c (grokdeclarator): Change ANSI to ISO.
20063         * lex.c (consume_string, readescape, do_identifier): Likewise.
20064         (parse_float, real_yylex): Likewise.
20065         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
20066         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
20067         new_type_id, maybe_label_decls, simple_stmt,
20068         for.init.statement): Likewise.
20069         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
20070         * semantics.c (finish_named_return_value): Likewise.
20071         * parse.c: Regenerate.
20072
20073 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
20074
20075         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
20076         (CPTI_CLASS_STAR_TYPE): Remove.
20077         (vtable_index_type): Likewise.
20078         (class_star_type_node): Remove.
20079         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
20080         (build_binary_op_nodefault): Remove.
20081         * call.c (build_new_op): Use build_binary_op instead of
20082         build_binary_op_nodefault.
20083         * decl.c (init_decl_processing): Remove class_star_type_node
20084         initialization.  Make delta_type_node ptrdiff_type_node under the
20085         new ABI.  Initialize vtable_index_type.
20086         (build_ptrmemfunc_type): Build different structures for the new
20087         ABI.
20088         (build_enumerator): Use build_binary_op instead of
20089         build_binary_op_nodefault.
20090         * method.c (build_overload_value): Mangle pointers-to-members
20091         appropriately under the new ABI.
20092         * typeck.c (build_array_ref): Use build_binary_op instead of
20093         build_binary_op_nodefault.
20094         (get_member_function_from_ptrfunc): Adjust for the new ABI.
20095         (build_binary_op_nodefault): Rename to ...
20096         (build_binary_op): ... this.  Remove old version.  Adjust for
20097         pointer-to-member comparisons under the new ABI.
20098         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
20099         (build_ptrmemfunc): Adjust for the new ABI.
20100         (expand_ptrmemfunc_cst): Likewise.
20101         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
20102         (pfn_from_ptrmemfunc): Adjust for the new ABI.
20103
20104 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
20105
20106         * call.c (build_object_call): Compress consecutive calls to
20107         cp_error.
20108         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
20109         (build_op_delete_call): Adjust message formatting.
20110
20111         * class.c (check_bases): Compress consecutive calls to
20112         cp_pedwarn.
20113         (finish_struct_anon): Say 'ISO C++'.
20114
20115         * decl.c (start_decl): Same here.
20116         (grok_reference_init): Likewise.
20117         (grokfndecl): Correct message formatting.
20118         (grokfndecl): Improve diagnostic.
20119         (check_static_variable_definition): Likewise. Say 'ISO C++'
20120         (compute_array_index_type): Say 'ISO C++'
20121         (create_array_type_for_decl): Compress consecutive calls to
20122         cp_error.
20123         (grokdeclarator): Say 'ISO C++'
20124         (grok_op_properties): Likewise.
20125
20126         * decl2.c (delete_sanity): Clairify diagnostic.
20127         (check_member_template): Same here.
20128         (grok_function_init): Use consistent terminology.
20129
20130         * expr.c (do_case): Say 'ISO C++'
20131
20132         * friend.c (do_friend): Compress consecutive calls to warning.
20133
20134 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
20135
20136         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
20137         * class.c (build_secondary_vtable): Reorganize.  Don't create a
20138         new vtable under the new ABI.
20139         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
20140         computing the size.
20141         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
20142         the initializing elements.
20143         (initialize_vtable): New function.
20144         (dfs_finish_vtbls): Use it.
20145         (dfs_accumulate_vtbl_inits): New function.
20146         (finish_vtbls): Merge primary and secondary vtables under the new
20147         ABI.
20148         (finish_struct_1): Remove redundant call to layout_vtable_decl.
20149         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
20150         aren't VAR_DECLs.
20151
20152         * class.c (build_vtable): New function, split out from ...
20153         (get_vtable_decl): ... here, and ...
20154         (build_secondary_vtable): ... here.
20155
20156         * pt.c (tsubst_decl): Fix formatting.
20157
20158 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20159
20160         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
20161         (avoid_overlap, build_base_field): Likewise.
20162         (build_base_field, build_base_fields, is_empty_class):
20163         Test DECL_SIZE with integer_zero.
20164         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
20165         * cp-tree.h (struct lang_type): New field size_unit.
20166         (CLASSTYPE_SIZE_UNIT): New macro.
20167         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
20168         (cp_finish_decl): Delete -Wlarger-than processing.
20169         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
20170         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
20171         * tree.c (make_binfo): binfo vector is one entry longer.
20172         (walk_tree): Walk DECL_SIZE_UNIT.
20173
20174 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
20175
20176         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
20177         comment.
20178         (build_vtable_entry): Don't assume all vtable entries are
20179         functions.
20180         (build_vtbl_initializer): Adjust accordingly.
20181         (get_vtable_decl): Fix formatting.
20182
20183 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
20184
20185         * semantics.c (deferred_type_access_control): Walk the entire
20186         type_lookups list.
20187         (save_type_access_control): Rename from
20188         initial_deferred_type_access_control.  Just remember the value.
20189         (decl_type_access_control): New fn.
20190         (begin_function_definition): Use deferred_type_access_control, after
20191         we've started the function.  Set type_lookups to error_mark_node.
20192         * parse.y (frob_specs, fn.def1): Adjust.
20193         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
20194         (parse_end_decl, parse_bitfield0, parse_method): New fns.
20195         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
20196         (after_type_component_declarator0): Likewise.
20197         (after_type_component_declarator): Likewise.
20198         (notype_component_declarator): Likewise.
20199         * cp-tree.h: Adjust.
20200
20201         * decl.c (redeclaration_error_message): Allow redeclaration of
20202         namespace-scope decls.
20203
20204 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
20205
20206         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
20207
20208 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
20209
20210         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
20211         * decl2.c (grokclassfn): Likewise.
20212
20213         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
20214
20215         * decl2.c (lang_decode_option): Don't set default message length
20216         here.
20217         * lex.c (lang_init_options): Set it here.
20218
20219 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
20220
20221         Make DECL_CONTEXT mean the class in which a member function was
20222         declared, even for a virtual function.
20223         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
20224         (DECL_FRIEND_CONTEXT): New macro.
20225         (DECL_REAL_CONTEXT): Remove.
20226         (SET_DECL_FRIEND_CONTEXT): Likewise.
20227         (DECL_VIRTUAL_CONTEXT): Adjust.
20228         (DECL_CLASS_SCOPE_P): Use TYPE_P.
20229         (add_friends): Remove.
20230         (hack_decl_function_context): Likewise.
20231         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
20232         CP_DECL_CONTEXT.
20233         (build_over_call): Fix indentation.  Use DECL_CONTEXT
20234         instead of DECL_CLASS_CONTEXT.
20235         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
20236         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
20237         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20238         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
20239         (build_base_field): Likewise.
20240         (finish_struct_1): Likewise.
20241         (build_self_reference): Likewise.
20242         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
20243         DECL_REAL_CONTEXT.
20244         (pushtag): Use decl_function_context, not
20245         hack_decl_function_context.
20246         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
20247         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
20248         (pushdecl): Remove bogus code.
20249         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
20250         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
20251         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20252         Use decl_function_context, nothack_decl_function_context.
20253         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
20254         (grokdeclarator): Likewise.  Use decl_function_context, not
20255         hack_decl_function_context.
20256         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
20257         (start_function): Use DECL_FRIEND_CONTEXT, not
20258         DECL_CLASS_CONTEXT.  Use decl_function_context, not
20259         hack_decl_function_context.
20260         (finish_function): Use decl_function_context, not
20261         hack_decl_function_context.
20262         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
20263         DECL_CLASS_CONTEXT.
20264         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
20265         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
20266         (grokfield): Likewise.
20267         (finish_builtin_type): Likewise.
20268         (finish_vtable_vardec): Use decl_function_context, not
20269         hack_decl_function_context.
20270         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20271         (start_static_initialization_or_destruction): Likewise.
20272         (finish_static_initialization_or_destruction): Likewise.
20273         (mark_used): Adjust logic for deciding when to synthesize methods.
20274         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
20275         DECL_REAL_CONTEXT.
20276         * error.c (dump_function_decl): Use DECL_CONTEXT, not
20277         DECL_CLASS_CONTEXT.
20278         * friend.c (is_friend): Likewise.
20279         (add_friends): Remove.
20280         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
20281         * lex.c (begin_definition_of_inclass_inline): Use
20282         decl_function_context, not hack_decl_function_context.
20283         (process_next_inline): Likewise.
20284         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
20285         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
20286         DECL_CLASSS_CONTEXT.
20287         (hack_identifier): Likewise.
20288         (synthesize_method):  Use decl_function_context, not
20289         hack_decl_function_context.
20290         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
20291         DECL_REAL_CONTEXT.
20292         (is_member_template): Use decl_function_context, not
20293         hack_decl_function_context.  Use DECL_CONTEXT, not
20294         DECL_CLASS_CONTEXT.
20295         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
20296         DECL_CLASS_CONTEXT.
20297         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
20298         DECL_REAL_CONTEXT.
20299         (push_template_decl_real): Likewise.
20300         (instantiate_class_template): Don't call add_friends.
20301         (tsubst_default_argument): Use DECL_CONTEXT, not
20302         DECL_REAL_CONTEXT.
20303         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
20304         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20305         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
20306         DECL_CLASS_CONTEXT.
20307         * repo.c (repo_inline_used): Likewise.
20308         * search.c (current_scope): Adjust for new _CONTEXT macros.
20309         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
20310         DECL_REAL_CONTEXT.
20311         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20312         (lookup_fnfields_here):Likewise.
20313         (check_final_overrider): Likewise.
20314         (init_vbase_pointers): Likewise.
20315         (virtual_context): Likewise.
20316         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
20317         (expand_body): Use decl_function_context, not
20318         hack_decl_function_context.
20319         * tree.c (hack_decl_function_context): Remove.
20320         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
20321         DECL_CLASS_CONTEXT.
20322         * typeck2.c (error_not_base_type): Likewise.
20323
20324 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
20325
20326         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
20327
20328 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20329
20330         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
20331
20332 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
20333
20334         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
20335
20336 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
20337
20338         * decl2.c (lang_decode_option): Enable automatic line wrapping.
20339
20340 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
20341
20342         * parse.y (frob_specs): Split out...
20343         (parse_decl): From here.
20344         (fn.def2): Call initial_deferred_type_access_control.
20345         (after_type_component_declarator0): Call frob_specs.
20346         (notype_component_declarator0): Likewise.
20347         * search.c (friend_accessible_p): Nested classes are friends of their
20348         enclosing classes.
20349
20350 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
20351
20352         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
20353         used to create an implicit temporary.
20354
20355         * class.c (dfs_modify_vtables): Tweak calculation of functions to
20356         override.
20357
20358 2000-02-08  Nathan Sidwell  <nathan@acm.org>
20359
20360         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
20361         strip array element qualifiers too.
20362
20363 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
20364
20365         * decl.c (store_parm_decls): Don't build cleanups for parameters
20366         while processing_template_decl.
20367
20368 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
20369
20370         * cp-tree.h (struct saved_scope): Add incomplete field.
20371         (namespace_scope_incomplete): New macro.
20372         * decl.c (pushdecl): Use it.
20373         (hack_incomplete_structures): Use it.  See through artificial
20374         binding levels.
20375         (mark_saved_scope): Mark it.
20376
20377         Implement access control for nested types.
20378         * search.c (type_access_control): New fn.
20379         (accessible_p): Now we do perform access control for types.
20380         * semantics.c (deferred_type_access_control): New fn.
20381         (initial_deferred_type_access_control): New fn.
20382         (begin_function_definition): Call it.  Add lookups parm.
20383         * decl.c (struct binding_level): Add this_class field.
20384         (pushlevel_class): Set it.
20385         (mark_binding_level): Mark it.
20386         (lookup_name_real): Use it.  Call type_access_control.
20387         (mark_saved_scope): Mark lookups field.
20388         * cp-tree.h (flagged_type_tree): Add lookups field.
20389         (struct saved_scope): Add lookups field.
20390         (type_lookups): New macro.
20391         * parse.y (declmods): Now <ftype>.
20392         (parse_decl): Add lookups parm.  Call
20393         initial_deferred_type_access_control.
20394         (lang_extdef): Clear type_lookups.
20395         (typed_declspecs, declmods, typespec): Set lookups field.
20396         (initdcl): Call deferred_type_access_control.
20397         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
20398         component_decl_1, named_parm): Adjust.
20399         * friend.c (is_friend): Nested classes are friends of their
20400         enclosing classes.
20401
20402         * class.c (currently_open_derived_class): New fn.
20403         * method.c (hack_identifier): Use it.
20404
20405         * lex.c (do_identifier): Remove obsolete code.
20406
20407         * parse.y (typed_typespecs): Propagate new_type_flag properly.
20408
20409 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
20410
20411         * tinfo.h: Remove apostrophes from C++ comment (xgettext
20412         thinks this file is plain C).
20413
20414 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20415
20416         * Makefile.in (call.o): Depend on $(EXPR_H).
20417
20418         * call.c: Include "expr.h".
20419
20420         * class.c (dump_class_hierarchy): Add prototype.
20421
20422         * search.c (dfs_get_pure_virtuals): Likewise.
20423
20424 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
20425
20426         * parse.y (simple_stmt): Allow :: token in asm parameter list.
20427         * parse.c: Rebuilt.
20428
20429 2000-01-31  Jim Wilson  <wilson@cygnus.com>
20430
20431         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
20432         Store it in DECL_FCONTEXT.
20433         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
20434
20435 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
20436
20437         * tinfo.h (old abi): #include "tconfig.h".
20438         * tinfo.cc (convert_to_base): Move into old abi section.
20439
20440 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
20441
20442         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
20443         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
20444         (BINFO_PRIMARY_BINFO): New macro.
20445         (BF_DELTA): Rename to ...
20446         (BV_DELTA): ... this.
20447         (BF_VCALL_INDEX): Rename to ...
20448         (BV_VCALL_INDEX): ... this.
20449         (BF_FN): Rename to ...
20450         (BV_FN): ... this.
20451         * class.c (build_vbase_path): Adjust for changes to reverse_path.
20452         (set_rtti_entry): Rename BF_ macros to BV_ variants.
20453         (modify_vtable_entry): Simplify.
20454         (add_virtual_function): Rename BF_ macros to BV_ variants.
20455         (build_vtable_initializer): Likewise.
20456         (get_class_offset_1): Remove.
20457         (dfs_get_class_offset): Likewise.
20458         (get_class_offset): Likewise.
20459         (dfs_find_final_overrider): New function.
20460         (find_final_overrider): Likewise.
20461         (modify_one_vtable): Remove.
20462         (dfs_find_base): New function.
20463         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
20464         find_final_overrider.
20465         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
20466         virtuals.
20467         (dfs_fixup_vtable_deltas): Remove.
20468         (override_one_vtable): Remove.
20469         (merge_overrides): Likewise.
20470         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
20471         unreal chilren of virtual bases.
20472         (finish_struct_1): Don't use merge_overrides.  Don't use
20473         dfs_fixup_vtable_deltas.
20474         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
20475         BINFOs.
20476
20477 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
20478             Jason Merrill  <jason@yorick.cygnus.com>
20479
20480         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
20481
20482 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
20483
20484         * exception.cc (__throw_bad_typeid): Add missing std::.
20485
20486 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20487
20488         * cp-tree.h (make_thunk): PROTO -> PARAMS.
20489
20490 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
20491
20492         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
20493
20494         Runtime support for new-abi rtti.
20495         * inc/typeinfo (type_info::operator!=): Define in class.
20496         (type_info::before, type_info::name, type_info::operator==,
20497         type_info::operator!=): Define new ABI implementations.
20498         (type_info::is_pointer_p, type_info::is_function_p): Declare
20499         new virtual functions.
20500         (type_info::do_catch, type_info::do_upcast): Likewise.
20501
20502         * tinfo.h (__base_class_info): Define new class.
20503         (__class_type_info): Likewise.
20504         (__si_class_type_info): Likewise.
20505         (__vmi_class_type_info): Likewise.
20506         (__dynamic_cast): Prototype.
20507
20508         * tinfo.cc: Conditionalize old and new rtti mechanisms.
20509         (type_info::is_pointer_p): Define new function.
20510         (type_info::is_function_p): Likewise.
20511         (type_info::do_catch): Likewise.
20512         (type_info::do_upcast): Likewise.
20513         (vtable_prefix): New structure for vtable access.
20514         (adjust_pointer): Define new template function.
20515         (contained_p, public_p, virtual_p, contained_public_p,
20516         contained_nonpublic_p, contained_nonvirtual_p): Define new
20517         functions.
20518         (nonvirtual_base_type): New local variable.
20519         (__class_type_info::~__class_type_info): Define.
20520         (__si_class_type_info::~__si_class_type_info): Likewise.
20521         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
20522         (__class_type_info::do_catch): Define new function.
20523         (__class_type_info::do_upcast): Likewise.
20524         (__class_type_info::find_public_src): Likewise.
20525         (__class_type_info::do_find_public_src): Likewise.
20526         (__si_class_type_info::do_find_public_src): Likewise.
20527         (__vmi_class_type_info::do_find_public_src): Likewise.
20528         (__class_type_info::do_dyncast): Likewise.
20529         (__si_class_type_info::do_dyncast): Likewise.
20530         (__vmi_class_type_info::do_dyncast): Likewise.
20531         (__class_type_info::do_upcast): Likewise.
20532         (__si_class_type_info::do_upcast): Likewise.
20533         (__vmi_class_type_info::do_upcast): Likewise.
20534         (__dynamic_cast): Likewise.
20535
20536         * tinfo2.cc (__fundamental_type_info): Define new class.
20537         (__pointer_type_info): Likewise.
20538         (__reference_type_info): Likewise.
20539         (__array_type_info): Likewise.
20540         (__function_type_info): Likewise.
20541         (__enum_type_info): Likewise.
20542         (__ptr_to_member_type_info): Likewise.
20543         (__fundamental_type_info::~__fundamental_type_info): Define.
20544         (__pointer_type_info::~__pointer_type_info): Likewise.
20545         (__reference_type_info::~__reference_type_info): Likewise.
20546         (__array_type_info::~__array_type_info): Likewise.
20547         (__function_type_info::~__function_type_info): Likewise.
20548         (__enum_type_info::~__enum_type_info): Likewise.
20549         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
20550         (__pointer_type_info::do_catch): Define new function.
20551         (__ptr_to_member_type_info::do_catch): Define new function.
20552
20553         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
20554         (__is_pointer): Likewise.
20555
20556         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
20557
20558 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
20559
20560         * cp/class.c (build_vtable): Rename to build_primary_vtable.
20561         (prepare_fresh_vtable): Rename to build_secondary_vtable.
20562         (make_new_vtable): New function.
20563         (modify_vtable_entry): Handle generation of new vtables correctly.
20564         (modify_one_vtable): Remove unused parameter.
20565         (dfs_fixup_vtable_deltas): Likewise.
20566         (override_one_vtable): Use build_secondary_vtable.
20567         (finish_struct_1): Use build_primary_vtable and
20568         build_secondary_vtable.
20569
20570 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
20571
20572         * cp/decl.c: Adjust variable names, comments, help strings.
20573
20574 2000-01-29  Nathan Sidwell  <nathan@acm.org>
20575
20576         * new2.cc (operator delete[]): Use operator delete, don't assume
20577         implementation.
20578
20579 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
20580
20581         * class.c (build_vtbl_initializer): Add argument to
20582         build_vtable_entry call.
20583
20584 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
20585
20586         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
20587         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
20588         (BF_DELTA): New macro.
20589         (BF_VCALL_INDEX): Likewise.
20590         (BF_FN): Likewise.
20591         (THUNK_VCALL_OFFSET): Likewise.
20592         (make_thunk): Change prototype.
20593         * class.c (build_vtable_entry): Integrate
20594         build_vtable_entry_for_fn.  Handle vcall indices.
20595         (build_vtable_entry_for_fn): Remove.
20596         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
20597         BF_VCALL_INDEX, BF_FN.
20598         (modify_vtable_entry): Integrate common code from
20599         modify_one_vtable and dfs_fixup_vtable_deltas.
20600         (add_virtual_function): Set BF_VCALL_INDEX.
20601         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
20602         and BF_FN.
20603         (modify_one_vtable): Simplify.
20604         (dfs_fixup_vtable_deltas): Likewise.
20605         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
20606         * method.c (make_thunk): Handle vcall indices.
20607
20608 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
20609
20610         Compiler side new abi rtti (not enabled).
20611         * cp-tree.h (new_abi_rtti_p): New macro.
20612         (emit_support_tinfos): Prototype new function.
20613         (tinfo_decl_p): Likewise.
20614         (emit_tinfo_decl): Likwise.
20615         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
20616         macros.
20617         (doing_runtime): New local static.
20618         (init_rtti_processing): Add new-abi initializer.
20619         (get_tinfo_decl): Add new-abi logic.
20620         (tinfo_from_decl): Likewise.
20621         (build_dynamic_cast_1): Likewise.
20622         (qualifier_flags): New static function.
20623         (tinfo_base_init): Likewise.
20624         (generic_initializer): Likewise.
20625         (ptr_ref_initializer): Likewise.
20626         (ptmd_initializer): Likewise.
20627         (class_hint_flags): Likewise.
20628         (class_initializer): Likewise.
20629         (synthesize_tinfo_var): Likewise.
20630         (create_real_tinfo_var): Likewise.
20631         (create_pseudo_type_info): Likewise.
20632         (get_vmi_pseudo_type_info): Likewise.
20633         (create_tinfo_types): Likewise.
20634         (emit_support_tinfos): New global function.
20635         (tinfo_decl_p): New global predicate.
20636         (emit_tinfo_decl): New global function.
20637         * class.c (set_rtti_entry): Generalize for old and new rtti.
20638         (build_vtbl_initializer): Likewise.
20639         * decl2.c (finish_file): Likewise.
20640
20641 2000-01-27  Jim Wilson  <wilson@cygnus.com>
20642
20643         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
20644         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
20645
20646 2000-01-27  Mike Stump  <mrs@wrs.com>
20647
20648         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
20649         for scopes.
20650
20651 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
20652
20653         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
20654
20655 2000-01-26  J"orn Rennecke <amylaar@cygnus.co.uk>
20656
20657         * optimize.c (calls_setjmp_r): Supply new argument
20658         to special_function_p.
20659
20660 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20661
20662         * call.c: PROTO -> PARAMS.
20663         * class.c: Likewise.
20664         * cp-tree.h: Likewise.
20665         * cvt.c: Likewise.
20666         * decl.c: Likewise.
20667         * decl.h: Likewise.
20668         * decl2.c: Likewise.
20669         * dump.c: Likewise.
20670         * errfn.c: Likewise.
20671         * error.c: Likewise.
20672         * except.c: Likewise.
20673         * expr.c: Likewise.
20674         * init.c: Likewise.
20675         * input.c: Likewise.
20676         * lex.c: Likewise.
20677         * lex.h: Likewise.
20678         * method.c: Likewise.
20679         * optimize.c: Likewise.
20680         * parse.y: Likewise.
20681         * pt.c: Likewise.
20682         * repo.c: Likewise.
20683         * rtti.c: Likewise.
20684         * search.c: Likewise.
20685         * semantics.c: Likewise.
20686         * spew.c: Likewise.
20687         * tree.c: Likewise.
20688         * typeck.c: Likewise.
20689         * typeck2.c: Likewise.
20690         * xref.c: Likewise.
20691
20692 2000-01-25  Richard Henderson  <rth@cygnus.com>
20693
20694         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
20695
20696 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
20697
20698         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
20699         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
20700         (struct vcall_offset_data_s): New type.
20701         (dfs_vcall_offset_queue_p): New function.
20702         (dfs_build_vcall_offset_vtbl_entries): Likewise.
20703         (build_vcall_offset_vtbl_entries): Likewise.
20704         (layout_vtable_decl): Likewise.
20705         (num_vfun_entries): Likewise.
20706         (num_extra_vtbl_entries): Add the entries for vcall offsets.
20707         (build_vtbl_initializer): Likewise.
20708         (dfs_finish_vtabls): Use layout_vtable_decl.
20709         (modify_one_vtables): Always duplicate vtables under the new ABI.
20710         (finish_struct_1): Use layout_vtable_decl.
20711
20712 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20713
20714         * decl.c (member_function_or_else): Change third arg from a format
20715         specifier to an `enum overload_flags'.  Callers changed.
20716
20717 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
20718
20719         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
20720         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
20721         build_const_cast, get_delta_difference, check_return_expr): Avoid
20722         ANSI string concatenation usage.
20723
20724 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
20725
20726         * class.c (layout_class_type): Put the fields required to make a
20727         class non-empty at the end, not the beginning, of the TYPE_FIELDs
20728         list.
20729
20730 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
20731
20732         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
20733         template.
20734
20735         * decl2.c (mark_used): Do instantiate inlines that have been
20736         explicitly instantiated.
20737
20738 2000-01-24  Richard Henderson  <rth@cygnus.com>
20739
20740         * call.c (build_over_call): Use expand_tree_builtin.
20741         * typeck.c (build_function_call_real): Likewise.
20742         (build_binary_op_nodefault): Handle unordered compares.
20743
20744 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
20745
20746         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
20747         cp_tree_index values.
20748         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
20749         New global node #defines for them.
20750         * rtti.c (call_void_fn): Replace with ...
20751         (build_runtime_decl): ... new static function.
20752         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
20753         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
20754         (build_dynamic_cast_1): Always produce correctly typed result.
20755         Explicitly produce type_info addresses. Use dynamic_cast_node.
20756         * exception.cc (__throw_bad_cast): Return `void *'.
20757         (__throw_bad_typeid): Return `const type_info &'.
20758
20759 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
20760
20761         * cp-tree.h (get_vtable_decl): Prototype new function.
20762         * class.c (get_vtable_decl): New function. Broken out from ...
20763         (build_vtable): ... here. Use it.
20764         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
20765         by get_vtable_decl.
20766
20767 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
20768
20769         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
20770         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
20771         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
20772         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
20773         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
20774         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
20775         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
20776         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
20777         (CPTI_TINFO_VAR_ID): New enumeration.
20778         (__tp_desc_type_node, __access_mode_type_node,
20779         __bltn_desc_type_node, __user_desc_type_node,
20780         __class_desc_type_node, __ptr_desc_type_node,
20781         __attr_desc_type_node, __func_desc_type_node,
20782         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
20783         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
20784         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
20785         enum_desc_type_node, class_desc_type_node,
20786         si_class_desc_type_node, vmi_class_desc_type_node,
20787         ptmd_desc_type_node, base_desc_type_node): New #defines.
20788         (tinfo_fn_id, tinfo_fn_type): Rename to ...
20789         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
20790         (tinfo_var_id): New enumeration.
20791         (DECL_TINFO_FN_P): Augment comment.
20792         * decl.c (cp_global_trees): Adjust documentation.
20793         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
20794         tinfo_decl_type and tinfo_var_id.
20795         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
20796         (build_typeid): Remove unused variable.
20797         (get_tinfo_var): Use tinfo_var_id.
20798         (tinfo_name): New static function.
20799         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
20800         (tinfo_from_decl): Likewise.
20801         (get_base_offset): New static function, broken out of
20802         expand_class_desc.
20803         (expand_si_desc): Use tinfo_name.
20804         (expand_class_desc): Likewise. Lose local static variable.
20805         Use base_desc_type_node. Use get_base_offset.
20806         (expand_ptr_desc): Use tinfo_name.
20807         (expand_attr_desc): Likewise.
20808         (expand_generic_desc): Likewise.
20809
20810         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
20811         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
20812
20813 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
20814
20815         * cp-tree.h (__eprintf): Remove declaration.
20816         * tree.c (__eprintf): Remove definition.
20817
20818 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
20819             Mark Mitchell  <mark@codesourcery.com>
20820
20821         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
20822         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
20823
20824 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
20825
20826         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
20827
20828 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
20829
20830         * cp-tree.h (register_dtor_fn): New function.
20831         * decl.c (destroy_local_static): Rename to ...
20832         (register_dtor_fn): ... this.  Give it external linkage.
20833         (expand_static_init): Use it.
20834         * decl2.c (do_static_initialization): Likewise, if using
20835         __cxa_atexit.
20836         (do_static_destruction): Check that __cxa_atexit is not in use.
20837         (finish_file): Don't call do_static_destruction if using
20838         __cxa_atexit.
20839
20840         * typeck.c (convert_arguments): Restore two-message error
20841         reporting.
20842
20843 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
20844
20845         Remap dynamic cast hint values to be consistent across ABIs.
20846         * search.c (dynamic_cast_base_recurse): Remap generated value.
20847         (get_dynamic_cast_base_type): Adjust documentation.
20848         * tinfo.h (__user_type_info::dyncast): Likewise.
20849         (__user_type_info::find_public_subobj): Remap BOFF meaning.
20850         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
20851         (__class_type_info::do_dyncast): Likewise.
20852         (__class_type_info::do_find_public_subobj): Likewise.
20853         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
20854
20855 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
20856
20857         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
20858
20859         * typeck2.c (incomplete_type_error): Restore previous
20860         cp_error and cp_error_at call sequence.
20861
20862 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
20863
20864         * class.c (dump_class_hierarchy): Make format agree with argument;
20865         cast pointer to unsigned long and print with %lx.
20866
20867 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
20868
20869         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
20870
20871         * typeck.c (composite_pointer_type, common_type,
20872         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
20873         build_function_call_real, convert_arguments,
20874         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
20875         build_unary_op, mark_addressable, build_compound_expr,
20876         build_static_cast, build_reinterpret_cast, build_const_cast,
20877         build_c_cast, build_modify_expr, get_delta_difference,
20878         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
20879         'ISO C++'.  Fusion consecutive calls to diagnostic message routines
20880         into a single one.
20881         * typeck2.c (readonly_error, abstract_virtuals_error,
20882         process_init_constructor, check_for_new_type): Likewise.
20883
20884 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
20885
20886         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
20887         VAR_DECLs.
20888
20889 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
20890
20891         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
20892         (build_x_typeid): Likewise.
20893         (get_tinfo_fn): Likewise.
20894         (get_tinfo_fn_unused): Rename to ...
20895         (get_tinfo_decl): ... here.
20896         * rtti.c (build_headof): Replace logic error with assertion.
20897         (get_tinfo_fn_dynamic): Rename to ...
20898         (get_tinfo_decl_dynamic): ... here. Make static. Use
20899         complete_type_or_else.
20900         (build_x_typeid): Move into ...
20901         (build_typeid): ... here. Adjust call to
20902         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
20903         throw_bad_typeid expression.
20904         (get_tinfo_fn_unused): Rename to ...
20905         (get_tinfo_decl): ... here. Adjust comment.
20906         (get_tinfo_fn): Delete.
20907         (tinfo_from_decl): New static function.
20908         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
20909         (get_typeid): Use complete_type_or_else.
20910         (build_dynamic_cast_1): Adjust calls to
20911         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
20912         * parse.y (primary): Adjust call to build_typeid.
20913         * except.c (build_eh_type_type_ref): Adjust call to
20914         get_tinfo_decl. Mark as used.
20915         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
20916         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
20917         * parse.c: Regenerated.
20918
20919 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
20920
20921         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
20922         calling convention.
20923         (resolves_to_fixed_type_p): Document calling convention.
20924         * rtti.c (build_x_typeid): Initialize NONNULL.
20925
20926         * cp-tree.h (build_shared_int_cst): New function.
20927         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
20928         * class.c (modify_vtable_entry): Likewise.
20929         (add_virtual_function): Split out code to generated shared
20930         INTEGER_CSTs to build_share_int_cst.
20931         (modify_all_vtables): Handle all the overridden functions here.
20932         Add overridden functions from non-primary virtual bases to the
20933         primary vtable.
20934         (finish_struct_1): Adjust call to modify_all_vtables.  Add
20935         overridden functions from non-primary bases to the vtable.
20936         * tree.c (build_shared_int_cst): New function.
20937
20938         * cp-tree.h (scratchalloc): Remove.
20939         (build_scratch_list): Likewise.
20940         * call.c (convert_class_to_reference): Replace build_scratch_list
20941         and build_expr_list with build_tree_list.
20942         (add_candidate): Replace scratchalloc with expralloc.  Note memory
20943         leak.
20944         (build_user_type_conversion_1):  Replace build_scratch_list
20945         and build_expr_list with build_tree_list.
20946         (build_new_op): Likewise.
20947         (build_op_delete_call): Likewise.
20948         (convert_like): Likewise.
20949         * cvt.c (ocp_convert): Likewise.
20950         * decl.c (start_decl): Likewise.
20951         (start_function): Likewise.
20952         (finish_destructor_body): Likewise.
20953         (maybe_build_cleanup_1): Likewise.
20954         * decl2.c (reparse_decl_as_expr): Likewise.
20955         * init.c (perform_member_init): Likewise.
20956         (expand_cleanup_for_base): Likewise.
20957         (build_builtin_delete_call): Likewise.
20958         (build_new_1): Likewise.
20959         (build_delete): Likewise.
20960         * method.c (do_build_assign_ref): Likewise.
20961         * parse.y (already_scoped_stmt): Likewise.
20962         (nontrivial_exprlist): Likewise.
20963         (net_initializer): Likewise.
20964         (initlist): Likewise.
20965         * parse.c: Regenerated.
20966         * rtti.c (build_x_typeid): Likewise.
20967         (build_dynamic_cast_1): Likewise.
20968         * typeck.c (build_x_compound_expr): Likewise.
20969         (build_static_cast): Likewise.
20970         (build_modify_expr): Likewise.
20971
20972         * cp-tree.h (DECL_VINDEX): Add documentation.
20973         * class.c (build_vtable_entry): Likewise.
20974         (start_vtable): Add comment.
20975         (add_virtual_function): Replace pending_hard_virtuals with
20976         overridden_virtuals and pending_virtuals with new_virtuals.
20977         Replace redundant assignments with assertions.
20978         (check_for_override): Add comment.
20979         (check_bases_and_members): Replace pending_hard_virtuals with
20980         overridden_virtuals and pending_virtuals with new_virtuals.
20981         (create_vtbl_ptr): Likewise.
20982         (layout_class_type): Likewise.
20983         (finish_struct_1): Likewise.  Add comments.
20984
20985 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
20986
20987         * class.c (finish_struct_1): Replace redundant code with
20988         assertions.
20989
20990         * cp-tree.h (flag_new_abi): Move.
20991         (flag_use_cxa_atexit): Likewise.
20992         (flag_honor_std): Likewise.
20993         (flag_rtti): Likewise.
20994         (vbase_offsets_in_vtable_p): Define.
20995         (vptrs_present_everywhere_p): Likewise.
20996         (TYPE_CONTAINS_VPTR_P): Likewise.
20997         (dfs_walk_real): Declare.
20998         * class.c (build_vbase_pointer_fields): Check
20999         vbase_offsets_in_vtable_p.
21000         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
21001         BINFO_VPTR_FIELD.
21002         (build_vbase_offset_vtbl_entries): Simplify.
21003         (build_vbase_offset_vtbl_entries): Adjust.
21004         (build_vbase_pointer): Add ability to look up vbase offsets in
21005         vtable.
21006         (start_vtable): New function.
21007         (add_virtual_function): Use it.
21008         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
21009         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
21010         (build_vtbl_initializer): Take the type of the complete object as
21011         input.  Use it to correctly calculate vbase offsets.
21012         (dfs_finish_vtbls): Pass the complete type to
21013         build_vtbl_initializer.
21014         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
21015         (create_vtable_ptr): Create a vtable even if there are no
21016         new virtual functions, under the new ABI.
21017         (finish_struct_1): Likewise.
21018         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
21019         * decl.c (exapnd_static_init): Remove call to
21020         preserve_initializer.
21021         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
21022         vtables.
21023         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
21024         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
21025         (construct_virtual_bases): Don't initialize virtual base pointers
21026         under the new ABI.
21027         (build_aggr_init): Clean up comment.
21028         (expand_aggr_init_1): Likewise.
21029         * rtti.c (expand_class_desc): Store the virtual function table
21030         index where the vbase offset lives in the offset field.
21031         * search.c (dfs_walk_real): Make it global.
21032         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
21033         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
21034
21035         * tinfo.h (USItype): Make it signed under the new ABI.
21036         * tinfo.cc (convert_to_base): New function.  Encapsulate base
21037         conversion logic here.
21038         (__class_type_info::do_upcast): Use it.
21039         (__class_type_info::do_dyncast): Likewise.
21040         (__class_type_info::do_find_public_subobj): Likewise.
21041
21042         * init.c (construct_virtual_bases): Don't look up the addresses of
21043         virtual bases at run-time.
21044
21045         * class.c (build_vbase_pointer): Relocate.
21046         (build_vbase_pointer_fields): Likewise.
21047         (dfs_build_vbase_offset_vtbl_entries): Likewise.
21048         (build_vbase_offset_vtbl_entries): Likewise.
21049
21050         * decl.c (init_decl_processing): Complain if -fnew-abi
21051         -fno-vtable-thunks is used.
21052
21053         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
21054         flag_new_abi.
21055
21056 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
21057
21058         * cp-tree.h (num_extra_vtbl_entries): New function.
21059         (size_extra_vtbl_entries): Likewise.
21060         (dfs_vtable_path_unmark): Likewise.
21061         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
21062         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
21063         * class.c (num_extra_vtbl_entries): New function.
21064         (size_extra_vtbl_entries): Likewise.
21065         (dfs_build_vbase_offset_vtbl_entries): New function.
21066         (build_vbase_offset_vtbl_entries): Likewise.
21067         (build_vtbl_initializer): Use it.
21068         (finish_struct_1): Adjust vtable sizes (using
21069         num_extra_vtbl_entries).
21070         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
21071         THUNK_DECL is non-NULL before expanding it.
21072         * init.c (expand_virtual_init): Adjust the vtable pointer by
21073         size_extra_vtbl_entries before storing it.
21074         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
21075         Handle TREE_LIST parameters here, not in the dfs_* functions.
21076         (dfs_unmarked_real_bases_queue_p): Adjust.
21077         (dfs_marked_real_bases_queue_p): Likewise.
21078         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
21079         (dfs_vtable_path_marked_real_bases_queue_p): New function.
21080         (dfs_vtable_path_unmark): Likewise.
21081
21082 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
21083
21084         * optimize.c (copy_body_r): Clear the operand three of a
21085         TARGET_EXPR when copying it.
21086
21087 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
21088
21089         * method.c (build_decl_overload_real): Check whether we are in ::
21090         before returning __builtin_new/delete.
21091
21092 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
21093
21094         * pt.c (tsubst_friend_function): Improve comment.
21095         (instantiate_decl): Avoid crashing when a "nested" function is
21096         instantiated from the top level.
21097
21098         * dump.c (dqeueue_and_dump): Dump
21099         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
21100
21101 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
21102
21103         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
21104
21105 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
21106
21107         * g++spec.c (lang_specific_driver): Add -fnew-abi if
21108         ENABLE_NEW_GXX_ABI defined.
21109         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
21110         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
21111         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
21112
21113 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
21114
21115         * decl.c (start_cleanup_fn): Call pushdecl.
21116
21117         * call.c (convert_class_to_reference): Fix typos.
21118         (build_conditional_expr): Handle errors gracefully.
21119         * class.c (push_nested_class): Likewise.
21120         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
21121         (DECL_THIS_EXTERN): Use it.
21122         (DECL_THIS_STATIC): Likewise.
21123         * cvt.c (convert_to_void): Handle errors gracefully.
21124         (build_expr_type_conversion): Likewise.
21125         * decl.c (maybe_push_decl): Likewise.
21126         (start_decl_1): Likewise.
21127         (require_complete_types_for_parms): Likewise.
21128         * parse.y (structsp): Likewise.
21129         (base_class): Likewise.
21130         * parse.c: Regenerated.
21131         * pt.c (finish_member_template_decl): Likewise.
21132         * typeck.c (decay_conversion): Likewise.
21133
21134         * cp-tree.h (dfs_skip_vbases): New function.
21135         (find_vbase_instance): Likewise.
21136         * class.c (determine_primary_base): Allow a nearly empty base to
21137         serve as a primary base class under the new ABI.
21138         (get_class_offset_1): Rename to ...
21139         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
21140         messages here.
21141         (get_class_offset): Use it.  Issue error messages here.
21142         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
21143         find the right copies of virtual bases.
21144         (fixup_vtable_deltas1): Rename to ...
21145         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
21146         bases as primary bases.
21147         (fixup_vtable_deltas): Remove.
21148         (override_one_vtable): Handle virtual bases as primary bases.
21149         (merge_overrides): Likewise.
21150         (finish_struct_1): Likewise.
21151         (dump_class_hierarchy): Dump primary-ness of bases as well.
21152         * search.c (mark_primary_bases): Use a pre-order traversal to
21153         handle primary virtual bases.
21154         (dfs_skip_vbases): New fiunction.
21155         (expand_upcast_fixups): Adjust to handle primary virtual bases.
21156         (fixup_virtual_upcast_offsets): Likewise.
21157         (fixup_all_virtual_upcast_offsets): Likewise.
21158         (dfs_find_vbase_instances): New function.
21159         (find_vbase_instance): Likewise.
21160
21161 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
21162
21163         * lex.c (DIR_SEPARATOR): Delete macro.
21164
21165 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
21166
21167        * decl2.c (lang_decode_option): Handle automatic line wrapping
21168        option.
21169
21170 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
21171
21172         * friend.c (do_friend): Don't resolve scopes when processing
21173         template declarations, even if the qualifying scope doesn't
21174         involve template parameters.
21175
21176 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
21177
21178         * class.c (dfs_modify_vtables_queue_p): Remove.
21179         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
21180         and dfs_marked_real_bases_queue_p instead of
21181         dfs_modify_vtables_queue_p.
21182
21183         * class.c (build_vbase_path): Simplify.
21184         (dfs_propagate_binfo_offsets): New function.
21185         (propagate_binfo_offsets): Use it.
21186         (remove_base_field): Simplify.
21187         (dfs_set_offset_for_vbases): Remove.
21188         (dfs_set_offset_for_shared_vbases): New function.
21189         (dfs_set_offset_for_unshared_vbases): Likewise.
21190         (layout_virtual_bases): Use them.
21191         (layout_basetypes): Don't call propagate_binfo_offsets.
21192         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
21193         for the vbases.
21194
21195         * class.c (build_base_field): New function, split out from ...
21196         (build_base_fields): ... here.  Use it.  Allocate primary bases
21197         first, under the new ABI.
21198         (get_vtable_entry): Remove.
21199         (remove_base_field): New function, split out from ...
21200         (remove_base_fields): ... here.  Adjust since primary bases come
21201         first under the new ABI.
21202
21203         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
21204         (initialize_vtbl_ptrs): New function.
21205         (expand_indirect_vtbls_init): Change prototype.
21206         (convert_pointer_to_vbase): Declare.
21207         * init.c (expand_direct_vtbls_init): Remove.
21208         (dfs_initialize_vtbl_ptrs): New function.
21209         (initialize_vtbl_ptrs): Likewise.
21210         (emit_base_init): Use initialize_vtbl_ptrs.
21211         * search.c (convert_pointer_to_vbase): Make it global.
21212         (expand_indirect_vtbls_init): Remove vtable initialization code.
21213         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
21214
21215         * class.c (dfs_finish_vtbls): New function.
21216         (finish_vtbls): Use it.
21217         (dump_class_hierarchy): New function.
21218
21219         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
21220         (BINFO_VBASE_PRIMARY_P): New macro.
21221         (BINFO_VIRTUALS): Add to documentation.
21222         (SET_BINFO_PRIMARY_MARKED_P): Remove.
21223         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
21224         (dfs_mark_primary_bases_queue_p): Likewise.
21225         (dfs_unmarked_real_bases_queue_p): New function.
21226         (dfs_marked_real_bases_queue_p): Likewise.
21227         * search.c (dfs_mark_primary_bases): Adjust.
21228         (mark_primary_bases): Likewise.
21229         (get_shared_vbase_if_not_primary): New function.
21230         (dfs_unmarked_real_bases_queue_p): Likewise.
21231         (dfs_marked_real_bases_queue_p): Likewise.
21232         (dfs_get_pure_virtuals): Simplify.
21233         (get_pure_virtuals): Likewise.
21234
21235 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
21236
21237         * lex.c: Include tm_p.h.
21238
21239 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
21240
21241         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
21242
21243 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
21244
21245         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
21246         * pt.c (instantiate_decl): Defer comdat templates that might not be
21247         needed.
21248
21249         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
21250         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
21251         (finish_file): Likewise.
21252
21253         * decl2.c (import_export_class): Undo 12/14 change.
21254
21255         * error.c (dump_decl): operator new, not operatornew.
21256
21257         * class.c (field_decl_cmp): A nontype is "greater" than a type.
21258         * search.c (lookup_field_1): Look for the last field with the
21259         desired name.
21260
21261 2000-01-05  Nathan Sidwell  <nathan@acm.org>
21262
21263         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
21264         FUNCTION_DECL.
21265
21266 2000-01-05  Nathan Sidwell  <nathan@acm.org>
21267
21268         * typeck.c (build_static_cast): Don't strip target qualifiers
21269         when casting from a class.
21270
21271 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
21272
21273         * class.c (warn_hidden): Initialize variable `fndecl'.
21274
21275 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
21276
21277         * decl.c (flag_isoc9x): New variable to be able to use code in
21278         c-common.c.  For now always zero.
21279
21280 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
21281
21282         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
21283         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
21284         or unshare_base_binfos for virtual bases here.
21285         * search.c (dfs_get_vbase_types): Do it here.
21286         (get_vbase_types): Adjust.
21287
21288 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
21289
21290         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
21291         (BINFO_PRIMARY_MARKED_P): Use flag 5.
21292         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
21293         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
21294         (unmark_primary_bases): Remove declaration.
21295         (unmarkedp): Declare.
21296         (dfs_vbase_unmark): Likewise.
21297         * class.c (determine_primary_base): Return immediately if there
21298         are no base classes.  Call mark_primary_bases here.
21299         (modify_all_direct_vtables): Remove.
21300         (modify_all_indirect_vtables): Remove.
21301         (dfs_modify_vtables_queue_p): New function.
21302         (dfs_modify_vtables): New function.
21303         (modify_all_vtables): Use them.
21304         (build_base_fields): Build FIELD_DECLs for primary virtual base
21305         classes.
21306         (create_vtable_ptr): Don't call determine_primary_base here.
21307         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
21308         (dfs_set_offset_for_vbases): ... this.
21309         (layout_virtual_bases): Use it.
21310         (layout_class_type): Call determine_primary_base here.
21311         * search.c (unmarkedp): Make it global.
21312         (shared_marked_p): Simplify.
21313         (shared_unmarked_p): Likewise.
21314         (dfs_primary_bases_queue_p): Remove.
21315         (dfs_unmark_primary_bases): Likewise.
21316         (unmark_primary_bases): Likewise.
21317         (mark_primary_bases): Simplify.
21318         (get_pure_virtuals): Don't call mark_primary_bases here.
21319         (dfs_vbase_unmark): New function.
21320         (get_vbase_types): Simplify.
21321
21322         * class.c (struct base_info): Remove.
21323         (determine_primary_base): Take has_virtual_p rather than a
21324         base_info as input.  Don't calculate max_has_virtual.
21325         (finish_struct_bits): Remove max_has_virtual argument.
21326         (create_vtable_ptr): Remove max_has_virtual_p argument.
21327         (layout_virtual_bases): Remove max argument.
21328         (layout_basetypes): Likewise.
21329         (layout_class_type): Remove max_has_virtual_p argument.
21330         (finish_struct_1): Remove max_has_virtual.
21331
21332         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
21333         (layout_basetypes): Remove.
21334         * class.c (propagate_binfo_offsets): Moved here from tree.c.
21335         Update to handle primary virtual bases.
21336         (remove_base_fields): New function, split out from
21337         layout_basetypes.
21338         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
21339         (layout_virtual_bases): New function, split out from
21340         layout_basetypes.  Update to handle primary virtual bases.
21341         (layout_basetypes): Moved here from tree.c.  Use
21342         remove_base_fields and layout_virtual_bases.
21343         * search.c (dfs_mark_primary_bases_queue_p): New function.
21344         (mark_primary_bases): Use it.
21345         * tree.c (CEIL): Remove.
21346         (propagate_binfo_offsets): Remove.
21347         (layout_basetypes): Remove.
21348
21349 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
21350
21351         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
21352         (BINFO_PRIMARY_MARKED_P): New macro.
21353         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
21354         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
21355         (mark_primary_bases): New function.
21356         (unmark_primary_bases): Likewise.
21357         * search.c (get_abstract_virtuals_1): Remove.
21358         (dfs_mark_primary_bases): New function.
21359         (mark_primary_bases): Likewise.
21360         (dfs_unmark_primary_bases): Likewise.
21361         (unmark_primary_bases): Likewise.
21362         (dfs_get_pure_virtuals): Likewise.
21363
21364 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
21365
21366         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
21367         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
21368         (modify_one_vtable): Adjust.
21369         (fixup_vtable_deltas1): Likewise.
21370         (override_one_vtable): Likewise.
21371         * search.c (get_abstract_virtuals_1): Likewise.
21372         (get_pure_virtuals): Likewise.
21373         (expand_upcast_fixups): Likewise.
21374         * tree.c (debug_binfo): Likewise.
21375
21376         * class.c (build_vtable): Don't return a value.  Don't rebuild
21377         vtables for bases that have already been handled.
21378         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
21379         already been handled.
21380         (modify_one_vtable): Adjust accordingly.
21381         (fixup_vtable_deltas1): Likewise.
21382         (finish_struct_1): Likewise.
21383
21384 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
21385
21386         * call.c (build_new_method_call): Also check destructors.