OSDN Git Service

* configure.in (target_list): Add generated-manpages.
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
2
3         * Make-lang.in (c++.generated-manpages): New dummy target.
4
5 Tue Nov 27 09:03:47 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6
7         * Make-lang.in (cp-lang.o): Depends on c-common.h.
8         * cp-lang.c (c-common.h): Include.
9         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
10         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
11         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
12
13 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
14
15         * decl2.c (c_language): Move to c-common.c.
16         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
17         functions.
18         (cxx_init): Update.
19
20 2001-11-26  Jason Merrill  <jason@redhat.com>
21
22         * call.c (joust): Remove COND_EXPR hack.
23
24 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
25
26         * cp/search.c (lookup_base_r): Declare bk in variable declaration
27         space.
28         
29 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
30
31         PR g++/3145
32         * class.c (build_vbase_pointer): Remove.
33         (build_vbase_path): Remove.
34         (build_base_path): New function.
35         * cp-tree.h (base_access, base_kind): New enumerations.
36         (build_base_path): Declare.
37         (convert_pointer_to_real): Remove.
38         (convert_pointer_to): Remove.
39         (lookup_base): Declare.
40         (convert_pointer_to_vbase): Remove.
41         * call.c (build_scoped_method_call): Use lookup_base &
42         build_base_path instead of convert_pointer_to_real,
43         get_base_distance & get_binfo.
44         (build_over_call): Likewise.
45         * cvt.c (cp_convert_to_pointer): Likewise.
46         (convert_to_pointer_force): Likewise.
47         (build_up_reference): Likewise.
48         (convert_pointer_to_real): Remove.
49         (convert_pointer_to): Remove.
50         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
51         instead of convert_pointer_to_vbase & build_vbase_path.
52         (emit_base_init): Use build_base_path instead of
53         convert_pointer_to_real.
54         (expand_virtual_init): Lose unrequired conversions.
55         (resolve_offset_ref): Use lookup_base and build_base_path
56         instead of convert_pointer_to.
57         * rtti.c (build_dynamic_cast_1): Use lookup_base &
58         build_base_path instead of get_base_distance & build_vbase_path.
59         * search.c (get_vbase_1): Remove.
60         (get_vbase): Remove.
61         (convert_pointer_to_vbase): Remove.
62         (lookup_base_recursive): New function.
63         (lookup_base): New function.
64         * typeck.c (require_complete_type): Use lookup_base &
65         build_base_path instead of convert_pointer_to.
66         (build_component_ref): Likewise.
67         (build_x_function_call): Likewise.
68         (get_member_function_from_ptrfunc): Likewise.
69         (build_component_addr): Likewise.
70         * typeck2.c (build_scoped_ref): Likewise.
71
72 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
73
74         * cp-tree.h (CP_TYPE_QUALS): Removed.
75         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
76         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and 
77         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
78         * dump.c (cp_dump_tree): Use void* dump_info argument to match 
79         lang-hooks prototype.
80         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
81         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
82         CP_TYPE_QUALS changed to cp_type_quals.
83         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
84         (CXX_C_OBJS): Remove c-dump.o.
85
86 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
87
88         PR c++/3637
89         * pt.c (lookup_template_class): Ensure that all specializations
90         are registered on the list corresponding to the most general
91         template.
92
93 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
94
95         * call.c (non_reference): Add documentation.
96         (convert_class_to_reference): Do not strip reference types 
97         from conversion operators.
98         (maybe_handle_ref_bind): Simplify.
99         (compare_ics): Correct handling of references.
100
101 2001-11-19  John Wilkinson <johnw@research.att.com>
102
103         * dump.c (dump_op): New function.
104         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
105         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
106         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
107         
108 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
109
110         PR4629
111         * semantics.c (finish_sizeof): Make sure that expression created
112         while processing a template do not have a type.
113         (finish_alignof): Likewise.
114         * typeck.c (c_sizeof): Likewise.
115         (expr_sizeof): Likewise.
116
117 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
118
119         * lex.c (cxx_finish): Call c_common_finish.
120         (finish_parse): Remove.
121
122 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
123
124         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
125         when displaying error message about missing array bounds.
126
127 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
128
129         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
130         CONST_CAST_EXPR.
131         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
132
133 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
134
135         * cp-tree.h (print_class_statistics): Restore.
136
137 2001-11-15  Jason Merrill  <jason@redhat.com>
138
139         * method.c (use_thunk): Don't emit debugging information for thunks.
140
141         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
142         * decl.c (make_typename_type): Handle getting a class template.
143         * search.c (lookup_field_r): A class template is good enough for
144         want_type.
145
146         * call.c (convert_like_real): Only use cp_convert for the bad part.
147         (standard_conversion): Also allow bad int->enum.
148         * typeck.c (ptr_reasonably_similar): Also allow functions to
149         interconvert.  Pointers to same-size integers are reasonably
150         similar.
151
152         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
153         give it void type.
154
155 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
156
157         PR g++/3154
158         * init.c (sort_base_init): Remove unreachable code.
159         (expand_member_init): Adjust comment to reflect reality. Simplify
160         and remove unreachable code.
161
162 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
163
164         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
165         (cxx_init): Update prototype.
166         * decl.c (init_decl_processing): Rename.  Move null node init
167         to its creation time.
168         * lex.c (cxx_init_options): Update.
169         (cxx_init): Combine with old init_parse; also call
170         cxx_init_decl_processing.
171
172 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
173
174         * decl.c (check_initializer): Try to complete the type of an
175         array element before checking whether it's complete.  Don't
176         complain about arrays with complete element types but an
177         unknown size.
178         (cp_finish_decl): Build the hierarchical constructor before
179         calling maybe_deduce_size_from_array_init.
180
181 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
182
183         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
184
185 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
186
187         PR g++/4206
188         * parse.y (already_scoped_stmt): Remove.
189         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
190
191 2001-11-12  H.J. Lu <hjl@gnu.org>
192
193         * cp/cvt.c (ocp_convert): Don't warn the address of a weak
194         function is always `true'.
195
196 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
197
198         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
199         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
200         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
201         * cp-tree.h (print_class_statistics): Remove.
202         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
203         cxx_print_identifier, cxx_set_yydebug): New.
204         * lex.c (set_yydebug): Rename c_set_yydebug.
205         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
206         lang_print_xnode): Rename.
207         * tree.c (print_lang_statistics): Rename.
208
209 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
210
211         * class.c (dump_array): Fix format specifier warning.
212
213 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
214
215         * cp-lang.c (LANG_HOOKS_NAME): Override.
216         (struct lang_hooks): Constify.
217         * lex.c (cxx_init_options): Update.
218         (lang_identify): Remove.
219         * parse.y (language_string): Remove.    
220
221 2001-11-08  Andreas Franck  <afranck@gmx.de>
222
223         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
224         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
225         suggested by autoconf.
226         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
227         (c++.install-common): Use the transformed target alias names.
228
229 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
230
231         * Make-lang.in: Update.
232         * cp-lang.c: Include langhooks-def.h.
233
234 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
235
236         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
237
238 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
239
240         * lex.c (copy_lang_type): Add static prototype.
241
242 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
243
244         * pt.c (unify): Handle SCOPE_REF.
245
246 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
247
248         * tree.c (cp_copy_res_decl_for_inlining): Adjust
249         DECL_ABSTRACT_ORIGIN for the return variable.
250
251 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
252
253         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
254
255 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
256
257         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
258         semantics.c, spew.c: Fix spelling errors.
259
260 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
261
262         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
263
264 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
265
266         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
267         pop_everything.
268
269 Tue Oct 23 14:00:20 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
270
271         * cp-lang.c (cxx_get_alias_set): New function.
272         Point LANG_HOOKS_GET_ALIAS_SET to it.
273
274 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
275
276         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
277         * cp-tree.h (make_unbound_class_template): Prototype new function.
278         * decl.c (make_unbound_class_template): New function.
279         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
280         * error.c (dump_type): Likewise.
281         * mangle.c (write_type): Likewise.
282         * parse.y (template_parm): Likewise.
283         (template_argument): Use make_unbound_class_template.
284         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
285         (tsubst): Likewise.
286         (tsubst_copy): Likewise.
287         (unify): Likewise.
288         * tree.c (walk_tree): Likewise.
289         * typeck.c (comptypes): Likewise.
290
291 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
292
293         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
294         extra calls into fewer ones.
295
296 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
297
298         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
299         Warn when merging inline with attribute noinline.
300         (start_decl, start_function): Warn if inline and attribute
301         noinline appear in the same declaration.
302
303 2001-10-16  H.J. Lu <hjl@gnu.org>
304
305         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
306         for tree checking disabled.
307
308 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
309
310         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
311         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
312
313 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
314
315         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
316         (unify): Only handle MINUS_EXPR specially if the above flag is set
317         and the subtracted constant is 1.  Clear the flag on recursive calls.
318         Set it when unifying the maximum value in an INTEGER_TYPE's range.
319
320 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
321
322         * decl.c (bad_specifiers): Don't allow exception specifications
323         on any typedefs.
324
325 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
326
327         * cp/lex.c (init_cp_pragma): Similarly.
328
329 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
330
331         * pt.c (lookup_template_class): Build complete template arguments
332         for BOUND_TEMPLATE_TEMPLATE_PARM.
333
334 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
335
336         * cp-tree.h (TYPE_BINFO): Update comment.
337         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
338         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
339         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
340         (copy_type): Prototype new function.
341         * lex.c (copy_lang_decl): Gather tree node statistics.
342         (copy_lang_type): New function.
343         (copy_type): Likewise.
344         (cp_make_lang_type): Create lang_type for
345         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
346         and BOUND_TEMPLATE_TEMPLATE_PARM.
347         * pt.c (tsubst): Use copy_type instead of copy_node.
348         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
349
350 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
351
352         * pt.c (determine_specialization): Ignore functions without
353         DECL_TEMPLATE_INFO.
354
355 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
356
357         PR g++/4476
358         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
359
360 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
361
362         * typeck2.c (store_init_value): Don't re-digest a bracketed
363         initializer.
364
365         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
366         ANON_AGGR_TYPE_P.
367
368 2001-10-11  Richard Henderson  <rth@redhat.com>
369
370         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
371         of an asm statement.
372         (build_vtbl_ref_1): Split out from build_vtbl_ref.
373         (build_vfn_ref): Use it to handle vtable descriptors before
374         calling build_vtable_entry_ref.
375         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
376
377 2001-10-10  Richard Henderson  <rth@redhat.com>
378
379         * parse.y (asm_operand): Allow named operands.
380         * semantics.c (finish_asm_stmt): Tweek for changed location
381         of the operand constrant.
382
383 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
384
385         * call.c (standard_conversion): Add bad conversion between
386         integers and pointers.
387         (convert_like_real): Don't use convert_for_initialization for bad
388         conversions; complain here and use cp_convert.
389         (build_over_call): Don't handle bad conversions specially.
390         (perform_implicit_conversion): Allow bad conversions.
391         (can_convert_arg_bad): New fn.
392         * cp-tree.h: Declare it.
393         * typeck.c (convert_for_assignment): Use it.
394         (ptr_reasonably_similar): Any target type is similar to void.
395
396 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
397
398         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
399         (cp/cp-lang.o): New rule.
400         * cp-tree.h: Declare hooks.
401         * tree.c: Make hooks non-static.
402         (init_tree): Don't initialize hooks here.
403         * lex.c: Likewise.  Move definition of lang_hooks to...
404         * cp-lang.c: ... new file.
405
406 2001-10-08  Richard Henderson  <rth@redhat.com>
407
408         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
409         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
410
411 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
412
413         * class.c (build_vtable_entry_ref): Const-ify.
414         * decl.c (predefined_identifier,
415         initialize_predefined_identifiers): Likewise.
416         * init.c (build_new_1): Likewise.
417         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
418         Likewise.
419
420 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
421
422         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
423         (INSNS_PER_STMT): Likewise.
424         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
425         (copy_body, initialize_inlined_parameters): Likewise.
426         (declare_return_variable, inlinable_function_p): Likewise.
427         (expand_call_inline, expand_calls_inline): Likewise.
428         (optimize_inline_calls, clone_body): Likewise.
429         * tree.c (walk_tree): Moved to ../tree-inline.c.
430         (walk_tree_without_duplicates): Likewise.
431         (copy_tree_r, remap_save_expr): Likewise.
432
433 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
434
435         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
436         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
437         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
438         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
439         (flag_inline_trees): Moved declaration to ../tree-inline.h.
440         (walk_tree): Moved declaration to ../tree-inline.h.
441         (walk_tree_without_duplicates, copy_tree_r): Likewise.
442         (remap_save_expr): Likewise.
443         * decl.c: Include tree-inline.h.
444         (lang_mark_tree): Don't mark inlined_fns.
445         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
446         * optimize.c: Include tree-inline.h.
447         (optimize_inline_calls): Move declaration to ../tree.h, as
448         non-static.
449         (remap_decl): Use language-independent constructs and hooks.
450         (remap_block, copy_body_r, declare_return_variable): Likewise.
451         (inlinable_function_p): Likewise.  Don't test for
452         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
453         no longer language-specific.
454         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
455         call of dump_function to...
456         (optimize_function): Here...
457         (clone_body): New function, extracted from...
458         (maybe_clone_body): ... here.  Build decl_map locally and pass
459         it on to clone_body.
460         * pt.c, semantics.c: Include tree-inline.h.
461         * tree.c: Likewise.
462         (cp_walk_subtrees): New language-specific hook for tree inlining.
463         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
464         cp_is_overload_p, cp_auto_var_in_fn_p,
465         cp_copy_res_decl_for_inlining): Likewise.
466         (walk_tree): Move language-specific constructs into...
467         (cp_walk_subtrees): this new function.
468         (copy_tree_r): Use language-independent constructs and hooks.
469         (init_tree): Initialize tree inlining hooks.
470         (remap_save_expr): Adjust prototype so that the declaration
471         does not require the definition of splay_tree.
472
473 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
474
475         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
476         to build the declaration instead of the declaration itself.
477
478 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
479
480         * decl2.c (cxx_decode_option): Add 'else'.
481
482         * spew.c (end_input): No longer static.
483         * cp-tree.h: Declare it.
484         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
485
486 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
487
488         * call.c (build_over_call), typeck.c (build_function_call_real):
489         Pass type attributes to check_function_format rather than name or
490         assembler name.  Don't require there to be a name or assembler
491         name to check formats.
492
493 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
494
495         * decl.c (init_decl_processing): Don't call
496         init_function_format_info.  Initialize lang_attribute_table
497         earlier.
498         (builtin_function): Call decl_attributes.
499         (insert_default_attributes): New.
500
501 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
502
503         * decl.c (grokdeclarator): Copy array typedef handling from C
504         frontend.
505
506         * decl.c (grokdeclarator): Copy too-large array handling from C
507         frontend.
508
509 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
510
511         * config-lang.in (target_libs): Added target-gperf, so that we
512         don't try to build it if C++ is disabled.
513
514 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
515
516         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
517         (cp/errfn.o): Delete rule.
518         (cp/error.o): Depend on flags.h.
519         * errfn.c: Delete file.
520         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
521         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
522         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
523         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
524         internal_error respectively.  Make cp_deprecated into a macro.
525         Don't define cp_printer typedef or declare cp_printers.
526         * error.c: Include flags.h.
527         Delete: struct tree_formatting_info, print_function_argument_list,
528         print_declaration, print_expression, print_function_declaration,
529         print_function_parameter, print_type_id, print_cv_qualifier_seq,
530         print_type_specifier_seq, print_simple_type_specifier,
531         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
532         print_parameter_declaration_clause, print_exception_specification,
533         print_nested_name_specifier, and definition of cp_printers.
534         (locate_error): New function.
535         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
536         rewritten in terms of locate_error and diagnostic.c.
537         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
538         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
539         (init_error): Adjust to match.
540
541 Sat Sep 22 09:15:31 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
542
543         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
544
545 2001-09-21  Richard Henderson  <rth@redhat.com>
546
547         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
548         (build_vtbl_initializer): Likewise.
549         (build_vfn_ref): New.
550         * cp-tree.h: Declare it.
551         * call.c (build_over_call): Use it.
552         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
553         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
554
555 Fri Sep 21 08:16:19 2001  J"orn Rennecke <amylaar@redhat.com>
556
557         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
558
559 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
560
561         Table-driven attributes.
562         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
563         * decl2.c (cplus_decl_attributes): Only take one attributes
564         parameter.
565         * cp-tree.c (cplus_decl_attributes): Update prototype.
566         * class.c (finish_struct), decl.c (start_decl, start_function),
567         decl2.c (grokfield), friend.c (do_friend), parse.y
568         (parse_bitfield): Update calls to cplus_decl_attributes.
569         * decl.c (grokdeclarator): Take a pointer to a single ordinary
570         attribute list.
571         * decl.h (grokdeclarator): Update prototype.
572         * decl2.c (grokfield): Take a single ordinary attribute list.
573         * friend.c (do_friend): Likewise.
574         * decl.c (shadow_tag, groktypename, start_decl,
575         start_handler_parms, grokdeclarator, grokparms, start_function,
576         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
577         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
578         (process_template_parm, do_decl_instantiation): Pass single
579         ordinary attribute lists around.
580         * decl.c (grokdeclarator): Correct handling of nested attributes.
581         Revert the patch
582         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
583                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
584                 not the left.
585         .
586         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
587         (cp_attribute_table): Declare.
588         * decl.c (valid_lang_attribute): Don't define.
589         (lang_attribute_table): Define.
590         (init_decl_processing): Initialize lang_attribute_table instead of
591         valid_lang_attribute.
592         * tree.c (cp_valid_lang_attribute): Remove.
593         (handle_java_interface_attribute, handle_com_interface_attribute,
594         handle_init_priority_attribute): New functions.
595         (cp_attribute_table): New array.
596         * decl2.c (import_export_class): Don't use
597         targetm.valid_type_attribute.
598
599 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
600
601                 * Make-lang.in (cp/error.o): Depend on real.h
602                 * error.c: #include "real.h"
603
604 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
605
606         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
607         xmalloc/strcpy/strcat.
608
609 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
610
611         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
612         Const-ification.
613         * pt.c (tsubst_decl): Likewise.
614
615 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
616
617         * decl2.c (lang_f_options): Const-ification.
618         * lex.c (cplus_tree_code_name): Likewise.
619         * spew.c (yyerror): Likewise.
620
621 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
622
623         PR c++/3986
624         * class.c (force_canonical_binfo_r): Check & move an indirect
625         primary base first.
626         (force_canonical_binfo): Check that it's not already
627         canonical.
628         (mark_primary_virtual_base): Remove BINFO parameter.
629         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
630
631 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
632
633         Remove TYPE_NONCOPIED_PARTS.
634         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
635         CLASSTYPE_PURE_VIRTUALS.
636         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
637         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
638         (layout_class_type): Don't call fixup_inline_methods here ...
639         (finish_struct_1): ... call it here.
640
641 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
642
643         * decl.c (duplicate_decls): Remove code deadling with
644         DECL_SAVED_INSNS.
645         * decl2.c (finish_file): Likewise.
646         * pt.c (instantiate_decl): Likewise.
647         * semantics.c (expand_body): Don't defer local functions if
648         they wouldn't be deferred for some other reason.  Don't
649         generate RTL for functions that will not be emitted.
650         (genrtl_start_function): Remove code deadling with
651         DECL_SAVED_INSNS.
652         (genrtl_finish_function): Likewise.
653
654 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
655
656         PR c++/4203
657         * call.c (build_over_call): Do not optimize any empty base
658         construction.
659
660 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
661
662         * error.c (dump_template_decl): Output template parameters
663         together with their specifiers.
664         Output `class' prefix for template template parameter.
665         (dump_decl): Fix formatting.
666
667 2001-08-30  Kurt Garloff  <garloff@suse.de>
668
669         * optimize.c (inlinable_function_p): Allow only smaller single
670         functions. Halve inline limit after reaching recursive limit.
671
672 2001-08-30  Joern Rennecke <amylaar@redhat.com>
673             Jason Merrill  <jason_merrill@redhat.com>
674
675         * class.c (build_vtable_entry_ref): Subtract in char*, not
676         ptrdiff_t.
677
678 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
679
680         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
681         (build_cplus_array_type): Use cp_build_qualified_type, not
682         TYPE_MAIN_VARIANT, to get an unqualified version.
683
684         * decl2.c (grok_alignof): Lose.
685         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
686         * typeck.c (c_alignof): Lose.
687         * semantics.c (finish_sizeof, finish_alignof): New.
688         * parse.y: Use them.
689         * cp-tree.h: Declare them.
690
691 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
692
693         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
694         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
695         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
696
697 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
698
699         * typeck2.c (add_exception_specifier): Only require complete type if
700         not in processing template declaration.
701
702 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
703
704         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
705         GNU_xref_start_scope and GNU_xref_end_scope.
706
707         * tree.c (TYPE_HASH): Moved to ../tree.h.
708
709 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
710
711         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
712         on COMPOUND_EXPRs.
713
714 2001-08-14  Richard Henderson  <rth@redhat.com>
715
716         * class.c, cp-tree.h (build_vfn_ref): Remove.
717         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
718
719 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
720
721         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
722         empty class assignment as having side-effects to avoid
723         spurious warnings.
724
725 2001-08-13  Zack Weinberg  <zackw@panix.com>
726
727         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
728         * except.c: Include libfuncs.h.
729
730 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
731
732         * decl.c (grokdeclarator): Clarify diagnostic message.
733
734 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
735
736         * decl2.c (do_nonmember_using_decl): Replace using directive
737         with using declaration in the error message.
738
739 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
740
741         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
742         criterion to avoid rebuilding expression tree instead of
743         processing_template_decl.
744
745 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
746
747         Support named return value optimization for inlines, too.
748         * decl.c (finish_function): Nullify returns here.
749         * semantics.c (genrtl_start_function): Not here.
750         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
751         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
752         Also nullify the CLEANUP_STMT for the nrv.
753         * cp-tree.h: Declare it.
754         * optimize.c (declare_return_variable): Replace the nrv with the
755         return variable.
756         * typeck.c (check_return_expr): Be more flexible on alignment check.
757         Ignore cv-quals when checking for a matching type.
758
759 2001-08-09  Richard Henderson  <rth@redhat.com>
760
761         * decl2.c (finish_objects): Use target hooks instead of
762         assemble_constructor and assemble_destructor.
763
764 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
765
766         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
767
768 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
769
770         PR c++/3820
771         Stop using TYPE_NONCOPIED_PARTS.
772         * call.c (build_over_call): Be careful when copy constructing
773         or assigning to an empty class.
774         * class.c (check_bases_and_members): It has a
775         COMPLEX_ASSIGN_REF if it has a vptr.
776         (layout_class_type): Don't add empty class padding to
777         TYPE_NONCOPIED_PARTS.
778         (finish_struct_1): Don't add the VFIELD either.
779         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
780         initialization.
781
782 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
783
784         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
785
786 2001-08-06  Richard Henderson  <rth@redhat.com>
787
788         * decl2.c (finish_objects): Pass a symbol_ref and priority to
789         assemble_{constructor,destructor}.  Remove priority handling.
790
791 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
792
793         Don't allow template-id in using-declaration.
794         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
795         (do_class_using_decl): Likewise.
796
797 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
798
799         * cp/spew.c (read_token): No need to pop buffers.
800
801 2001-08-02  Stan Shebs  <shebs@apple.com>
802
803         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
804         (fnaddr_from_vtable_entry): Remove decl.
805         * method.c (use_thunk): Update comment.
806
807 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
808
809         * repo.c (get_base_filename): Change return value to const char
810         pointer.
811
812 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
813
814         Kill -fhonor-std.
815         * NEWS: Document.
816         * cp-tree.h (flag_honor_std): Remove.
817         (CPTI_FAKE_STD): Remove.
818         (std_node): Remove comment about it being NULL.
819         (fake_std_node): Remove.
820         * decl.c (in_fake_std): Remove.
821         (walk_namespaces_r): Remove fake_std_node check.
822         (push_namespace): Remove in_fake_std code.
823         (pop_namespace): Likewise.
824         (lookup_name_real): Remove fake_std_node check.
825         (init_decl_processing): Always create std_node. Always add
826         std:: things there.
827         (builtin_function): Always put non '_' fns in std.
828         * decl2.c (flag_honor_std): Remove.
829         (lang_f_options): Remove honor-std.
830         (unsupported_options): Add honor-std.
831         (set_decl_namespace): Remove fake_std_node check.
832         (validate_nonmember_using_decl): Likewise.
833         (do_using_directive): Likewise.
834         (handle_class_head): Likewise.
835         * dump.c (cp_dump_tree): Likewise.
836         * except.c (init_exception_processing): Adjust.
837         * init.c (build_member_call): Remove fake_std_node check.
838         (build_offset_ref): Likewise.
839         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
840         * rtti.c (init_rtti_processing): Adjust.
841
842 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
843
844         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
845         operand while calling cp_tree_equal.
846
847 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
848
849         The 3.0 ABI no longer has vbase pointer fields.
850         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
851         FORMAT_VBASE_NAME): Remove.
852         * method.c (do_build_copy_constructor): Adjust.
853         (do_build_assign_ref): Adjust.
854         * search.c (lookup_field_r): Adjust.
855         * typeck.c (build_component_ref): Adjust.
856
857         The 3.0 ABI always has a vtable pointer at the start of every
858         polymorphic class.
859         * rtti.c (build_headof_sub): Remove.
860         (build_headof): Adjust.
861         (get_tinfo_decl_dynamic): No need to check flag_rtti
862         here. Adjust.
863         (create_real_tinfo_var): Explain why we need a hidden name.
864
865 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
866
867         PR c++/3631
868         * class.c (update_vtable_entry_for_fn): The fixed adjustment
869         of a virtual thunk should be from declaring base.
870
871 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
872
873         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
874         the shared virtual base, so preserving inheritance graph order.
875
876 2001-07-30  Andreas Jaeger  <aj@suse.de>
877
878         * decl2.c: Remove unused var global_temp_name_counter.
879
880 2001-07-28  Richard Henderson  <rth@redhat.com>
881
882         * method.c (pending_inlines): Remove.
883
884 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
885
886         * class.c (mark_primary_virtual_base): Don't adjust base
887         offsets here.
888         (dfs_unshared_virtual_bases): Adjust them here.
889         (mark_primary_bases): Explain why we adjust at the end.
890
891 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
892
893         * class.c (finish_struct_1): When copying the primary base's
894         VFIELD, make sure we find it is at offset zero.
895
896 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
897
898         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
899         tsubst_expr for default template arguments.
900
901 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
902
903         PR c++/3621
904         * spew.c (yylex): Only copy the token's lineno, if it is
905         non-zero.
906
907 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
908
909         PR c++/3624
910         * call.c (resolve_args): Simplify, call
911         convert_from_reference.
912         (build_new_op): Resolve and convert from reference ARG1
913         earlier. Adjust ARG2 & ARG3 resolve and conversion.
914
915 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
916
917         * decl.c (last_function_parm_tags): Remove.
918         (current_function_parm_tags): Remove.
919         (init_decl_processing): Adjust.
920         (start_function): Adjust.
921         (store_parm_decls): Adjust.
922
923         PR c++/3152
924         * decl.c (grokdeclarator): Detect when a function typedef is
925         declaring a function, and create last_function_parms correctly.
926
927 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
928
929         * call.c (joust): Only prefer a non-builtin candidate to a builtin
930         one if they have the same signature.
931
932         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
933         it rather than toplevel_bindings_p.  Give it a mangled name if static.
934         (convert_to_reference): Adjust.
935         * decl2.c (get_temp_name): Lose.
936         * mangle.c (mangle_ref_init_variable): New fn.
937         (mangle_guard_variable): Strip the ref-init header.
938         * cp-tree.h: Adjust.
939         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
940         initializer.
941         (grok_reference_init): Always use DECL_INITIAL.
942
943 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
944
945         PR c++/3416
946         * call.c (build_conditional_expr): Recheck args after
947         conversions.
948         * cp-tree.h (build_conditional_expr): Move to correct file.
949         * typeck.c (decay_conversion): Diagnose any unknown types
950         reaching here.
951         (build_binary_op): Don't do initial decay or default
952         conversions on overloaded functions.
953         (build_static_cast): Don't do a decay conversion here.
954
955 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
956
957         PR c++/3543
958         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
959         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
960
961 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
962
963         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
964         (create_vtbl_ptr): ... here.
965
966 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
967
968         * class.c (build_vbase_offset_vbtl_entries): Look for
969         non-primary base of which we are a sub vtable.
970
971 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
972
973         * semantics.c (finish_this_expr):  Remove unused code.
974
975 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
976
977         Simplify rtti, now we've only one ABI.
978         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
979         CPTI_TINFO_VAR_ID.
980         (tinfo_decl_id, tinfo_var_id): Remove.
981         (get_typeid_1): Remove.
982         * rtti.c
983         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
984         (typeid_ok_p): New function.
985         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
986         (get_tinfo_decl): Remove old abi documentation.
987         (tinfo_from_decl): Remove.
988         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
989         (get_typeid_1): Remove.
990         (get_base_offset): Remove.
991         (synthesize_tinfo_var): Absorb get_base_offset.
992         (create_real_tinfo_var): Don't use tinfo_decl_id.
993
994 2001-07-23  Graham Stott  <grahams@redhat.com>
995
996         * cp/class.c (type_requires_array_cookie): Fix use of uninitialised
997         variable has_two_argument_delete_p.
998
999 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
1000
1001         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
1002         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
1003         (CPTI_INDEX_IDENTIFIER): Remove.
1004         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
1005         (delta2_identifier): Remove.
1006         (index_identifier): Remove.
1007         (pfn_or_delta2_identifier): Remove.
1008         (flag_vtable_thunks): Remove.
1009         (VTABLE_DELTA2_NAME): Remove.
1010         (VTABLE_INDEX_NAME): Remove.
1011         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
1012         (vfunc_ptr_type_node): Adjust.
1013         (VTABLE_NAME_PREFIX): Adjust.
1014         (build_vfn_ref): Lose first parameter.
1015         (fixup_all_virtual_upcast_offsets): Remove.
1016         * decl.c (initialize_predefined_identifiers): Remove
1017         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
1018         (init_decl_processing): Remove no-vtable-thunk code.
1019         * decl2.c (flag_vtable_thunks): Remove.
1020         (mark_vtable_entries): Remove no-vtable-thunk code.
1021         * error.c (dump_decl): Remove no-vtable-thunk code.
1022         (dump_expr): Adjust ptr to member function code.
1023         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
1024         code.
1025         * rtti.c (build_headof): Remove no-vtable-thunk code.
1026         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
1027         * search.c (get_base_distance): Remove expand_upcast_fixups case.
1028         (virtual_context) Remove.
1029         (expand_upcast_fixups): Remove.
1030         (fixup_virtual_upcast_offsets): Remove.
1031         (fixup_all_virtual_upcast_offsets): Remove.
1032         * typeck.c (get_member_function_from_ptrfunc): Remove
1033         no-vtable-thunk code.
1034         * call.c (build_over_call): Adjust call to build_vfn_ref.
1035         * class.c (build_vfn_ref): Lose first parameter. Remove
1036         no-vtable-thunk code.
1037         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
1038         (build_vtable_entry): Remove no-vtable-thunk code.
1039
1040 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
1041
1042         Remove old-abi remnants. Remove comments about old abi
1043         behaviour. Remove refences to 'new-abi' in comments.
1044         * cp-tree.h: Adjust comments.
1045         (vbase_offsets_in_vtable_p): Delete.
1046         (vcall_offsets_in_vtable_p): Delete.
1047         (vptrs_present_everywhere_p): Delete.
1048         (all_overridden_vfuns_in_vtables_p): Delete.
1049         (merge_primary_and_secondary_vtables_p): Delete.
1050         (TYPE_CONTAINS_VPTR_P): Adjust.
1051         (VTT_NAME_PREFIX): Remove.
1052         (CTOR_VTBL_NAME_PREFIX): Remove.
1053         (init_vbase_pointers): Remove.
1054         * class.c: Adjust coments.
1055         (build_vbase_pointer_fields): Delete.
1056         (build_vbase_pointer): Remove old-abi code.
1057         (build_secondary_vtable): Likewise.
1058         (modify_all_vtables): Likewise.
1059         (create_vtable_ptr): Likewise.
1060         (layout_class_type): Likewise.
1061         (finish_struct_1): Likewise.
1062         (finish_vtbls): Likewise.
1063         (dfs_finish_vtbls): Delete.
1064         (build_vbase_offset_vtbl_entries): Remove old-abi code.
1065         * cvt.c: Adjust comments.
1066         * decl.c: Adjust comments.
1067         * decl2.c: Adjust comments.
1068         * init.c: Adjust comments.
1069         (construct_virtual_bases): Remove old-abi code.
1070         * lang-specs.h: Remove -fno-new-abi.
1071         * mangle.c: Adjust comments.
1072         * rtti.c: Adjust comments.
1073         (get_base_offset): Remove old-abi-code.
1074         * search.c: Adjust comments.
1075         (dfs_init_vbase_pointers): Remove.
1076         (dfs_vtable_path_unmark): Remove.
1077         (init_vbase_pointers): Remove.
1078         * semantics.c: Adjust comments.
1079         (emit_associated_thunks): Remove old-abi code.
1080         * typeck.c: Adjust comments.
1081
1082 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
1083
1084         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
1085         params.h.
1086
1087 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
1088
1089         * class.c (finish_struct_anon): Forbid nested classes.
1090
1091 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
1092
1093         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
1094         * optimize.c: Include debug.h.
1095         (maybe_clone_body): Use debug hook.
1096         * semantics.c: Include debug.h.
1097         (expand_body): Use debug hook.
1098
1099 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
1100
1101         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
1102
1103 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
1104
1105         * class.c (type_requires_array_cookie): New function.
1106         (check_methods): Don't try to figure out whether the type needs a
1107         cookie here.
1108         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
1109         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
1110         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
1111         * pt.c (instantiate_class_template): Don't set
1112         TYPE_VEC_DELETE_TAKES_SIZE.
1113         * NEWS: Document ABI changes from GCC 3.0.
1114
1115 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
1116             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
1117
1118         * NEWS (Changes in GCC 3.0): Fix typo.
1119
1120 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
1121
1122         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
1123         which attributes are to be attached, and a flags argument.  Update
1124         call to decl_attributes.
1125         (grokfield): Update call to decl_attributes.
1126         * class.c (finish_struct): Update call to cplus_decl_attributes.
1127         * cp-tree.h (cplus_decl_attributes): Update prototype.
1128         * decl.c (start_decl, grokdeclarator, start_function): Update
1129         calls to decl_attributes and cplus_decl_attributes.
1130         * friend.c (do_friend): Update call to cplus_decl_attributes.
1131         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
1132
1133 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
1134
1135         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
1136         for `register' variables with an asm-specification.
1137
1138 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
1139
1140         * semantics.c (finish_asm_stmt): Mark the output operands
1141         to an asm addressable, if necessary.
1142
1143 2001-07-11  Ben Elliston  <bje@redhat.com>
1144
1145         * Revert this change -- there is a subtle bug.
1146
1147         PR c++/80
1148         * decl.c (finish_enum): New "attributes" argument; pass it to
1149         cplus_decl_attributes.  Use a narrower type if the enum is packed.
1150         * cp-tree.h (finish_enum): Adjust prototype.
1151         * parse.y (enum_head): New non-terminal.
1152         (structsp): Use it. Enums now may be preceded or followed by
1153         optional attributes -- pass their chained tree to finish_enum().
1154         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
1155
1156 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
1157
1158         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
1159         variables.
1160
1161 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
1162
1163         * semantics.c (cp_expand_stmt): Fix for null
1164         current_function_return_value.
1165
1166 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
1167
1168         * call.c (build_op_delete_call): Initialize fn.
1169         (convert_like_real): Delete conditional.
1170         (joust): Initialize *w and *l.
1171         * class.c: Add prototype for binfo_ctor_vtable.
1172         (get_primary_binfo): Initialize result.
1173         * init.c (build_java_class_ref): Initialize name.
1174
1175 2001-07-09  Erik Rozendaal  <dlr@acm.org>
1176
1177         * typeck.c (unary_complex_lvalue): Do not duplicate the
1178         argument to modify, pre-, or post-increment when used as an
1179         lvalue and when the argument has side-effects.
1180
1181 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
1182
1183         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
1184         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
1185         cplus_decl_attributes even if attrs is NULL.
1186         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
1187
1188 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
1189
1190         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
1191         calls to decl_attributes.
1192
1193 2001-07-06  Ira Ruben   <ira@apple.com>
1194
1195         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
1196         be DECL_TEMPLATE_RESULT.
1197
1198 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1199
1200         * cp-tree.h (copy_template_template_parm): Rename to ...
1201         (bind_template_template_parm): ... here.
1202         * tree.c (copy_template_template_parm): Rename to ...
1203         (bind_template_template_parm): ... here.  Remove the case when
1204         NEWARGS is NULL_TREE.
1205         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
1206         BOUND_TEMPLATE_TEMPLATE_PARM.
1207         * pt.c (lookup_template_class): Adjust.
1208
1209 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
1210
1211         * cvt.c (convert_lvalue): New fn.
1212         * cp-tree.h: Declare it.
1213         * method.c (do_build_assign_ref): Use it.
1214         (do_build_copy_constructor): Convert parm to base types
1215         before calling base constructors.
1216
1217         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
1218         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
1219         optimize.
1220         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
1221
1222 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
1223
1224         * optimize.c (optimize_inline_calls): New function, broken out
1225         of ...
1226         (optimize_function): ... here. Call it. Don't inline if it is
1227         a thunk.
1228         (dump_function): Print name of dump flag causing this dump.
1229         * semantics.c (expand_body): Move thunk inline check to
1230         optimize_function.
1231
1232 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
1233
1234         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
1235         (comptypes): Use target.comp_type_attributes.
1236
1237 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
1238
1239         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
1240
1241 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
1242
1243         * error.c (lang_print_error_function): Add a `diagnostic_context *'
1244         parameter. Tweak.
1245
1246 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
1247
1248         * decl2.c (import_export_class): Update.
1249
1250 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
1251
1252         * error.c (init_error): Adjust settings.
1253
1254 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
1255
1256         * error.c (init_error): Adjust settings.
1257
1258 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
1259
1260         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
1261         return pointers to data members by reference rather than by value.
1262
1263 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
1264
1265         Implement the Named Return Value optimization.
1266         * cp-tree.h (struct cp_language_function): Add x_return_value.
1267         (current_function_return_value): Now a macro.
1268         * decl.c: Don't define it.
1269         (define_label, finish_case_label): Don't clear it.
1270         (init_decl_processing): Don't register it with GC.
1271         * semantics.c (genrtl_finish_function): Don't check it for
1272         no_return_label.  Copy the RTL from the return value to
1273         current_function_return_value and walk, calling...
1274         (nullify_returns_r): ...this new fn.
1275         * typeck.c (check_return_expr): Set current_function_return_value.
1276
1277 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
1278
1279         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
1280         sharing a ctor vtable with.  Merge code for cases 1 and 2.
1281         (binfo_ctor_vtable): New fn.
1282         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
1283
1284 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
1285
1286         * class.c (dfs_find_final_overrider): Fix logic.
1287
1288         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
1289         virtual thunk instead of non-virtual.
1290         (get_matching_virtual): Uncomment.
1291
1292         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
1293         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
1294         PARM, not ARG.
1295
1296 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
1297
1298         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
1299         we've not emerged from the hierarchy of RTTI_BINFO on reaching
1300         a non-virtual base.
1301
1302 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
1303
1304         * NEWS: Update release number.
1305
1306 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
1307
1308         PR c++/3130, c++/3131, c++/3132
1309         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
1310         * class.c (force_canonical_binfo_r): Move
1311         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
1312         virtual bases unless they're primary and what they're primary
1313         too has been moved.
1314         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
1315         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
1316         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
1317         derived binfo.
1318         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
1319         (layout_nonempty_base_or_field): Add most derived type
1320         parameter. Adjust.
1321         (layout_empty_base): Likewise.
1322         (build_base_field): Likewise.
1323         (build_base_fields): Likewise.
1324         (propagate_binfo_offsets): Add most derived type
1325         parameter. Skip non canonical virtual bases too.
1326         (dfs_set_offset_for_unshared_vbases): Don't skip primary
1327         bases. Do skip canonical bases.
1328         (layout_virtual_bases): Adjust.
1329         (layout_class_type): Adjust.
1330         (dfs_get_primary_binfo): Build list of virtual primary base
1331         candidates.
1332         (get_primary_binfo): Check that the shared virtual primary
1333         base candidate was found first.
1334         (accumulate_vtbl_inits): Don't do anything for non-vptr
1335         containing binfos. For case 1 primary virtual bases, keep
1336         checking that we've not emerged from the hierarchy of RTTI_BINFO.
1337
1338 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
1339
1340         PR c++/3089
1341         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
1342         hierarchy looking for primary bases for a ctor
1343         vtable. Recursively call oneself, if we meet our primary via
1344         this route and haven't met it yet via inheritance graph order.
1345
1346 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
1347
1348         * lang-options.h: Emit documentation for -fno-honor-std, not
1349         -fhonor-std.
1350
1351 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
1352
1353         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
1354         Don't clobber delta.
1355         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
1356
1357 2001-06-10  Mark Mitchell <mark@codesourcery.com>
1358             Gabriel Dos Reis  <gdr@codesourcery.com>
1359
1360         * Make-lang.in (cp/call.o): Depend on diagnostic.h
1361         (cp/typeck.o): Depend on diagnostic.h
1362         (cp/typeck2.o): Depend on diagnostic.h
1363         (cp/repo.o): Depend on dignostic.h
1364         * typeck.c: #include diagnostic.h
1365         (convert_for_initialization): Remove extern declaration for
1366         warningcount and errorcount.
1367
1368         * call.c: #include diagnostic.h
1369         (convert_like_real): Remove extern declaration for warnincount and
1370         errorcount.
1371
1372         * repo.c: #include diagnostic.h
1373         * typeck2.c: #include diagnostic.h
1374
1375 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
1376
1377         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
1378         in previous change.
1379
1380 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
1381
1382         PR c++/2929
1383         * friend.c (do_friend): Use push_decl_namespace for classes at
1384         namespace scope.
1385
1386 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
1387             Jason Merrill <jason_merrill@redhat.com>
1388
1389         PR c++/3061
1390         * class.c (build_secondary_vtable): Use assert, rather than an error
1391         message.
1392         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
1393         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
1394         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
1395         Don't set BINFO_VTABLE for a primary virtual base.
1396
1397 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
1398
1399         * decl.c (duplicate_decls): Update source position information
1400         when a template function is defined.
1401
1402 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
1403
1404         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
1405
1406 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
1407
1408         PR c++/2914
1409         * decl.c (pushtag): Don't push into a complete type's scope.
1410
1411 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
1412
1413         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
1414         (struct lang_decl_flags): Lose generate_with_vtable_p.
1415         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
1416         * class.c (copy_virtuals): Adjust.
1417         * decl2.c (mark_vtable_entries): Adjust.
1418         * method.c (make_thunk, build_vtable_entry): Adjust.
1419         * class.c (update_vtable_entry_for_fn): Only look as far as the
1420         first defining class.
1421         (build_vtbl_initializer): Put nothing in the slot for a function only
1422         defined in a lost primary virtual base.
1423         (add_vcall_offset_vtbl_entries_1): Use the same code for
1424         the lost primary case and the normal case.
1425         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
1426         (get_vfield_offset, get_derived_offset): Lose.
1427         (dfs_find_final_overrider): Use look_for_overrides_here.
1428         (get_matching_virtual): New fn.
1429         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
1430         not BV_VCALL_INDEX.
1431         * search.c (look_for_overrides_here): Split out from...
1432         (look_for_overrides_r): Here.
1433
1434         * class.c (find_final_overrider): Return error_mark_node on error.
1435
1436         * decl2.c (key_method): #if 0 accidental change.
1437
1438 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
1439
1440         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
1441         (build_over_call): Likewise.
1442         * decl.c (grokparms): Likewise.
1443         * pt.c (tsubst_decl): Likewise.
1444         * typeck.c (convert_arguments): Likewise.
1445
1446 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
1447
1448         * semantics.c (begin_class_definition): Robustify.
1449
1450         * pt.c (instantiate_decl): Tell the repository code about the
1451         clones, not the cloned functions.
1452         * repo.c (repo_template_used): Explicitly instantiate the cloned
1453         function, not the clones.
1454
1455 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
1456
1457         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
1458         ICS_BAD_FLAG on created conversion.
1459         (compare_ics): Break out rank.
1460
1461 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
1462
1463         * decl.c (xref_tag): Remove extraneous %s on dependent name
1464         lookup warning.
1465
1466 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
1467
1468         * class.c (layout_vtable_decl): Fix off by one error on
1469         build_index_type.
1470         (build_vtt): Likewise.
1471         (build_ctor_vtbl_group): Likewise.
1472
1473 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
1474
1475         * class.c (maybe_indent_hierarchy): New function.
1476         (dump_class_hierarchy_r): Add flags. Dump extra binfo
1477         information, if enabled. Use maybe_indent_hierarchy. Adjust
1478         output format.
1479         (dump_class_hierarchy): Adjust prototype. Adjust output format.
1480         (dump_array, dump_vtable, dump_vtt): New functions.
1481         (finish_struct_1): Adjust hierarchy dumping.
1482         (initialize_vtable): Call dump_vtable.
1483         (build_vtt): Call dump_vtt.
1484         (build_ctor_vtbl_group): Call dump_vtable.
1485         * decl2.c (flag_dump_class_layout): Remove.
1486         (cxx_decode_option): Remove dump translation unit
1487         and dump class hierarchy check. Call dump_switch_p.
1488         (finish_file): Adjust dumping.
1489         (dump.c): Only dump base classes if not TDF_SLIM.
1490         Only dump namespace members if not TDF_SLIM.
1491         * optimize.c (dump_function): New function.
1492         (optimize_function): Call dump_function.
1493         * semantics.c (expand_body): Use dump_enabled_p.
1494
1495 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
1496
1497         PR g++/2936
1498         Part missed from first commit
1499         * decl2.c (finish_anon_union): Copy context.
1500
1501 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
1502
1503         PR g++/2936
1504         * optimize.c (remap_decl): Remap anonymous aggregate members too.
1505
1506 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
1507
1508         PR g++/2823
1509         * semantics.c (expand_body): Don't optimize thunks.
1510
1511 2001-05-25  Sam TH  <sam@uchicago.edu>
1512
1513         * cp-tree.h lex.h: Fix header include guards.
1514
1515 2001-05-25  Mark Mitchell <mark@codesourcery.com>
1516
1517         * decl.c (init_decl_processing): Tweak.
1518
1519 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
1520
1521         * decl.c (duplicate_decls): Tidy.
1522         (init_decl_processing): Always set flag_no_builtin.
1523
1524 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
1525
1526         PR c++/2184
1527         * decl2.c (do_local_using_decl): Push the decls, even in a
1528         template.
1529
1530 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
1531
1532         * optimize.c (initialize_inlined_parameters): Don't set
1533         TREE_READONLY for a VAR_DECL taking the place of an inlined
1534         PARM_DECL.
1535
1536 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
1537
1538         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
1539         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
1540         attribute.
1541
1542 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
1543
1544         * parse.y: Refer to compound literals as such, not as
1545         constructor-expressions.
1546
1547 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
1548
1549         * call.c (build_op_delete_call): Ignore exception-specifications
1550         when looking for matching delete operators.
1551         * init.c (build_new_1): Compute whether or not the allocation
1552         function used is a placement allocation function or not, and
1553         communicate this information to build_op_delete_call.
1554
1555 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
1556
1557         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
1558         (build_vtbl_ref): Adjust.
1559         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
1560         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
1561         Re-add vtable-gc.
1562         (unsupported_options): Correspondingly.
1563
1564         * decl2.c (maybe_make_one_only): Check flag_weak, not
1565         supports_one_only().
1566
1567         * cp-tree.def (START_CATCH_STMT): Lose.
1568         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
1569         * tree.c (cp_statement_code_p): Don't case it.
1570         * semantics.c (cp_expand_stmt): Likewise.
1571         * cp-tree.h (START_CATCH_TYPE): Lose.
1572         (HANDLER_TYPE): New.
1573         * except.c (expand_start_catch_block): Don't start any blocks.
1574         Return the type.
1575         (expand_end_catch_block): Don't end any blocks.
1576         * parse.y (handler): Don't pass anything from finish_handler_parms
1577         to finish_handler.
1578         * pt.c (tsubst_expr): Likewise.
1579         * semantics.c (begin_handler): Call note_level_for_catch here.
1580         (finish_handler_parms): Don't return anything.
1581         (genrtl_catch_block, begin_catch_block): Lose.
1582         (genrtl_handler): Call expand_start_catch here.
1583
1584 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
1585
1586         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
1587         (get_vtable_decl, build_vtt): Not here.
1588
1589 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
1590
1591         PR c++/2781
1592         * optimize.c (update_cloned_parm): Copy addressability and other
1593         flags.
1594
1595 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1596
1597         * pt.c (determine_specialization): Ignore artificial functions.
1598
1599 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
1600
1601         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
1602         (C_RID_CODE): Remove.
1603         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
1604         (init_parse): Don't do it here.
1605
1606 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
1607
1608         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
1609         function declaration to avoid stripping the symbol's attributes.
1610
1611 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
1612
1613         * decl.c (pushdecl): Adjust error string.
1614         (xref_tag): Adjust friend class injection warning. Remove the
1615         inherited name from the class shadowed scope.
1616
1617 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
1618
1619         * except.c (cp_protect_cleanup_actions): New function.
1620         (init_exception_processing): Don't set protect_cleanup_actions
1621         here.  Do set lang_protect_cleanup_actions.
1622
1623 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
1624
1625         * spew.c (read_token): Call yyerror on all unexpected tokens.
1626
1627 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
1628
1629         * init.c (member_init_ok_or_else): Take a tree rather than
1630         string for name.
1631         (expand_member_init): Adjust.
1632
1633 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
1634
1635         * decl.c (duplicate_decls): Suppress warning about duplicate
1636         decls if the first decl is a friend.
1637
1638 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
1639
1640         * except.c (choose_personality_routine): Export.  Add
1641         explanatory comment.  Take an enum languages, not a boolean.
1642         (initialize_handler_parm): Adjust to match.
1643         * cp-tree.h: Prototype choose_personality_routine.
1644         * lex.c (handle_pragma_java_exceptions): New function.
1645         (init_cp_pragma): Register #pragma GCC java_exceptions.
1646
1647 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
1648
1649         * method.c (build_mangled_C99_name): Remove unused prototype.
1650
1651 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
1652
1653         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
1654         * typeck.c (get_member_function_from_ptrfunc,
1655         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
1656         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
1657
1658         Reverted Geoff Keating's 2001-05-03's patch.
1659
1660 2001-05-11  Ira Ruben   <ira@apple.com>
1661
1662         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
1663
1664 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
1665
1666         * cp-tree.h (finish_label_expr, lookup_label): Delete.
1667         * parse.y: Update for '&&'; don't issue warning here.
1668         * semantics.c (finish_label_expr): Delete.
1669
1670 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
1671
1672         * splay-tree.h (splay_tree_max): New function.
1673         (splay_tree_min): Likewise.
1674
1675 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
1676
1677         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
1678         (pfn_vflag_identifier): Define.
1679         Update comment about layout of pointer functions.
1680         (build_ptrmemfunc1): Update prototype.
1681         (expand_ptrmemfunc_cst): Update prototype.
1682         * decl.c (initialize_predefined_identifiers): Initialize
1683         pfn_vflag_identifier.
1684         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
1685         an extra field to the type.
1686         * expr.c (cplus_expand_constant): Pass 'flag' between
1687         expand_ptrmemfunc_cst and build_ptrmemfunc1.
1688         * typeck.c (get_member_function_from_ptrfunc): When
1689         FUNCTION_BOUNDARY < 16, look at additional field to determine
1690         if a pointer-to-member is a real pointer or a vtable offset.
1691         (build_ptrmemfunc1): Add new parameter to contain extra field.
1692         (build_ptrmemfunc): Pass the extra field around.
1693         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
1694         (pfn_from_ptrmemfunc): Ignore the extra field.
1695
1696 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
1697
1698         * cp-tree.h (flag_inline_trees): Update documentation.
1699         * decl.c (init_decl_processing): Adjust handling of
1700         flag_inline_functions and flag_inline_trees to support -O3.
1701         (grokfndecl): Set DECL_INLINE on all functions if that's what
1702         the user requested.
1703         (save_function_data): Clear DECL_INLINE in
1704         current_function_cannot_inline is non-NULL.
1705         * decl2.c (flag_inline_trees): Update documentation.
1706
1707 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
1708
1709         * dump.c (cp_dump_tree, USING_STMT case): New case.
1710         * tree.c (cp_statement_code_p): Add USING_STMT.
1711         * decl2.c (do_using_directive): Add the using directive statement.
1712
1713         * tree.c (walk_tree): Reformat an if block.
1714
1715 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
1716
1717         * decl.c (compute_array_index_type): Don't try to do anything with
1718         the indices when processing a template.
1719
1720 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1721
1722         * call.c: NULL_PTR -> NULL.
1723         * class.c: Likewise.
1724         * cvt.c: Likewise.
1725         * decl.c: Likewise.
1726         * decl2.c: Likewise.
1727         * except.c: Likewise.
1728         * init.c: Likewise.
1729         * rtti.c: Likewise.
1730         * search.c: Likewise.
1731         * tree.c: Likewise.
1732         * typeck.c: Likewise.
1733         * typeck2.c: Likewise.
1734
1735 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
1736
1737         * decl2.c (do_using_directive): Revert previous patch.
1738
1739 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
1740
1741         * cp-tree.def (USING_STMT): New statement node.
1742         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
1743         * decl2.c (do_using_directive): Add USING_STMT to statement
1744         tree. Don't emit errors when processing template decl.
1745         * pt.c (tsubst_expr, USING_STMT case): New case.
1746         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
1747
1748 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
1749
1750         * call.c (build_new_op): Convert args from reference here.
1751         (build_conditional_expr): Don't convert here.
1752
1753 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
1754
1755         * spew.c (last_token_id): New static variable.
1756         (read_token): Set it here.
1757         (yyerror): Use it here.
1758
1759 2001-04-30  Richard Henderson  <rth@redhat.com>
1760
1761         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
1762         * decl.c: Likewise.
1763
1764 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
1765
1766         * gxxint.texi: Remove.
1767         * Make-lang.in: Remove all traces of gxxint.texi.
1768
1769 Mon Apr 30 16:14:10 2001  Mark P Mitchell  <mark@codesourcery.com>
1770
1771         * decl2.c (start_static_initialization_or_destruction): Correct
1772         logic to handle the -fno-use-cxa-atexit case.
1773
1774 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
1775
1776         * optimize.c (update_cloned_parm): New function.
1777         (maybe_clone_body): Use it.  Update the `this' parameter too.
1778
1779 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
1780
1781         * decl2.c (unsupported_options): Add new-abi.
1782         * lang-options.h: Remove no longer supported options.
1783
1784 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
1785
1786         * except.c (can_convert_eh): Don't check template parms,
1787         typename types etc.
1788
1789 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
1790
1791         * optimize.c (maybe_clone_body): Copy parameter names and locations.
1792
1793 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
1794
1795         * cp-tree.h (adjust_clone_args): Prototype new function.
1796         * class.c (adjust_clone_args): New function.
1797         * decl.c (start_function): Call it for in charge ctors.
1798
1799 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
1800
1801         * method.c (use_thunk): Make sure that thunks really are emitted
1802         when requested.
1803
1804 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
1805
1806         * mangle.c (write_chars): New macro.
1807         (hwint_to_ascii): New function
1808         (write_number): Use it.
1809         (write_integer_cst): Deal with really big numbers.
1810
1811 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
1812
1813         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
1814         the clone.
1815
1816 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
1817
1818         * decl.c (grokdeclarator): Set context of namespace scope
1819         TYPE_DECLS.
1820
1821 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
1822
1823         * cp/optimize.c: Include hashtab.h.
1824         (struct inline_data): Add tree_pruner.
1825         (expand_call_inline, expand_calls_inline): Use it when calling
1826         walk_tree.
1827         (optimize_function): Initialize and free tree_pruner.
1828
1829 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
1830
1831         Lazy __FUNCTION__ generation.
1832         * cp-tree.def (FUNCTION_NAME): Remove.
1833         * cp-tree.h (function_name_declared_p): Remove.
1834         (cp_fname_init): Prototype.
1835         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
1836         don't call declare_function_name. Call start_fname_decls.
1837         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
1838         clobber the line number.
1839         (cp_fname_init): New function.
1840         (start_function): Call start_fname_decls.
1841         (finish_function): Call finish_fname_decls.
1842         * lex.c (reswords): Add slots for __FUNCTION__ et al.
1843         (rid_to_yy): Add mappings for __FUNCTION__ et al.
1844         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
1845         * parse.y (VAR_FUNC_NAME): New token.
1846         (primary): Add VAR_FUNC_NAME.
1847         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
1848         generation.
1849         (tsubst, FUNCTION_NAME case): Remove.
1850         (tsubst_copy, FUNCTION_NAME case): Remove.
1851         (tsubst_expr, DECL_STMT case): Be careful with a
1852         DECL_PRETTY_FUNCTION_P.
1853         (instantiate_decl): Remove function_name_declared_p.
1854         * semantics.c (begin_compound_statement): Don't call
1855         declare_function_name here.
1856         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
1857         (finish_translation_unit): Call finish_fname_decls.
1858         (expand_body): Remove function_name_declared_p.
1859         * typeck2.c (digest_init): Allow any ERROR_MARK.
1860
1861 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
1862
1863         * pt.c (tsubst_decl): Use VOID_TYPE_P.
1864         * semantics.c: Fix some typos.
1865
1866 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
1867
1868         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
1869
1870 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1871
1872         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
1873
1874 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
1875
1876         * except.c (build_throw): Wrap the initialization of the exception
1877         object in a MUST_NOT_THROW_EXPR.
1878         (do_free_exception): #if 0.
1879
1880 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
1881
1882         * cp-tree.h (finish_enum): Change prototype.
1883         * decl.c (finish_enum): Reorganize.
1884         * parse.y (structsp): Adjust calls to finish_enum.
1885
1886 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
1887
1888         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
1889         't' case.
1890
1891 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
1892
1893         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
1894         (layout_empty_base): Return at end flag.
1895         (build_base_field): Likewise.
1896         (build_base_fields): Likewise.
1897         (layout_virtual_bases): Don't add 1 to eoc value.
1898         (end_of_class): Use full size for empty bases.
1899         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
1900         empty bases. Don't add 1 to eoc value. Only add trailing padding
1901         if we're an empty class with no empty bases.
1902         (dump_class_hierarchy): Dump size and alignment.
1903
1904 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
1905
1906         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
1907         ICS_BAD_FLAG.
1908
1909 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
1910
1911         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
1912         is found, look first if name does not match the structure name.
1913
1914 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
1915
1916         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
1917         set.
1918         (SET_DECL_LANGUAGE): New macro.
1919         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
1920         (pushdecl): Likewise.
1921         (build_library_fn_1): Likewise.
1922         (build_cp_library_fn): Likewise.
1923         (grokfndecl): Likewise.
1924         (grokvardecl): Mark `extern "C"' variables as having C linkage.
1925         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
1926         * lex.c (retrofit_lang_decl): Likewise.
1927         * mangle.c (mangle_decl_string): Don't mangle the names of
1928         variables declared with C language linkage.
1929         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
1930
1931 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
1932
1933         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
1934         flag_access_control from uninitialized storage.
1935
1936 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
1937
1938         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
1939         * mangle.c (write_pointer_to_member_type): Fix mangling of
1940         pointers to cv-qualified member function types.
1941
1942         * init.c (build_delete): Create a SAVE_EXPR for the address if
1943         we're going to use it more than once.
1944
1945 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
1946
1947         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
1948         (expand_ptremfunc_cst): Change prototype.
1949         (delta2_from_ptrmemfunc): Remove.
1950         * expr.c (cplus_expand_constant): Adjust call to
1951         expand_ptrmemfunc_cst.
1952         * typeck.c (build_ptrmemfunc1): Simplify.
1953         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
1954         results in a constant.
1955         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
1956         (delta2_from_ptrmemfunc): Remove.
1957         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
1958
1959 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
1960
1961         * cp-tree.h (decl_namespace_list): New macro.
1962         (struct saved_scope): Add decl_ns_list.
1963         * decl.c (mark_saved_scope): Mark it.
1964         * decl2.c: Lose static decl_namespace_list.
1965         (init_decl2): Don't save it.
1966
1967 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1968
1969         * cp-tree.h (warn_return_type, yylex): Delete redundant
1970         declarations.
1971
1972         * decl.c (current_class_depth, global_namespace): Likewise.
1973
1974         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
1975
1976         * repo.c (flag_use_repository): Likewise.
1977
1978 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1979
1980         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
1981         set_block, pushdecl, getdecls, gettags, init_decl_processing,
1982         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
1983         lvalue_or_else, print_lang_statistics, comp_target_types,
1984         unsigned_type, signed_type, signed_or_unsigned_type,
1985         build_function_call, mark_addressable, incomplete_type_error):
1986         Delete redundant declarations.
1987
1988 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
1989
1990         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
1991         (TYPE_ANONYMOUS_P): New macro.
1992         (TAGGED_TYPE_P): New macro.
1993         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
1994         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
1995         * tree.c (no_linkage_helper): Likewise.
1996         * semantics.c (begin_class_definition): Likewise.
1997         * pt.c (convert_template_argument): Likewise.
1998         * lex.c (check_for_missing_semicolon): Likewise.
1999
2000 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
2001
2002         * class.c (dfs_unshared_virtual_bases): New function.
2003         (mark_primary_bases): Call it.
2004         (check_bases): Ignore virtual bases when determining
2005         nearly-emptiness.
2006
2007 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
2008
2009         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
2010
2011 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
2012
2013         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
2014         cloned function to the clone.
2015
2016 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2017
2018         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
2019
2020         * semantics.c: Include expr.h.
2021
2022 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
2023
2024         * method.c (implicitly_declare_fn): Commonize code for copy ctor
2025         and assignment op. Set TREE_USED for parameter.
2026
2027 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
2028
2029         * class.c (find_final_overrider_data): Add `candidates'.
2030         (dfs_find_final_overrider): Don't issue error messages
2031         prematurely.
2032         (find_final_overrider): Issue error messages here.
2033         (build_base_field): Don't warn about amgibuous direct bases here.
2034         (warn_about_ambiguous_direct_bases): New function.
2035         (layout_class_type): Use it.
2036
2037 2001-04-10  Richard Henderson  <rth@redhat.com>
2038
2039         * typeck.c (build_array_ref): Push the array reference inside
2040         COMPOUND_EXPR and COND_EXPR.
2041
2042 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
2043
2044         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
2045         * decl.c (duplicate_decls): Adjust accordingly.
2046         (maybe_commonize_var): Likewise.
2047         (grokfndecl): Likewise.
2048         (start_function): Likewise.
2049         (start_method): Likewise.
2050         * decl2.c (key_method): Likewise.
2051         (import_export_decl): Likewise.
2052         * method.c (implicitly_declare_fn): Likewise.
2053         * optimize.c (maybe_clone_body): Likewise.
2054
2055 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
2056
2057         * lang-specs.h: Add __DEPRECATED.
2058
2059 Thu Apr  5 16:54:29 2001  J"orn Rennecke <amylaar@redhat.com>
2060
2061         * search.c (get_dynamic_cast_base_type): When building a new
2062         constant, set its type to ssizetype.
2063
2064 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
2065
2066         * optimize.c (expand_call_inline): Only add newly inlined statements
2067         into inlined_stmts.
2068
2069 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
2070
2071         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
2072         (OPERATOR_FORMAT): Likewise.
2073         (OPERATOR_TYPENAME_FORMAT): Likewise.
2074         * operators.def: Remove old name-mangling information.
2075         * decl.c (grok_op_properties): Adjust accordingly.
2076         * lex.c (init_operators): Likewise.
2077         * rtti.c (get_tinfo_decl): Issue error messages about types that
2078         have variable size.
2079
2080 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
2081
2082         * decl2.c (import_export_decl): Don't call import_export_class
2083         when processing an inline member function.
2084         * semantics.c (expand_body): Call import_export_decl before
2085         emitting inline functions.
2086
2087 2001-03-28  Richard Henderson  <rth@redhat.com>
2088
2089         IA-64 ABI Exception Handling:
2090         * cp-tree.def (EH_SPEC_BLOCK): New.
2091         (MUST_NOT_THROW_EXPR): New.
2092         * cp-tree.h: Update changed function declarations.
2093         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
2094         (CPTI_CALL_UNEXPECTED): New.
2095         (struct cp_language_function): Rename x_eh_spec_try_block
2096         to x_eh_spec_block.
2097         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
2098         * decl.c (current_binding_level): If no current function
2099         bindings, revert to scope_chain.
2100         (initialize_predefined_identifiers): Remove __cp_push_exception.
2101         (store_parm_decls): Use begin_eh_spec_block.
2102         (finish_function): Use finish_eh_spec_block.
2103         (mark_lang_function): Update for name changes.
2104         * decl2.c (finish_file): No mark_all_runtime_matches.
2105         * dump.c (cp_dump_tree): Handle new tree codes.
2106         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
2107         * except.c (catch_language_init, catch_language): Remove.
2108         (init_exception_processing): Don't set language code.
2109         Initialize call_unexpected_node, protect_cleanup_actions,
2110         eh_personality_libfunc, lang_eh_runtime_type.
2111         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
2112         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
2113         (prepare_eh_type): Split out type canonicalizations ...
2114         (build_eh_type_type): ... from here.
2115         (build_eh_type_type_ref): Remove.
2116         (mark_all_runtime_matches): Remove.
2117         (build_exc_ptr): New.
2118         (do_begin_catch, do_end_catch): New.
2119         (do_pop_exception): Remove.
2120         (build_terminate_handler): Remove.
2121         (choose_personality_routine): Split out language choice from ...
2122         (initialize_handler_parm): ... here.
2123         Use MUST_NOT_THROW_EXPR.
2124         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
2125         exception object handling.
2126         (expand_start_eh_spec, expand_end_eh_spec): Remove.
2127         (expand_exception_blocks, alloc_eh_object): Remove.
2128         (begin_eh_spec_block, finish_eh_spec_block): New.
2129         (do_allocate_exception, do_free_exception): New.
2130         (expand_throw): Merge into ...
2131         (build_throw): ... here.  Update for abi.
2132         * expr.c (cplus_expand_expr): No expand_internal_throw.
2133         Handle MUST_NOT_THROW_EXPR.
2134         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
2135         * semantics.c (*) Update for except.h name changes.
2136         (genrtl_try_block): No protect_with_terminate.
2137         (genrtl_eh_spec_block): New.
2138         (genrtl_handler): Don't emit the goto here.
2139         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
2140         (genrtl_finish_function): Don't expand_exception_blocks.
2141         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
2142
2143 2001-03-28  Richard Henderson  <rth@redhat.com>
2144
2145         * decl.c (struct named_label_list): Rename eh_region to
2146         in_try_scope, add in_catch_scope.
2147         (struct binding_level): Rename eh_region to is_try_scope,
2148         add is_catch_scope.
2149         (note_level_for_try): Rename from note_level_for_eh.
2150         (note_level_for_catch): New.
2151         (poplevel): Copy both is_try_scope and is_catch_scope to
2152         the named_label_list struct.
2153         (check_previous_goto_1): Don't check for catch block via
2154         DECL_ARTIFICIAL; use in_try_scope instead.
2155         (check_goto): Likewise.
2156         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
2157         * except.c (expand_start_catch_block): Call note_level_for_catch.
2158         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
2159
2160 2001-03-27  Richard Henderson  <rth@redhat.com>
2161
2162         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
2163         exceptions_via_longjmp.
2164
2165 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
2166
2167         * pt.c (check_default_tmpl_args):  Make error messages clearer.
2168
2169 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
2170
2171         * error.c:  Also undefine 'A' macro used for cp_printers definition.
2172
2173 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2174
2175         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
2176
2177 2001-03-26  Mike Yang <yang@research.att.com>
2178             Mark Mitchell  <mark@codesourcery.com>
2179
2180         * dump.c (dump_access): New function.
2181         (cp_dump_tree): Use it.  Dump basetype information for class
2182         types.
2183
2184 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
2185
2186         * Makefile.in (optimize.o): Depend on params.h.
2187         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
2188         (init_decl_processing): Set flag_no_inline when doing
2189         inlining-on-trees.
2190         * optimize.c: Include params.h.
2191         (struct inline_data): Improve documentation of FNS.  Add
2192         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
2193         (INSNS_PER_STMT): New macro.
2194         (remap_block): Use CLONING_P.
2195         (inlinable_function_p): Don't inline big functions.
2196         (expand_call_inline): Keep track of how much inlining we've done.
2197         (optimize_function): Set FIRST_INLINED_FN.
2198         (maybe_clone_body): Set CLONING_P.
2199         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
2200         tree nodes.
2201         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
2202         rest_of_compilation.  Clear DECL_RTL for local variables
2203         afterwards.
2204         (clear_decl_rtl): New function.
2205
2206 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
2207
2208         Implement DR 209
2209         * cp-tree.h (skip_type_access_control,
2210         reset_type_access_control): Prototype.
2211         * decl.c (grokdeclarator): Access of friends is not checked.
2212         * parse.y (component_decl_list): Reset type access control.
2213         * semantics.c (decl_type_access_control): Clear
2214         current_type_lookups.
2215         (save_type_access_control): Don't save if not deferring.
2216         (skip_type_access_control, reset_type_access_control): New
2217         functions.
2218         (begin_class_definition): Do type access control for basetypes.
2219         Start deferred access control.
2220         (finish_class_definition): Resume immediate access control if
2221         this is a local class.
2222
2223 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2224
2225         * class.c (add_method): Use memcpy/memmove, not bcopy.
2226
2227         * decl.c (duplicate_decls): Likewise.
2228
2229 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
2230
2231         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
2232         not `_'.
2233
2234 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
2235
2236         * decl.c (local_names): Define.
2237         (push_local_name): New.
2238         (grok_reference_init): Return init if initializing static reference
2239         variable with non-constant instead of emitting it.
2240         Move expand_static_init call to cp_finish_decl.
2241         (layout_var_decl): Call push_local_name.
2242         (maybe_commonize_var): Allow inlining functions even if they have
2243         static local variables, use comdat_linkage for them if flag_weak.
2244         (check_initializer): Call obscure_complex_init if
2245         grok_reference_init returned non-zero.
2246         (save_function_data): Clear x_local_names.
2247         (pop_cp_function_context): Free x_local_names.
2248         (mark_inlined_fns): Remove.
2249         (mark_lang_function): Mark x_local_names.
2250         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
2251         Mark inlined_fns as tree, remove call to mark_inlined_fns.
2252         * class.c (alter_access): Ensure DECL_ACCESS is never set if
2253         DECL_DISCRIMINATOR_P.
2254         * cp-tree.h (cp_language_function): Add x_local_names.
2255         (lang_decl_flags): Add discriminator into u2.
2256         (lang_decl_inlined_fns): Remove.
2257         (lang_decl): inlined_fns is now a TREE_VEC.
2258         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
2259         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
2260         TREE_VEC, not a custom structure.
2261         (optimize_function): Likewise.
2262         * mangle.c (discriminator_for_local_entity): Discriminate among
2263         VAR_DECL local entities.
2264         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
2265         is not valid.
2266
2267 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
2268
2269         Add support for Java interface method calls.
2270         * cp-tree.h (struct lang_type): Add java_interface flag.
2271         (TYPE_JAVA_INTERFACE): New macro.
2272         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
2273         by setting TYPE_JAVA_INTERFACE.
2274         * call.c (java_iface_lookup_fn): New static.
2275         (build_over_call): If calling a method declared in a
2276         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
2277         expression which resolves the function address.
2278         (build_java_interface_fn_ref): New function.
2279
2280 2001-03-22  Richard Henderson  <rth@redhat.com>
2281
2282         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
2283         * except.c: Don't include it.
2284
2285 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
2286             based on an idea from Joe Buck <jbuck@synopsys.com>
2287
2288         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
2289         New nonterminals.
2290         (data_def, component_decl): Add reductions to bad_decl.
2291
2292 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
2293
2294         * method.c (do_build_assign_ref): Don't use build_modify_expr for
2295         anonymous aggregates, since they don't have assignment operator
2296         method.
2297         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
2298         assignment operators for anonymous structure fields.
2299
2300 2001-03-21  Jason Merrill  <jason@redhat.com>
2301
2302         * pt.c (instantiate_decl): Abort if we see a member constant
2303         instantiation that doesn't already have its initializer.
2304         Downgrade explicit instantiation without definition to pedwarn.
2305
2306         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
2307         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
2308         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
2309
2310         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
2311         (pending_vtables): Remove.
2312         * decl2.c (pending_vtables): Remove.
2313         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
2314         CLASSTYPE_VTABLE_NEEDS_WRITING.
2315         (import_export_class): Likewise.
2316         (init_decl2): Don't mark pending_vtables.
2317         * lex.c (handle_pragma_vtable): Just sorry.
2318         * pt.c (instantiate_class_template): Don't mess with
2319         CLASSTYPE_VTABLE_NEEDS_WRITING.
2320         (mark_class_instantiated): Likewise.
2321         * ptree.c (print_lang_type): Don't print it.
2322         * semantics.c (begin_class_definition): Don't set it.
2323
2324         * pt.c (template_tail): Replace with last_pending_template.
2325         (maybe_templates, maybe_template_tail): Remove.
2326         (add_pending_template): Adjust.
2327         (instantiate_pending_templates): Adjust.
2328
2329         * cp-tree.h (struct saved_scope): Remove lang_stack field.
2330         (current_lang_stack): Remove.
2331         * decl.c (maybe_push_to_top_level): Don't initialize it.
2332         (duplicate_decls): Use current_lang_depth.
2333         (xref_basetypes): Likewise.
2334         * class.c (current_lang_depth): New fn.
2335         (push_lang_context): Use more varray functionality.
2336         (pop_lang_context): Likewise.
2337
2338         * error.c (GLOBAL_THING): Always use '__'.
2339
2340 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
2341
2342         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
2343
2344         * mangle.c (mangle_decl_string): Mangle the names of overloaded
2345         operators, even when they have `extern "C"' linkage.
2346
2347 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
2348
2349         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
2350         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
2351         where it's not necessary.
2352         (add_method): Remove optimization involving comparison of
2353         DECL_ASSEMBLER_NAME.
2354         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
2355         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
2356         where it's not necessary.
2357         (check_methods): Likewise.
2358         (build_clone): Likewise.
2359         (built_vtt): Likewise.
2360         * cp-tree.h (DECL_NEEDED_P): Likewise.
2361         * decl.c (pushtag): Likewise.
2362         (duplicate_decls): Likewise.
2363         (pushdecl): Likewise.
2364         (builtin_function): Likewise.
2365         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
2366         (build_cp_library_fn): Likewise.
2367         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
2368         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
2369         where it's not necessary.
2370         (make_rtl_for_nonlocal_decl): Likewise.
2371         (cp_finish_decl): Likewise.
2372         (grokfndecl): Likewise.
2373         (grokvardecl): Likewise.
2374         (grokdeclarator): Likewise.
2375         (start_function): Likewise.
2376         (cp_missing_return_ok_p): Likewise.
2377         * decl2.c (grokclassfn): Likewise.
2378         (check_classfn): Likewise.
2379         (finish_static_data_member_decl): Likewise.
2380         (grokfield): Likewise.
2381         * error.c (GLOBAL_IORD_P): Remove.
2382         (dump_global_iord): Improve output.
2383         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
2384         * except.c (nothrow_libfn_p): Summarily reject any function not in
2385         namespace-scope.
2386         * init.c (build_java_class_ref): Don't explicitly set
2387         DECL_ASSEMBLER_NAME after calling mangle_decl.
2388         * mangle.c (mangle_decl_string): Handle extern "C" functions.
2389         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
2390         * method.c (set_mangled_name_for_decl): Don't explicitly set
2391         DECL_ASSEMBLER_NAME after calling mangle_decl.
2392         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
2393         IDENTIFIER_GLOBAL_VALUE for the thunk.
2394         * pt.c (set_mangled_name_for_template_decl): Remove.
2395         (check_explicit_specialization): Don't use it.
2396         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
2397         (tsubst_friend_function): Likewise.
2398         (tsubst_decl): Likewise.
2399         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
2400         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
2401         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
2402         where it's not necessary.
2403         (tinfo_base_init): Likewise.
2404         (create_real_tinfo_var): Likewise.
2405         * search.c (looup_field_1): Likewise.
2406         * semantics.c (finish_named_return_value): Likewise.
2407         * tree.c (init_tree): Set lang_set_decl_assembler_name.
2408
2409 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
2410
2411         Correct semantics restrictions checking in throw-expression.
2412         * except.c (is_admissible_throw_operand): New function.
2413         (build_throw): Use it.
2414
2415 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
2416
2417         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
2418         and its ilk.
2419
2420 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
2421
2422         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
2423         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
2424         * decl.c (duplicate_decls): Likewise.
2425         (builtin_function): Likewise.
2426         (build_library_fn): Likewise.
2427         (build_cp_library_fn): Likewise.
2428         (check_initializer): Likewise.
2429         (cp_finish_decl): Likewise.
2430         * decl2.c (grokfield): Likewise.
2431         (grok_function_init): Remove #if 0'd code.
2432         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
2433         * friend.c (do_friend): Likewise.
2434         * init.c (get_temp_regvar): Likewise.
2435         * method.c (make_thunk): Likewise.
2436         * pt.c (tsubst_friend_function): Likewise.
2437         (tsubst_decl): Likewise.
2438         (regenerate_decl_from_template): Likewise.
2439         * semantics.c (genrtl_named_return_value): Likewise.
2440         (expand_body): Likewise.
2441         (genrtl_finish_function): Likewise.
2442         * tree.c (cp_tree_equal): Likewise.
2443
2444 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
2445
2446         * call.c (convert_like_real): Add extra semantics to INNER
2447         parameter. Don't convert to temporary if a user conversion
2448         gives us an lvalue that we're about to bind to a reference.
2449         Set INNER to indicate pending reference binding on recursive
2450         calls.
2451
2452 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
2453
2454         * cp/lex.c: Delete duplicate pending_lang_change.
2455
2456 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
2457
2458         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
2459         Similarly.
2460         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
2461         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
2462
2463 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
2464
2465         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
2466
2467 2001-03-08  Stan Shebs  <shebs@apple.com>
2468
2469         * cp-tree.h (set_identifier_local_value): Remove unused decl.
2470
2471 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
2472
2473         * spew.c: Remove references to CPP_OSTRING.
2474
2475 2001-03-06  Andrew Haley  <aph@redhat.com>
2476
2477         * typeck.c (convert_arguments): Check that we have an fndecl.
2478
2479 2001-03-05  Andrew Haley  <aph@redhat.com>
2480
2481         * typeck.c (convert_arguments): Don't do ellipsis conversion for
2482         __built_in_constant_p.
2483
2484 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
2485
2486         * typeck.c (build_static_cast): Allow enum to enum conversions
2487         as per DR 128.
2488
2489 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
2490
2491         * class.c (check_field_decls): Pointers to member do not a
2492         non-pod struct make, as per DR 148.
2493
2494 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
2495
2496         * call.c (joust): cp_pedwarn when using gnu extension concerning
2497         worst conversion sequences.
2498
2499 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
2500
2501         * decl.c: Replace all uses of 'boolean' with 'bool'.
2502
2503 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
2504
2505         * lang-specs.h: Add zero initializer for cpp_spec field to
2506         all array elements that need one.  Don't put an #ifdef inside
2507         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
2508         use it.
2509
2510 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
2511
2512         Implement using decls inside template functions.
2513         * decl2.c (validate_nonmember_using_decl): Don't special case
2514         fake_std_node in the global namespace. Don't reject early when
2515         processing a template.
2516         (do_local_using_decl): Add to statement tree. Don't do further
2517         processing when building a template.
2518         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
2519
2520 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
2521
2522         * decl2.c (do_nonmember_using_decl): Don't complain if we find
2523         same function. Do complain about ambiguating extern "C"
2524         declarations.
2525
2526 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
2527
2528         Remove floating point and complex type template constant parms.
2529         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
2530         COMPLEX_TYPE extensions.
2531         (invalid_nontype_parm_type_p): Likewise.
2532
2533 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
2534
2535         * except.c (call_eh_info): Revert "match_function"'s type.
2536
2537 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
2538
2539         Fix ctor vtable vcall offsets.
2540         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
2541         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
2542         (get_matching_base): Remove.
2543         (get_original_base): New function.
2544         (build_vtbl_initializer): Initialize vid.rtti_binfo.
2545         Use a virtual thunk for a ctor vtable with an index
2546         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
2547         primary base within a constructor vtable. Only set
2548         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
2549         when primary base has been lost.
2550         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
2551
2552 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
2553
2554         * call.c (joust): Ensure more_specialized()'s argument length
2555         parameter has correct value for constructors.
2556
2557 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
2558
2559         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
2560
2561         * decl.c (mark_inlined_fns): Prototype.
2562
2563 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
2564
2565         * spew.c (yylex): Correct handling of friends.
2566
2567 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
2568
2569         * mangle.c (write_encoding): Pass write_function_type the
2570         FUNCTION_DECL for the function being encoded.
2571         (write_function_type): Pass it along to write_bare_function_type.
2572         (write_bare_function_type): Pass it along to write_method_parms.
2573         (write_method_parms): Don't mangle the compiler-generated
2574         parameters to a constructor or destructor.
2575
2576 2001-02-22  Andreas Jaeger  <aj@suse.de>
2577
2578         * optimize.c: Include toplev.h for
2579         note_deferral_of_defined_inline_function prototype.
2580
2581 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
2582
2583         * cp-tree.h (struct lang_decl_inlined_fns): New.
2584         (struct lang_decls): Add inlined_fns.
2585         (DECL_INLINED_FNS): New macro.
2586         * optimize.c (struct inline_data): Add inlined_fns.
2587         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
2588         (inlinable_function_p): Likewise, fix typo in comment,
2589         function is not inlinable if it already inlined function currently
2590         being optimized.
2591         (expand_call_inline): Add fn to inlined_fns if necessary.
2592         (optimize_function): Initialize inlined_fns.
2593         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
2594         * decl.c (mark_inlined_fns): New function.
2595         (lang_mark_tree): Call it.
2596
2597 2001-02-21  Jason Merrill  <jason@redhat.com>
2598
2599         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
2600         (DECL_UNINLINABLE): Move to middle-end.
2601
2602         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
2603         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
2604         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
2605         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
2606         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
2607
2608         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
2609         second parm of op=.
2610
2611 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
2612
2613         * decl2.c (set_decl_namespace): Allow explicit instantiations in
2614         any namespace.
2615
2616 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2617
2618         * optimize.c (expand_call_inline): Don't walk subtrees of type
2619         nodes.
2620
2621 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
2622
2623         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
2624         for a destructor.
2625
2626 2001-02-18  Jason Merrill  <jason@redhat.com>
2627
2628         Do put the VTT parameter in DECL_ARGUMENTS.
2629         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
2630         (current_vtt_parm): New macro.
2631         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
2632         (DECL_HAS_VTT_PARM_P): New macro.
2633         (DECL_VTT_PARM): Remove.
2634         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
2635         * decl.c (duplicate_decls): Only copy the operator code if
2636         appropriate.
2637         (start_function): Set current_vtt_parm.
2638         (lang_mark_tree): Don't mark vtt_parm.
2639         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
2640         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
2641         * class.c (build_clone): Maybe remove the VTT parm.
2642         * optimize.c (maybe_clone_body): Set up the VTT parm.
2643         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
2644         * call.c (build_over_call): Just allow the VTT arg.
2645         * method.c (make_thunk): Don't set DECL_VTT_PARM.
2646         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
2647         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
2648         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
2649         * error.c (dump_function_decl): Likewise.
2650         * call.c (build_user_type_conversion_1, convert_like_real): Abort
2651         if we try to call a constructor with in-charge or VTT parms.
2652         * method.c (skip_artificial_parms_for): New fn.
2653         * call.c (add_function_candidate, build_over_call): Call it.
2654         * call.c (build_new_method_call): Use current_vtt_parm.
2655         * init.c (expand_virtual_init): Likewise.
2656         * class.c (same_signature_p): No longer static.
2657         * cp-tree.h: Declare it.
2658         * search.c (look_for_overrides_r): Use it.
2659
2660 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
2661
2662         * cp-tree.h (new_abi_rtti_p): Remove.
2663         (name_mangling_version): Likewise.
2664         (flag_do_squangling): Likewise.
2665         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
2666         * decl.c (grokfndecl): Likewise.
2667         * decl2.c (name_mangling_version): Remove.
2668         (flag_do_squangling): Likewise.
2669         (lang_f_options): Remove `squangle'.
2670         (unsupported_options): Add `squangle'.
2671         (cxx_decode_option): Issue a warning about uses of
2672         -fname-mangling-version.
2673         (finish_file): Remove old ABI support.
2674         * pt.c (check_explicit_specialization): Likewise.
2675         (tsubst_decl): Likewise.
2676         * rtti.c (init_rtti_processing): Likewise.
2677         (build_headof): Likewise.
2678         (get_tinfo_decl_dynamic): Likewise.
2679         (tinfo_from_decl): Likewise.
2680         (build_dynamic_cast_1): Likewise.
2681         (synthesize_tinfo_var): Likewise.
2682         * init.c (build_new): Allow enumeration types for the array-bounds
2683         in a direct-new-declarator.
2684
2685         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
2686
2687         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
2688         TREE_PROTECTED from the template being specialized.
2689
2690 2001-02-17  Jason Merrill  <jason@redhat.com>
2691
2692         * decl2.c (build_artificial_parm): Set TREE_READONLY.
2693
2694         * decl.c (bad_specifiers): Allow throw specs on things with
2695         pointer-to-function or -member-function type.
2696         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
2697         a pmf.
2698
2699 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
2700
2701         * call.c (check_dtor_name): Handle template names correctly.
2702
2703 2001-02-16  Jason Merrill  <jason@redhat.com>
2704
2705         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
2706         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
2707         * optimize.c (maybe_clone_body): Don't substitute it.
2708         * call.c (build_new_method_call): Check in_chrg instead.
2709         * init.c (expand_virtual_init): Likewise.
2710
2711 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
2712
2713         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
2714         class-type introduces at least a type-name.
2715
2716 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
2717
2718         * call.c (convert_like_real): Create a temporary for non-lvalue.
2719
2720 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
2721
2722         * cp-tree.h: Fix typos in comments.
2723
2724 2001-02-16  Jason Merrill  <jason@redhat.com>
2725
2726         * optimize.c (remap_block): If we're compiling a clone, pass the
2727         new block to insert_block.
2728
2729 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
2730
2731         * semantics.c (finish_asm_stmt): Robustify.
2732
2733 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
2734
2735         * pt.c (push_template_decl_real): Don't remangle the name of a
2736         class template.
2737
2738 2001-02-15  Jim Meyering  <meyering@lucent.com>
2739
2740         * Make-lang.in (c++.install-common): Depend on installdirs.
2741         (c++.install-info): Likewise.
2742         (c++.install-man): Likewise.
2743
2744 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
2745
2746         * typeck2.c (build_m_component_ref): Robustify.
2747
2748 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
2749
2750         * friend.c (do_friend): Don't take the nested [template] class
2751         into account when deciding whether to warn about the friend
2752         function not referring to a template function.
2753
2754 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
2755
2756         * typeck.c (build_unary_op): Clarify error message.
2757
2758 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
2759
2760         * parse.y (component_constructor_declarator): allow optional
2761         parentheses around constructor class name.
2762
2763 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
2764
2765         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
2766         section.
2767         * init.c (emit_base_init): Remove incorrect comment about
2768         virtual bases.
2769         * method.c (make_thunk): Fix comment alignment.
2770
2771 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
2772
2773         Kill remnants of this is variable.
2774         * cp-tree.h (flag_this_is_variable): Remove.
2775         * decl2.c (flag_this_is_variable): Remove.
2776         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
2777         (build_vbase_path): The path is non-static, even in a cdtor.
2778         (resolves_to_fixed_type_p): Add additional return value.
2779         * search.c (init_vbase_pointers): Adjust.
2780         * tree.c (lvalue_p_1): Adjust.
2781         * typeck.c (mark_addressable): Adjust.
2782
2783 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
2784
2785         * pt.c (unify): Don't check cv quals of array types.
2786
2787 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
2788
2789         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
2790         check whether we already have the type.
2791
2792 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
2793
2794         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
2795         * call.c (build_op_delete_call): Simplify to remove duplicate
2796         code.
2797         * class.c (clone_function_decl): Don't build the deleting variant
2798         of a non-virtual destructor.
2799         * decl.c (finish_destructor_body): Don't call delete if this is a
2800         non-virtual destructor.
2801         * init.c (build_delete): Explicitly call `operator delete' when
2802         deleting an object with a non-virtual destructor.
2803
2804 2001-02-13  Jason Merrill  <jason@redhat.com>
2805
2806         * lang-specs.h: Add more __EXCEPTIONS.
2807
2808 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
2809
2810         * typeck2.c (process_init_constructor): Check
2811         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
2812
2813 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
2814
2815         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
2816         Remove spurious information in comment. Allow further
2817         adjustments of REFERENCE_TYPE args.
2818
2819 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
2820
2821         * errfn.c (cp_deprecated): Tweak diagnostic text.
2822         * parse.y (new_initializer): Deprecate initializer lists
2823         extension.
2824
2825 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
2826
2827         Remove old ABI support.
2828
2829 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
2830
2831         * decl2.c (flag_vtable_thunks): Always set it to 1.
2832         (flag_new_abi): Likewise.
2833         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
2834
2835         * Makefile.in (g++spec.o): Fix typo.
2836
2837 2001-02-09  Jason Merrill  <jason@redhat.com>
2838
2839         * lang-specs.h: Restore definition of __EXCEPTIONS.
2840
2841 2001-02-08  Jason Merrill  <jason@redhat.com>
2842
2843         * search.c (shared_member_p): New function.
2844         (lookup_field_r): Use it.
2845         * cp-tree.h (SHARED_MEMBER_P): Remove.
2846
2847         * method.c (process_overload_item): Handle template-dependent array
2848         bounds.
2849         * pt.c (type_unification_real): If we end up with undeduced nontype
2850         parms, try again.
2851
2852         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
2853         types.
2854
2855         * typeck2.c (friendly_abort): Don't say anything if we have
2856         earlier errors or sorries.
2857
2858         * decl.c (check_tag_decl): Notice attempts to redefine bool and
2859         wchar_t.  Ignore if in_system_header.
2860
2861         * decl.c (maybe_push_cleanup_level): New fn...
2862         (start_decl_1): ...split out from here.
2863         * cvt.c (build_up_reference): Use it.
2864         * cp-tree.h: Declare it.
2865
2866 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
2867
2868         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
2869         spec.
2870
2871 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
2872
2873         * pt.c (lookup_template_class): Make sure it's a primary
2874         template or template_template_parm when called from the parser.
2875         (instantiate_template_class): Add assertion.
2876
2877 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
2878
2879         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
2880         from error_mark_node.
2881
2882 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
2883
2884         Fix specification and implementation bugs in V3 ABI
2885         construction vtables.
2886         * cp-tree.h (flag_dump_class_layout): New flag.
2887         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
2888         (BINFO_LOST_PRIMARY_P): New flag.
2889         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
2890         (BINFO_PRIMARY_MARKED_P): Rename to ...
2891         (BINFO_PRIMARY_P): ... here.
2892         (binfo_via_virtual): New prototype.
2893         * decl2.c (flag_dump_class_layout): New flag.
2894         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
2895         use `=' as a file name separator.
2896         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
2897         bases.
2898         (build_vtbl_address): If this is a virtual primary base, then
2899         get the vtbl of what it is ultimately primary for.
2900         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
2901         for BINFO_PRIMARY_P.
2902         (dfs_skip_nonprimary_vbases_markedp): Likewise.
2903         (get_shared_vbase_if_not_primary): Likewise.
2904         (dfs_get_pure_virtuals): Likewise.
2905         (expand_upcast_fixups): Likewise.
2906         (fixup_virtual_upcast_offsets): Likewise.
2907         (dfs_find_vbase_instance): Likewise.
2908         (find_vbase_instance): Likewise.
2909         (binfo_from_vbase): Adjust comment to reflect reality.
2910         (binfo_via_virtual): New function.
2911         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
2912         for binfo walking during VTT construction.
2913         (dfs_mark_primary_bases): Remove.
2914         (force_canonical_binfo_r): New function.
2915         (force_canonical_binfo): New function.
2916         (mark_primary_virtual_base): New function.
2917         (mark_primary_bases): Walk in inheritance graph order, use
2918         mark_primary_virtual_base.
2919         (determine_primary_base): Use some more intermediate variables.
2920         (dfs_find_final_overrider): Don't check for overriding along a
2921         virtual path.
2922         (dfs_modify_vtables): Walk into primary virtual bases too.
2923         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
2924         (build_base_fields): Likewise.
2925         (dfs_set_offset_for_unshared_vbases): Likewise.
2926         (layout_virtual_bases): Likewise.
2927         (end_of_class): Likewise.
2928         (finish_struct_1): Call dump_class_hierarchy, if requested.
2929         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
2930         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
2931         (dump_class_hierarchy): Add file parameter. Append to file, if
2932         required.
2933         (finish_vtbls): Adjust accumulate_vtbl_inits call.
2934         Use canonical base for virtual bases.
2935         (build_vtt): Add more comments. Adjust build_vtt_inits call.
2936         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
2937         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
2938         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
2939         virtual VTTs.
2940         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
2941         from DATA.  We want virtual primary bases and all bases via virtual.
2942         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
2943         virtual base when not a construction vtable.
2944         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
2945         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
2946         Use canonical bases when processing virtual bases.
2947         (accumulate_vtbl_inits): We're interested in any base via a
2948         virtual path.
2949         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
2950         within a construction vtable, determine what is being overridden.
2951         (build_vtbl_initializer): Add more comments
2952         (add_vcall_offset_vtbl_entries_1): Adjust comment.
2953         (build_rtti_vtbl_entries): Check if the base has lost its
2954         primary.
2955
2956 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
2957
2958         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
2959
2960 Sun Feb  4 15:52:44 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2961
2962         * decl.c (pushdecl): Call abort instead of fatal.
2963         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
2964         * init.c (build_new_1): Likewise.
2965         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
2966         * decl.c (build_typename_type): hash_table_init now returns void.
2967         decl.c (init_decl_processing): Make an error non-fatal.
2968
2969 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
2970
2971         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
2972         Document.
2973         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
2974         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
2975         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
2976         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
2977         * decl.c (maybe_commonize_var): Use the new name-mangling where
2978         appropriate.
2979         * decl2.c (comdat_linkage): Enhance comments.  Make all
2980         compiler-generated things static, if COMDAT is not available.
2981         (get_tinfo_decl): Do not make typeinfo objects that belong in the
2982         library COMDAT.
2983         (tinfo_base_init): Use the correct mangled name for typeinfo
2984         strings, and push them into the global scope.
2985         (typeinfo_in_lib_p): New function.
2986         (synthesize_tinfo_var): Use it.
2987         (create_real_tinfo_var): Likewise.
2988
2989 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
2990
2991         * decl.c (push_class_binding): Use context_for_name_lookup instead
2992         of CP_DECL_CONTEXT.
2993         * search.c (context_for_name_lookup): Remove static.  Check for NULL
2994         context in the loop.
2995         * cp-tree.h (context_for_name_lookup): Add prototype.
2996
2997 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
2998
2999         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
3000         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
3001         Remove.
3002         * call.c (convert_class_to_reference, build_user_type_conversion_1,
3003         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
3004
3005 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
3006
3007         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
3008         of macros used when compiling g++spec.c.
3009         * g++spec.c (lang_specific_driver): Link with the shared
3010         libgcc by default.
3011
3012 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
3013
3014         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
3015         make_reference_declarator, make_call_declarator), method.c
3016         (implicitly_declare_fn), parse.y (namespace_using_decl,
3017         notype_unqualified_id, expr_or_declarator, new_type_id,
3018         after_type_declarator, direct_after_type_declarator,
3019         notype_declarator, complex_notype_declarator,
3020         complex_direct_notype_declarator, qualified_id,
3021         notype_qualified_id, overqualified_id, direct_new_declarator,
3022         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
3023         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
3024         instead of build_parse_node.
3025
3026 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3027
3028         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
3029         (minus_one_node): Moved to top level gcc directory.  Renamed
3030         to integer_minus_one_node.
3031
3032         * init.c (init_init_processing): Don't set minus_one_node.
3033         (build_vec_init): Use integer_minus_one_node.
3034
3035         * rtti.c (get_tinfo_decl_dynamic): Likewise.
3036
3037 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
3038
3039         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
3040         identical and they would be replaced with constant, remove
3041         MODIFY_EXPR from the tree.
3042
3043 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3044
3045         * Make-lang.in: Remove all dependencies on defaults.h.
3046         * call.c: Don't include defaults.h.
3047         * decl.c: Likewise.
3048         * decl2.c: Likewise.
3049         * except.c: Likewise.
3050         * pt.c: Likewise.
3051         * rtti.c: Likewise.
3052         * tree.c: Likewise.
3053         * typeck.c: Likewise.
3054
3055 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
3056
3057         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
3058         operators even in "C" linkage.
3059         * method.c (set_mangled_name_for_decl): Likewise.
3060         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
3061         overloaded operators in "C" linkage.
3062
3063 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
3064
3065         * pt.c (tsubst_decl): Remove IN_DECL parameter.
3066         (tsubst_arg_types): Check parameter is not void.
3067         (tsubst): Adjust tsubst_decl call.
3068
3069 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
3070
3071         * call.c (add_builtin_candidate): Quote std properly, from
3072         previous change.
3073
3074 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3075
3076         * pt.c (check_explicit_specialization): Clone constructors and
3077         destructors.
3078
3079 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
3080
3081         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
3082         indicates anything special about template depth. Make sure we
3083         only count the user visible template classes.
3084
3085 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
3086
3087         * call.c (build_conv): Typo in comment.
3088         (add_builtin_candidate): Add more explanation.
3089         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
3090         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
3091         when we have enumeral types.
3092         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
3093         candidates for relops and eqops.
3094         (joust): Simplify control flow. Allow a non-template user
3095         function to hide a builtin.
3096
3097 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
3098
3099         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
3100         (more_specialized): Add deduction parameter.
3101         * call.c (joust): Adjust more_specialized call.
3102         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
3103         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
3104         (get_bindings_order): Remove.
3105         (get_bindings_real): Add DEDUCE parameter.
3106         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
3107         REFERENCE_TYPE jig for DEDUCE_ORDER.
3108         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
3109         maybe_adjust_types_for_deduction.
3110         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
3111         directly.
3112         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
3113         (check_cv_quals_for_unify): Use new unify qualifier flags.
3114         (unify): Clear new unify qualifier flags.
3115         (get_bindings_real): Add DEDUCE parameter.
3116         (get_bindings): Adjust call to get_bindings_real.
3117         (get_bindings_overload): Likewise.
3118         (most_specialized_instantiation): Adjust call to
3119         more_specialized.
3120
3121 2001-01-19  Jason Merrill  <jason@redhat.com>
3122
3123         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
3124
3125         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
3126         -fnew-abi.
3127
3128 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
3129
3130         * decl2.c (arg_assoc_class): Fix double iteration logic.
3131
3132 2001-01-19  Jason Merrill  <jason@redhat.com>
3133
3134         * init.c (build_delete): Always call convert_force to strip cv-quals.
3135
3136         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
3137         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
3138         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
3139
3140 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
3141
3142         * search.c (get_vbase_1): Count only virtual bases.
3143
3144 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
3145
3146         * class.c (duplicate_tag_error): Robustify flag clearing.
3147
3148 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
3149
3150         * cp-tree.h (lookup_template_class): Add complain parm.
3151         * decl.c (lookup_namespace_name): Adjust call to
3152         lookup_template_class.
3153         (make_typename_type): Likewise.
3154         * semantics.c (finish_template_type): Likewise.
3155         * pt.c (lookup_template_class): Add complain parm. Adjust.
3156         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
3157         (tsubst): Likewise.
3158
3159 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
3160
3161         * pt.c (copy_default_args_to_explicit_spec): Preserve
3162         object's CV quals. Reorganize.
3163
3164 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
3165
3166         * typeck.c (build_modify_expr): Say `initialization' for
3167         INIT_EXPRs.
3168         * init.c (build_default_init): Convert to enumeral type, if
3169         needed.
3170
3171 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
3172
3173         * parse.y (nomods_initdcl0): Properly set things up for
3174         initdcl0_innards.
3175
3176 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
3177
3178         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
3179         (type_unification_real): Set it.
3180         (unify): Use it.
3181
3182 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
3183
3184         * decl.c (finish_destructor_body): Convert to vbase pointer here.
3185
3186 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
3187
3188         * semantics.c (begin_class_definition): Check we're not inside a
3189         template parm list.
3190
3191 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
3192
3193         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
3194         BASELINK_P.
3195
3196 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3197
3198         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
3199         * call.c (build_over_call): Add comment.
3200
3201 2001-01-16 Daniel Berlin <dberlin@redhat.com>
3202
3203         * cvt.c (ocp_convert): Handle vector type conversion
3204         * typeck2.c (digest_init): Handle vector type initializations
3205
3206 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
3207
3208         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
3209           was given.
3210
3211 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
3212
3213         * pt.c (check_nontype_parm): Rename to ...
3214         (invalid_nontype_parm_type_p): ... here.
3215         (process_template_parm): Adjust.
3216         (convert_template_argument): Adjust.
3217
3218 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
3219
3220         * pt.c (check_nontype_parm): New function.
3221         (process_template_parm): Use it.
3222         (convert_template_argument): Use it.
3223         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
3224         member.
3225
3226 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
3227
3228         * tree.c: Add defaults.h
3229         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
3230         * Make-lang.in (cp/tree.o): Add defaults.h.
3231
3232 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
3233
3234         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
3235
3236 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
3237
3238         * g++.1: Change to be ".so man1/gcc.1".
3239
3240 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
3241
3242         * Make-lang.in (c++.info, c++.install-info): Build and install g++
3243         internals info.
3244         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
3245         ($(srcdir)/cp/g++int.info): New target.
3246         * gxxint.texi: Add info directory entry.  Use @@ in email address.
3247         * .cvsignore: Update.
3248
3249 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
3250
3251         * typeck.c (build_c_cast): Do template processing earlier.
3252         Always pedwarn on array casts.
3253
3254 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
3255
3256         * friend.c (make_friend_class): Make sure a templated class is
3257         actually a template.
3258
3259 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
3260
3261         * decl2.c (get_guard): Set linkage from guarded decl.
3262
3263 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
3264
3265         * call.c (convert_default_arg): Check for unprocessed
3266         DEFAULT_ARG.
3267         * cp-tree.h (replace_defarg): Move to spew.c.
3268         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
3269         spew.c, which is where they really are.
3270         (done_pending_defargs): Declare.
3271         (unprocessed_defarg_fn): Declare.
3272         * decl.c (replace_defarg): Move to spew.c
3273         * parse.y (structsp): Call done_pending_defargs.
3274         * spew.c (defarg_fns): Rearrange list structure.
3275         (defarg_fnsdone): New static variable.
3276         (defarg_depfns): New static variable.
3277         (init_spew): Adjust.
3278         (add_defarg_fn): Store the type in TREE_TYPE.
3279         (do_pending_defargs): Detect and deal with ordering constraints
3280         and circularity.
3281         (done_pending_defargs): New function.
3282         (unprocessed_defarg_fn): New function.
3283         (replace_defarg): Moved from decl.c. Robustify. Don't save
3284         if circularity detected.
3285
3286 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
3287
3288         * pt.c (unify): Check array has a domain, before checking
3289         whether it is variable sized.
3290
3291 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
3292
3293         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
3294         parameters with pointers to arrays of unknown bound.
3295
3296 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
3297
3298         * parse.y (template_parm_header, template_spec_header): New
3299         reductions. Split out from ...
3300         (template_header): ... here. Use them.
3301         (template_template_parm): Use template_parm_header.
3302         * semantics.c (finish_template_template_parm): Add assert.
3303
3304 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
3305
3306         * mangle.c (write_builtin_type): Fix thinko.
3307
3308         * pt.c (copy_default_args_to_explicit_spec_1): New function.
3309         (copy_default_args_to_explicit_spec): Likewise.
3310         (check_explicit_specialization): Use it.
3311
3312         * class.c (finish_struct_1):  Remove last argument in call to
3313         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
3314         * decl.c (builtin_function): Likewise.
3315         (build_cp_library_fn): Likewise.
3316         (check_initializer): Likewise.
3317         (make_rtl_for_nonlocal_decl): Likewise.
3318         (cp_finish_decl): Likewise.
3319         (start_function): Likewise.
3320         * decl2.c (finish_anon_union): Likewise.
3321         * friend.c (do_friend): Likewise.
3322         * init.c (build_java_class_ref): Likewise.
3323         * method.c (make_thunk): Likewise.
3324         * pt.c (tsubst_friend_function): Likewise.
3325         * semantics.c (expand_body): Likewise.
3326
3327 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
3328
3329         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
3330         looking at DECL_CLONED_FUNCTION for non-functions.
3331
3332 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
3333
3334         * error.c (dump_template_parameter): Use parm to determine how
3335         to print default value.
3336
3337 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
3338
3339         * class.c (duplicate_tag_error): Clear more flags.
3340
3341 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
3342
3343         * call.c (build_new_method_call): Use binfo_for_vbase.
3344
3345 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
3346
3347         * cp-tree.h (flag_cond_mismatch): Don't declare.
3348         * decl2.c (flag_cond_mismatch): Don't define.
3349         (lang_f_options): Remove cond-mismatch.
3350         (unsupported_options): Add cond-mismatch.
3351
3352 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
3353
3354         * class.c (handle_using_decl): Reject using of constructor name
3355         of sourcing class. Allow injecting of a method with same name as
3356         nested class. Fixup error messages.
3357
3358 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
3359
3360         * decl2.c (lang_decode_option): Handle -Wformat=2.
3361
3362 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
3363
3364         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
3365         initialized_in_class.
3366         (DECL_DEFINED_IN_CLASS_P): Rename to ...
3367         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
3368         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
3369         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
3370         * pt.c (check_default_tmpl_args): Adjust for
3371         DECL_INITIALIZED_IN_CLASS_P.
3372         (instantiate_class_template): Likewise.
3373         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
3374
3375         * class.c (finish_struct): Constify saved_filename.
3376
3377 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
3378
3379         * class.c (duplicate_tag_error): Adjust diagnostic.
3380         (finish_struct): Locally set location to start of struct.
3381         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
3382
3383 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
3384
3385         * decl.c (struct binding_level): Adjust class_shadowed comments
3386         to reflect reality.
3387         (push_class_level_binding): Ajust comments to reflect reality.
3388         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
3389         Don't set TREE_VALUE on the class_shadowed list.
3390
3391 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3392
3393         * decl2.c (acceptable_java_type): Allow references too.
3394         * init.c (build_java_class_ref): When using the new ABI, search
3395         `class$' and have it mangled with `mangle_decl.'
3396         * mangle.c (write_java_integer_type_codes): New function.
3397         (write_builtin_type): Detect and mangle Java integer and real
3398         types.
3399
3400 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
3401
3402         * decl2.c (grokfield): Don't accept `asm' specifiers for
3403         non-static data members.
3404
3405 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3406
3407         * expr.c (cplus_expand_expr): Don't reset `target'.
3408
3409 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
3410
3411         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
3412
3413 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
3414
3415         * parse.y (template_datadef): Check for error_mark_node.
3416
3417 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
3418
3419         * cp-tree.def (DEFAULT_ARG): Make `x' class.
3420
3421 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
3422
3423         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
3424         (record_builtin_type): Make non-static.
3425         (flag_short_double): Don't declare.
3426         (init_decl_processing): Remove the creation of many tree nodes now
3427         in c_common_nodes_and_builtins.
3428         (build_void_list_node): New function.
3429         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
3430         * cp-tree.h (flag_short_wchar): Don't declare.
3431
3432 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
3433
3434         * call.c (build_conv): Don't use build1 for USER_CONV.
3435         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
3436
3437 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
3438
3439         * lex.c (lang_init): Call c_common_lang_init.
3440
3441 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
3442
3443         * search.c (lookup_fnfields_here): Remove.
3444         (look_for_overrides_r): Use lookup_fnfields_1.
3445         Ignore functions from using declarations.
3446
3447 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
3448
3449         Implement exceptions specifiers for implicit member functions.
3450         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
3451         * method.c (synthesize_exception_spec): New function.
3452         (locate_dtor, locate_ctor, locate_copy): New functions.
3453         (implicitly_declare_fn): Generate the exception spec too.
3454         * search.c (check_final_overrider): Check artificial functions
3455         too.
3456         * typeck2.c (merge_exception_specifiers): New function.
3457
3458 2001-01-03  Jason Merrill  <jason@redhat.com>
3459
3460         * init.c (build_default_init): New fn.
3461         (perform_member_init): Split out from here.
3462         (build_new_1): Use it.  Simplify initialization logic.
3463         (build_vec_init): Take an array, rather than a pointer and maxindex.
3464         Speed up simple initializations.  Don't clean up if we're assigning.
3465         * cp-tree.h: Adjust.
3466         * decl2.c (do_static_initialization): Remove TREE_VEC case.
3467         * parse.y (new_initializer): Return void_zero_node for ().
3468         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
3469         * typeck2.c (digest_init): Only complain about user-written
3470         CONSTRUCTORs.
3471
3472 2000-12-22  Mike Stump  <mrs@wrs.com>
3473
3474         * decl2.c: (max_tinst_depth): Increase to 50.
3475
3476 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
3477
3478         * class.c (invalidate_class_lookup_cache): Zero the
3479         previous_class_values.
3480         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
3481         TREE_INT_CST_HIGH.
3482         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
3483         * decl.c (free_bindings): New variable.
3484         (push_binding): Don't create a new binding if we have one on the
3485         free list.
3486         (pop_binding): Put old bindings on the free list.
3487         (init_decl_processing): Use size_int, not build_int_2.
3488         Register free_bindings as a GC root.
3489         (cp_make_fname_decl): Use size_int, not build_int_2.
3490         (push_inline_template_parms_recursive): Likewise.
3491         (end_template_parm_list): Likewise.
3492         (for_each_tempalte_parm): Do not use walk_tree_without_duplicates.
3493         (tsubst_template_parms): Use size_int, not build_int_2.
3494         (tsubst): Likewise.
3495         * rtti.c (get_vmi_pseudo_type_info): Likewise.
3496
3497 2001-01-02  Richard Henderson  <rth@redhat.com>
3498
3499         * parse.y (asm): Set ASM_INPUT_P.
3500
3501 2001-01-02  Jason Merrill  <jason@redhat.com>
3502
3503         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
3504         for v3 ABI.
3505
3506         * typeck.c (cp_truthvalue_conversion): New fn.
3507         * cvt.c (ocp_convert): Use it.
3508
3509         * cp-tree.h: Lose c-common.c decls.
3510
3511         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
3512         * cvt.c (convert_to_void): Use type_unknown_p.
3513
3514         * typeck.c (strip_all_pointer_quals): Also strip quals from
3515         pointer-to-member types.
3516
3517         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
3518         parse.y as C.
3519
3520         * call.c (build_new_method_call): Do evaluate the object parameter
3521         when accessing a static member.
3522         * typeck.c (build_component_ref): Likewise.
3523
3524 2001-01-02  Andreas Jaeger  <aj@suse.de>
3525
3526         * decl.c (cp_missing_noreturn_ok_p): New.
3527         (init_decl_processing): Set lang_missing_noreturn_ok_p.
3528
3529 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
3530
3531         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
3532
3533 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
3534
3535         * class.c (pushclass): Remove #if 0'd code.
3536         * cp-tree.h (overload_template_name): Remove.
3537         * decl.c (store_bindings): Simplify.
3538         (pop_from_top_level): Likewise.
3539         * pt.c (overload_template_name): Remove.
3540         (instantiate_decl): Don't call push_to_top_level if it's not
3541         needed.
3542
3543 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
3544
3545         * pt.c (register_local_specialization): Don't return a value.
3546         (lookup_template_class): Use move-to-front heuristic when looking
3547         up template instantiations.
3548         (instantiate_decl): Only push_to_top_level when we're actually
3549         going to instantiate the template.
3550
3551 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
3552
3553         * search.c (binfo_for_vtable): Return least derived class, not
3554         most.  Handle secondary vtables.
3555
3556 2000-12-22  Jason Merrill  <jason@redhat.com>
3557
3558         * pt.c (more_specialized): Don't optimize len==0.
3559         (fn_type_unification): If we're adding the return type, increase len.
3560
3561         * typeck.c (build_binary_op): Fix pmf comparison logic.
3562
3563         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
3564         DECL_STATIC_FUNCTION_P.
3565
3566         * semantics.c (genrtl_finish_function): Don't try to jump to
3567         return_label unless it exists.
3568
3569         In partial ordering for a call, ignore parms for which we don't have
3570         a real argument.
3571         * call.c (joust): Pass len to more_specialized.
3572         (add_template_candidate_real): Strip 'this', pass len.
3573         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
3574         (get_bindings_order): New fn.  Pass len down.
3575         (get_bindings_real): Strip 'this', pass len.
3576         (fn_type_unification): Likewise.
3577         (type_unification_real): Succeed after checking 'len' args.
3578         (most_specialized_instantiation): Lose explicit_args parm.
3579         * class.c (resolve_address_of_overloaded_function): Strip 'this',
3580         pass len.
3581
3582 2000-12-21  Jason Merrill  <jason@redhat.com>
3583
3584         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
3585         DECL_TEMPLATE_RESULT.
3586
3587         * search.c (lookup_field_r): Call lookup_fnfields_1, not
3588         lookup_fnfields_here.
3589
3590         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
3591
3592         * call.c (build_object_call): Also allow conversions that return
3593         reference to pointer to function.
3594         (add_conv_candidate): Handle totype being ref to ptr to fn.
3595         (build_field_call): Also allow members of type reference to function.
3596         Lose support for calling pointer to METHOD_TYPE fields.
3597
3598         * error.c (dump_expr): Handle *_CAST_EXPR.
3599
3600         * typeck2.c (build_scoped_ref): Always convert to the naming class.
3601
3602         * tree.c (break_out_cleanups): Lose.
3603         * cp-tree.h: Remove prototype.
3604         * typeck.c (build_component_ref): Don't break_out_cleanups.
3605         (build_compound_expr): Likewise.
3606         * semantics.c (finish_expr_stmt): Likewise.
3607
3608 2000-12-20  Richard Henderson  <rth@redhat.com>
3609
3610         * cp-tree.h: Update declarations.
3611         * decl.c (finish_case_label): Return the new stmt node.
3612         * semantics.c (finish_goto_stmt): Likewise.
3613         (finish_expr_stmt, finish_return_stmt): Likewise.
3614         (finish_break_stmt, finish_continue_stmt): Likewise.
3615         (finish_asm_stmt): Likewise.
3616         * parse.y (already_scoped_stmt): Set STMT_LINENO.
3617         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
3618         (simple_if, simple_stmt): Return the new stmt node.
3619         (save_lineno): New.
3620
3621 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
3622
3623         * cp-tree.h: Don't declare warn_long_long.
3624
3625 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3626
3627         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
3628         IS_AGGR_TYPE.
3629
3630 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3631
3632         * pt.c (unify): Handle when both ARG and PARM are
3633         BOUND_TEMPLATE_TEMPLATE_PARM.
3634
3635 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3636
3637         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
3638         DECL_TEMPLATE_PARM_P.
3639
3640 2000-12-15  Jason Merrill  <jason@redhat.com>
3641
3642         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
3643
3644         * init.c (build_new_1): Don't strip quals from type.
3645
3646         * decl.c (pushdecl): Don't check for linkage on a non-decl.
3647
3648         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
3649
3650         * call.c (build_new_function_call): Lose space before paren in
3651         error message.
3652         (build_new_method_call): Likewise.
3653
3654         * typeck2.c (build_m_component_ref): Propagate quals from datum.
3655
3656 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3657
3658         * pt.c (check_explicit_specialization): Propagate default
3659         function arguments to explicit specializations.
3660
3661 2000-12-13  DJ Delorie  <dj@redhat.com>
3662
3663         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
3664         and <? operators.
3665
3666 2000-12-08  Jason Merrill  <jason@redhat.com>
3667
3668         * error.c (dump_function_name): Don't let the user see __comp_ctor.
3669
3670         Clean up copy-initialization in overloading code.
3671         * call.c (build_user_type_conversion_1): Die if we are asked to
3672         convert to the same or a base type.
3673         (implicit_conversion): Avoid doing so.  Lose reference binding code.
3674         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
3675         direct-initialization.  Also do direct-init part of copy-init.
3676         (build_user_type_conversion): Don't provide context to convert_like.
3677         * cvt.c (ocp_convert): build_user_type_conversion will now provide
3678         the constructor call for copy-init.
3679
3680         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
3681         instantiation of a member template.
3682         (do_decl_instantiation): Not here.
3683
3684 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
3685
3686         * class.c (check_field_decls): Don't special case anonymous
3687         fields in error messages.
3688         (note_name_declared_in_class): Use %D on diagnostic.
3689
3690         * tree.c (pod_type_p): Use strip_array_types.
3691         (cp_valid_lang_attribute): Likewise.
3692         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
3693         multiple evaluations.
3694         (cp_has_mutable_p): Use strip_array_types.
3695
3696 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
3697
3698         * cp-tree.h (sufficient_parms_p): Declare new function.
3699         * call.c (sufficient_parms_p): New function, broken out of ...
3700         (add_function_candidate): ... here. Use it.
3701         (add_conv_candidate): Use it.
3702         * decl.c (grok_ctor_properties): Use it.
3703
3704 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
3705
3706         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
3707
3708 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
3709
3710         * decl2.c (lang_decode_option): Handle -Wformat-security.
3711
3712 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3713
3714         * pt.c (verify_class_unification): New function.
3715         (get_class_bindings): Use it.
3716         (try_class_unification): Tidy.
3717         (unify): Handle when argument of a template-id is not
3718         template parameter dependent.
3719         (template_args_equal): Handle when TREE_CODE's do not match.
3720
3721 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
3722
3723         * lang-specs.h (c++): When invoking the stand-alone preprocessor
3724         for -save-temps, pass all relevant -Defines to it, and then don't
3725         pass them to cc1plus.
3726
3727 2000-12-05  Will Cohen  <wcohen@redhat.com>
3728
3729         * decl.c (finish_case_label): Cleared
3730         more_cleanups_ok in surrounding function scopes.
3731         (define_label): Likewise.
3732
3733 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
3734
3735         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
3736         (get_matching_virtual): Remove.
3737         (look_for_overrides): Declare new function.
3738         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
3739         DECL_VINDEX here.
3740         * class.c (check_for_override): Move base class iteration code
3741         to look_for_overrides.
3742         * search.c (next_baselink): Remove.
3743         (get_virtuals_named_this): Remove.
3744         (get_virtual_destructor): Remove.
3745         (tree_has_any_destructors_p): Remove.
3746         (struct gvnt_info): Remove.
3747         (check_final_overrider): Remove `virtual' from error messages.
3748         (get_matching_virtuals): Remove. Move functionality to ...
3749         (look_for_overrides): ... here, and ...
3750         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
3751         to be overriding.
3752
3753 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
3754
3755         * typeck.c (get_delta_difference): If via a virtual base,
3756         return zero.
3757         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
3758         adjustment.
3759
3760 2000-12-04  Richard Henderson  <rth@redhat.com>
3761
3762         * error.c (dump_tree): Use output_add_string not OB_PUTS.
3763
3764 2000-12-04  Jason Merrill  <jason@redhat.com>
3765
3766         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
3767         (write_builtin_type): Pass intSI_type_node and the like through
3768         type_for_mode.
3769         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
3770         Pass intSI_type_node and the like through type_for_mode.
3771         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
3772         * pt.c (tsubst, unify): Likewise.
3773         * tree.c (walk_tree): Likewise.
3774         * error.c (dump_type): Likewise.
3775         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
3776
3777         * Make-lang.in: Tweak top comment for emacs.
3778         (cp/TAGS): Restore.
3779
3780         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
3781
3782         * class.c (clone_function_decl): Robustify.
3783
3784 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
3785
3786         * decl.c (store_bindings): Only search in the non modified
3787         old_bindings for duplicates.
3788
3789 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
3790
3791         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
3792         TYPE_POLYMORPHIC_P.
3793
3794         * typeck.c (build_static_cast): Remove unused variable.
3795
3796 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3797
3798         * pt.c: Fix typo in comment.
3799
3800 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
3801
3802         * decl2.c (warn_format): Remove definition.
3803         (lang_decode_option): Handle -Wformat-nonliteral,
3804         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
3805
3806 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
3807
3808         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
3809         (init_decl_processing): Don't create string_type_node,
3810         const_string_type_node, wint_type_node, intmax_type_node,
3811         uintmax_type_node, default_function_type, ptrdiff_type_node and
3812         unsigned_ptrdiff_type_node.  Adjust position of call to
3813         c_common_nodes_and_builtins.
3814         (identifier_global_value): New function.
3815
3816 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
3817
3818         * call.c (standard_conversion): Reject pointer to member
3819         conversions from ambiguous, inaccessible or virtual bases.
3820         * typeck.c (build_static_cast): Don't check pointers to members
3821         specially.
3822
3823 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
3824
3825         * method.c (do_build_copy_constructor): Preserve cv
3826         qualifications when accessing source object members.
3827         (do_build_assign_ref): Likewise. Remove separate diagnostics for
3828         unnamed fields.
3829
3830 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
3831
3832         * method.c (do_build_assign_ref): Construct appropriately
3833         CV-qualified base reference. Don't allow const casts in base
3834         conversion.
3835
3836 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
3837
3838         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
3839         incomplete return type.
3840
3841 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
3842
3843         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
3844         * semantics.c (finish_base_specifier): Accept a _TYPE not a
3845         _DECL.
3846
3847 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
3848
3849         * spew.c (yyerror): Cope if yylval.ttype is NULL.
3850
3851 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
3852
3853         * decl.c (grokdeclarator): Diagnose undefined template contexts.
3854
3855 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
3856
3857         * decl.c (grokdeclarator): Do type access control on friend
3858         class.
3859
3860 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
3861
3862         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
3863         bison parser ickiness.
3864         * pt.c (tsubst_friend_function): Enter namespace scope when
3865         tsubsting the function name.
3866         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
3867
3868 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
3869
3870         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
3871         * cvt.c (cp_convert_to_pointer): Add force parameter.
3872         Allow conversions via virtual base if forced.
3873         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
3874         (ocp_convert): Likewise.
3875         * search.c (binfo_from_vbase): Return the virtual base's binfo.
3876         * typeck.c (get_delta_difference): Adjust handling of virtual
3877         bases.
3878
3879 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
3880
3881         * tree.c (struct list_hash): Remove.
3882         (list_hash_table): Make it be an htab.
3883         (struct list_proxy): New type.
3884         (list_hash_eq): New function.
3885         (list_hash_pieces): Renamed from ...
3886         (list_hash): ... this.
3887         (list_hash_lookup): Remove.
3888         (list_hash_add): Remove.
3889         (hash_tree_cons): Use the generic hashtable.
3890         (mark_list_hash): Remove.
3891         (init_tree): Create the hashtable.
3892
3893 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
3894
3895         * method.c (build_mangled_C9x_name): Rename to
3896         build_mangled_C99_name.  Change C9X references in comments to
3897         refer to C99.
3898
3899 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
3900
3901         * parse.y (unary_expr): Move VA_ARG from here ...
3902         (primary): ... to here.
3903
3904 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
3905
3906         * semantics.c (finish_id_expr): If type is error_mark, return
3907         error_mark.
3908
3909 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
3910
3911         * pt.c (lookup_template_class): Simplify loop exit constructs.
3912         Cope when there is no partial instantiation of a template
3913         template member.
3914
3915 Thu Nov 23 02:16:47 2000  J"orn Rennecke <amylaar@redhat.com>
3916
3917         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
3918
3919 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
3920
3921         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
3922         prefix.
3923
3924         * pt.c (do_decl_instantiate): Explicitly clone constructors and
3925         destructors that haven't already been cloned.
3926
3927 2000-11-20  Richard Henderson  <rth@redhat.com>
3928
3929         * parse.y (yyparse_1): Rename the parser entry point.
3930
3931 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
3932
3933         * mangle.c (write_name): Use <unscoped-name> for names directly in
3934         function scope.
3935         (write_unscoped_name): Accept names directly in function scope.
3936
3937 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
3938
3939         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
3940         * parse.y (extdef): Add EXPORT reduction.
3941         * spew.c (yylex): Don't skip export here.
3942
3943 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
3944
3945         * decl.c (init_decl_processing): Correct name of pure virtual
3946         function under the new ABI.
3947         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
3948         (throw_bad_typeid): Likewise for bad typeid function.
3949
3950 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
3951
3952         * decl.c (grokparms): Don't even function types of `void' type,
3953         either.
3954         * mangle.c (write_type): Don't crash when confronted with the
3955         error_mark_node.
3956
3957         * decl.c (grokparms): Don't create parameters of `void' type.
3958
3959 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
3960
3961         * lex.c (mark_impl_file_chain): Delete.
3962         (init_parse): Remove call to ggc_add_string_root.  No need to
3963         ggc_strdup a string constant.  Do not add impl_file_chain to GC
3964         roots.
3965         (handle_pragma_implementation): No need to ggc_strdup main_filename.
3966
3967 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
3968
3969         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
3970
3971 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
3972
3973         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
3974         * decl.c (grokdeclarator): Don't reject void parms here.
3975         (require_complete_types_for_parms): Simplify, use
3976         complete_type_or_else.
3977         (grokparms): Remove bitrot. Remove funcdef parm.
3978         Deal with ellipsis parm lists here.
3979         * semantics.c (finish_parmlist): Don't append void_list_node
3980         here. Set PARMLIST_ELLIPSIS_P.
3981
3982 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
3983
3984         * typeck2.c (incomplete_type_error): Reorganise to avoid
3985         excessive diagnostics.
3986
3987 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
3988
3989         * lex.c (struct impl_files, internal_filename): Constify a char *.
3990
3991 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
3992
3993         * mangle.c (write_special_name_constructor): Don't generate
3994         assembler junk when confronted with an old-style constructor.
3995         (write_special_name_destructor): Likewise.
3996         (mangle_decl_string): Do it here instead.
3997
3998 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
3999
4000         * call.c (op_error): Make error messages clearer.
4001
4002 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
4003
4004         * decl.c (wrapup_globals_for_namespace): Don't mark things
4005         TREE_ASM_WRITTEN when they're not.
4006
4007 2000-11-15  Jason Merrill  <jason@redhat.com>
4008
4009         * typeck2.c (friendly_abort): Uncount the error before handing
4010         off to fancy_abort.
4011
4012 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
4013
4014         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
4015
4016 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
4017
4018         * class.c (build_vtbl_initializer): Fix typo in comment.
4019         * typeck.c (expr_sizeof): Don't crash on errors.
4020
4021 2000-11-14  Jim Wilson  <wilson@redhat.com>
4022
4023         * lang-specs.h: Add %2 after %(cc1_options).
4024
4025 2000-11-14  Richard Henderson  <rth@redhat.com>
4026
4027         * typeck.c (c_sizeof): Be strict about casting result value
4028         back to c_size_type_node.
4029         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
4030
4031 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
4032
4033         * typeck.c (build_unary_op): Use boolean_increment from
4034         c-common.c, moving the relevant code there.
4035
4036 2000-11-11  Jason Merrill  <jason@redhat.com>
4037
4038         * typeck.c (mark_addressable): Don't call put_var_into_stack.
4039
4040         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
4041         in inlines.
4042
4043 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4044
4045         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
4046         * lex.c (copy_lang_decl): Likewise.
4047
4048 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
4049
4050         * dump.c (cp_dump_tree): Don't dump function bodies here.
4051
4052         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
4053         (dump.o): Update dependency list.
4054         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
4055         (flag_dump_translation_unit): Likewise.
4056         (CP_TYPE_QUALS): Adjust definition.
4057         (DECL_C_BIT_FIELD): Remove.
4058         (SET_DECL_C_BIT_FIELD): Likewise.
4059         (CLEAR_DECL_C_BIT_FIELD): Likewise.
4060         (add_maybe_template): Likewise.
4061         (strip_array_types): Likewise.
4062         (dump_node_to_file): Likewise.
4063         (cp_dump_tree): New function.
4064         * decl.c (init_decl_processing): Set lang_dump_tree.
4065         * decl2.c (flag_dump_translation_unit): Remove.
4066         * dump.c: Move most of it to ../c-dump.c.
4067         (cp_dump_tree): New function.
4068         * pt.c (add_maybe_template): Remove.
4069         * typeck.c (strip_array_types): Likewise.
4070
4071 2000-11-07  Eric Christopher  <echristo@redhat.com>
4072
4073         * decl.c (init_decl_processing): Change definition of
4074         __wchar_t to wchar_t.  Remove artificial declaration of
4075         wchar_t.
4076         * lex.c: Change instances of __wchar_t to wchar_t.
4077
4078 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
4079
4080         * lex.c (do_identifier): Don't lookup_name for operators.
4081         * parse.y (operator): Save looking_for_typename.
4082         (unoperator): Restore it.
4083         * spew.c (frob_opname): Use nth_token for lookahead.
4084
4085 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
4086
4087         * decl.c (grok_op_properties): Always use coerce_new_type and
4088         coerce_delete_type.
4089         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
4090         exception specification. Tidy up.
4091         (coerce_delete_type): Preserve exception specification. Tidy up.
4092
4093 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
4094
4095         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
4096         (push_binding_level), error.c (cp_tree_printer), pt.c
4097         (process_partial_specialization, tsubst_template_arg_vector),
4098         search.c (lookup_member): Use memset () instead of bzero ().
4099
4100 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
4101
4102         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
4103
4104 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
4105
4106         * Make-lang.in (c++.distdir): Remove.
4107
4108 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
4109
4110         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
4111         declarations from different namespaces to be combined.
4112
4113 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
4114
4115         * decl.c: Include tm_p.h.
4116
4117 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
4118
4119         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
4120
4121 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
4122
4123         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
4124         (build_overload_value), repo.c (open_repo_file), xref.c
4125         (open_xref_file): Use strchr () and strrchr () instead of index ()
4126         and rindex ().
4127
4128 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
4129
4130         * call.c (build_over_call): Call fold on the CALL_EXPR.
4131
4132 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
4133
4134         * error.c (dump_template_decl): Separate template hearders with
4135         space not comma.
4136
4137 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
4138
4139         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
4140         TS_* flags with corresponding TFF_*.  Adjust prototypes of
4141         functions (which used to take a tree_string_flags) to take an int.
4142
4143         * cp-tree.h (enum tree_string_flags): Remove
4144         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
4145         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
4146         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
4147         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
4148         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
4149         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
4150         (type_as_string, decl_as_string, expr_as_string,
4151         context_as_string): Adjust prototype.
4152
4153         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
4154         instead of TS_PLAIN.
4155
4156         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
4157         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
4158         plain `0'.
4159
4160 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
4161
4162         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
4163         (linkage_kind): New enumeration.
4164         (decl_linkage): New function.
4165         * decl2.c (comdat_linkage): Extend comment.
4166         * error.c (dump_function_decl): Print the arguments used to
4167         instantiate a template, even when not printing the type of the
4168         function.
4169         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
4170         not TREE_PUBLIC, to test for external linkage.
4171         * tree.c (decl_linkage): New function.
4172
4173 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
4174
4175         * pt.c (instantiate_decl): Always instantiate static data members
4176         initialized in-class.
4177
4178 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
4179
4180         * Make-lang.in: Move all build rules here from Makefile.in,
4181         adapt to new context.  Wrap all rules that change the current
4182         directory in parentheses.  Expunge all references to $(P).
4183         When one command depends on another and they're run all at
4184         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
4185         all object-file generation rules.  Delete obsolete variables.
4186
4187         * Makefile.in: Delete.
4188         * config-lang.in: Delete outputs= line.
4189
4190 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
4191
4192         * error.c (dump_function_decl): Print no space between
4193         `ptr-operator' the `type-specifier' of the return type.
4194         (dump_type_prefix): Make sure we put space at the appropriate
4195         place.
4196
4197 2000-10-23  Jason Merrill  <jason@redhat.com>
4198
4199         * call.c (equal_functions): Also call decls_match for extern "C" fns.
4200
4201 2000-10-22  Jason Merrill  <jason@redhat.com>
4202
4203         * call.c (build_conditional_expr): Use ocp_convert to force
4204         rvalue conversion.
4205
4206 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
4207
4208         * call.c (standard_conversion): Use RVALUE_CONVs for all
4209         expressions that satisfy lvalue_p, not just those that satisfy
4210         real_lvalue_p.
4211
4212         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
4213
4214         * typeck.c (c_sizeof): Return an expression of `size_t' type,
4215         not one with TYPE_IS_SIZETYPE set.
4216         (dubious_conversion_warnings): Remove special-case code.
4217
4218 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
4219
4220         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
4221         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
4222         (dump_type_prefix): Print vector-of-int as 'int vector'.
4223         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
4224         * tree.c (walk_tree): Handle VECTOR_TYPE.
4225
4226         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
4227
4228 2000-10-21  Jason Merrill  <jason@redhat.com>
4229
4230         * parse.y (operator): Set got_object from got_scope.
4231         Set looking_for_typename.
4232         * decl.c (lookup_name_real): Clear val after setting from_obj.
4233         Reorganize diagnostic.
4234
4235 2000-10-20  Jason Merrill  <jason@redhat.com>
4236
4237         * tree.c (walk_tree): Don't walk into default args.
4238
4239         * error.c (dump_expr): Use host_integerp.
4240
4241 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
4242
4243         * typeck2.c (abstract_virtuals_error): Use "because" instead of
4244         "since" in error message.
4245
4246 Fri Oct 20 13:54:59 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4247
4248         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
4249
4250 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
4251
4252         * decl.c (revert_static_member_fn): Fixed typo.
4253
4254 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
4255
4256         * class.c (subobject_offset_fn): New type.
4257         (dfs_record_base_offsets): Remove.
4258         (record_base_offsets): Likewise.
4259         (dfs_search_base_offsets): Likewise.
4260         (record_subobject_offset): New function.
4261         (check_subobject_offset): Likewise.
4262         (walk_subobject_offsets): Likewise.
4263         (record_subobject_offsets): Likewise.
4264         (layout_conflict_p): Reimplement.
4265         (layout_nonempty_base_or_field): Correct handling of type
4266         conflicts during layout.
4267         (layout_empty_base): Likewise.
4268         (build_base_field): Adjust to handle new representation of empty
4269         base offset table.
4270         (build_base_fields): Likewise.
4271         (layout_virtual_bases): Likewise.
4272         (splay_tree_compare_integer_csts): New function.
4273         (layout_class_type): Use a splay_tree, rather than a varray, to
4274         represent the offsets of empty bases.
4275
4276         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
4277         * decl.c (select_decl): Don't return declarations that are
4278         DECL_ANTICIPATED.
4279
4280 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
4281
4282         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
4283         (fake_std_node): New macro.
4284         * decl.c (in_std): Rename to ...
4285         (in_fake_std): ... this.
4286         (flag_no_builtin): Remove.
4287         (flag_no_nonansi_builtin): Likewise.
4288         (walk_namespaces_r): Use fake_std_node.
4289         (push_namespace): Use std_identifier.
4290         (pop_namespace): Use in_fake_std.
4291         (lookup_name_real): Use fake_std_node.
4292         (init_decl_processing): When -fhonor-std, create the `std'
4293         namespace.  Don't create a dummy fake_std_node in that case.
4294         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
4295         (builtin_function): Put builtins whose names don't begin
4296         with `_' in the std namespace.
4297         * decl2.c (flag_no_builtin): Remove.
4298         (flag_no_nonansi_builtin): Likewise.
4299         (set_decl_namespace): Use fake_std_node.
4300         (validate_nonmember_using_decl): Likewise.
4301         (do_using_directive): Likewise.
4302         (handle_class_head): Likewise.
4303         * dump.c (dequeue_and_dump): Likewise.
4304         * except.c (init_exception_processing): Use std_identifier.
4305         * init.c (build_member_call): Use fake_std_node.
4306         * rtti.c (init_rtti_processing): Use std_identifier.
4307
4308 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
4309
4310         * cp-tree.h (back_end_hook): Remove declaration.
4311         * decl2.c (back_end_hook): Remove definition.
4312
4313         * dump.c (dequeue_and_dump): Dump TREE_USED.
4314
4315 Tue Oct 17 20:19:06 2000  Brad Lucier <lucier@math.purdue.edu>
4316
4317         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
4318
4319 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
4320
4321         * decl.c (WINT_TYPE): Define.
4322         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
4323         c_size_type_node, signed_size_type_node and wint_type_node.
4324
4325 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
4326
4327         * decl2.c (warn_missing_format_attribute): New variable.
4328         (lang_decode_option): Decode -Wmissing-format-attribute.
4329
4330 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
4331
4332         * typeck.c (qualify_type): Remove.
4333         (composite_pointer_type): Fix handling of conversions to `cv void*'.
4334
4335 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4336
4337         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
4338
4339 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4340
4341         * Makefile.in (parse.c, parse.h): Create atomically.
4342
4343 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
4344
4345         * class.c (current_obstack): Remove.
4346         * decl.c (ggc_p): Remove.
4347         (start_decl): Don't use decl_tree_cons.
4348         (grokdeclarator): Don't use build_decl_list.
4349         (start_function): Don't use decl_tree_cons.
4350         (finish_function): Don't mess with obstacks.
4351         * decl2.c (grok_x_components): Don't use build_decl_list.
4352         * lex.c (make_call_declarator): Don't call decl_tree_cons.
4353         (implicitly_declare_fn): Don't call build_decl_list.
4354         * parse.y (frob_specs): Don't call build_decl_list or
4355         decl_tree_cons.
4356         (expr_or_declarator_intern): Don't call decl_tree_cons.
4357         (primary): Don't call build_decl_list.
4358         (fcast_or_absdcl): Likewise.
4359         (typed_declspecs): Don't call decl_tree_cons.
4360         (reserved_declspecs): Don't call build_decl_list.
4361         (declmods): Likewise.
4362         (reserved_typespecquals): Likewise.
4363         (aggr): Likewise.
4364         (new_type_id): Likewise.
4365         (cv_qualifiers): Likewise.
4366         (after_type_declarator_intern): Likewise.
4367         (notype_declarator_intern): Likewise.
4368         (absdcl_intern): Likewise.
4369         (named_parm): Likewise.
4370         * pt.c (most_specialized_class): Likewise.
4371         * repo.c (temporary_obstack): Make it a structure, not a pointer.
4372         (init_repo): Initialize it.
4373         * search.c (current_obstack): Remove.
4374         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
4375
4376 2000-10-09  Richard Henderson  <rth@cygnus.com>
4377
4378         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
4379         (c++ language support bits for libgcc): Remove.
4380         (c++.clean): Remove cplib2.txt cleanup.
4381         * config-lang.in (headers, lib2funcs): Remove.
4382
4383         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
4384         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
4385         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
4386         * inc/new.h, inc/typeinfo: Remove files.
4387
4388 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
4389
4390         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
4391         defined.
4392         (init_decl_processing): Initialize intmax_type_node and
4393         uintmax_type_node.
4394
4395 2000-10-06  Richard Henderson  <rth@cygnus.com>
4396
4397         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
4398         (original_result_rtx): Remove.
4399         * decl.c (save_function_data): Don't clear x_result_rtx.
4400         (mark_lang_function): Don't mark it either.
4401         * expr.c (fixup_result_decl): Remove.
4402         * semantics.c (genrtl_named_return_value): Frob the return decl
4403         before calling emit_local_var.
4404         (genrtl_finish_function): Don't call fixup_result_decl.
4405         Always emit the jump to return_label.
4406
4407 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
4408
4409         * pt.c (lookup_template_class): Set current access for enum.
4410         (tsubst_enum): Set file & line for enum decl.
4411
4412         * spew.c (yylex): Remove unused variable.
4413
4414 2000-10-05  Richard Henderson  <rth@cygnus.com>
4415
4416         * semantics.c (genrtl_finish_function): Don't init or check
4417         can_reach_end; remove noreturn and return value checks.
4418
4419 2000-10-05  Tom Tromey  <tromey@cygnus.com>
4420
4421         * init.c (build_java_class_ref): Use `build_static_name' with a
4422         suffix, not a prefix, to build the class object's name.
4423
4424 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
4425
4426         * cp-tree.h (access_kind): Fix comment typo.
4427         * decl2.c (grokfield): Fix diagnostic typo.
4428         * semantics.c (finish_template_type): Fix comment typo.
4429         (finish_qualified_object_call_expr): Likewise.
4430
4431 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
4432
4433         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
4434         tsubsting fails.
4435
4436 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
4437
4438         * spew.c (frob_id): New static function.
4439         (frob_opname): Use it.
4440         (yylex): Use it.
4441
4442 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
4443
4444         * decl.c (lang_mark_false_label_stack): Remove.
4445         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
4446
4447 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
4448
4449         * gxxint.texi: Use @email for formatting email addresses.
4450
4451 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
4452
4453         * error.c: Remove direct obstack manipulation.  Replace with
4454         output_buffer-based formatting.  Adjust calls to removed macros.
4455         (obstack_chunk_alloc, obstack_chunk_free): Remove.
4456         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
4457         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
4458
4459 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
4460
4461         * ir.texi: Move to ../c-tree.texi.
4462
4463 2000-09-20  Jason Merrill  <jason@redhat.com>
4464
4465         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
4466
4467 2000-09-21  Andreas Jaeger  <aj@suse.de>
4468
4469         * errfn.c: Move declaration of cp_printer and cp_printers to ...
4470         * cp-tree.h: ... here.
4471
4472         * error.c: Remove declaration of cp_printer.
4473
4474 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
4475
4476         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
4477
4478 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
4479
4480         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
4481         users.
4482
4483 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
4484
4485         * decl.c (start_function): Robustify.
4486
4487 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4488
4489         * cp-tree.h (check_function_format): Accept a `status' parameter.
4490
4491         * call.c, typeck.c: Updates calls to `check_function_format'.
4492
4493 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
4494
4495         * decl2.c (handle_class_head): Always push some scope even
4496         in the error case.
4497
4498 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
4499
4500         * cp-tree.h (struct cp_language_function): Remove
4501         x_scope_stmt_stack and name_declared.
4502         (current_scope_stmt_stack): Remove.
4503         (function_name_declared_p): New macro.
4504         (struct lang_decl_flags): Use c_lang_decl as a base class.
4505         (context): Remove.
4506         (struct lang_decl): Replace saved_tree with context.
4507         (DECL_FRIEND_CONTEXT): Adjust accordingly.
4508         (SET_DECL_FRIEND_CONTEXT): Likewise.
4509         (DECL_VIRTUAL_CONTEXT): Likewise.
4510         (DECL_SAVED_TREE): Remove.
4511         (C_DECLARED_LABEL_FLAG): Likewise.
4512         (cplus_expand_expr_stmt): Don't declare.
4513         (add_decl_stmt): Likewise.
4514         (add_scope_stmt): Likewise.
4515         * decl.c (mark_stmt_tree): Remove.
4516         (case_compare): Likewise.
4517         (finish_case_label): Use c_add_case_label.
4518         (init_decl_processing): Set more language-specific hooks.
4519         (build_enumerator): Fix typo in comment.
4520         (cplus_expand_expr_stmt): Remove.
4521         (mark_lang_function): Use mark_c_language_function.
4522         (lang_mark_tree): Use c_mark_lang_decl.
4523         * decl2.c: Change order of inclusion.
4524         * except.c: Likewise.
4525         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
4526         back on c_expand_expr.
4527         * friend.c: Include expr.h.
4528         * init.c: Change order of inclusion.
4529         * Makefile.in: Update dependencies.
4530         * lex.h (free_lang_decl_chain): Remove.
4531         * optimize.c (maybe_clone_body): Use function_name_declared_p.
4532         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
4533         it doesn't exist.
4534         (instantiate_decl): Use function_name_declared_p.
4535         * semantics.c (lang_expand_expr_stmt): Remove.
4536         (set_current_function_name_declared): Likewise.
4537         (current_function_name_declared): Likewise.
4538         (begin_compound_stmt): Use function_name_declared_p.
4539         (add_decl_stmt): Remove.
4540         (setup_vtbl_ptr): Use function_name_declared_p.
4541         (add_scope_stmt): Remove.
4542         (current_scope_stmt_stack): New function.
4543         (cp_expand_stmt): Don't handle SCOPE_STMTs.
4544         (expand_body): Use function_name_declared_p.
4545         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
4546         * typeck.c: Change order of includes.
4547         (convert_sequence): Remove.
4548
4549 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
4550
4551         * lex.c (reswords): Add _Complex.
4552
4553 Thu Sep 14 12:10:45 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4554
4555         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
4556
4557 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
4558
4559         * init.c (begin_init_stmts): Don't use // comments.
4560
4561 2000-09-12  Jason Merrill  <jason@redhat.com>
4562
4563         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
4564         all non-extern arrays.
4565
4566         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
4567         typenames, too.  Downgrade complaint to pedwarn.
4568         (xref_tag): Warn about surprising behavior of 'friend struct T'.
4569         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
4570         'class This::Inherited'.
4571
4572 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
4573
4574         * decl.c (finish_case_label): Given the LABEL_DECL a
4575         DECL_CONTEXT.
4576
4577 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
4578
4579         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
4580         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
4581         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
4582         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
4583         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
4584         New macros.
4585         (sorry_for_unsupported_tree, print_scope_operator,
4586         print_left_paren, print_right_paren, print_left_bracket,
4587         print_right_bracket, print_whitespace): Likewise.
4588         (aggr_variety): Rename to class_key_or_enum.
4589         (print_type): Rename to print_type_id.
4590         (print_type_specifier_seq, print_simple_type_specifier,
4591         print_elaborated_type_specifier,
4592         print_rest_of_abstract_declarator,
4593         print_parameter_declaration_clause, print_exception_specification,
4594         print_nested_name_specifier, print_template_id,
4595         typedef_original_name,  print_template_argument_list_start,
4596         print_template_argument_list_end): New functions.
4597
4598 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
4599
4600         * ir.texi: Add more documentation.
4601
4602 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
4603
4604         * cp-tree.h (struct saved_scope): Remove x_function_parms.
4605         (current_function_parms): Don't define.
4606         (struct cp_language_function): Remove parms_stored.
4607         (current_function_just_assigned_this): Don't define.
4608         (current_function_parms_stored): Likewise.
4609         (static_ctors): Declare.
4610         (static_dtors): Likewise.
4611         (SF_EXPAND): Don't define.
4612         (expand_start_early_try_stmts): Remove declaration.
4613         (store_parm_decls): Likewise.
4614         * decl.c (static_ctors): Don't declare.
4615         (static_dtors): Likewise.
4616         (struct binding_level): Remove this_block.
4617         (poplevel): Remove dead code.
4618         (set_block): Likewise.
4619         (mark_binding_level): Don't mark this_block.
4620         (mark_saved_scope): Don't mark x_function_parms.
4621         (init_decl_processing): Don't add current_function_parms as a GC
4622         root.
4623         (check_function_type): Change prototype.
4624         (start_function): Remove RTL-generation code.
4625         (expand_start_early_try_stmts): Remove.
4626         (store_parm_decls): Give it internal linkage.  Remove
4627         RTL-generation code.
4628         (finish_function): Remove RTL-generation code.
4629         * decl2.c (static_ctors): Fix formatting.
4630         (static_dtors): Likewise.
4631         * method.c (use_thunk): Don't call store_parm_decls.
4632         (synthesize_method): Likewise.
4633         * optimize.c (maybe_clone_body): Likewise.
4634         * parse.y (fn.def2): Likewise.
4635         (.set_base_init): Likewise.
4636         (nodecls): Likewise.
4637         * pt.c (instantiate_decl): Likewise.
4638         * rtti.c (synthesize_tinfo_fn): Likewise.
4639         * semantics.c (genrtl_try_block): Simplify.
4640         (expand_body): Use genrtl_start_function and
4641         genrtl_finish_function.
4642         (genrtl_start_function): New function.
4643         (genrtl_finish_function): Likewise.
4644
4645 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
4646
4647         * error.c (cp_tree_printer, case 'P'): Append break.
4648
4649 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
4650
4651         * cp-tree.h (frob_opname): Declare.
4652         * parse.y (saved_scopes): New static variable.
4653         (cp_parse_init): Adjust.
4654         (do_id): If lastiddecl is NULL, do do_identifier.
4655         (operator): Save scope information.
4656         (unoperator): New reduction. Restore scope information.
4657         (operator_name): Append unoperator. Call frob_opname.
4658         * spew.c (frob_opname): Define.
4659
4660 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
4661
4662         * decl.c, rtti.c: Include defaults.h if not already included.
4663         Don't define the *_TYPE_SIZE macros.
4664
4665 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
4666
4667         * cp-tree.h (push_switch): Change prototype.
4668         (check_cp_case_value): Remove declaration.
4669         (decl_constant_value): Likewise.
4670         * decl.c (struct cp_switch): Add switch_stmt and cases.
4671         (case_compare): New function.
4672         (push_switch): Set switch_stmt.  Initialize cases.
4673         (pop_switch): Clean up cases.
4674         (define_case_label): Rename to ...
4675         (finish_case_label): ... this.  Do semantic analysis for case
4676         labels here.
4677         (start_function): Correct comment.
4678         * decl2.c (check_cp_case_value): Remove.
4679         * expr.c (do_case): Remove.
4680         * pt.c (tsubst_expr): Adjust call to finish_case_label.
4681         * semantics.c (genrtl_do_poplevel): Remove declaration.
4682         (RECHAIN_STMTS): Remove.
4683         (finish_break_stmt): Use build_break_stmt.
4684         (finish_continue_stmt): Use build_continue_stmt.
4685         (finish_switch_cond): Adjust condition here, rater than in
4686         c_expand_start_case.
4687         (finish_case_label): Remove.
4688         * typeck.c (c_expand_return): Remove.
4689         (c_expand_start_case): Likewise.
4690
4691 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
4692
4693         * ir.texi: Document type nodes.
4694
4695 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
4696
4697         * cp-tree.h (init_cp_semantics): Declare.
4698         (genrtl_try_block): Don't declare.
4699         (genrtl_handler): Likewise.
4700         (genrtl_catch_block): Likewise.
4701         (genrtl_ctor_stmt): Likewise.
4702         (genrtl_subobject): Likewise.
4703         (genrtl_do_poplevel): Likewise.
4704         (genrtl_named_return_value): Likewise.
4705         * lex.c (init_parse): Call init_cp_semantics.
4706         * semantics.c (genrtl_try_block): Give it internal linkage.
4707         (genrtl_handler): Likewise.
4708         (genrtl_catch_block): Likewise.
4709         (genrtl_ctor_stmt): Likewise.
4710         (genrtl_subobject): Likewise.
4711         (genrtl_do_poplevel): Likewise.
4712         (genrtl_named_return_value): Likewise.
4713         (lang_expand_stmt): Rename to ...
4714         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
4715         (init_cp_semantics): Define.
4716
4717         * decl.c (initialize_local_var): Remove RTL-generating code.
4718         * semantics.c (genrtl_try_block): Fix formatting.
4719
4720         Move statement-tree facilities from C++ to C front-end.
4721         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
4722         (void_zero_node): Remove.
4723         (stmt_tree): Likewise.
4724         (scope_chain): Adjust.
4725         (language_function): Rename to cp_language_function.
4726         (cp_function_chain): Adjust.
4727         (current_stmt_tree): Remove.
4728         (last_tree): Likewise.
4729         (last_expr_type): Likewise.
4730         (struct lang_decl): Adjust.
4731         (STMT_IS_FULL_EXPR_P): Remove.
4732         (add_tree): Remove.
4733         (begin_stmt_tree): Likewise.
4734         (finish_stmt_tree): Likewise.
4735         (walk_tree_fn): Likewise.
4736         (walk_stmt_tree): Likewise.
4737         * class.c (finish_struct): Replace use of add_tree with add_stmt.
4738         * decl.c (mark_stmt_tree): Adjust type.
4739         (init_decl_processing): Don't build void_zero_node.
4740         (initialize_local_var): Adjust usage of current_stmt_tree.
4741         (finish_enum): Use add_stmt, not add_tree.
4742         (save_function_data): Adjust use of language_function.
4743         (finish_constructor_body): Use add_stmt, not add_tree.
4744         (finish_destructor_body): Likewise.
4745         (push_cp_function_context): Adjust use of language_function.
4746         (pop_cp_function_context): Likewise.
4747         (mark_lang_function): Likewise.
4748         (mark_cp_function_context): Likewise.
4749         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
4750         (build_vec_init): Likewise.
4751         * semantics.c (SET_LAST_STMT): Remove.
4752         (RECHAIN_STMTS): Don't use it.
4753         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
4754         (current_stmt_tree): Define.
4755         (add_tree): Remove.
4756         (finish_goto_stmt): Use add_stmt, not add_tree.
4757         (finish_expr_stmt): Likewise.
4758         (begin_if_stmt): Likewise.
4759         (finish_then_clause): Likewise.
4760         (begin_while_stmt): Likewise.
4761         (begin_do_stmt): Likewise.
4762         (finish_return_stmt): Likewise.
4763         (begin_for_stmt): Likewise.
4764         (finish_break_stmt): Likewise.
4765         (finish_continue_stmt): Likewise.
4766         (begin_switch_stmt): Likewise.
4767         (finish_case_label): Likewise.
4768         (begin_try_block): Likewise.
4769         (begin_function_try_block): Likewise.
4770         (begin_handler): Likewise.
4771         (begin_catch_block): Likewise.
4772         (begin_compound_stmt): Likewise.
4773         (begin_asm_stmt): Likewise.
4774         (finish_asm_stmt): Likewise.
4775         (finish_label_stmt): Likewise.
4776         (add_decl_stmt): Likewise.
4777         (finish_subobject): Likewise.
4778         (finish_decl_cleanup): Likewise.
4779         (finish_named_return_value): Likewise.
4780         (setup_vtbl_ptr): Likewise.
4781         (add_scope_stmt): Likewise.
4782         (finish_stmt_expr): Likewise.
4783         (prune_unused_decls): Remove.
4784         (begin_stmt_tree): Likewise.
4785         (finish_stmt_tree): Likewise.
4786         (prep_stmt): Adjust use of current_stmt_tree.
4787         (lang_expand_stmt): Likewise.
4788         * tree.c (statement_code_p): Remove.
4789         (cp_statement_code_p): New function.
4790         (walk_stmt_tree): Remove.
4791         (init_tree): Set lang_statement_code_p.
4792
4793 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
4794
4795         Integrated preprocessor.
4796
4797         * Make-lang.in, Makefile.in: Remove all references to input.c,
4798         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
4799         * gxx.gperf, hash.h, input.c: Delete.
4800         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
4801         initialized properly.
4802
4803         * class.c (fixup_pending_inline): Take a tree, not a
4804         struct pending_inline *.  All callers changed.
4805         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
4806         RID_PROTECTED entries in ridpointers[] array here.
4807         * decl.c (duplicate_decls): Do not refer to struct
4808         pending_inline.
4809         (record_builtin_type, init_decl_processing): Use RID_MAX not
4810         CP_RID_MAX.
4811         (grokdeclarator): Use C_IS_RESERVED_WORD.
4812         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
4813         cpplib.
4814         (grok_x_components): Do not inspect pending_inlines chain.
4815
4816         * cp-tree.h (struct lang_identifier): Add rid_code entry.
4817         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
4818         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
4819         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
4820         TIME_IDENTIFIER_FILEINFO): Kill.
4821         Update prototypes.
4822         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
4823         single 32-bit word.
4824         * parse.y: Call do_pending_inlines unconditionally.
4825         reinit_parse_for_method is now snarf_method.  fn.defpen is no
4826         longer necessary.  Remove unnecessary <itype> annotation on
4827         SCOPE.  Do not refer to end_of_file or struct pending_inline.
4828         * semantics.c (begin_inline_definitions): Call
4829         do_pending_inlines unconditionally.
4830
4831         * lex.c: Remove all code now shared with C front end.
4832         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
4833         into the get_identifier table.  Rewrite pragma handling to
4834         work with the registry.  Move code to save tokens for later
4835         processing to spew.c.
4836
4837         * spew.c: Rewrite everything in terms of token streams instead
4838         of text.  Move routines here from lex.c / input.c as
4839         appropriate.  GC-mark trees hanging off the pending inlines
4840         chain.
4841
4842 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
4843
4844         * NEWS: Mention that the named return value extension has been
4845         deprecated.
4846         * cp-tree.h (original_result_rtx): Define.
4847         (TREE_REFERENCE_EXPR): Remove.
4848         (DECL_VPARENT): Likewise.
4849         (pushdecl_nonclass_level): Likewise.
4850         (store_return_init): Likewise.
4851         (reinit_lang_specific): Likewise.
4852         (genrtl_named_return_value): Change prototype.
4853         * decl.c (original_result_rtx): Remove.
4854         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
4855         Do not generate RTL for local variables here.
4856         (store_return_init): Remove.
4857         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
4858         store_return_init.
4859         (finish_named_return_value): Adjust accordingly.  Warn that this
4860         extension is deprecated.
4861         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
4862
4863 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
4864
4865         * pt.c (type_unification_real): Replace switch with if.
4866         (unify): Tsubst non-type parms before comparing.
4867
4868 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
4869
4870         * error.c (dump_typename): New function, broken out of ...
4871         (dump_type): ... here. Use it.
4872         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
4873
4874 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
4875
4876         * init.c (build_offset_ref): Deal with namespace scoped
4877         TEMPLATE_ID_EXPRs.
4878
4879 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
4880
4881         * class.c (resolve_address_of_overloaded_function): Add
4882         explanation message.
4883         * decl.c (define_case_label): Reformat explanation.
4884         * decl2.c (finish_static_data_member_decl): Likewise.
4885         (grokfield): Likewise.
4886         * friend.c (do_friend): Likewise.
4887
4888 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
4889
4890         * tree.c (walk_tree): Expose tail recursion.
4891         (walk_stmt_tree): New function.
4892         * cp-tree.h: Prototype walk_stmt_tree.
4893         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
4894         the BLOCKs directly.  If a BLOCK has no variables after
4895         pruning, discard it.
4896         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
4897         restore the line number.
4898
4899 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
4900
4901         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
4902         (pt.o): Remove dependency on HTAB_H.
4903         * cp-tree.h: Include hashtab.h.
4904         (walk_tree): Change prototype.
4905         (walk_tree_without_duplicates): New function.
4906         * decl.c (check_default_argument): Use it.
4907         * optimize.c (remap_decl): Adjust calls to walk_tree.
4908         (copy_body): Likewise.
4909         (expand_calls_inline): Likewise.
4910         (calls_setjmp_p): Use walk_tree_without_duplicates.
4911         * pt.c: Don't include hashtab.h.
4912         (for_each_template_parm): Use walk_tree_without_duplicates.
4913         * semantics.c (finish-stmt_tree): Likewise.
4914         (expand_body): Likewise.
4915         * tree.c (walk_tree): Add additional parameter.
4916         (walk_tree_without_duplicates): New function.
4917         (count_trees): Use it.
4918         (verify_stmt_tree): Adjust call to walk_tree.
4919         (find_tree): Use walk_tree_without_duplicates.
4920         (no_linkage_check): Likewise.
4921         (break_out_target_exprs): Adjust call to walk_tree.
4922         (cp_unsave): Likewise.
4923
4924 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4925
4926         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
4927         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
4928         * cp-tree.h (TYPE_BINFO): Adjust comment.
4929         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
4930         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
4931         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
4932         (TYPE_TEMPLATE_INFO): Likewise.
4933         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
4934         * class.c (push_nested_class): Likewise.
4935         * decl.c (lookup_name_real): Likewise.
4936         (grokdeclarator): Likewise.
4937         (grok_op_properties): Likewise.
4938         (xref_tag): Likewise.
4939         (xref_basetypes): Likewise.
4940         * decl2.c (constructor_name_full): Likewise.
4941         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
4942         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
4943         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
4944         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
4945         (dump_type_suffix): Likewise.
4946         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
4947         instead.
4948         (get_aggr_from_typedef): Likewise.
4949         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
4950         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
4951         (write_template_parm): Likewise.
4952         (write_template_template_parm): Check tree code instead of
4953         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
4954         * method.c (build_overload_nested_name): Add
4955         BOUND_TEMPLATE_TEMPLATE_PARM.
4956         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
4957         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
4958         * pt.c (convert_template_argument): Check tree code instead of
4959         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
4960         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
4961         (for_each_template_parm): Adjust comment.
4962         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
4963         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
4964         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
4965         template_args_equal to compare template template parameter cases.
4966         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
4967         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
4968         instead.
4969         * tree.c (copy_template_template_parm): Decide whether to create
4970         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
4971         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
4972         (copy_tree_r): Likewise.
4973         * typeck.c (comptypes): Likewise.  Check tree code instead of
4974         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
4975
4976 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
4977
4978         * decl.c (finish_function): Move the code for handling functions
4979         marked with the constructor and destructor attributes inside the
4980         expand_p block.
4981
4982 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
4983
4984         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
4985
4986 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
4987
4988         * pt.c (lookup_template_class): Remove abort.
4989         * tree.c (get_type_decl): Allow error_mark_node.
4990
4991 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
4992
4993         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
4994         TEMPLATE_ID_EXPRs.
4995
4996 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
4997
4998         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
4999         new ABI mangling.
5000
5001 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
5002
5003         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
5004         union tag mismatch error reporting.
5005
5006 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
5007
5008         * call.c (build_scoped_method_call): Check it is not a namespace.
5009
5010 2000-08-30  Jason Merrill  <jason@redhat.com>
5011
5012         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
5013
5014         * tree.c (bot_manip): Check TREE_CONSTANT rather than
5015         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
5016         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
5017
5018         * decl.c (start_function): Always call make_function_rtl.
5019
5020 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
5021
5022         * semantics.c (prune_unused_decls): New function.
5023         (finish_stmt_tree): Call it via walk_tree.
5024
5025 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
5026
5027         * class.c (build_secondary_vtable): Constify a char *.
5028         * decl.c (init_decl_processing): Initialize function_id_node,
5029         pretty_function_id_node, and func_id_node.
5030         * input.c (struct input_source): Constify 'str'.
5031         (feed_input): Constify first argument.
5032         * mangle.c (write_identifier): Constify argument.
5033         * pt.c (mangle_class_name_for_template): Constify argument.
5034
5035 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
5036
5037         * typeck.c (mark_addressable): Remove code that pokes around in
5038         RTL.
5039
5040 2000-08-28  Jason Merrill  <jason@redhat.com>
5041
5042         * lex.c (file_name_nondirectory): Move to toplev.c.
5043
5044         * cp-tree.h (LOCAL_CLASS_P): New macro.
5045         * class.c (finish_struct_1): Use it.
5046
5047 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
5048
5049         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
5050         (write_encoding): Pass another argument to write_name.
5051         (write_name): Add ignore_local_scope parameter.  Fix handling of
5052         local names.
5053         (write_nested_name): Use write_unqualified_name.
5054         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
5055         (write_template_prefix): Use write_unqualified_name.
5056         (write_component): Remove.
5057         (write_local_name): Add parameter.  Use direct local entity to
5058         discriminator calculation.
5059         (write_class_enum_type): Pass another argument to write_name.
5060         (write_template_template_arg): Likewise.
5061         (make_guard_variable): Likewise.
5062
5063 2000-08-27  Jason Merrill  <jason@redhat.com>
5064
5065         * decl.c (pushdecl): Matching decls for local externs are found in
5066         the current level.  Propagate linkage information from previous
5067         declarations.
5068
5069 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
5070
5071         * ir.texi (Expressions): Fix typo.
5072
5073 2000-08-25  Greg McGary  <greg@mcgary.org>
5074
5075         * tree.c (init_tree): Use ARRAY_SIZE.
5076
5077 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
5078
5079         * error.c (cp_tree_printer): Rework.
5080
5081 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
5082
5083         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
5084         dyn-string.o.
5085         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
5086         (cp-demangle.o): Remove target.
5087         (dyn-string.o): Likewise.
5088
5089         * decl.c (grokfndecl): Require that `main' return an `int'.
5090         * mangle.c (write_encoding): Don't mangle return types for
5091         conversion functions.
5092
5093 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
5094
5095         * error.c (tree_formatting_info): New data type.
5096         (tree_being_formatted): New macro.
5097         (tree_formatting_flags): Likewise.
5098         (put_whitespace): Likewise.
5099         (print_tree_identifier): Likewise.
5100         (print_identifier): Likewise.
5101         (cp_tree_printer, print_function_argument_list, print_declaration,
5102         print_expression, print_function_declaration,
5103         print_function_parameter, print_type, print_cv_qualifier): New
5104         functions.
5105         (init_error): Initialize lang_printer.
5106
5107 2000-08-24  Jason Merrill  <jason@redhat.com>
5108
5109         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
5110         adjustment necessary.
5111
5112 2000-08-24  Greg McGary  <greg@mcgary.org>
5113
5114         * cp-tree.h (MAIN_NAME_P): Remove macro.
5115
5116 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
5117
5118         * error.c (print_instantiation_context): Don't forget to flush the
5119         buffer.
5120
5121 2000-08-23  Jason Merrill  <jason@redhat.com>
5122
5123         * typeck.c (build_ptrmemfunc): Save the input pmf.
5124
5125         * method.c (process_modifiers): Use same_type_p.
5126
5127 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
5128
5129         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
5130         * mangle.c (write_function_type): Change prototype.
5131         (write_encoding): Don't mangle return types for
5132         constructors or destructors.
5133         (write_type): Adjust call to write_function_type.
5134         * pt.c (instantiate_template): Instantiate alternate entry points
5135         when instantiating the main function.
5136
5137 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
5138
5139         * error.c (cp_print_error_function): Don't use embedded '\n' in
5140         output_printf.
5141
5142 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
5143
5144         * decl.c (init_decl_processing): Remove bogus initialization.
5145         * error.c (lang_print_error_function): Restore here.
5146         (init_error): Initialize print_error_function.
5147
5148 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
5149
5150         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
5151
5152 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
5153
5154         * Makefile.in (error.o): Depends on diagnostic.h
5155
5156         * cp-tree.h (problematic_instantiation_changed,
5157         record_last_problematic_instantiation, current_instantiation,
5158         print_instantiation_context): Declare.
5159         (maybe_print_template_context): Remove.
5160
5161         * decl.c (init_decl_processing): Set print_error_function to NULL.
5162         (lang_print_error_function): Remove, since we're using a new
5163         machinery.
5164
5165         * error.c: #include diagnostic.h
5166         (function_category): New function.
5167         (cp_diagnostic_starter): Likewise.
5168         (cp_diagnostic_finalizer): Likewise.
5169         (cp_print_error_function): Likewise.
5170         (maybe_print_instantiation_context): Likewise.
5171         (print_instantiation_full_context): Likewise.
5172         (print_instantiation_partial_context): Likewise.
5173         (print_instantiation_context): Define.
5174         (init_error): Initialize diagnostic pager and finalizer.
5175
5176         * pt.c (problematic_instantiation_changed): Define.
5177         (record_last_problematic_instantiation): Likewise.
5178         (current_instantiation): Likewise.
5179         (maybe_print_template_context): Remove.
5180         (print_template_context): Likewise.
5181         (current_tinst_level): Make static to reflect Brendan Kehoe's
5182         change of 1995-04-13.
5183         (push_tinst_level): Call print_instantiation_context.
5184
5185 2000-08-21  Nix  <nix@esperi.demon.co.uk>
5186
5187         * lang-specs.h: Do not process -o or run the assembler if
5188         -fsyntax-only.
5189
5190 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
5191
5192         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
5193         variables.
5194         * decl2.c (lang_decode_option): Disable gettext attributes for
5195         -ansi.
5196
5197 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
5198
5199         * lex.c (lang_init_options): Default diagnostic message maximum
5200         length to 80, when line-wrapping.
5201
5202 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
5203
5204         * class.c (build_vtbl_initializer): Clear the entire
5205         vtbl_init_data.  Start keeping track of the functions for which we
5206         have created vcall offsets here.
5207         (dfs_build_vcall_offset_vtbl_entries): Remove.
5208         (build_vcall_offset_vtbl_entries): Reimplement.
5209         (add_vcall_offset_vtbl_entries_r): New function.
5210         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
5211         computing when vcall offsets are necessary.
5212
5213 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
5214
5215         * decl.c (member_function_or_else): Use cp_error ... %T.
5216         (grokdeclarator): Likewise.
5217         (start_method): Likewise.
5218         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
5219
5220 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
5221
5222         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
5223         TYPE_DECLs.
5224
5225 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
5226
5227         * cp-tree.h (PTRMEM_OK_P): New macro.
5228         (itf_ptrmem_ok): New enumeration value.
5229         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
5230         argument. Diagnose implicit pointer to member.
5231         (instantiate_type): Don't diagnose implicit pointer to member
5232         here. Pass itf_ptrmem_ok if ok. Adjust calls to
5233         resolve_address_of_overloaded_function.
5234         * init.c (build_offset_ref): Set PTRMEM_OK_P.
5235         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
5236         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
5237         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
5238         (build_unary_op): Deal with single non-static member in
5239         microsoft-land.
5240
5241 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
5242
5243         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
5244
5245 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
5246
5247         * cp-tree.h (enum_name_string): Remove prototype.
5248         (report_case_error): Remove prototype.
5249         * cp/typeck2.c (enum_name_string): Remove.
5250         (report_case_error): Remove.
5251         * error.c (dump_expr): Deal with enum values directly.
5252         Correctly negate integer constant.
5253
5254 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
5255
5256         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
5257         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
5258         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
5259         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
5260         (__cxa_vec_new): Use __cxa_vec_new2.
5261         (__cxa_vec_delete): Use __cxa_vec_delete2.
5262
5263 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
5264
5265         * vec.cc (__cxa_vec_new): Set "C" linkage.
5266         (__cxa_vec_ctor): Likewise.
5267         (__cxa_vec_cctor): Likewise.
5268         (__cxa_vec_dtor): Likewise.
5269         (__cxa_vec_delete): Likewise.
5270         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
5271         (__cxa_vec_ctor): Likewise.
5272         (__cxa_vec_cctor): Likewise.
5273         (__cxa_vec_dtor): Likewise.
5274         (__cxa_vec_delete): Likewise.
5275
5276 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
5277
5278         * class.c (instantiate_type): Reinstate local variable
5279         deleted in previous change.
5280
5281         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
5282         itf_no_attributes.
5283
5284 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
5285
5286         * cp-tree.h (instantiate_type_flags): New enumeration.
5287         (instantiate_type): Change parameter.
5288         * class.c (instantiate_type): Adjust prototype. Adjust.
5289         * call.c (standard_conversion): Adjust instantiate_type call.
5290         (reference_binding): Likewise.
5291         (build_op_delete_call): Likewise.
5292         (convert_like_real): Likewise.
5293         * cvt.c (cp_convert_to_pointer): Likewise.
5294         (convert_to_reference): Likewise.
5295         * pt.c (convert_nontype_argument): Likewise.
5296         * typeck.c (build_binary_op): Likewise.
5297         (build_ptrmemfunc): Likewise.
5298         (convert_for_assignment): Likewise.
5299
5300 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
5301
5302         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
5303         (current_aggr): Define.
5304         * decl.c (grokdeclarator): Make sure a friend class is an
5305         elaborated type specifier.
5306         * parse.y (current_aggr): Remove static definition.
5307         (cp_parse_init): Adjust.
5308         (structsp): Clear and restore current_aggr.
5309         (component_decl_list): Clear current_aggr.
5310
5311         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
5312         aggregate tag on the typename's context.
5313
5314         * pt.c (tsubst_friend_class): Return error_mark_node, if
5315         parms becomes NULL.
5316         (instantiate_class_template): Ignore error_mark_node friend types.
5317
5318 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
5319
5320         * cvt.c (warn_ref_binding): New static function, broken out of ...
5321         (convert_to_reference): ... here. Use it.
5322
5323 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
5324
5325         * parse.y (template_arg): Add rule for template qualified with
5326         global scope.
5327
5328 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
5329
5330         * decl2.c (add_function): Reorganize.
5331         (arg_assoc): Do not consider function template decls.
5332
5333 2000-08-11  Jason Merrill  <jason@redhat.com>
5334
5335         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
5336         looking inside.
5337
5338 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
5339
5340         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
5341         (lookup_nested_tag): Likewise.
5342
5343         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
5344         can be produced.
5345
5346 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
5347
5348         * parse.y (named_complex_class_head_sans_basetype): Remove
5349         always true if.
5350
5351 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
5352
5353         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
5354         explicit TEMPLATE_ID_EXPR args.
5355         (build_expr_from_tree, case CALL_EXPR): Likewise.
5356
5357 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
5358
5359         * decl.c (check_tag_decl): Diagnose typename's which don't
5360         declare anything.
5361
5362 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
5363
5364         * init.c (build_aggr_init): Reject bogus array initializers
5365         early.
5366
5367 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
5368
5369         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
5370         runtime.
5371         * cp/tinfo.cc (__dynamic_cast): Likewise.
5372         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
5373
5374 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
5375
5376         * cvt.c (convert_to_pointer_force): Fix error message when
5377         attempting to cast from ambiguous base.
5378
5379 2000-08-08  Jason Merrill  <jason@redhat.com>
5380
5381         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
5382         (tsubst_template_arg_vector): Likewise.
5383
5384         * decl2.c (build_anon_union_vars): Choose the largest field; don't
5385         assume that one will be as large as the union.
5386
5387 2000-08-07  Kazu Hirata  <kazu@hxi.com>
5388
5389         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
5390         * decl.c (pop_labels): Likewise.
5391
5392 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
5393
5394         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
5395         specifications.
5396         (__pointer_to_member_type_info): Likewise.
5397         (__base_class_info): Likewise.
5398         (__class_type_info): Likewise.
5399         (__si_class_type_info): Likewise.
5400         (__vmi_class_type_info): Likewise.
5401         * tinfo.cc (__si_class_type_info::__do_find_public_src):
5402         Changed member names to match specifications.
5403         (__vmi_class_type_info::__do_find_public_src): Likewise.
5404         (__si_class_type_info::__do_dyncast): Likewise.
5405         (__vmi_class_type_info::__do_dyncast): Likewise.
5406         (__si_class_type_info::__do_upcast): Likewise.
5407         (__vmi_class_type_info::__do_upcast): Likewise.
5408         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
5409         (__pbase_type_info::__pointer_catch): Likewise.
5410         (__pointer_type_info::__pointer_catch): Likewise.
5411         (__pointer_to_member_type_info::__pointer_catch): Likewise.
5412
5413 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
5414
5415         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
5416         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
5417         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
5418
5419 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
5420
5421         * cp-tree.h (add_method): Change prototype.
5422         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
5423         Don't double the size of the method vector in the error case.
5424         (handle_using_decl): Adjust call to add_method.
5425         (add_implicitly_declared_members): Likewise.
5426         (clone_function_decl): Likewise.
5427         * decl2.c (check_classfn): Likewise.
5428         * semantics.c (finish_member_declaration): Likewise.
5429
5430 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
5431
5432         * decl.c (flag_isoc94): New variable.
5433
5434 2000-08-02  Jason Merrill  <jason@redhat.com>
5435
5436         * pt.c (do_type_instantiation): Add complain parm; don't complain
5437         if called recursively.
5438         * cp-tree.h, parse.y: Adjust.
5439
5440 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
5441
5442         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
5443         -Wno-strict-prototypes.
5444
5445         * g++spec.c: Adjust type of second argument to
5446         lang_specific_driver, and update code as necessary.
5447
5448         * cp-tree.h: Don't prototype min_precision here.
5449         (my_friendly_assert): Cast expression to void.
5450         * semantics.c (do_poplevel): Initialize scope_stmts.
5451
5452 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
5453
5454         * cp-tree.h (DECL_NEEDED_P): Tweak.
5455
5456 2000-07-28  Jason Merrill  <jason@redhat.com>
5457
5458         * lang-specs.h: Use %i in rule for .ii files.
5459
5460 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
5461
5462         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
5463
5464 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
5465
5466         Allow indirect primary bases.
5467         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
5468         primary_base.
5469         (CLASSTYPE_VFIELD_PARENT): Remove.
5470         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
5471         (BINFO_PRIMARY_BINFO): Remove.
5472         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
5473         (BINFO_VBASE_PRIMARY_P): Likewise.
5474         (BINFO_PRIMARY_BASE_OF): New macro.
5475         (BINFO_INDIRECT_PRIMARY_P): Likewise.
5476         (get_primary_binfo): New function.
5477         * decl.c (lang_mark_tree): Make lang_type::primary_base.
5478         * class.c (vcall_offset_data_s): Rename to ...
5479         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
5480         and add ctor_vtbl_p.
5481         (get_derived_offset): Use get_primary_binfo.
5482         (dfs_mark_primary_bases): Adjust handling of virtual primary
5483         bases.
5484         (mark_primary_bases): Likewise.
5485         (set_primary_base): Take a binfo, not an integer, as a
5486         representation of the primary base.
5487         (indirect_primary_base_p): Remove.
5488         (determine_primary_base): Adjust for indirect primary bases.
5489         (dfs_find_final_overrider): Fix typo in coment.
5490         (update_vtable_entry_for_fn): Use get_primary_binfo.
5491         (layout_nonempty_base_or_field): Tweak.
5492         (build_base_fields): Adjust for new primary base semantics.
5493         (dfs_propagate_binfo_offsets): Remove.
5494         (propagate_binfo_offsets): Rewrite.
5495         (dfs_set_offset_for_shared_vbases): Remove.
5496         (layout_virtual_bases): Don't use it.
5497         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
5498         ABI.
5499         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
5500         CLASSTYPE_VFIELD_PARENT.
5501         (dfs_get_primary_binfo): New function.
5502         (get_primary_binfo): Likewise.
5503         (dump_class_hierarchy_r): Tweak printing of primary bases.
5504         (build_vtbl_initializer): Fix typo in comments.  Use
5505         vtbl_init_data.
5506         (build_vcall_and_vbase_vtbl_entries): Likewise.
5507         (build_vbaes_offset_vtbl_entries): Likewise.
5508         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
5509         BV_VCALL_INDEX to handle indirect primary bases.
5510         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
5511         (build_rtti_vtbl_entries): Likewise.
5512         * search.c (get_shared_vbase_if_not_primary): Tweak.
5513         (find_vbase_instance): Likewise.
5514         (binfo_for_vtable): Simplify.
5515         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
5516         (make_binfo): Make it have 11 entries.
5517
5518 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
5519
5520         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
5521         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
5522         ascertaining primaryness.
5523         (G): Remove template_args.
5524         (decl_is_template_id): New function.
5525         (write_encoding): Use decl_is_template_id.
5526         (write_name): Likewise.  Handle type_decls.  Get main variant of
5527         type decls.
5528         (write_nested_name): Likewise.
5529         (write_prefix): Likewise.
5530         (write_template_prefix): Likewise.
5531         (write_special_name_constructor): Remove defunct production from
5532         comment.
5533         (write_bare_function_type): Remove comment about absent parameter.
5534         (write_template_template_arg): Add missing grammar production to
5535         comment.
5536
5537 2000-07-27  Jason Merrill  <jason@redhat.com>
5538
5539         * decl.c (duplicate_decls): If common_type produces a non-typedef
5540         type for a typedef, just use the old type.
5541
5542 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
5543
5544         * cp-tree.h (function_depth): Declare.
5545         (verify_stmt_tree): Likewise.
5546         (find_tree): Likewise.
5547         * decl.c (function_depth): Give it external linkage.
5548         * optimize.c (optimize_function): Increment and decrement it.
5549         * tree.c (verify_stmt_tree_r): New function.
5550         (verify_stmt_tree): Likewise.
5551         (find_tree_r): Likewise.
5552         (find_tree): Likewise.
5553
5554 2000-07-27  Jason Merrill  <jason@redhat.com>
5555
5556         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
5557         TYPE_PTRMEMFUNC_P.
5558         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
5559
5560 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
5561
5562         * decl.c (start_cleanup_fn): Mark the function as `inline'.
5563         * decl2.c (get_guard): Call cp_finish_decl, not
5564         rest_of_decl_compilation, for local guards.
5565         * lex.c (do_identifier): Remove unused variable.
5566
5567 Wed Jul 26 15:05:51 CEST 2000   Marc Espie <espie@cvs.openbsd.org>
5568
5569         * parse.y:  Add missing ';'.
5570
5571 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
5572
5573         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
5574         of `extern "C++"'.
5575
5576 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
5577
5578         Kill strict_prototype. Backwards compatibility only for
5579         non NO_IMPLICIT_EXTERN_C systems.
5580         * cp-tree.h (flag_strict_prototype): Remove.
5581         (strict_prototype): Remove.
5582         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
5583         * decl.c (maybe_push_to_top_level): Adjust.
5584         (pop_from_top_level): Adjust.
5585         (decls_match): Only allow sloppy parm matching for ancient
5586         system headers.
5587         (init_decl_processing): Adjust.
5588         (grokdeclarator): Adjust.
5589         * decl2.c (flag_strict_prototype): Remove.
5590         (strict_prototype): Remove.
5591         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
5592         (lang_f_options): Remove "strict-prototype".
5593         (unsupported-options): Add "strict-prototype".
5594         * lex.c (do_identifier): Adjust.
5595         (do_scoped_id): Adjust.
5596         * parse.y (empty_parms): Adjust.
5597         * class.c (push_lang_context): Adjust.
5598         (pop_lang_context): Adjust.
5599         * typeck.c (comp_target_parms): Adjust.
5600
5601 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
5602
5603         * decl.c (poplevel): Deal with anonymous variables at for scope.
5604         (maybe_inject_for_scope_var): Likewise.
5605
5606 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
5607
5608         * decl.c: Remove all signal handling code, now done in toplev.c.
5609
5610 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
5611
5612         * decl.c (make_rtl_for_nonlocal_decl): Rework.
5613
5614         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
5615         correctly.
5616
5617 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
5618
5619         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
5620         Define my_friendly_assert and my_friendly_abort as macros
5621         which may call friendly_abort.  Prototype friendly abort, not
5622         my_friendly_abort or my_friendly_assert.
5623         * decl.c (signal_catch): Report the signal caught in the error
5624         message.  Call fatal directly.
5625         * typeck2.c (ack, my_friendly_assert): Delete.
5626         (my_friendly_abort): Rename to friendly_abort.  Expect file,
5627         line, and function parameters.  Report the abort code, then
5628         call fancy_abort.  Do not mask an abort if errors have
5629         already occurred.
5630
5631 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
5632
5633         * typeck.c (comp_target_parms): Remove obsolete parameter.
5634         (comp_target_types): Adjust.
5635
5636 2000-07-17  Jason Merrill  <jason@redhat.com>
5637
5638         * typeck.c (mark_addressable): Never set TREE_USED.
5639         * call.c (build_call): Don't abort on calls to library functions
5640         that have been declared normally.
5641
5642         * typeck.c (build_binary_op): Fix grammar in warning.
5643
5644         * exception.cc (__eh_free): Fix prototype.
5645
5646         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
5647
5648         * decl.c (pushdecl): Handle seeing an OVERLOAD in
5649         IDENTIFIER_NAMESPACE_VALUE.
5650
5651 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
5652
5653         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
5654         * method.c (use_thunk): Correct handling of vcall offsets.
5655
5656 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
5657
5658         * .cvsignore: parse.h and parse.c have no cp- prefix.
5659
5660 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
5661
5662         * .cvsignore: New file.
5663
5664 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
5665
5666         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
5667
5668 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
5669
5670         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
5671         * parse.c: Remove.
5672         * parse.h: Likewise.
5673
5674 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
5675
5676         * class.c (layout_class_type): Add pointers to virtual bases after
5677         base classes under the old ABI.
5678
5679 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
5680
5681         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
5682         (finish_continue_stmt): Likewise.
5683         (begin_for_stmt): Remove call to note_level_for_for.
5684         (finish_goto_stmt): Change call from build_min_nt
5685         to build_stmt.
5686         (finish_expr_stmt): Likewise.
5687         (begin_if_stmt): Likewise.
5688         (begin_while_stmt): Likewise.
5689         (finish_while_stmt): Likewise.
5690         (finish_return_stmt): Likewise.
5691         (begin_for_stmt): Likewise.
5692         (finish_for_stmt): Likewise.
5693         (finish_break_stmt): Likewise.
5694         (begin_switch_stmt): Likewise.
5695         (finish_case_label): Likewise.
5696         (genrtl_try_block): Likewise.
5697         (begin_try_block): Likewise.
5698         (begin_handler): Likewise.
5699         (begin_compound_stmt): Likewise.
5700         (finish_asm_stmt): Likewise.
5701         (finish_label_stmt): Likewise.
5702         (add_decl_stmt): Likewise.
5703         (finish_subobject): Likewise.
5704         (finish_decl_cleanup): Likewise.
5705         (finish_named_return_value): Likewise.
5706         (setup_vtbl_ptr): Likewise.
5707         (add_scope_stmt): Likewise.
5708         * decl.c (finish_constructor_body): Likewise.
5709         (finish_destructor_body): Likewise.
5710         * optimize.c (copy_body_r): Likewise.
5711         (initialize_inlined_parameters): Likewise.
5712         (declare_return_variable): Likewise.
5713         (expand_call_inline): Likewise.
5714
5715 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
5716
5717         * semantics.c (expand_body): Sync interface information
5718         at the end of function body expansion.
5719
5720 2000-07-09  Jason Merrill  <jason@redhat.com>
5721
5722         * init.c (build_new_1): Bail early if the call to new fails.
5723
5724         * decl.c (compute_array_index_type): Check specifically for
5725         an INTEGER_CST, not just TREE_CONSTANT.
5726
5727         * decl.c (duplicate_decls): Don't call duplicate_decls on
5728         the DECL_TEMPLATE_RESULT.
5729         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
5730         codes.
5731
5732         * error.c (dump_template_bindings): Don't crash if we had an
5733         invalid argument list.
5734
5735         * typeck.c (c_expand_start_case): Do narrowing here.
5736         * semantics.c (finish_switch_cond): Not here.
5737
5738 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
5739
5740         * parse.y (asm_clobbers): Do string concatenation.
5741
5742 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
5743
5744         * decl.c (pushtag): Don't put local classes in template functions
5745         on the local_classes list.
5746
5747 2000-07-04  Scott Snyder  <snyder@fnal.gov>
5748
5749         * decl2.c (get_guard): Add missing return for old ABI local
5750         variable case.
5751
5752 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
5753
5754         * cp-tree.h (char_type_p): New function.
5755         * decl.c (init_decl_processing): Don't initialize
5756         signed_wchar_type_node or unsigned_wchar_type_node.
5757         (complete_array_type): Handle brace-enclosed string-constants.
5758         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
5759         * tree.c (char_type_p): New function.
5760         * typeck2.c (digest_init): Use char_type_p.
5761
5762 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
5763
5764         * pt.c (tsubst): Don't layout type, if it's error_mark.
5765
5766 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
5767
5768         * pt.c (instantiate_pending_templates): Reset template level.
5769
5770 2000-07-05  Jason Merrill  <jason@redhat.com>
5771
5772         * call.c (joust): Don't complain about `operator char *()' beating
5773         `operator const char *() const'.
5774
5775 2000-07-04  scott snyder  <snyder@fnal.gov>
5776             Jason Merrill  <jason@redhat.com>
5777
5778         * repo.c (repo_get_id): Handle the case where a class with virtual
5779         bases has a null TYPE_BINFO_VTABLE.
5780
5781 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
5782             Jason Merrill  <jason@redhat.com>
5783
5784         * parse.y (member_init): Just pass in the type.
5785         * init.c (expand_member_init): Handle getting a type.
5786
5787 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
5788             Jason Merrill  <jason@redhat.com>
5789
5790         * decl.c (finish_function): Warn if a function has no return
5791         statement.
5792         Suggested by Andrew Koenig.
5793         * typeck.c (check_return_expr): Do set current_function_returns_value
5794         if we got an error_mark_node.
5795
5796 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
5797
5798         * decl2.c (push_decl_namespace): Push the original namespace.
5799
5800 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
5801
5802         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
5803         * semantics.c (begin_class_definition): Clear it.
5804
5805 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
5806
5807         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
5808         (genrtl_expr_stmt): Likewise.
5809         (genrtl_decl_stmt): Likewise.
5810         (genrtl_if_stmt): Likewise.
5811         (genrtl_while_stmt): Likewise.
5812         (genrtl_do_stmt): Likewise.
5813         (genrtl_return_stmt): Likewise.
5814         (genrtl_for_stmt): Likewise.
5815         (genrtl_break_stmt): Likewise.
5816         (genrtl_continue_stmt): Likewise.
5817         (genrtl_scope_stmt): Likewise.
5818         (genrtl_switch_stmt): Likewise.
5819         (genrtl_case_label): Likewise.
5820         (genrtl_begin_compound_stmt): Likewise.
5821         (genrtl_finish_compound_stmt): Likewise.
5822         (genrtl_compound_stmt): Likewise.
5823         (genrtl_asm_stmt): Likewise.
5824
5825         * init.c (begin_init_stmts): Remove call to
5826         genrtl_begin_compound_stmt.
5827         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
5828
5829         * semantics.c (lang_expand_stmt): Changed call to
5830         genrtl_compound_stmt to ignore return value.
5831
5832 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
5833
5834         * mangle.c (canonicalize_for_substitution): Return the canonical
5835         variant of a type.
5836
5837         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
5838         TYPE_DECL.
5839         * typeck.c (commonparms): Remove obstack manipulations.
5840
5841 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
5842
5843         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
5844
5845         * Makefile.in (OBJS): Added ../c-semantics.o.
5846         (OBJDEPS): Likewise.
5847
5848         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
5849         ../c-common.h.
5850         (struct stmt_tree): Added comment.
5851         (current_function_name_declared): Removed.
5852         (stmts_are_full_exprs_p): Likewise.
5853         (genrtl_do_pushlevel): Likewise.
5854         (genrtl_clear_out_block): Likewise.
5855         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
5856         (DECL_ANON_UNION_ELEMS): Likewise.
5857         (emit_local_var): Likewise.
5858         (make_rtl_for_local_static): Likewise.
5859         (do_case): Likewise.
5860         (expand_stmt): Likewise.
5861         (genrtl_decl_cleanup): Likewise.
5862         (c_expand_asm_operands): Likewise.
5863         (c_expand_return): Likewise.
5864         (c_expand_start_case): Likewise.
5865
5866         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
5867         (emit_local_var): Likewise.
5868         (initialize_local_var): Change reference to
5869         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
5870         Change reference to stmts_are_full_exprs_p to
5871         current_stmt_tree->stmts_are_full_exprs_p.
5872         (push_cp_function_context): Likewise.
5873
5874         * expect.c (expand_throw): Change reference to
5875         stmts_are_full_exprs_p.
5876
5877         * init.c (build_aggr_init): Change reference to
5878         stmts_are_full_exprs_p.
5879         (build_vec_init): Likewise.
5880
5881         * optimize.c (maybe_clone_body): Change reference to
5882         current_function_name_declared to
5883         cp_function_chain->name_declared.
5884
5885         * pt.c (instantiate_decl): Change reference to
5886         current_function_name_declared to
5887         cp_function_chain->name_declared.
5888
5889         * semantics.c (expand_cond): Moved declaration to c-common.h.
5890         (genrtl_do_pushlevel): Moved to c-semantics.c.
5891         (genrtl_clear_out_block): Likewise.
5892         (genrtl_goto_stmt): Likewise.
5893         (genrtl_expr_stmt): Likewise.
5894         (genrtl_decl_stmt): Likewise.
5895         (gerntl_if_stmt): Likewise.
5896         (genrtl_while_stmt): Likewise.
5897         (genrtl_do_stmt): Likewise.
5898         (genrtl_return_stmt): Likewise.
5899         (genrtl_for_stmt): Likewise.
5900         (genrtl_break_stmt): Likewise.
5901         (genrtl_continue_stmt): Likewise.
5902         (genrtl_scope_stmt): Likewise.
5903         (genrtl_switch_stmt): Likewise.
5904         (genrtl_case_label): Likewise.
5905         (genrtl_begin_compound_stmt): Likewise.
5906         (genrtl_finish_compound_stmt): Likewise.
5907         (genrtl_compound_stmt): Likewise.
5908         (genrtl_asm_stmt): Likewise.
5909         (genrtl_decl_cleanup): Likewise.
5910         (expand_cond): Likewise.
5911         (expand_stmt): Renamed to ...
5912         (lang_expand_stmt): ... this.
5913         (lang_expand_expr_stmt): Initialize.
5914         (set_current_function_name_declared): Likewise.
5915         (stmts_are_full_exprs_p): Likewise.
5916         (current_function_name_declared): Likewise.
5917         (anon_aggr_type_p): Likewise.
5918         (do_poplevel): Change reference to
5919         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
5920         Change reference to stmts_are_full_exprs_p to
5921         current_stmt_tree->stmts_are_full_exprs_p.
5922         (add_tree): Likewise.
5923         (finish_expr_stmt): Likewise.
5924         (prep_stmt): Likewise.
5925         (lang_expand_stmt): Likewise.
5926         (begin_compound_stmt): Change reference to
5927         current_function_name_declared to
5928         cp_function_chain->name_declared and call to
5929         current_function_name_declared().
5930         (setup_vtbl_ptr): Likewise.
5931         (genrtl_do_poplevel): Removed.
5932
5933 2000-06-30  Jason Merrill  <jason@redhat.com>
5934
5935         * init.c (init_init_processing): Go back to aligning like
5936         double_type_node for old ABI.
5937         (get_cookie_size): Make cookie larger if we get a type that needs
5938         more alignment.
5939         (build_vec_delete): Call it.
5940
5941         * typeck.c (qualify_type_recursive): New fn.
5942         (composite_pointer_type): Use it.
5943         (build_binary_op): Use composite_pointer_type.
5944
5945 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
5946             Jason Merrill  <jason@redhat.com>
5947
5948         * typeck.c (check_return_expr): Don't complain about returning
5949         NULL from operator new if -fcheck-new.
5950         * cp-tree.h: Declare flag_check_new here.
5951         * init.c: Not here.
5952
5953 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
5954
5955         * mangle.c (find_substitution): Use same_type_p.
5956         (write_encoding): Don't check for substitutions.
5957
5958 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
5959
5960         * parse.y (expr_no_comma_rangle): New non-terminal.
5961         (template_parm): Use it for default parameter case.
5962         (template_arg): Use it.
5963         (expr_no_commas): Remove commented out undefined extensions.
5964         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
5965         * parse.h, parse.c: Rebuilt.
5966
5967 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
5968
5969         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
5970         (finish_asm_stmt): Do it here, instead.
5971
5972         * cp-tree.h (ridpointers): Don't declare.
5973         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
5974         (record_builtin_java_type): Likewise.
5975         (init_decl_processing): Likewise.
5976         * lex.c: Move inclusion of lex.h.
5977         (ridpointers): Don't define.
5978         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
5979         RID_MAX.
5980         * lex.h (enum rid): Rename to ...
5981         (enum cp_rid): ... this.
5982         (ridpointers): Don't declare.
5983         * parse.y: Move inclusion of lex.h.
5984         * parse.c: Regenerated.
5985         * spew.c: Move inclusion of lex.h.
5986
5987         * cp-tree.h (struct language_function): Remove temp_name_counter.
5988         (temp_name_counter): Remove.
5989         (get_temp_name): Change prototype.
5990         (get_guard): New function.
5991         (get_guard_cond): Likewise.
5992         (set_guard): Likewise.
5993         * cvt.c (build_up_reference): Adjust call to get_temp_name.
5994         * decl.c (expand_static_init): Use get_guard and friends to
5995         implement guard variables.
5996         * decl2.c (get_temp_name): Assume that the variables created are
5997         always static.
5998         (get_sentry): Rename to ...
5999         (get_guard): ... this.  Implement new ABI guard variables.
6000         (get_guard_bits): New function.
6001         (get_guard_cond): Likewise.
6002         (set_guard): Likewise.
6003         (start_static_initialization_or_destruction): Use them.
6004         (do_static_initialization): Replace sentry with guard throughout.
6005         (do_static_destruction): Likewise.
6006         * init.c (create_temporary_var): Add comment.
6007
6008 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
6009
6010         * mangle.c (find_substitution): Use same_type_p.
6011         (write_encoding): Don't check for substitutions.
6012
6013 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
6014
6015         * parse.y (expr_no_comma_rangle): New non-terminal.
6016         (template_parm): Use it for default parameter case.
6017         (template_arg): Use it.
6018         (expr_no_commas): Remove commented out undefined extensions.
6019         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
6020         * parse.h, parse.c: Rebuilt.
6021
6022 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
6023
6024         * cp-tree.h (flag_const_strings): Remove.
6025         (warn_parentheses): Likewise.
6026         (warn_format): Likewise.
6027         (common_type): Likewise.
6028         (default_conversion): Likewise.
6029         (build_binary_op): Likewise.
6030         (cp_build_binary_op): New macro.
6031         * call.c (build_new_op): Use cp_build_binary_op instead of
6032         build_binary_op.
6033         * class.c (build_vtable_entry_ref): Likewise.
6034         * decl.c (expand_static_init): Likewise.
6035         (compute_array_index_type): Likewise.
6036         (build_enumerator): Likewise.
6037         * decl2.c (delete_sanity): Likewise.
6038         (start_static_initialization_or_destruction): Likewise.
6039         * error.c (dump_type_suffix): Likewise.
6040         * init.c (resolve_offset_ref): Likewise.
6041         (build_new): Likewise.
6042         (build_new_1): Likewise.
6043         (build_vec_delete_1): Likewise.
6044         (build_vec_init): Likewise.
6045         (build_delete): Likewise.
6046         * rtti.c (synthesize_tinfo_fn): Likewise.
6047         (synthesize_tinfo_var): Likewise.
6048         * search.c (expand_upcast_fixups): Likewise.
6049         (fixup_all_virtual_upcast_offsets): Likewise.
6050         * typeck.c (build_array_ref): Likewise.
6051         (get_member_function_from_ptrfunc): Likewise.
6052         (build_binary_op): Add parameter.
6053         (pointer_int_sum): Use cp_build_binary_op.
6054         (pointer_diff): Likewise.
6055         (build_modify_expr): Likewise.
6056         (get_delta_difference): Likewise.
6057         (build_ptrmemfunc): Likewise.
6058
6059 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
6060
6061         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
6062         * decl.c (create_implicit_typedef): Adjust.
6063         * decl2.c (build_artificial_parm): Adjust.
6064         * method.c (implicitly_declare_fn): Adjust.
6065         * pt.c (push_inline_template_parms_recursive): Adjust.
6066         (process_template_parm): Adjust.
6067         (overloaded_template_name): Adjust.
6068         * semantics.c (finish_template_template_parm): Adjust.
6069
6070 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
6071
6072         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
6073         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
6074         where to emit thunks.
6075         (build_vtt): Adjust call to build_vtt_inits.
6076         (build_vtt_inits): Add parameter to indicate whether or not
6077         sub-VTTs for virtual bases should be included.  Adjust handling of
6078         construction vtables.
6079         (get_matching_base): New function.
6080         (dfs_build_vtt_inits): Rename to ...
6081         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
6082         construction vtables.
6083         (dfs_fixup_binfo_vtbls): Likewise.
6084         (build_ctor_vtbl_groups): Build construction vtables for virtual
6085         bases, too.
6086         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
6087         to build construction vtbls.
6088         (dfs_accumulate_vtbl_inits): Adjust handling of
6089         construction vtables.
6090
6091         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
6092         types correctly.
6093
6094 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
6095
6096         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
6097
6098 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
6099
6100         * search.c (hides): Remove.
6101         (is_subobject_of_p): Add most_derived parameter. Use
6102         CANONICAL_BINFO.
6103         (lookup_field_queue_p): Adjust.
6104         (lookup_field_r): Adjust.
6105
6106 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
6107
6108         * decl2.c (handle_class_head): Bash typedefs to the type's main
6109         decl.
6110
6111 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
6112
6113         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
6114         (begin_global_stmt_expr): ... this.
6115         (genrtl_finish_stmt_expr): Rename to ...
6116         (finish_global_stmt_expr): ... this.
6117         * init.c (begin_init_stmts): Adjust calls.
6118         (finish_init_stmts): Likewise.
6119         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
6120         (begin_global_stmt_expr): ... this.
6121         (genrtl_finish_stmt_expr): Rename to ...
6122         (finish_global_stmt_expr): ... this.
6123
6124 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
6125
6126         * search.c (lookup_member): Fix typo in comment.
6127
6128 2000-06-24  Jason Merrill  <jason@redhat.com>
6129
6130         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
6131         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
6132
6133 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
6134
6135         * parse.y (complex_direct_notype_declarator): Support global_scope.
6136         * Makefile.in: Adjust conflict count.
6137
6138 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
6139
6140         * parse.y (template_arg): Convert TEMPLATE_DECL
6141         that is a template template paramter to
6142         TEMPLATE_TEMPLATE_PARM here.
6143
6144         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
6145         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
6146         (copy_template_template_parm): Adjust prototype.
6147         * decl.c (grokdeclarator): Remove dead code.
6148         * pt.c (process_template_parm): Tidy.
6149         (lookup_template_class): Construct nodes in
6150         copy_template_template_parm.
6151         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
6152         lookup_template_class.  Use TYPE_TI_TEMPLATE.
6153         * tree.c (copy_template_template_parm): Add NEWARGS
6154         parameter.
6155         (mapcar): Adjust call to copy_template_template_parm.
6156         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
6157         * method.c (build_template_template_parm_names): Change error
6158         code to avoid compilation warning.
6159
6160         * gxxint.texi: Document template template parameter
6161         name mangling.
6162
6163 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
6164
6165         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
6166         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
6167         (cp-demangle.o): New rule.
6168         (dyn-string.o): Likewise.
6169         * inc/cxxabi.h (__cxa_demangle): New declaration.
6170
6171 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
6172
6173         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
6174         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
6175         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
6176         a tree, not an int.
6177         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
6178         (make_thunk): Change prototype.
6179         (emit_thunk): Rename to use_thunk.
6180         (mangle_thunk): Change prototype.
6181         * class.c (get_derived_offset): Simplify.
6182         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
6183         BV_GENERATE_THUNK_WITH_VTABLE_P.
6184         (build_primary_vtable): Simplify.
6185         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
6186         (dfs_find_base): Remove.
6187         (update_vtable_entry_for_fn): Correct bug in finding the base
6188         where a virtual function was first declared.  Figure out whether
6189         or not to emit a vcall-thunk with the vtables in which it appears.
6190         Correct logic for deciding whether to use an ordinary thunk, or a
6191         vcall thunk.
6192         (finish_struct_1): Remove unnecssary code.
6193         (build_vtbl_initializer): Use ssize_int for the running counter of
6194         negative indices.
6195         (build_vtbl_initializer): Only use vcall thunks where necessary.
6196         Mark thunks as needing to be emitted with their vtables, or not.
6197         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
6198         indices.  Use size_binop.
6199         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
6200         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
6201         size_binop.
6202         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
6203         (build_vtable_entry): Mark thunks as needing to be emitted with
6204         their vtables, or not.
6205         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
6206         * decl2.c (mark_vtable_entries): Use use_thunk instead of
6207         emit_thunk.
6208         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
6209         information.
6210         * error.c (dump_expr): Use BV_FN.
6211         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
6212         not an int.
6213         * method.c (make_thunk): Likewise.
6214         (emit_thunk): Rename to use_thunk.  Allow callers to decide
6215         whether or not to actually emit the thunk.  Adjust for changes in
6216         representation of vcall offsets.
6217         * search.c (dfs_get_pure_virtuals): Use BV_FN.
6218         * semantics.c (emit_associated_thunks): New function.
6219         (expand_body): Use it.
6220         * ir.texi: Adjust decriptions of thunks.
6221
6222 2000-06-22  Jason Merrill  <jason@redhat.com>
6223
6224         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
6225         (tsubst_friend_function): Copy it here.
6226
6227         * decl.c (grok_op_properties): Fix typo.
6228
6229         * decl2.c (delete_sanity): Clarify warning, avoid failure on
6230         deleting void*.
6231
6232         * pt.c (check_explicit_specialization): Clarify error.
6233
6234         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
6235         an old OVERLOAD when we're declaring a non-function.
6236         (pushdecl, destroy_local_var): Check for error_mark_node.
6237         (warn_extern_redeclared_static): Also bail early if
6238         we're a CONST_DECL.
6239         (push_overloaded_decl): Ignore an old error_mark_node.
6240
6241 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
6242
6243         * call.c (build_x_va_arg): Check if in a template decl.
6244         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
6245
6246 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6247
6248         * class.c (push_lang_context): TYPE_NAME gets you to the Java
6249         types DECLs.
6250         * decl.c (check_goto): Computed gotos assumed OK.
6251
6252 2000-06-20  Jason Merrill  <jason@redhat.com>
6253
6254         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
6255         for which we don't need to look for instantiations.
6256
6257 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
6258
6259         * parse.y (program): Always call finish_translation_unit.
6260         * parse.c, parse.h: Rebuilt.
6261
6262 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
6263
6264         * method.c: Don't include hard-reg-set.h.
6265
6266 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
6267
6268         * rtti.c (get_base_offset): Cope when vbase field is in a base.
6269
6270 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
6271
6272         * call.c (build_conditional_expr): Use VOID_TYPE_P.
6273         * cvt.c (cp_convert_to_pointer): Likewise.
6274         (convert_to_void): Likewise.
6275         * error.c (dump_expr): Likewise.
6276         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
6277         * init.c (build_delete): Likewise.
6278         * method.c (emit_thunk): Likewise.
6279         * optmize.c (declare_return_variable): Likewise.
6280         * rtti.c (get_tinfo_decl_dynamic): Likewise.
6281         (get_typeid): Likewise.
6282         (build_dynamic_cast_1): Likewise.
6283         * typeck.c (composite_pointer_type): Likewise.
6284         (common_type): Likewise.
6285         (build_indirect_ref): Likewise.
6286         (build_binary_op): Likewise.
6287         (build_x_compound_expr): Likewise.
6288         (check_return_expr): Likewise.
6289         * typeck2.c (add_exception_specifier): Likewise.
6290
6291         * mangle.c (write_method_parms): Use direct comparison for end
6292         of parmlist.
6293
6294 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
6295
6296         * cp-tree.h (genrtl_try_block): Declare function.
6297         (genrtl_handler): Likewise.
6298         (genrtl_catch_block): Likewise.
6299         (genrtl_ctor_stmt): Likewise.
6300         (genrtl_subobject): Likewise.
6301         (genrtl_decl_cleanup): Likewise.
6302         (genrtl_do_poplevel): Likewise.
6303         (genrtl_do_pushlevel): Likewise.
6304         (genrtl_clear_out_block): Likewise.
6305         (genrtl_goto_stmt): Likewise.
6306         (genrtl_expr_stmt): Likewise.
6307         (genrtl_decl_stmt): Likewise.
6308         (genrtl_if_stmt): Likewise.
6309         (genrtl_while_stmt): Likewise.
6310         (genrtl_do_stmt): Likewise.
6311         (genrtl_return_stmt): Likewise.
6312         (genrtl_for_stmt): Likewise.
6313         (genrtl_break_stmt): Likewise.
6314         (genrtl_continue_stmt): Likewise.
6315         (genrtl_scope_stmt): Likewise.
6316         (genrtl_switch_stmt): Likewise.
6317         (genrtl_case_label): Likewise.
6318         (genrtl_begin_compound_stmt): Likewise.
6319         (genrtl_finish_compound_stmt): Likewise.
6320         (genrtl_compound_stmt): Likewise.
6321         (genrtl_asm_stmt): Likewise.
6322         (genrtl_named_return_value): Likewise.
6323         (genrtl_begin_stmt_expr): Likewise.
6324         (genrtl_finish_stmt_expr): Likewise.
6325         (finish_for_stmt): Removed first argument.
6326         (finish_switch_stmt): Likewise.
6327
6328         * semantics.c (genrtl_try_block): Define function.
6329         (genrtl_handler): Likewise.
6330         (genrtl_catch_block): Likewise.
6331         (genrtl_ctor_stmt): Likewise.
6332         (genrtl_subobject): Likewise.
6333         (genrtl_decl_cleanup): Likewise.
6334         (genrtl_do_poplevel): Likewise.
6335         (genrtl_do_pushlevel): Likewise.
6336         (genrtl_clear_out_block): Likewise.
6337         (genrtl_goto_stmt): Likewise.
6338         (genrtl_expr_stmt): Likewise.
6339         (genrtl_decl_stmt): Likewise.
6340         (genrtl_if_stmt): Likewise.
6341         (genrtl_while_stmt): Likewise.
6342         (genrtl_do_stmt): Likewise.
6343         (genrtl_return_stmt): Likewise.
6344         (genrtl_for_stmt): Likewise.
6345         (genrtl_break_stmt): Likewise.
6346         (genrtl_continue_stmt): Likewise.
6347         (genrtl_scope_stmt): Likewise.
6348         (genrtl_switch_stmt): Likewise.
6349         (genrtl_case_label): Likewise.
6350         (genrtl_begin_compound_stmt): Likewise.
6351         (genrtl_finish_compound_stmt): Likewise.
6352         (genrtl_compound_stmt): Likewise.
6353         (genrtl_asm_stmt): Likewise.
6354         (genrtl_named_return_value): Likewise.
6355         (genrtl_begin_stmt_expr): Likewise.
6356         (genrtl_finish_stmt_expr): Likewise.
6357         (finish_for_stmt): Removed first argument and generate rtl
6358         specific code.
6359         (finish_switch_stmt): Likewise.
6360         (do_poplevel): Removed generate rtl specific code.
6361         (do_pushlevel): Likewise.
6362         (add_tree): Likewise.
6363         (finish_goto_stmt): Likewise.
6364         (finish_expr_stmt): Likewise.
6365         (begin_if_stmt): Likewise.
6366         (finish_if_stmt_cond): Likewise.
6367         (finish_then_clause): Likewise.
6368         (begin_else_clause): Likewise.
6369         (finish_else_clause): Likewise.
6370         (finish_if_stmt): Likewise.
6371         (clear_out_block): Likewise.
6372         (begin_while_stmt): Likewise.
6373         (finish_while_stmt_cond): Likewise.
6374         (finish_while_stmt): Likewise.
6375         (begin_do_stmt): Likewise.
6376         (finish_do_body): Likewise.
6377         (finish_do_stmt): Likewise.
6378         (finish_return_stmt): Likewise.
6379         (begin_for_stmt): Likewise.
6380         (finish_for_init_stmt): Likewise.
6381         (finish_for_cond): Likewise.
6382         (finish_for_expr): Likewise.
6383         (finish_break_stmt): Likewise.
6384         (finish_continue_stmt): Likewise.
6385         (begin_switch_stmt): Likewise.
6386         (finish_switch_cond): Likewise.
6387         (finish_case_label): Likewise.
6388         (begin_try_block): Likewise.
6389         (begin_function_try_block): Likewise.
6390         (finish_try_block): Likewise.
6391         (finish_cleanup_try_block): Likewise.
6392         (finish_cleanup): Likewise.
6393         (finish_function_try_block): Likewise.
6394         (finish_handler_sequence): Likewise.
6395         (finish_function_handler_sequence): Likewise.
6396         (begin_handler): Likewise.
6397         (finish_handler_parms): Likewise.
6398         (begin_catch_block): Likewise.
6399         (finish_handler): Likewise.
6400         (begin_compound_stmt): Likewise.
6401         (finish_compound_stmt): Likewise.
6402         (finish_asm_stmt): Likewise.
6403         (finish_label_stmt): Likewise.
6404         (finish_label_decl): Likewise.
6405         (finish_subobject): Likewise.
6406         (finish_decl_cleanup): Likewise.
6407         (finish_named_return_value): Likewise.
6408         (begin_stmt_expr): Likewise.
6409         (finish_stmt_expr): Likewise.
6410
6411         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
6412         to call genrtl_expr_stmt when appropriate.
6413
6414         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
6415         begin_compound_expr to call genrtl_begin_stmt_expr and
6416         genrtl_begin_compound_expr when appropriate.
6417         (finish_init_stmts): Changed calls to finish_compound_expr and
6418         finish_stmt_expr to call genrtl_finish_compound_expr and
6419         genrtl_finish_stmt_expr when appropriate.
6420         (expand_default_init): Changed call to finish_expr_stmt to call
6421         genrtl_expr_stmt when appropriate.
6422         (build_vec_init): Likewise.
6423
6424         * parse.y (simple_stmt): Removed first argument from call to
6425         finish_for_stmt. Removed first argument from call to
6426         finish_switch_stmt.
6427
6428         * parse.c: Regenerated.
6429
6430         * pt.c (tsubst_expr): Removed first argument from call to
6431         finish_for_stmt. Removed first argument from call to
6432         finish_switch_stmt.
6433
6434 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
6435
6436         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
6437         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
6438
6439         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
6440         (cplus_tree_code_length[]): Likewise.
6441         (cplus_tree_code_name[]): Likewise.
6442         (init_parse): Added call to add_c_tree_codes. Changed
6443         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
6444
6445 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
6446
6447         * cp-tree.h (finish_mem_initializers): Declare.
6448         (count_trees): Likewise.
6449         * parse.y (base_init): Use finish_mem_initializers.
6450         * semantics.c (finish_mem_initializers): New function.
6451
6452         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
6453         the number of trees.
6454         (n_trees): Remove.
6455         (count_trees): Don't use it.
6456
6457 2000-06-15  Jason Merrill  <jason@redhat.com>
6458
6459         * tree.c (count_trees): New debugging function.
6460
6461         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
6462         * init.c (build_member_call): Pull out the name of a DECL.
6463
6464         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
6465         * semantics.c (expand_body): Push to TV_INTEGRATION here.
6466         * optimize.c (optimize_function): Not here.
6467         * pt.c (instantiate_decl): Push to TV_PARSE.
6468
6469 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
6470
6471         * cp-tree.h (struct language_function): Remove x_base_init_list
6472         and x_member_init_list.
6473         (current_base_init_list): Remove.
6474         (current_member_init_list): Likewise.
6475         (setup_vtbl_ptr): Change prototype.
6476         (emit_base_init): Likewise.
6477         (expand_member_init): Likewise.
6478         (reinit_parse_for_function): Remove.
6479         * decl.c (save_function_data): Don't clear x_base_init_list and
6480         x_member_init_list.
6481         (mark_language_function): Don't mark them.
6482         * init.c (perform_member_init): Tweak comment.
6483         (sort_member_init): Take the list of initializers as an argument.
6484         (sort_base_init): Likewise.
6485         (emit_base_init): Likewise.
6486         (expand_member_init): Return the initializer.  Don't use global
6487         variables.
6488         * lex.c (reinit_parse_for_function): Remove.
6489         * method.c (build_template_parm_names): Correct substitution.
6490         (do_build_copy_constructor): Don't use current_member_init_list
6491         and current_base_init_list.
6492         (synthesize_method): Likewise.
6493         * parse.y (base_init): Split mem-initializers into
6494         base-initializers and field-initializers.
6495         (member_init_list): Build up the list here.
6496         (member_init): Return the initializer.
6497         (fn.depfn): Don't use reinit_parse_for_function.
6498         * parse.c: Regenerated.
6499         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
6500         ERROR_MARK.
6501         (tsubst_expr): Don't use current_member_init_list
6502         and current_base_init_list.
6503         (tsubst_expr_values): Rename to ...
6504         (tsubst_initializer_list): ... this.  Use convert_from_reference.
6505         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
6506         and current_base_init_list.
6507         (begin_function_definition): Don't call reinit_parse_for_function.
6508
6509         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
6510
6511         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
6512         correctly.
6513
6514         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
6515
6516 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
6517
6518         * cp-tree.h (IF_COND): Move to c-common.h.
6519         (THEN_CLAUSE): Likewise.
6520         (ELSE_CLAUSE): Likewise.
6521         (WHILE_COND): Likewise.
6522         (WHILE_BODY): Likewise.
6523         (DO_COND): Likewise.
6524         (DO_BODY): Likewise.
6525         (RETURN_EXPR): Likewise.
6526         (EXPR_STMT_EXPR): Likewise.
6527         (FOR_INIT_STMT): Likewise.
6528         (FOR_COND): Likewise.
6529         (FOR_EXPR): Likewise.
6530         (FOR_BODY): Likewise.
6531         (SWITCH_COND): Likewise.
6532         (SWITCH_BODY): Likewise.
6533         (CASE_LOW): Likewise.
6534         (CASE_HIGH): Likewise.
6535         (GOTO_DESTINATION): Likewise.
6536         (COMPOUND_BODY): Likewise.
6537         (ASM_CV_QUAL): Likewise.
6538         (ASM_STRING): Likewise.
6539         (ASM_OUTPUTS): Likewise.
6540         (ASM_INPUTS): Likewise.
6541         (ASM_CLOBBERS): Likewise.
6542         (DECL_STMT_DECL): Likewise.
6543         (STMT_EXPR_STMT): Likewise.
6544         (LABEL_STMT_LABEL): Likewise.
6545         (SCOPE_BEGIN_P): Likewise.
6546         (SCOPE_END_P): Likewise.
6547         (SCOPE_STMT_BLOCK): Likewise.
6548         (SCOPE_NULLIFIED_P): Likewise.
6549         (SCOPE_NO_CLEANUPS_P): Likewise.
6550         (SCOPE_PARTIAL_P): Likewise.
6551         (ASM_VOLATILE_P): Likewise.
6552         (STMT_LINENO): Likewise.
6553         (STMT_LINENO_FOR_FN_P): Likewise.
6554
6555         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
6556         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
6557         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
6558         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
6559         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
6560
6561         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
6562
6563         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
6564         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
6565
6566         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
6567         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
6568         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
6569
6570 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
6571
6572         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
6573         * class.c (dfs_find_final_overrider): Set it appropriately.
6574         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
6575         avoid unneeded secondary vptrs.
6576
6577 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
6578
6579         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
6580         (check_bitfield_decl, check_field_decl): Likewise.
6581         (build_vtbl_or_vbase_field, build_base_field): Likewise.
6582         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
6583         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
6584         (xfer_tag, finish_enum): Likewise.
6585         * decl2.c (finish_builtin_type): Likewise.
6586         * init.c (init_init_processing): Likewise.
6587         * pt.c (instantiate_class_template): Likewise.
6588         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
6589         * cp-tree.h (struct lang_type): Add user_align member.
6590         (CLASSTYPE_USER_ALIGN): Define.
6591
6592 Tue Jun 13 15:48:03 2000  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
6593
6594         * Make-lang.in (c++.install-common): Install g++-cross in
6595         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
6596         $(target_alias)-g++ and $(target_alias)-c++.
6597
6598 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
6599
6600         * class.c (vcall_offset_data_s): Add last_init and fns.
6601         (overrides): Rename to same_signature_p.
6602         (dfs_find_final_overrider): Adjust accordingly.
6603         (mark_overriders): Likewise.
6604         (warn_hidden): Likewise.
6605         (build_vtbl_initializer): Reorganize machinery for building things
6606         at negative offsets.
6607         (build_vcall_and_vbase_vtbl_entries): Likewise.
6608         (build_vbase_offset_vtbl_entries): Likewise.
6609         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
6610         offset entries.  Do not create two entries for functions with the
6611         same signature.
6612         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
6613         (build_rtti_vtbl_entries): Reorganize machinery for building things
6614         at negative offsets.
6615
6616         * optimize.c (expand_call_inline): Don't recurse into the code
6617         used to initialize the parameters more than once.
6618
6619 2000-06-11  Mark Mitchell <mark@codesourcery.com>
6620
6621         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
6622         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
6623         (find_substitution): Only use the `Sa' substitution for
6624         std::allocator, not instantiations of it.
6625         (write_template_prefix): Move comment.  Only use a TREE_LIST to
6626         represent substitutions for a member template.
6627         (write_array_type): Mangle array dimensions correctly.
6628         * optimize.c (maybe_clone_body): Copy more information from the
6629         cloned function.
6630         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
6631         on the regenerated declaration.
6632
6633 2000-06-11  Chip Salzenberg  <chip@valinux.com>
6634             Mark Mitchell <mark@codesourcery.com>
6635
6636         * class.c (build_vtable): Clarify comment.
6637         (build_ctor_vtbl_group): Pass the most derived type to
6638         build_vtable.
6639
6640 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6641
6642         * decl2.c (compare_options): Don't needlessly cast away const-ness.
6643
6644 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
6645
6646         * decl.c (add_binding): Handle duplicate declarations of external
6647         variables.
6648
6649 2000-06-09  Chip Salzenberg  <chip@valinux.com>
6650             Mark Mitchell <mark@codesourcery.com>
6651
6652         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
6653         argument.
6654         (write_signed_number): New macro.
6655         (write_unsigned_number): Likewise.
6656         (write_source_name): Use them.
6657         (write_number): Handle signed and unsigned values.
6658         (write_integer_cst): Use tree_int_cst_sgn, and use
6659         write_unsigned_number or write_signed_number as appropriate.
6660         (write_discriminator): Use write_unsigned_number or
6661         write_signed_number as appropriate.
6662         (write_template_arg_literal): Likewise.
6663         (write_array_type): Use tree_low_cst.
6664         (write_template_parm):  Use write_unsigned_number or
6665         write_signed_number as appropriate.
6666         (write_substitution): Adjust call to write_number.
6667         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
6668         (write_expression): Handle non-type template arguments of
6669         reference type correctly.
6670         (mangle_thunk): Use write_signed_number.
6671
6672 2000-06-09  Chip Salzenberg  <chip@valinux.com>
6673
6674         * mangle.c (find_substition): Don't mangle objects with typename
6675         substitutions (e.g. "cin" as "Si").
6676
6677 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
6678
6679         * call.c (add_candidate): Use ggc_alloc_cleared.
6680         * decl.c (lookup_label): Likewise.
6681         * lex.c (retrofit_lang_decl): Likewise.
6682
6683 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
6684
6685         * semantics.c (expand_body): Push to TV_EXPAND.
6686         * optimize.c (optimize_function): Push to TV_INTEGRATION.
6687         * decl.c (start_function): Always call announce_function.
6688
6689         * tinfo2.cc: Just declare abort.
6690
6691 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
6692
6693         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
6694         whenever @ is a symbolic name.
6695
6696 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
6697
6698         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
6699
6700 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
6701
6702         * decl.c (pushdecl): Look up functions by DECL_NAME, not
6703         DECL_ASSEMBLER_NAME.
6704
6705 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
6706
6707         * decl2.c (c_language): Define.
6708
6709 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
6710
6711         * lex.c (lang_init_options): Tweak.
6712
6713         * decl2.c: Remove #inclusion of diagnostic.h
6714         (lang_decode_option): Move diagnostic formatting options to
6715         toplevel.
6716
6717         * lang-options.h: Remove documentation for diagnostic options.
6718
6719         * Makefile.in (lex.o): Depends upon diagnostic.h
6720
6721 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
6722
6723         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
6724         the same DECL_RESULT, it's not a redefinition.
6725         * pt.c (tsubst_decl): Remove code to handle illegal
6726         specializations.
6727
6728 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
6729
6730         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
6731
6732 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
6733
6734         * search.c (maybe_suppress_debug_info): Don't check
6735         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
6736
6737         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
6738         here if extern_p.
6739
6740         Remember instantiation context in deferred instantiations.
6741         * cp-tree.h (struct tinst_level): Remove.
6742         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
6743         * pt.c (current_tinst_level): Now a tree.
6744         (print_template_context, push_tinst_level, pop_tinst_level,
6745         tinst_for_decl): Adjust.
6746         (reopen_tinst_level): New fn.
6747         (init_pt): Register current_tinst_level as a root.
6748         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
6749         of the pending templates list.
6750         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
6751         * lex.c (extract_interface_info): Adjust.
6752         * decl2.c (warn_if_unknown_interface): Adjust.
6753
6754 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
6755
6756         * class.c (indirect_primary_base_p): New function.
6757         (determine_primary_base): Use it.
6758
6759 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
6760
6761         Update new-abi dynamic cast algorithm.
6762         * tinfo.cc (__class_type_info::__dyncast_result): Add
6763         whole_details. Adjust constructor.
6764         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
6765         Avoid unnecessary searching.
6766         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
6767
6768 Mon Jun  5 06:48:55 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6769
6770         * decl.c (init_decl_processing): Don't call record_component_aliases.
6771         * tree.c (build_cplus_array_type_1): Likewise.
6772
6773 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
6774
6775         * ir.texi: Correct typo.
6776         * mangle.c (write_expression): Handle non-type template arguments
6777         with reference type.
6778         * method.c (build_overload_value): Likewise.
6779         * pt.c (convert_nontype_argument): Explicitly represent conversion
6780         to a reference with an ADDR_EXPR.
6781         (unify): Always unify arguments in left-to-right order.
6782
6783 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
6784             Mark Mitchell  <mark@codesourcery.com>
6785
6786         * Make-lang.in (CXX_SRCS): Add mangle.c.
6787         * Makefile.in (CXX_OBJS): Add mangle.o.
6788         (mangle.o): New rule.
6789
6790         * class.c (local_classes): New variable.
6791         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
6792         (get_vtt_name): Use mangle_vtt_name for new ABI.
6793         (init_class_processing): Initialize local_classes.
6794         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
6795         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
6796         (std_identifier): New macro.
6797         (DECL_VOLATILE_MEMFUNC_P): New macro.
6798         (DECL_NAMESPACE_STD_P): Likewise.
6799         (local_classes): Declare.
6800         (get_mostly_instantiated_function_type): Declare.
6801         (init_mangle): Declare.
6802         (mangle_decl): Likewise.
6803         (mangle_type_string): Likewise.
6804         (mangle_type): Likewise.
6805         (mangle_typeinfo_for_type): Likewise.
6806         (mangle_typeinfo_string_for_type): Likewise.
6807         (mangle_vtbl_for_type): Likewise.
6808         (mangle_vtt_for_type): Likewise.
6809         (mangle_ctor_vtbl_for_type): Likewise.
6810         (mangle_thunk): Likewise.
6811         (mangle_conv_op_name_for_type): Likewise.
6812         (mangle_guard_variable): Likewise.
6813         * decl.c (pushtag): Keep track of local classes.
6814         (initialize_predefined_identifiers): Initialize std_identifier.
6815         (init_decl_processing): Use std_identifier.
6816         (start_decl): Don't treat instantiations as specializations.
6817         (grokdeclarator): Likewise.
6818         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
6819         name for fully-instantiated templates.
6820         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
6821         destructors with the new ABI.
6822         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
6823         (grokfield): Use mangle_type for new ABI.
6824         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
6825         (get_sentry): Use mangle_guard_variable for new ABI.
6826         (start_static_initialization_or_destruction): Likewise.
6827         * expr.c (extract_aggr_init): Remove.
6828         (extract_scalar_init): Likewise.
6829         (extract_init): Remove #if 0'd code.
6830         * mangle.c: New function.
6831         * method.c (build_mangled_name): Assert not flag_new_abi.
6832         (build_static_name): Likewise.
6833         (build_decl_overload_real): Likewise.
6834         (build_typename_overload): Likewise.
6835         (build_overload_with_type): Likewise.
6836         (build_overload_name): Likewise.
6837         (get_ctor_vtbl_name): Likewise.
6838         (start_squangling): Likewise.
6839         (get_id_2): Likewise.
6840         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
6841         (init_method): Call init_mangle for new ABI.
6842         (make_thunk): Call mangle_thunk for new ABI.
6843         * operators.def: Correct new ABI manglings for the `%' operator.
6844         Add `::' operator.
6845         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
6846         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
6847         (lookup_template_class): Call mangle_decl for new ABI.
6848         (get_mostly_instantiated_function_type): New function.
6849         (set_mangled_name_for_template_decl): Use it.
6850         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
6851         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
6852         conversion op names.
6853         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
6854         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
6855         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
6856         mangle_typeinfo_string_for_type.
6857
6858 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
6859
6860         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
6861         (INNERMOST_TEMPLATE_ARGS): New macro.
6862         (innermost_args): Remove.
6863         (get_innermost_template_args): New function.
6864         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
6865         * error.c (dump_function_decl): Be caution when using
6866         most_general_template.
6867         * method.c (build_template_parm_names):  Use
6868         INNERMOST_TEMPLATE_ARGS.
6869         * pt.c (add_to_template_args): Tidy comment
6870         (get_innermost_template_args): New function.
6871         (check_explicit_specialization): Clear DECL_INITIAL for a new
6872         specialization.
6873         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
6874         Tidy.
6875         (push_template_decl): Always register specializations of the most
6876         general template.
6877         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
6878         (coerce_template_parms): Likewise.
6879         (lookup_template_class): Likewise.
6880         (innermost_args): Remove.
6881         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
6882         (tsubst_decl): Handle tricky specializations.  Use
6883         get_innermost_template_args.
6884         (instantiate_template): Simplify handling of partial
6885         instantiations.
6886         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
6887         (most_general_template): Reimplement, in a more straightforward
6888         manner.
6889         (regenerate_decl_from_template): Tweak formatting.  Use
6890         TMPL_ARGS_DEPTH for clarity.
6891         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
6892
6893         * dump.c (dequeue_and_dump): Dump information about thunks.
6894
6895 2000-06-01  Richard Henderson  <rth@cygnus.com>
6896
6897         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
6898
6899 2000-06-01  Richard Henderson  <rth@cygnus.com>
6900
6901         * decl2.c (unsupported_options): Fix typo, make const.
6902         (lang_decode_option): Fix bsearch argument order.
6903
6904 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
6905
6906         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
6907         on FIELD_DECLs.
6908
6909 Wed May 31 14:09:00 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6910
6911         * cp-tree.h (c_get_alias_set): Deleted.
6912         * Makefile.in (decl.o): Include ../expr.h.
6913         * decl.c (expr.h): Include.
6914         (init_decl_processing): Call record_component_aliases for arrays.
6915         (grokdeclarator): Likewise.
6916         Set TREE_ADDRESSABLE for fields that aren't bitfields.
6917         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
6918
6919 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
6920
6921         Remove guiding declaration support.
6922         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
6923         (flag_guiding_decls): Remove.
6924         * call.c (build_user_type_conversion_1): Remove support for
6925         guiding decls.
6926         (build_new_function_call): Likewise.
6927         (build_new_op): Likewise.
6928         (build_new_method_call): Likewise.
6929         * decl.c (start_function): Likewise.
6930         * friend.c (is_friend): Likewise.
6931         (do_friend): Likewise.
6932         * decl2.c ((flag_dump_translation_unit): Make it const.
6933         (flag_guiding_decls): Remove.
6934         (unsupported_options): New variable
6935         (compare_options): New function.
6936         (lang_decode_option): Use them.
6937
6938         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
6939
6940         * method.c (mangle_expression): Adjust test for legal expression
6941         operators.
6942
6943         * pt.c (instantiate_decl): Save and restore the local
6944         specializations list.
6945
6946 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
6947
6948         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
6949
6950 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
6951
6952         * call.c (add_template_candidate_real): Handle member template
6953         constructors for classes with virtual bases.
6954         (build_user_type_conversion_1): Use in_charge_arg_for_name.
6955         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
6956
6957         * ir.texi: Update thunk documentation.
6958
6959         * call.c (joust): Fix handling of overloaded builtin operators.
6960
6961 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
6962
6963         * cp-tree.h (DECL_ANTICIPATED): New macro.
6964         Document new use of DECL_LANG_FLAG_7.
6965         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
6966         in the user namespace.
6967         * lex.c (do_identifier): If the identifier's declaration has
6968         DECL_ANTICIPATED on, it has not yet been declared.  But do not
6969         replace it with an ordinary implicit declaration.
6970
6971         * tinfo2.cc: Include stdlib.h.
6972
6973 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
6974
6975         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
6976         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
6977         CLASSTYPE_ALIGN.
6978
6979 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
6980
6981         * decl2.c (lang_decode_option): Use skip_leading_substring instead
6982         of plain strncmp.
6983
6984 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
6985
6986         * operators.def (<?): Duplicated, should have been...
6987         (>?): this.  Fixed.
6988
6989 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
6990             Mark Mitchell  <mark@codesourcery.com>
6991
6992         * cp-tree.h (ansi_opname): Make it a macro.
6993         (ansi_assopname): Likewise.
6994         (struct lang_decl_flags): Add assignment_operator_p.
6995         (struct lang_decl): Add operator_code.
6996         (DECL_VTT_PARM): Adjust.
6997         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
6998         overloaded operator.
6999         (SET_OVERLOADED_OPERATOR_CODE): New macro.
7000         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
7001         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
7002         (opname_tab): Remove.
7003         (assignop_tab): Likewise.
7004         (operator_name_info_t): New type.
7005         (operator_name_info): New variable.
7006         (assignment_operator_name_info): Likewise.
7007         (build_cp_library_fn): Remove declaration.
7008         (push_cp_library_fn): Likewise.
7009         (operator_name_string): Likewise.
7010         (build_decl_overload): Likewise.
7011         * call.c (print_z_candidates): Simplify.
7012         (build_object_call): Adjust usage of ansi_opname.  Use
7013         DECL_OVERLOADED_OPERATOR_P.
7014         (op_error): Adjust operator name lookup.
7015         (build_conditional_expr): Adjust usage of ansi_opname.
7016         (build_new_op): Likewise.
7017         (build_op_delete_call): Likewise.
7018         (build_over_call): Likewise.
7019         (joust): Use DECL_OVERLOADED_OPERATOR_P.
7020         * decl.c (duplicate_decls): Copy operator_code.
7021         (init_decl_processing): Adjust parameters to push_cp_library_fn.
7022         (builtin_function): Adjust parameters to build_library_fn_1.
7023         (build_library_fn_1): Accept an overloaded operator code.
7024         (build_library_fn): Pass ERROR_MARK.
7025         (build_cp_library_fn): Accept an overloaded operator code.
7026         (push_cp_library_fn): Likewise.
7027         (grokfndecl): Tweak.
7028         (grokdeclarator): Simplify code to compute names of overloaded
7029         operators.  Adjust use of ansi_opname.
7030         (ambi_op_p): Work on tree_codes, not identifiers.
7031         (unary_op_p): Likewise.
7032         (grok_op_properties): Likewise.
7033         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
7034         (lang_mark_tree): Don't try to mark the operator_code.
7035         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
7036         * error.c (dump_decl): Remove special handling for operator
7037         names.
7038         (dump_function_name): Likewise.
7039         (dump_expr): Adjust name lookup of operators.
7040         (op_to_string): Simplify.
7041         (assop_to_string): Likewise.
7042         * init.c (build_new_1): Adjust use of ansi_opname.
7043         * lex.c (opname_tab): Remove.
7044         (assignop_tab): Likewise.
7045         (ansi_opname): Likewise.
7046         (ansi_assopname): Likewise.
7047         (operator_name_string): Likewise.
7048         (reinit_lang_specific): Likewise.
7049         (operator_name_info): New variable.
7050         (assignment_operator_name_info): Likewise.
7051         (init_operators): New function.
7052         (init_parse): Use it.
7053         (do_identifier): Adjust use of ansi_opname.
7054         * method.c (mangle_expression): Don't use ansi_opname for
7055         mangling.
7056         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
7057         (build_decl_overload): Remove.
7058         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
7059         (do_build_assign_ref): Adjust use of ansi_opname.
7060         (synthesize_method): Likewise.
7061         (implicitly_declare_fn): Likewise.
7062         * operators.def: New file.
7063         * parse.y (operator): Adjust use of ansi_opname.
7064         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
7065         (set_mangled_name_for_template_decl): Don't play games with
7066         current_namespace.
7067         (special_function_p): Adjust use of ansi_opname.
7068         * typeck.c (check_return_expr): Likewise.
7069         * Make-lang.in (cc1plus): Depend on operators.def.
7070         * Makefile.in (lex.o): Likewise.
7071         (decl.o): Likewise.
7072
7073 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
7074
7075         * Make-lang.in (cplib2.ready): Eradicate.
7076
7077 Sat May 27 11:25:46 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7078
7079         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
7080         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
7081         (built_min, cp_tree_equal): Likewise.
7082
7083 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
7084
7085         * class.c (layout_nonempty_base_or_field): Replace
7086         `record_layout_info' with `record_layout_info_s'.
7087
7088 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
7089
7090         Fix goto checking.
7091         * cp-tree.h (struct language_function): x_named_labels is now
7092         a struct named_label_list*.
7093         * decl.c (struct named_label_use_list): Renamed from...
7094         (struct named_label_list): ...this.  New struct.
7095         (push_binding_level): Don't set eh_region.
7096         (note_level_for_eh): New fn.
7097         (pop_label): Take label and old value directly.
7098         (pop_labels): Adjust for new named_labels format.
7099         (lookup_label): Likewise.
7100         (poplevel): Note characteristics of a binding level containing a
7101         named label.  Mess with named label lists earlier.
7102         (mark_named_label_lists): New fn.
7103         (mark_lang_function): Call it.
7104         (use_label): New fn, split out from...
7105         (make_label_decl): ...here.  Don't call it.
7106         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
7107         check_previous_gotos): New fns, split out from...
7108         (define_label): ...here.
7109         (check_switch_goto): New fn.
7110         (define_case_label): Call it.
7111         (check_goto): New fn.
7112         * semantics.c (finish_goto_stmt): Call it and use_label.
7113         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
7114         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
7115
7116 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
7117
7118         * class.c (build_vtable_entry_ref): Correct usage of
7119         get_vtbl_decl_for_binfo.
7120
7121         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
7122         * method.c (implicitly_declare_fn): Not here.
7123
7124 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
7125
7126         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
7127         (CPTI_PTMD_DESC_TYPE): ... here.
7128         (ptmd_desc_type_node): Rename to ...
7129         (ptm_desc_type_node): ... here.
7130         * decl.c: Likewise.
7131         * rtti.c (ptmd_initializer): Rename to ...
7132         (ptm_initializer): ... here.
7133         (sythesize_tinfo_var): Adjust. Deal with pointer to member
7134         function.
7135         (create_tinfo_types): Adjust.
7136
7137 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
7138
7139         Finish implementation of VTTs.
7140         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
7141         CPTI_VTT_PARM_IDENTIFIER.
7142         (vtt_parm_identifier): New macro.
7143         (vtt_parm_type): Likewise.
7144         (BINFO_SUBVTT_INDEX): Likewise.
7145         (BINFO_VPTR_INDEX): Likewise.
7146         (struct lang_decl): Add vtt_parm.
7147         (DECL_VTT_PARM): New macro.
7148         (DECL_USE_VTT_PARM): Likewise.
7149         (DECL_NEEDS_VTT_PARM_P): Likewise.
7150         (get_vtt_name): Declare.
7151         (build_artificial_parm): Likewise.
7152         (fixup_all_virtual_upcast_offsets): Likewise.
7153         (expand_indirect_vtbls_init): Remove.
7154         * call.c (build_new_method_call): Pass the vtt to subobject
7155         constructors and destructors.
7156         * class.c (get_vtt_name): Give it external linkage.
7157         (build_clone): Handle the magic VTT parameters for clones.
7158         (clone_function_decl): Fix typo in comment.
7159         (build_vtt): Keep track of the indices in the VTTs where various
7160         entities are stored.
7161         (build_vtt_inits): Likewise.
7162         (dfs_build_vtt_inits): Likewise.
7163         (build_ctor_vtbl_group): Tweak type of construction vtables.
7164         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
7165         primary bases, when building construction vtables.
7166         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
7167         (initialize_predefined_identifiers): Add vtt_parm_identifier.
7168         (init_decl_processing): Initialize vtt_parm_type.
7169         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
7170         (lang_mark_tree): Make vtt_parm.
7171         * decl2.c (build_artificial_parm): New function.
7172         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
7173         (grokclassfn): Use build_artificial_parm.
7174         * init.c (initialize_vtbl_ptrs): Call
7175         fixup_all_virtual_upcast_offsets directly.
7176         (perform_member_init): Use the complete subobject destructor for
7177         member cleanups.
7178         (build_vtbl_address): New function.
7179         (expand_virtual_init): Handle VTTs.
7180         * optimize (maybe_clone_body): Likewise.
7181         * search.c (fixup_all_virtual_upcast_offsets): Give it external
7182         linkage.
7183         (expand_indirect_vtbls_init): Remove.
7184         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
7185         * tree.c (make_binfo): Make them bigger.
7186
7187 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
7188
7189         * inc/cxxabi.h (__pbase_type_info): Define, based on
7190         __pointer_type_info.
7191         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
7192         (__pointer_to_member_type_info): Likewise.
7193         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
7194         (__pointer_to_member_type_info::__is_pointer_p): Remove.
7195         (__pointer_type_info::__do_catch): Rename to ...
7196         (__pbase_type_info::__do_catch): ... here. Adjust.
7197         (__pbase_type_info::__pointer_catch): Implement.
7198         (__pointer_type_info::__pointer_catch): Adjust.
7199         (__pointer_to_member_type_info::__pointer_catch): Adjust.
7200
7201 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
7202
7203         * tinfo.h (__user_type_info::contained_virtual_p): New
7204         predicate.
7205         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
7206         shaped heirarchy.
7207         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
7208         diamond shaped heirarchy. Add early out for mixed diamond and
7209         duplicate shaped heirarchy.
7210
7211 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
7212
7213         * cp-tree.h (build_delete): Change prototype.
7214         (build_vec_delete): Likewise.
7215         * call.c (build_scoped_method_call): Use special_function_kind
7216         values to indicate the kind of destruction to be done.
7217         (build_method_call): Likewise.
7218         * decl.c (finish_destructor_body): Likewise.
7219         (maybe_build_cleanup_1): Likewise.  Rename to ...
7220         (maybe_build_cleanup): ... this.
7221         * decl2.c (delete_sanity): Use special_function_kind
7222         values to indicate the kind of destruction to be done.
7223         (build_cleanup): Likewise.
7224         * init.c (perform_member_init): Likewise.
7225         (build_vec_delete_1): Likewise.
7226         (build_dtor_call): Simplify.
7227         (build_delete): Use special_function_kind
7228         values to indicate the kind of destruction to be done.
7229         (build_vbase_delete): Likewise.
7230         (build_vec_delete): Likewise.
7231
7232         * init.c (sort_member_init): Fix typo in error message generation
7233         code.
7234
7235 Mon May 15 11:46:29 2000  Donald Lindsay  <dlindsay@cygnus.com>
7236
7237         * semantics.c (begin_class_definition): make the packed
7238         attribute be sensitive to the "-fpack-struct" command line flag
7239
7240 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
7241
7242         Update new-abi upcast algorithm.
7243         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
7244         prototype and meaning of return value.
7245         (__si_class_type_info::__do_upcast): Likewise.
7246         (__vmi_class_type_info::__do_upcast): Likewise.
7247         * tinfo.cc (__class_type_info::__upcast_result): Replace
7248         whole2dst with part2dst. Adjust ctor.
7249         (__class_type_info::__do_upcast): Adjust call of worker function.
7250         (__class_type_info::__do_upcast): Adjust.
7251         (__si_class_type_info::__do_upcast): Adjust. Use parent's
7252         __do_upcast.
7253         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
7254         virtual base in diamond heirarchy bug.
7255
7256 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
7257
7258         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
7259         and bitfield to tinfo_fn_p.
7260         (DECL_TINFO_FN_P): Adjust.
7261         (SET_DECL_TINFO_FN_P): Likewise.
7262         (DECL_MUTABLE_P): Likewise.
7263         (DECL_C_BIT_FIELD): Likewise.
7264         (SET_DECL_C_BIT_FIELD): Likewise.
7265         (CLEAR_DECL_C_BIT_FIELD): Likewise.
7266         (DECL_UNINLINABLE): Likewise.
7267         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
7268         (handle_using_decl): Remove assertion.
7269         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
7270         to build FIELD_DECLs.
7271         (build_base_field): Likewise.
7272         (layout_class_type): Likewise.
7273         * decl.c (init_decl_processing): Likewise.
7274         (build_ptrmemfunc_type): Likewise.
7275         (grokdeclarator): Likewise.
7276         * decl2.c (grok_x_components): Likewise.
7277         * except.c (call_eh_info): Likewise.
7278         * init.c (init_init_processing): Likewise.
7279         * rtti.c (expand_class_desc): Likewise.
7280         (create_pseudo_type_info): Likewise.
7281         (get_vmi_pseudo_type_info): Likewise.
7282         (create_tinfo_types): Likewise.
7283         * ptree.c (print_lang_decl): Adjust.
7284         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
7285         before checking DECL_MUTABLE_P.
7286
7287         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
7288         parameters for template functions.
7289         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
7290         destructors as well as constructors.
7291
7292 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
7293
7294         * class.c (build_ctor_vtbl_group): Set inits.
7295         * optimize.c (maybe_clone_body): Set DECL_INLINE and
7296         DECL_THIS_INLINE appropriately for clones.
7297
7298         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
7299         (DECL_CONV_FN_P): Simplify.
7300         (DECL_OPERATOR): Remove.
7301         (language_to_string): Declare.
7302         * decl.c (duplicate_decls): Fix typo in comment.
7303         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
7304         (grok_op_properties): Use DECL_CONV_FN_P instead of
7305         IDENTIFIER_TYPENAME_P.
7306         * dump.c (dequeue_and_dump): Dump the language linkage of
7307         declarations.
7308         * error.c (language_to_string): Give it external linkage.
7309         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
7310         (implicitly_declare_fn): Set DECL_LANGUAGE.
7311         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
7312         IDENTIFIER_TYPENAME_P.
7313         (tsubst_decl): Likewise.
7314         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
7315         * semantics.c (finish_member_declaration): Don't mark members of
7316         classes declared in an extern "C" region as extern "C".
7317
7318 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
7319
7320         * decl2.c (qualified_lookup_using_namespace): Look through
7321         namespace aliases.
7322
7323         * decl.c (push_using_decl): Return the old decl on namespace level.
7324
7325 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
7326
7327         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
7328         (VTT_NAME_PREFIX): New macro.
7329         (CTOR_VTBL_NAME_PREFIX): Likewise.
7330         (get_ctor_vtbl_name): New function.
7331         * class.c (get_vtable_name): Simplify.
7332         (get_vtt_name): New function.
7333         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
7334         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
7335         when a virtual base becomes primary.
7336         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
7337         VTTs.
7338         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
7339         additional parameters.
7340         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
7341         (initialize_array): New function.
7342         (build_vtt): Likewise.
7343         (build_vtt_inits): Likewise.
7344         (dfs_build_vtt_inits): Likewise.
7345         (dfs_fixup_binfo_vtbls): Likewise.
7346         (build_ctor_vtbl_group): Likewise.
7347         (initialize_vtable): Use initialize_array.
7348         (accumulate_vtbl_inits): Reimplement to handle construction
7349         vtables.
7350         (dfs_accumulate_vtbl_inits): Likewise.
7351         (bulid_vtbl_initializer): Adjust parameter name.
7352         * method.c (build_typename_overload): Remove #if 0'd code.
7353         (get_ctor_vtbl_name): New function.
7354         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
7355         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
7356
7357         * cp-tree.h (struct lang_type): Remove search_slot.
7358         (CLASSTYPE_SEARCH_SLOT): Remove.
7359         (emit_base_init): Change prototype.
7360         (initialize_vtbl_ptrs): Likewise.
7361         (expand_indirect_vtbls_init): Likewise.
7362         (clear_search_slots): Remove.
7363         * decl.c (lang_mark_tree): Don't mark search_slot.
7364         * init.c (initialize_vtbl_ptrs): Simplify.
7365         (emit_base_init): Likewise.
7366         * search.c (struct vbase_info): Document decl_ptr.
7367         (convert_pointer_to_single_level): Remove.
7368         (dfs_find_vbases): Remove.
7369         (dfs_init_base_pointers): Simplify.
7370         (dfs_clear_vbase_slots): Remove.
7371         (dfs_vtable_path_unmark): New function.
7372         (init_vbase_pointers): Simplify.
7373         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
7374         (expand_indirect_vtbls_init): Simplify.  Don't call
7375         mark_all_temps_used.
7376         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
7377         initialize_vtbl_ptrs.
7378
7379 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
7380
7381         * except.c: Add static prototypes.
7382
7383 2000-05-20  H.J. Lu  <hjl@gnu.org>
7384
7385         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
7386
7387 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
7388
7389         Don't create a separate copy of virtual bases for the
7390         CLASSTYPE_VBASECLASSES list.
7391         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
7392         (BINFO_FOR_VBASE): Remove.
7393         (CANONICAL_BINFO): Adjust.
7394         (binfo_for_vbase): New function.
7395         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
7396         instead of BINFO_FOR_VBASE.
7397         (build_vbase_pointer): Likewise.
7398         (build_secondary_vtable): Likewise.
7399         (dfs_mark_primary_bases): Likewise.
7400         (mark_primary_bases): Likewise.
7401         (layout_nonempty_base_or_field): Likewise.
7402         (dfs_set_offset_for_shared_vbases): Likewise.
7403         (dfs_set_offset_for_unshared_vbases): Likewise.
7404         (layout_virtual_bases): Likewise.  Adjust for changes to the
7405         CLASSTYPE_VBASECLASSES list.
7406         (dump_class_hierarchy_r): Use binfo_for_vbase
7407         instead of BINFO_FOR_VBASE.
7408         (dump_class_hierarchy): Likewise.
7409         (finish_vtbls): Likewise.
7410         (build_vtbl_initializer): Adjust for changes to the
7411         CLASSTYPE_VBASECLASSES list.
7412         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
7413         * decl.c (finish_destructor_body): Adjust for changes to the
7414         CLASSTYPE_VBASECLASSES list.
7415         * init.c (sort_base_init): Use binfo_for_vbase.
7416         (construct_virtual_bases): Adjust for changes to the
7417         CLASSTYPE_VBASECLASSES list.
7418         (expand_member_init): Use binfo_for_vbase.
7419         (build_vbase_delete):  Adjust for changes to the
7420         CLASSTYPE_VBASECLASSES list.
7421         * method.c (do_build_copy_constructor): Likewise.
7422         * rtti.c (get_base_offset): Use binfo_for_vbase.
7423         (expand_class_desc): Remove #if 0'd code.
7424         * search.c (struct vbase_info): Remove vbase_types.
7425         (get_base_distance):  Use binfo_for_vbase.
7426         (lookup_field_queue_p): Use CANONICAL_BINFO.
7427         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
7428         (get_pure_virtuals): Adjust for changes to the
7429         CLASSTYPE_VBASECLASSES list.
7430         (dfs_find_vbases): Use binfo_for_vbase.
7431         (dfs_init_vbase_pointers): Likewise.
7432         (init_vbase_pointers): Don't initialize vi.vbase_types.
7433         (virtual_context): Use binfo_for_vbase.
7434         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
7435         CLASSTYPE_VBASECLASSES list.
7436         (expand_indirect_vtbls_init): Simplify.
7437         (dfs_get_vbase_types): Don't replicate virtual bases.
7438         (find_vbase_instance): Use binfo_for_vbase.
7439         (binfo_for_vbase): New function.
7440         * typeck.c (get_delta_difference): Use binfo_for_vbase.
7441
7442 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
7443
7444         * decl2.c (finish_anon_union): Generalize error messages to handle
7445         anonymous structures.
7446         * init.c (perform_member_init): Remove `name' parameter.
7447         (build_field_list): New function.
7448         (sort_member_init): Handle anonymous union initialization order
7449         correctly.  Check for multiple initializations of the same union.
7450         (emit_base_init): Don't look up fields by name here.
7451         (expand_member_init): Record the result of name lookup for future
7452         reference.
7453         * typeck.c (build_component_ref): Fix formatting.
7454
7455 Wed May 17 17:27:44 2000  Andrew Cagney  <cagney@b1.cygnus.com>
7456
7457         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
7458         * typeck.c (build_x_compound_expr): Replace warn_unused with
7459         warn_unused_value.
7460
7461         * decl2.c (lang_decode_option): Update -Wall unused flags by
7462         calling set_Wunused.
7463
7464 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
7465
7466         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
7467         * init.c (dfs_vtable_path_unmark): Remove.
7468         * search.c (marked_new_vtable_p): Likewise.
7469         (unmarked_new_vtable_p): Likewise.
7470         (dfs_search_slot_nonempty_p): Likewise.
7471         (dfs_mark): Likewise.
7472         (dfs_vtable_path_unmark): Likewise.
7473         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
7474         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
7475         (dfs_init_vbase_pointers): Remove special-case new ABI code.
7476         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
7477         (init_vbase_pointers): Simplify.
7478         (expand_indirect_vtbls_init): Likewise.
7479
7480         * class.c (copy_virtuals): New function.
7481         (build_primary_table): Use it.
7482         (build_secondary_vtable): Likewise.
7483         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
7484         indicate that no vcall offset is required.
7485         (add_virtual_function): Likewise.
7486         (modify_all_vtables): Likewise.
7487         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
7488         (dfs_accumulate_vtbl_inits): Likewise.
7489         (build_vtbl_initializer): Make changes to handle construction
7490         vtables.
7491         (dfs_build_vcall_offset_vtbl_entries): Likewise.
7492         (build_rtti_vtbl_entries): Likewise.
7493         (build_vtable_entries): Handle a NULL vcall_index.
7494
7495 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
7496
7497         * decl2.c (lang_decode_option): Fix thinko.
7498
7499 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
7500
7501         * except.c (check_handlers): New fn.
7502         * cp-tree.h: Declare it.
7503         * semantics.c (finish_handler_sequence): Call it.
7504         (finish_function_handler_sequence): Likewise.
7505         (finish_handler_parms): Set TREE_TYPE on the handler.
7506         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
7507         * search.c (get_base_distance_recursive): If protect>1, ignore
7508         special access.
7509         (get_base_distance): Don't reduce watch_access.
7510
7511 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
7512
7513         * lex.c: #include diagnostic.h.
7514         (lang_init_options): Set default prefixing rules.
7515
7516         * lang-options.h: Add -fdiagnostics-show-location=.
7517
7518         * decl2.c: #include diagnostic.h.
7519         (lang_decode_option): Handle -fdiagnostics-show-location=.
7520
7521 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
7522
7523         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
7524         * vec.cc: Revert my 2000-05-07 change.
7525
7526 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
7527
7528         * class.c (check_field_decls): Complain about non-static data
7529         members with same name as class in class with constructor.
7530
7531 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
7532
7533         * decl.c (grokdeclarator): Allow non-static data members with
7534         same name as class.
7535
7536 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
7537
7538         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
7539         and pending_inline.filename.  Update prototypes.
7540         * decl.c (define_label): Constify filename parameter.
7541         * decl2.c (warn_if_unknown_interface): Constify local char *.
7542         * input.c Constify input_source.filename. Don't declare
7543         input_filename or lineno.  Constify filename parameter to feed_input.
7544         * lex.c (init_parse): Constify parameter and return value.
7545         (cp_pragma_interface, cp_pragma_implementation): Constify
7546         filename argument.
7547         (reinit_parse_for_method, reinit_parse_for_block,
7548         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
7549         Constify local char *.
7550         * pt.c: Don't declare lineno or input_filename.
7551         (print_template_context, tsubst_friend_function, tsubst_decl,
7552         tsubst, instantiate_decl): Constify local char *.
7553         * semantics.c (expand_body): Constify local char *.
7554         * tree.c (build_srcloc): Constify filename parameter.
7555         * typeck.c (c_expand_asm_operands): Constify filename
7556         parameter.
7557
7558 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
7559
7560         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
7561         offsetof expansion.
7562
7563 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
7564
7565         * inc/cxxabi.h:  Fix typos in comment.
7566         (__base_class_info::__offset): Use a static_cast.
7567
7568 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
7569
7570         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
7571         of std::size_t and std::ptrdiff_t respectively.
7572         * tinfo.cc: Likewise.
7573         * vec.cc: Likewise.
7574
7575 2000-05-06  Richard Henderson  <rth@cygnus.com>
7576
7577         * typeck.c (build_c_cast): Don't warn integer->pointer size
7578         mismatch for constants.
7579
7580 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
7581
7582         * rtti.c (ptmd_initializer): Set non-public, if class is
7583         incomplete.
7584
7585         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
7586         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
7587         __cxa_vec_delete): Likewise.
7588         * tinfo.cc (__dynamic_cast): Likewise.
7589         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
7590         __cxa_vec_delete): Likewise.
7591
7592 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
7593
7594         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
7595         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
7596         (lang_decl_flags): Add vcall_offset.
7597         (THUNK_VCALL_OFFSET): Use it.
7598         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
7599         * method.c (make_thunk): Create the lang_decl here, not in
7600         emit_thunk.
7601         (emit_thunk): Make generic thunks into ordinary functions once
7602         they have been fed to expand_body.
7603         * semantics.c (expand_body): Set current_function_is_thunk here.
7604
7605 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7606
7607         * class.c (update_vtable_entry_for_fn): Prototype.
7608
7609         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
7610         and `tmpl'.
7611
7612         * search.c (dfs_build_inheritance_graph_order): Prototype.
7613
7614 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
7615
7616         * cp-tree.h (special_function_kind): Add various kinds of
7617         destructors.
7618         (special_function_p): New function.
7619         * class.c (overrides): Don't let one kind of destructor override
7620         another.
7621         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
7622         whether or not to instantiate a template.
7623         * tree.c (special_function_p): Define.
7624
7625 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
7626
7627         * cp-tree.def (THUNK_DECL): Remove.
7628         * cp-tree.h (DECL_THUNK_P): New macro.
7629         (DECL_NON_THUNK_FUNCTION_P): Likewise.
7630         (DECL_EXTERN_C_FUNCTION_P): Likewise.
7631         (SET_DECL_THUNK_P): Likewise.
7632         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
7633         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
7634         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
7635         * decl.c (decls_match): Use DECL_EXTERN_C_P.
7636         (duplicate_decls): Likewise.
7637         (pushdecl): Likewise.  Adjust thunk handling.
7638         (grokfndecl): Use DECL_EXTERN_C_P.
7639         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
7640         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
7641         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
7642         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
7643         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
7644         DECL_NO_STATIC_CHAIN.
7645         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
7646         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
7647         * search.c (covariant_return_p): Remove THUNK_DECL handling.
7648         * ir.texi: Update.
7649
7650 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
7651
7652         * tree.c (walk_tree): Set lineno.
7653
7654 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
7655
7656         * exception.cc: Update license notice.
7657         * new.cc: Likewise.
7658         * new1.cc: Likewise.
7659         * new2.cc: Likewise.
7660         * tinfo.cc: Likewise.
7661         * tinfo2.cc: Likewise.
7662         * vec.cc: Likewise.
7663         * inc/cxxabi.h: Likewise.
7664         * inc/exception: Likewise.
7665         * inc/new: Likewise.
7666         * inc/new.h: Likewise.
7667         * inc/typeinfo: Likewise.
7668
7669 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
7670
7671         * tree.c (build_target_expr_with_type): If we already have a
7672         TARGET_EXPR, just return it.
7673
7674         * optimize.c (initialize_inlined_parameters): Don't generate an
7675         EXPR_STMT if we can just use DECL_INITIAL.
7676         * decl.c (emit_local_var): Only make the initialization a
7677         full-expression if stmts_are_full_exprs_p.
7678
7679 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
7680
7681         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
7682         macro.
7683         * call.c (standard_conversion): Use it.
7684         (direct_reference_binding): Likewise.
7685         (build_over_call): Likewise.
7686         (is_properly_derived_from): Likewise.
7687         (compare_ics): Likewise.
7688         * class.c (resolves_to_fixed_type_p): Likewise.
7689         * optimize.c (declare_return_variable): Likewise.
7690         * pt.c (is_specialization_of): Likewise.
7691         (unify): Likewise.
7692         * typeck.c (comp_target_parms): Likeiwse.
7693         (build_static_cast): Likewise.
7694         (build_reinterpret_cast): Likewise.
7695         (build_const_cast): Likewise.
7696         (comp_ptr_ttypes_real): Likewise.
7697         (comp_ptr_ttypes_const): Likewise.
7698         * typeck2.c (process_init_constructor): Likewise.
7699
7700 2000-04-30  Scott Snyder <snyder@fnal.gov>
7701
7702         * decl.c (finish_destructor_body): Use the base destructor when
7703         destroying virtual bases.
7704
7705 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
7706
7707         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
7708         STMT_EXPRs.
7709         * optimize.c (struct inline_data): Add target_exprs field.
7710         (declare_return_variable): When a function returns an aggregate,
7711         use the variable declared in the TARGET_EXPR as the remapped
7712         DECL_RESULT.
7713         (expand_call_inline): Update the pending target_exprs stack.
7714         (optimize_function): Initialize the stack.
7715
7716         * decl2.c (finish_file): Fix typo in comment.
7717
7718         * method.c (emit_thunk): Don't try to return a `void' value.
7719
7720         * optimize.c (initialize_inlined_parameters): If the parameter is
7721         addressable, we need to make a new VAR_DECL, even if the
7722         initializer is constant.
7723
7724 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
7725
7726         * decl.c (grok_op_properties): Add an extra check of argtypes.
7727
7728 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
7729
7730         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
7731         variables.
7732         (initialize_inlined_parameters): Try to avoid creating new
7733         VAR_DECLs.
7734
7735 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
7736
7737         * lex.c (my_get_run_time): Remove.
7738         (init_filename_times): Use get_run_time instead of my_get_run_time.
7739         (check_newline): Likewise.
7740         (dump_time_statistics): Likewise.
7741         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
7742         of computing elapsed time explicitly.
7743
7744 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
7745
7746         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
7747         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
7748         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
7749         before calling decl_constant_value.
7750         * class.c (check_bitfield_decl): Likewise.
7751         * cvt.c (ocp_convert): Likewise.
7752         (convert): Likewise.
7753         * decl.c (compute_array_index_type): Likewise.
7754         (build_enumerator): Likewise.
7755         * decl2.c (check_cp_case_value): Likewise.
7756         * pt.c (convert_nontype_argument): Likewise.
7757         (tsubst): Likewise.
7758         * typeck.c (decay_conversion): Likewise.
7759         (build_compound_expr): Likewise.
7760         (build_reinterpret_cast): Likewise.
7761         (build_c_cast): Likewise.
7762         (convert_for_assignment): Likewise.
7763
7764 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
7765
7766         * decl.c (finish_function): Don't play games with DECL_INLINE.
7767
7768 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
7769
7770         * ir.texi: Correct typo.
7771
7772 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
7773
7774         * decl.c (grokdeclarator): Reject VLAs as members.
7775
7776 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
7777
7778         * call.c (standard_conversion): Accept conversion between
7779         COMPLEX_TYPEs.
7780
7781         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
7782
7783 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
7784
7785         * decl2.c (finish_file): Remove double setup for accounting
7786         compile time.
7787
7788 2000-04-24  Robert Lipe <robertlipe@usa.net>
7789
7790         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
7791
7792 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
7793
7794         * new.cc (set_new_handler): Needs to be in std::.
7795
7796 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
7797
7798         * cp-tree.h (lang_decl): Remove pretty_function_p.
7799         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
7800         language-specific node.
7801         * decl.c (cp_make_fname_decl): Use build_decl, not
7802         build_lang_decl, to build the variables.
7803         (grokvardecl): Don't call build_lang_decl for local variables in
7804         templates.
7805         (grokdeclarator): Don't call build_lang_decl for local type
7806         declarations in templates.
7807         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
7808         zero'd memory, rather than calling memset.
7809         * pt.c: Include hashtab.h.
7810         (local_specializations): New variable.
7811         (retrieve_local_specialization): Use it.
7812         (register_local_specialization): Likewise.
7813         (tsubst_decl): Don't assume local variables have
7814         DECL_LANG_SPECIFIC.
7815         (instantiate_decl): Set up local_specializations.
7816         * Makefile.in (HTAB_H): New variable.
7817
7818 2000-04-23  Richard Henderson  <rth@cygnus.com>
7819
7820         * typeck.c (c_expand_asm_operands): Restore the original
7821         contents of the output list.
7822
7823 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
7824
7825         * ir.texi:  Document complex number representation.
7826
7827 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
7828
7829         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
7830         (target_incomplete_p): New function.
7831         (tinfo_base_init): Create comdat NTBS name variable.
7832         (ptr_initializer): Add non_public parameter. Calculate it.
7833         (ptmd_initializer): Likewise.
7834         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
7835         (create_real_tinfo_var): Add non_public parameter. Use it.
7836         Push proxy into global namespace.
7837         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
7838         New enumeration.
7839         * inc/typeinfo (type_info::before, type_info::operator==):
7840         Compare __name addresses.
7841
7842         * tinfo2.cc: Remove new-abi builtins comment.
7843
7844 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
7845
7846         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
7847
7848         * call.c (joust): Exit early if we get the same function, too.
7849
7850         * decl2.c (key_method): Return NULL_TREE for template classes.
7851         (import_export_class): Don't need to check for template classes.
7852
7853 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
7854
7855         * lex.c: Remove references to cccp.c.
7856
7857 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
7858
7859         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
7860         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
7861         (DECL_DESTRUCTOR_P): Use destructor_attr.
7862         (DECL_CONST_MEMFUNC_P): Reimplement.
7863         (DECL_VOLATILE_MEMFUNC_P): Remove.
7864         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
7865         (overrides): Use DECL_DESTRUCTOR_P.
7866         (check_for_override): Likewise.
7867         * decl.c (start_function): Likewise.
7868         * decl2.c (grokfclassfn): Likewise.
7869         (check_classfn): Likewise.
7870         (grok_function_init): Likewise.
7871
7872 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
7873
7874         * decl2.c (grokfield): Issue error on illegal data member
7875         declaration.
7876
7877 Mon Apr 17 17:11:16 2000  Mark P Mitchell  <mark@codesourcery.com>
7878
7879         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
7880
7881 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
7882
7883         * class.c (build_vtable_entry): Don't build thunks for type-info
7884         functions.
7885
7886 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
7887
7888         * decl.c (decls_match): Allow a redeclaration of a builtin to
7889         specify args while the builtin did not.
7890
7891 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
7892
7893         * cp-tree.def (THUNK_DECL): Add to documentation.
7894         * cp-tree.h (flag_huge_objects): Declare.
7895         * class.c (modify_vtable_entry): Tidy.
7896         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
7897         Calculate delta appropriately for the new ABI.
7898         (dfs_modify_vtables): Use it.
7899         (modify_all_vtables): Fix thinko in code to add overriding copies
7900         of functions to primary vtables.
7901         (build_clone): Fix typo in comment.
7902         (clone_function_decl): Correct order of destructors in vtable.
7903         (build_vbase_offset_vtbl_entries): Adjust comment.
7904         (dfs_vcall_offset_queue_p): Remove.
7905         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
7906         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
7907         (build_vtable_entry): Correct check for pure virtual functions.
7908         Don't declare flag_huge_objects.
7909         * decl.c (flag_huge_objects): Remove declaration.
7910         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
7911         Use int_size_in_bytes.
7912         (emit_thunk): Handle vcall offset thunks.
7913
7914 Sat Apr 15 16:00:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7915
7916         * decl2.c (parse_time, varconst_time): Delete declarations.
7917         (finish_file): Delete LINENO declaration.
7918         START_TIME and THIS_TIME now long.
7919
7920 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
7921
7922         * class.c (build_base_field): Reformat comment.
7923
7924         * inc/cxxabi.h (stddef.h): Comment inclusion.
7925         (__base_class_info::__offset): Comment shift.
7926
7927 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
7928
7929         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
7930         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
7931         (cp_push_exception_identifier): New macro.
7932         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
7933         (DECL_BASE_DESTRUCTOR_P): Likewise.
7934         (DECL_DELETING_DESTRUCTOR_P): Likewise.
7935         (get_vtbl_decl_for_binfo): Fix formatting.
7936         (in_charge_arg_for_name): New macro.
7937         (maybe_build_cleanup_and_delete): Remove declaration.
7938         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
7939         (in_charge_arg_for_name): New function.
7940         (build_new_method_call): Use it.  Handle cloned destructors.
7941         (build_clone): Don't make the base constructor virtual.
7942         Automatically defer generated functions.
7943         (clone_function_decl): Handle destructors, too.
7944         (clone_constructors_and_destructors): Likewise.
7945         (create_vtable_ptr): Don't create a vtable entry for a cloned
7946         function.
7947         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
7948         (initialize_predefined_identifiers): Update appropriately.
7949         (finish_destructor_body): Simplify.
7950         (maybe_build_cleanup_and_delete): Remove.
7951         * except.c (expand_throw): Handle new-ABI destructors.
7952         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
7953         (build_dtor_call): New function.
7954         (build_delete): Use it.  Simplify.
7955         * optimize.c (maybe_clone_body): Handle destructors.
7956         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
7957
7958         * exception.cc (cleanup_fn): New typedef.
7959         (CALL_CLEANUP): New macro.
7960         (cp_eh_info): Use them.
7961         (__cp_push_exception): Likewise.
7962         (__cp_pop_exception): Likewise.
7963
7964 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
7965
7966         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
7967         (complete_dtor_identifier): New macro.
7968         (CLASSTYPE_FIRST_CONVERSION): Remove.
7969         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
7970         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
7971         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
7972         (CLASSTYPE_CONSTRUCTORS): Likewise.
7973         (CLASSTYPE_DESTRUCTORS): Likewise.
7974         (lang_decl): Add cloned_function.
7975         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
7976         (DECL_BASE_CONSTRUCTOR_P): Likewise.
7977         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
7978         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
7979         (DECL_CLONED_FUNCTION_P): Likewise.
7980         (DECL_CLONED_FUNCTION): Likewise.
7981         (clone_function_decl): Declare.
7982         (maybe_clone_body): Likewise.
7983         * call.c (build_user_type_conversion_1): Call complete object
7984         constructors in the new ABI.
7985         (build_new_method_call): Don't add in-charge parameters under the
7986         new ABI.
7987         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
7988         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
7989         CLASSTYPE_DESTRUCTOR_SLOT.
7990         (build_clone): New function.
7991         (clone_function_decl): Likewise.
7992         (clone_constructors_and_destructors): Likewise.
7993         (check_bases_and_members): Use it.
7994         * decl.c (iniitialize_predefined_identifiers): Initialize
7995         complete_dtor_identifier.
7996         (finish_function): Don't add extra code to a clone.
7997         (lang_mark_tree): Mark cloned_function.
7998         * decl2.c (mark_used): Don't bother trying to instantiate things
7999         we synthesized.
8000         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
8001         * method.c (set_mangled_name_for_decl): Don't treat clones as
8002         constructors.
8003         (synthesize_method): Sythesize cloned functions, not the clones.
8004         * optimize.c (inline_data): Update comment on ret_label.
8005         (remap_block): Don't assume DECL_INITIAL exists.
8006         (copy_body_r): Allow ret_label to be NULL.
8007         (maybe_clone_body): Define.
8008         * pt.c (tsubst_decl): Handle clones.
8009         (instantiate_clone): New function.
8010         (instantiate_template): Use it.
8011         (set_mangled_name_for_template_decl): Don't treat clones as
8012         constructors.
8013         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
8014         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
8015         * semantics.c (expand_body): Clone function bodies as necessary.
8016
8017         * optimize.c (remap_decl): Avoid sharing structure for arrays
8018         whose size is only known at run-time.
8019         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
8020
8021         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
8022         to has_in_charge_parm_p.
8023         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
8024         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
8025         (DECL_COPY_CONSTRUCTOR_P): New macro.
8026         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
8027         (build_user_type_conversion_1): Likewise.
8028         (convert_like_real): Likewise.
8029         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
8030         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
8031         (copy_args_p): Likewise.
8032         (grok_ctor_properties): Likewise.
8033         (start_function): Likewise.
8034         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
8035         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
8036         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
8037         * method.c (do_build_copy_constructor): Use
8038         DECL_HAS_IN_CHARGE_PARM_P.
8039         (synthesize_method): Likewise.
8040         * pt.c (instantiate_template): Remove goto.
8041         * tree.c (build_cplus_method_type): Remove mention of obstacks in
8042         comment.
8043
8044         * cp-tre.h (finish_function): Change prototype.
8045         * decl.c (end_cleanup_fn): Adjust caller.
8046         (finish_function): Take only one parameter.
8047         * decl2.c (finish_objects): Adjust caller.
8048         (finish_static_storage_duration_function): Likewise.
8049         * method.c (emit_thunk): Likewise.
8050         * parse.y: Likewise.
8051         * parse.c: Regenerated.
8052         * pt.c (instantiate_decl): Likewise.
8053         * rtti.c (synthesize_tinfo_fn): Likewise.
8054         * semantics.c (expand_body): Likewise.
8055
8056         * cp-tree.h (copy_decl): New function.
8057         * class.c (finish_struct_1): Use it.
8058         * lex.c (copy_decl): Define it.
8059         * pt.c (tsubst_decl): Likewise.
8060         * tree.c (copy_template_template_parm): Likewise.
8061
8062         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
8063         has_nonpublic_assign_ref.
8064         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
8065         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
8066         * class.c (finish_struct_methods): Don't set
8067         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
8068         (interface_only): Don't declare.
8069         (interface_unknown): Likewise.
8070
8071 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
8072
8073         * tree.h (HAVE_TEMPLATES): Remove definition.
8074         * lang-options.h (-fthis-is-variable): Remove documentation.
8075
8076 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
8077
8078         * class.c (instantiate_type): Handle object-relative template-id.
8079
8080         * semantics.c (finish_expr_stmt): Call convert_to_void here.
8081         * decl.c (cplus_expand_expr_stmt): Not here.
8082
8083         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
8084         Initialize exprtype earlier.
8085
8086         * parse.y (fn.def1): Check for defining types in return types.
8087
8088         * decl.c (check_tag_decl): Notice extra fundamental types.
8089         Diagnose empty decls in classes, too.
8090
8091         * decl.c (grokdeclarator): Don't override an anonymous name if no
8092         declarator was given.
8093
8094         * cvt.c (convert_to_void): Call resolve_offset_ref.
8095
8096         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
8097
8098         * decl2.c (decl_namespace): Handle getting a type.
8099
8100         * typeck.c (build_c_cast): Re-enable warning for cast between
8101         pointer and integer of different size.
8102
8103 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
8104
8105         * inc/cxxabi.h (__pointer_type_info): Add restrict and
8106         incomplete flags.
8107         (__pointer_type_info::__pointer_catch): New virtual function.
8108         (__pointer_to_member_type_info): Derive from
8109         __pointer_type_info. Adjust.
8110         (__pointer_to_member_type_info::__do_catch): Remove.
8111         (__pointer_to_member_type_info::__is_pointer_p): Declare.
8112         (__pointer_to_member_type_info::__pointer_catch): Declare.
8113         * rtti.c (qualifier_flags): Add restrict flag.
8114         (ptmd_initializer): Reorder members.
8115         (create_tinfo_types): Expand comments. Reorder
8116         ptmd_desc_type_node members.
8117         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
8118         Implement.
8119         (__pointer_type_info::__do_catch): Move specific code into
8120         __pointer_catch. Call it.
8121         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
8122         specific catch checking. Fix void conversion check.
8123         (__pointer_to_member_type_info::__do_catch): Remove.
8124         (__pointer_to_member_type_info::__pointer_catch): Implement.
8125
8126 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
8127
8128         * lex.c (init_parse): Remove traces of classof and headof.
8129         * decl2.c (flag_operator_names): Default to 1.
8130         (lang_decode_option): Do not set it for -ansi.
8131
8132 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
8133
8134         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
8135         (DECL_MAIN_VARIANT): Remove.
8136         * decl.c (duplicate_decls): Don't set it.
8137         (start_function): Likewise.
8138         (lang_mark_tree): Don't mark it.
8139         * decl2.c (defer_fn): Don't use it.
8140         * lex.c (retrofit_lang_decl): Don't set it.
8141         * pt.c (tsubst_decl): Likewise.
8142         * ptree.c (print_lang_decl): Don't print it.
8143         * typeck.c (mark_addressable): Don't use it.
8144
8145 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
8146
8147         * vec.cc: Include <new> and <exception>.
8148         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
8149         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
8150         terminate.
8151         (__cxa_vec_delete): Catch dtor exceptions.
8152
8153 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
8154
8155         Prepend __ to implementation defined names.
8156         * inc/typeinfo (type_info): Rename _name to __name.
8157         (type_info::type_info): Rename parameter.
8158         (type_info::operator==, type_info::operator!=,
8159         type_info::before): Likewise.
8160         (type_info::is_pointer_p, type_info::is_function_p,
8161         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
8162         parameters.
8163         * inc/cxxabi.h
8164         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
8165         (__pointer_type_info::__pointer_type_info): Likewise.
8166         (__pointer_type_info::is_pointer_p,
8167         __pointer_type_info::do_catch): Prepend __. Rename parameters.
8168         (__array_type_info::__array_type_info): Rename parameters.
8169         (__function_type_info::__function_type_info): Likewise.
8170         (__function_type_info::is_function_p): Prepend __.
8171         (__enum_type_info::__enum_type_info): Rename parameters.
8172         (__pointer_to_member_type_info::__pointer_to_member_type_info):
8173         Likewise.
8174         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
8175         parameters.
8176         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
8177         (__class_type_info::__class_type_info): Rename parameters.
8178         (__class_type_info::sub_kind): Prepend __. Adjust member names.
8179         (__class_type_info::upcast_result,
8180         __class_type_info::dyncast_result): Prepend __. Move definition
8181         into tinfo.cc.
8182         (__class_type_info::do_upcast, __class_type_info::do_catch,
8183         __class_type_info::find_public_src,
8184         __class_type_info::do_dyncast,
8185         __class_type_info::do_find_public_src): Prepend __. Rename
8186         parameters.
8187         (__si_class_type_info::__si_class_type_info): Rename parameters.
8188         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
8189         __si_class_type_info::do_find_public_src): Prepent __. Rename
8190         parameters.
8191         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
8192         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
8193         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
8194         parameters.
8195         (__dynamic_cast): Rename parameters.
8196         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
8197         type_info::do_catch, type_info::do_upcast): Prepend __.
8198         (contained_p, public_p, virtual_p, contained_public_p,
8199         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
8200         (__class_type_info::do_catch,
8201         __class_type_info::do_upcast): Prepend __. Adjust.
8202         (__class_type_info::__upcast_result,
8203         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
8204         Adjust.
8205         (__class_type_info::find_public_src): Prepend __. Adjust.
8206         (__class_type_info::do_find_public_src,
8207         __si_class_type_info::do_find_public_src,
8208         __vmi_class_type_info::do_find_public_src): Likewise.
8209         (__class_type_info::do_dyncast,
8210         __si_class_type_info::do_dyncast,
8211         __vmi_class_type_info::do_dyncast): Likewise.
8212         (__class_type_info::do_upcast,
8213         __si_class_type_info::do_upcast,
8214         __vmi_class_type_info::do_upcast): Likewise.
8215         (__dynamic_cast): Adjust.
8216         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
8217         (__function_type_info::is_function_p): Likewise.
8218         (__pointer_type_info::do_catch): Likewise. Adjust.
8219         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
8220         (__throw_type_match_rtti_2): Adjust.
8221         (__is_pointer): Adjust.
8222
8223 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
8224
8225         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
8226         (complete_ctor_identifier): New macro.
8227         (special_function_kind): Add sfk_copy_constructor and
8228         sfk_assignment_operator.
8229         (LOOKUP_HAS_IN_CHARGE): Remove.
8230         (cons_up_default_function): Rename to ...
8231         (implicitly_declare_fn): ... this.
8232         * call.c (build_new_method_call): Add in-charge parameters for
8233         constructors here.
8234         * class.c (add_implicitly_declared_members): Change parameter name
8235         from cant_have_assignment to cant_have_const_assignment.
8236         Replace calls to cons_up_default_function to implicitly_declare_fn.
8237         * cvt.c (ocp_convert): Use complete_ctor_identifier.
8238         * decl.c (initialize_predefined_identifiers): Initialize it.
8239         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
8240         complex expression.
8241         * init.c (expand_default_init): Don't calculate the in-charge
8242         parameter here.
8243         (build_new_1): Likewise.
8244         * lex.c (cons_up_default_function): Move to method.c.
8245         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
8246         (implicitly_declare_fn): New function.
8247         * typeck.c (build_static_cast): Use complete_ctor_identifier.
8248         (build_modify_expr): Likewise.
8249         * typeck2.c (build_functional_cast): Likewise.
8250
8251         Under the new ABI, constructors don't return `this'.
8252         * cp-tree.h (warn_reorder): Declare.
8253         (special_function_kind): New enum.
8254         (global_base_init_list): Remove declaration.
8255         (emit_base_init): Don't return a value.
8256         (check_base_init): Don't declare.
8257         (is_aggr_typedef): Likewise.
8258         * decl.c (check_special_function_return_type): New function.
8259         (return_types): Remove.
8260         (grokdeclarator): Use check_special_function_return_type.
8261         (start_function): Don't initialize ctor_label under the new ABI.
8262         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
8263         * init.c (begin_init_stmts): Move to top of file.
8264         (finish_init_stmts): Likewise.
8265         (warn_reorder): Don't declare.
8266         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
8267         value.
8268         (check_base_init): Remove.
8269         (is_aggr_typedef): Likewise.
8270         (build_new_1): Don't use the return value of a constructor.
8271         * semantics.c (setup_vtbl_ptr): Don't use the return value
8272         of emit_base_init.
8273         * typeck.c (check_return_expr): Don't magically convert return
8274         statements into `return this' in constructors under the new ABI.
8275
8276         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
8277         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
8278         (base_ctor_identifier): New macro.
8279         (base_dtor_identifier): Likewise.
8280         (deleting_dtor_identifier): Likewise.
8281         * decl.c: Don't include obstack.h.
8282         (obstack_chunk_alloc): Don't define.
8283         (obstack_chunk_free): Likewise.
8284         (struct predefined_identifier): New type.
8285         (initialize_predefined_identifiers): New function.
8286         (init_decl_processing): Use it.
8287         (debug_temp_inits): Remove.
8288         (start_method): Don't call preserve_data.
8289         (hack_incomplete_structures): Update comment.
8290         * init.c (init_init_processing): Don't initialize
8291         nelts_identifier.
8292         (build_offset_rf): Remove dead code.
8293         (build_delete): Use CLASSTYPE_N_BASECLASSES.
8294         * search.c (init_search_processing): Don't initialize
8295         vptr_identifier.
8296
8297 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8298
8299         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
8300         some sign_compare warnings.
8301
8302 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
8303
8304         Rename abi::__vmi_class_type_info members.
8305         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
8306         base_list, detail_masks members to vmi_flags, vmi_base_count,
8307         vmi_bases and vmi_flags_masks respectively.
8308         (__vmi_class_type_info::vmi_flags_masks): Rename
8309         details_unknown_mask to flags_unknown_mask.
8310         * tinfo.cc (__class_type_info::do_upcast): Adjust.
8311         (__vmi_class_type_info::do_find_public_src): Adjust.
8312         (__vmi_class_type_info::do_dyncast): Adjust.
8313         (__vmi_class_type_info::do_upcast): Adjust.
8314
8315 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
8316
8317         * tinfo.cc (convert_to_base): New function.
8318         (get_vbase_offset): Remove. Move into convert_to_base.
8319         (__vmi_class_type_info::do_find_public_src): Adjust.
8320         (__vmi_class_type_info::do_dyncast): Adjust.
8321         (__vmi_class_type_info::do_upcast): Adjust.
8322
8323 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
8324
8325         * tinfo.cc (operator=): Use __builtin_strcmp.
8326         * tinfo2.cc (before): Likewise.
8327
8328 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
8329
8330         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
8331         (DECL_SAVED_INLINE): Rename to ...
8332         (DECL_DEFERRED_FN): ... this.
8333         (in_function_p): Remove declaration.
8334         (mark_inline_for_output): Rename to ...
8335         (defer_fn): ... this.
8336         * decl.c (finish_function): Adjust call to mark_inline_for_output.
8337         (in_function_p): Remove definition.
8338         * decl2.c (saved_inlines): Rename to ...
8339         (deferred_fns): ... this.
8340         (saved_inlines_used): Rename to ...
8341         (deferred_fns_used): ... this.
8342         (mark_inline_for_output): Rename to ...
8343         (defer_fn): ... this.
8344         (finish_file): Adjust accordingly.
8345         (init_decl2): Likewise.
8346         * lex.c (cons_up_default_function): Likewise.
8347         * pt.c (mark_decl_instantiated): Likewise.
8348         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
8349         circumstances.
8350         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
8351         * semantics.c (expand_body): Defer more functions.
8352
8353 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
8354
8355         * vec.cc: New file.
8356         * Make-lang.in (CXX_LIB2FUNCS): Add it.
8357         (vec.o): Build it.
8358         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
8359         __cxa_vec_delete): Declare.
8360
8361 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
8362
8363         * rtti.c (dfs_class_hint_mark): New static function.
8364         (dfs_class_hint_unmark): New static function.
8365         (class_hint_flags): Use them.
8366
8367 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
8368
8369         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
8370
8371 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
8372
8373         * cp-tree.h (instantiate_decl): Change prototype.
8374         * decl2.c (mark_used): Adjust call.
8375         * optimize.c (inlinable_function_p): Adjust handling of templates.
8376         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
8377         (do_type_instantiation): Likewise.
8378         (instantiate_decl): Defer more templates.
8379         (instantiate_pending_templates): Adjust logic to handle inline
8380         friend functions.
8381
8382         * Makefile.in (GGC_H): New variable.  Use it throughout in place
8383         of ggc.h.
8384
8385         * call.c: Don't include obstack.h.  Include ggc.h.
8386         (obstack_chunk_alloc): Don't define.
8387         (obstack_chunk_free): Likewise.
8388         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
8389         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
8390         (pop_switch): Free it.
8391
8392         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
8393
8394         * dump.c (dequeue_and_dump): Don't try to print the bit_position
8395         if we don't have a DECL_FIELD_OFFSET.
8396
8397 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
8398
8399         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
8400         special_function_p.
8401
8402 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8403
8404         * cfns.gperf (hash, libc_name_p): Prototype.
8405
8406         * rtti.c (build_dynamic_cast_1): Constification.
8407
8408         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
8409
8410         * semantics.c (deferred_type_access_control): Prototype.
8411
8412 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
8413
8414         Correct many new ABI issues regarding vbase and vcall offset
8415         layout.
8416         * cp-tree.h (BINFO_VTABLE): Document.
8417         (struct lang_type): Tweak formatting.
8418         (BINFO_PRIMARY_BINFO): Add to documentation.
8419         (CLASSTYPE_VSIZE): Fix typo in comment.
8420         (CLASSTYPE_VBASECLASSES): Update documentation.
8421         (BINFO_VBASE_MARKED): Remove.
8422         (SET_BINFO_VBASE_MARKED): Likewise.
8423         (CLEAR_BINFO_VBASE_MARKED): Likewise.
8424         (BINFO_FIELDS_MARKED): Remove.
8425         (SET_BINFO_FIELDS_MARKED): Likewise.
8426         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
8427         (enum access_kind): New enumeration.
8428         (num_extra_vtbl_entries): Remove declaration.
8429         (size_extra_vtbl_entries): Likewise.
8430         (get_vtbl_decl_for_binfo): New function.
8431         (dfs_vbase_unmark): Remove declaration.
8432         (mark_primary_bases): Likewise.
8433         * class.c (SAME_FN): Remove.
8434         (struct vcall_offset_data_s): Move definition.
8435         (build_vbase_pointer): Use `build', not `build_binary_op', to
8436         access the vbase pointer under the new ABI.
8437         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
8438         (build_primary_vtable): Likewise.
8439         (dfs_mark_primary_bases): Move here from search.c.
8440         (mark_primary_bases): Likewise.
8441         (determine_primary_bases): Under the new ABI, don't make a base
8442         class a primary base just because we don't yet have any virtual
8443         functions.
8444         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
8445         (num_vfun_entries): Remove.
8446         (dfs_count_virtuals): Likewise.
8447         (num_extra_vtbl_entries): Likewise.
8448         (size_extra_vtbl_entries): Likewise.
8449         (layout_virtual_bases): Iterate in inheritance graph order under
8450         the new ABI.
8451         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
8452         indicate that a vfield is present.
8453         (init_class_processing): Initialize access_public_node, etc., from
8454         ak_public, etc.
8455         (get_vtbl_decl_for_binfo): New function.
8456         (dump_class_hierarchy_r): Likewise.
8457         (dump_class_hierarchy): Use it.
8458         (finish_vtbls): Build the vtbls in inheritance graph order.
8459         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
8460         (initialize_vtable): Use get_vtbl_decl_for_binfo.
8461         (accumulate_vtbl_inits): Add comments explaining why a pre-order
8462         walk is required.
8463         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
8464         where the vptr points, even for primary vtables.
8465         (build_vtbl_initializer): Adjust handling of vbase and vcall
8466         offsets.
8467         (build_vcall_and_vbase_vtable_entries): New function.
8468         (dfs_build_vbase_offset_vtbl_entries): Remove.
8469         (build_vbase_offset_vtbl_entries): Reimplement.
8470         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
8471         were already handled in a primary base class vtable.
8472         (build_vcall_offset_vtbl_entries): Adjust.
8473         (build_rtti_vtbl_entries): Adjust.
8474         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
8475         * init.c (expand_virtual_init): Simplify.
8476         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
8477         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
8478         * search.c (BINFO_ACCESS): New macro.
8479         (SET_BINFO_ACCESS): Likewise.
8480         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
8481         (access_in_type): Likewise.
8482         (dfs_accessible_p): Likewise.
8483         (protected_accessible_p): Likewise.
8484         (lookup_fnfields_1): Adjust documentation.
8485         (dfs_mark_primary_bases): Move to class.c
8486         (mark_primary_bases): Likewise.
8487         (dfs_vbase_unmark): Remove.
8488         (virtual_context): Use BINFO_FOR_VBASE.
8489         (dfs_get_vbase_types): Simplify.
8490         (dfs_build_inheritance_graph_order): New function.
8491         (get_vbase_types): Use it.
8492         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
8493
8494         * tinfo.cc (get_vbase_offset): New function.
8495         (__vmi_class_type_info::do_find_public_src): Use it.
8496         (__vmi_class_type_info::do_dyncast): Likewise.
8497         (__vmi_class_type_info::do_upcast): Likewise.
8498
8499 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
8500
8501         * lang-specs.h: Pass -fno-show-column to the preprocessor.
8502
8503 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
8504
8505         * rtti.c (class_hint_flags): Rename flags.
8506         (class_initializer): Remove flags.
8507         (synthesize_tinfo_var): Combine offset and flags. Add flags
8508         for __vmi_class_type_info.
8509         (create_tinfo_types): Remove flags from __class_type_info and
8510         __si_class_type_info. Merge flags and offset from
8511         base_class_type_info.
8512         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
8513         (__base_class_info::is_virtual_p): Adjust.
8514         (__base_class_info::is_public_p): Adjust.
8515         (__base_class_info::offset): New accessor.
8516         (__class_type_info::details): Remove member.
8517         (__class_type_info::__class_type_info): Lose details.
8518         (__class_type_info::detail_masks): Remove.
8519         (__si_class_type_info::__si_class_type_info): Lose details.
8520         (__vmi_class_type_info::details): New member.
8521         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
8522         (__vmi_class_type_info::detail_masks): New member.
8523         * tinfo.cc (__class_type_info::do_upcast): Initialize result
8524         with unknown_details_mask.
8525         (__vmi_class_type_info::do_find_public_src): Adjust
8526         (__vmi_class_type_info::do_dyncast): Adjust.
8527         (__vmi_class_type_info::do_upcast): Set result details, if
8528         needed. Adjust.
8529         (__dynamic_cast): Temporarily #if out optimization.
8530
8531 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
8532
8533         * rtti.c (get_tinfo_decl): Mark used.
8534         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
8535         mark as dealt with, if we output it.
8536
8537 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
8538
8539         * class.c: Reorganize to put virtual function table initialization
8540         machinery at the end of the file.
8541
8542 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
8543
8544         * class.c (finish_struct): Use bitsize_zero_node.
8545         * pt.c (instantiate_class_template): Likewise.
8546
8547 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
8548
8549         Put RTTI entries at negative offsets in new ABI.
8550         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
8551         vbase offset at index -3, not -1.
8552         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
8553         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
8554         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
8555         (build_rtti_vtbl_entries): New function.
8556         (set_rtti_entry): Remove.
8557         (build_primary_vtable): Don't use it.
8558         (build_secondary_vtable): Likewise.
8559         (start_vtable): Remove.
8560         (first_vfun_index): New function.
8561         (set_vindex): Likewise.
8562         (add_virtual_function): Don't call start_vtable.  Do call
8563         set_vindex.
8564         (set_primary_base): Rename parameter.
8565         (determine_primary_base): Likewise.
8566         (num_vfun_entries): Don't use skip_rtti_stuff.
8567         (num_extra_vtbl_entries): Include RTTI information.
8568         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
8569         (skip_rtti_stuff): Remove.
8570         (dfs_modify_vtables): Don't use it.
8571         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
8572         (layout_nonempty_base_or_field): Update size handling.
8573         (create_vtable_ptr): Tweak.
8574         (layout_class_type): Adjust parameter names.
8575         (finish_struct_1): Simplify.
8576         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
8577         (skip_rtti_stuff): Remove.
8578         (first_vfun_index): New function.
8579         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
8580         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
8581         (marked_vtable_pathp): Declare.
8582         (unmarked_vtable_pathp): Likewise.
8583         * error.c (dump_expr): Use first_vfun_index to calculate vtable
8584         offsets.
8585         * rtti.c (build_headof): Look for RTTI at negative offsets.
8586         (get_tinfo_decl_dynamic): Likewise.
8587         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
8588         here.
8589         (create_pseudo_type_info): Do it here instead.  Adjust so that
8590         vptr points at first virtual function.
8591         * search.c (marked_vtable_pathp): Make it global.
8592         (unmarked_vtable_pathp): Likewise.
8593         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
8594         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
8595         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
8596         (get_pure_virtuals): Likewise.
8597         (expand_upcast_fixups): Likewise.
8598         * tree.c (debug_binfo): Likewise.
8599         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
8600         negative offset.
8601
8602 Sun Mar 26 20:15:26 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8603
8604         * class.c (check_field_decl): Fix typo.
8605         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
8606         (check_methods): Likewise.
8607         (check_field_decls): Likewise.
8608         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
8609         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
8610         Use DECL_RESULT_FLD, not DECL_RESULT.
8611         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
8612         * lex.c (identifier_type): Likewise.
8613         * pt.c (determine_specialization, lookup_template_class): Likewise.
8614         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
8615         (resolve_overloaded_unification, more_specialized): Likewise.
8616         * semantics.c (finish_member_declaration): Likewise.
8617         * typeck.c (build_x_function_call): Likewise.
8618
8619 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
8620
8621         * class.c (layout_empty_base): Handle empty bases with non-byte
8622         alignment.
8623         (build_base_field): Likewise.
8624         (layout_virtual_bases): Likewise.
8625
8626         * class.c (finish_struct_1): Fix typo in this change:
8627
8628         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8629
8630 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
8631
8632         * decl.c (grokdeclarator): Count partial specializations when
8633         keeping track of how many template classes have been seen.
8634
8635         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
8636
8637 Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8638
8639         * class.c (build_vbase_pointer_fields): layout_field now place_field.
8640         (get_vfield_offset): Use byte_position.
8641         (set_rtti_entry): Set OFFSET to ssizetype zero.
8642         (get_binfo_offset_as_int): Deleted.
8643         (dfs_record_base_offsets): Use tree_low_cst.
8644         (dfs_search_base_offsets): Likewise.
8645         (layout_nonempty_base_or_field): Reflect changes in RLI format
8646         and call byte_position.
8647         (layout_empty_base): Convert offset to ssizetype.
8648         (build_base_field): use rli_size_unit_so_far.
8649         (dfs_propagate_binfo_offsets): Do computation in proper type.
8650         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
8651         (layout_class_type): Reflect changes in RLI names and fields.
8652         (finish_struct_1): Set DECL_FIELD_OFFSET.
8653         * dump.c (dequeue_and_dump): Call bit_position.
8654         * expr.c (cplus_expand_constant): Use byte_position.
8655         * rtti.c (expand_class_desc): Use bitsize_one_node.
8656         * typeck.c (build_component_addr): Use byte_position and don't
8657         special case for zero offset.
8658
8659 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
8660
8661         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
8662
8663         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
8664         tinfo object.
8665         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
8666         vtable.
8667
8668 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
8669
8670         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
8671         DECL_P macros.
8672         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
8673         make_typename_type, check_initializer, cp_finish_decl,
8674         xref_tag): Likewise.
8675         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
8676         decl_namespace, arg_assoc_template_arg, arg_assoc,
8677         validate_nonmember_using_decl, do_class_using_decl): Likewise.
8678         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
8679         args_to_string): Likewise.
8680         * friend.c (is_friend): Likewise.
8681         * lex.c (note_got_semicolon, note_list_got_semicolon,
8682         is_global): Likewise.
8683         * method.c (build_overload_nested_name, build_overload_value,
8684         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
8685         * parse.y (typename_sub, typename_sub1): Likewise.
8686         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
8687         process_partial_specialization, convert_template_argument,
8688         template_args_equal, add_pending_template, lookup_template_class,
8689         for_each_template_parm_r, maybe_fold_nontype_arg,
8690         tsubst, instantiate_template, type_unification_real, unify,
8691         instantiate_pending_templates, set_mangled_name_for_template_decl):
8692         Likewise.
8693         * repo.c (repo_get_id, repo_template_used): Likewise.
8694         * search.c (lookup_field_1): Likewise.
8695         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
8696         * xref.c (classname): Likewise.
8697
8698 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
8699
8700         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
8701         (CANONICAL_BINFO): New macro.
8702         (BINFO_NEW_VTABLE_MARKED): Use it.
8703         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
8704         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
8705         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
8706         not TREE_TYPE.
8707         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
8708         (build_secondary_vtable): Likewise.
8709         (dfs_finish_vtbls): Likewise.
8710         (dfs_accumulate_vtbl_inits): Likewise.
8711         (accumulate_vtbl_inits): New function.
8712         (finish_vtbls): Make sure that virtual bases come after
8713         non-virtual bases in the vtable group.
8714         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
8715         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
8716         * search.c (struct vbase_info): Move definition.
8717         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
8718         (unmarked_new_vtable_p): Likewise.
8719         (dfs_mark_vtable_path): Remove.
8720         (dfs_mark_new_vtable): Remove.
8721         (dfs_unmark_new_vtable): Likewise.
8722         (dfs_clear_search_slot): Likewise.
8723         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
8724         (dfs_clear_vbase_slots): Likewise.
8725         (init_vbase_pointers): LIkewise.
8726
8727 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
8728
8729         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
8730         SIZETYPE to a non-SIZETYPE.
8731
8732 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
8733
8734         * class.c (layout_virtual_bases): Adjust names in conditionally
8735         compiled code.
8736
8737         * class.c (record_base_offsets): New function.
8738         (layout_conflict_p): Likewise.
8739         (layout_nonempty_base_or_field): Use it.
8740         (layout_empty_base): New function.
8741         (build_base_field): Use it.
8742         (build_base_fields): Update comment.
8743         (layout_virtual_bases): Fold in a little code form
8744         layout_basetypes.  Use layout_empty_base.
8745         (layout_basetypes): Remove.
8746         (end_of_class): New function.
8747         (layout_class_type): Use it.  Adjust.
8748
8749         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
8750         (fntype_p): Remove.
8751         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
8752         comment.
8753         (dfs_skip_nonprimary_vbases_markedp): Likewise.
8754         * typeck.c (fntype_p): Remove.
8755
8756         * cp-tree.h (TI_SPEC_INFO): Remove.
8757         (CLASSTYPE_TI_SPEC_INFO): Likewise.
8758         * pt.c (process_partial_specialization): Likewise.
8759
8760         * class.c (build_base_field): Fix thinko in computation of binfo
8761         offsets.
8762
8763         * tree.c (mark_local_for_remap_p): Mark variables declared in
8764         TARGET_EXPRs as well.
8765
8766 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
8767
8768         * typeck.c (require_complete_type, complete_type,
8769         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
8770         build_array_ref, convert_arguments, pointer_diff,
8771         build_x_unary_op, build_unary_op, build_c_cast,
8772         build_modify_expr): Use COMPLETE_TYPE_P etc.
8773         * call.c (is_complete, convert_like_real,
8774         build_new_method_call): Likewise.
8775         * class.c (build_vbase_pointer_fields, check_bases,
8776         build_base_field, finish_struct_1, pushclass): Likewise.
8777         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
8778         * decl.c (maybe_process_template_type_declaration, pushtag,
8779         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
8780         layout_var_decl, check_initializer, cp_finish_decl,
8781         grokdeclarator, require_complete_types_for_parms,
8782         grok_op_properties, xref_tag, xref_basetypes,
8783         check_function_type): Likewise.
8784         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
8785         * friend.c (do_friend): Likewise.
8786         * init.c (build_offset_ref): Likewise.
8787         * parse.y (structsp): Likewise.
8788         * pt.c (maybe_process_partial_specialization,
8789         tsubst_friend_function, instantiate_class_template, tsubst,
8790         do_type_instantiation, instantiate_pending_templates): Likewise.
8791         * repo.c (repo_get_id): Likewise.
8792         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
8793         synthesize_tinfo_var, emit_support_tinfos): Likewise.
8794         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
8795         * semantics.c (begin_class_definition): Likewise.
8796         * tree.c (build_cplus_method_type): Likewise.
8797         * typeck2.c (digest_init, build_functional_cast,
8798         add_exception_specifier): Likewise.
8799         * parse.h, parse.c: Regenerated.
8800
8801 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
8802
8803         * inc/cxxabi.h: New header file. Define new-abi entry points.
8804         (__pointer_type_info::target): Rename member to ...
8805         (__pointer_type_info::type): ... here.
8806         (__base_class_info::type): Rename member to ...
8807         (__base_class_info::base): ... here.
8808         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
8809         * cp-tree.h (CPTI_ABI): New global tree enumeration.
8810         (abi_node): New global tree node.
8811         * decl.c (abi_node): Document.
8812         (init_decl_processing): Initialize abi_node.
8813         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
8814         (get_vmi_pseudo_type_info): Likewise.
8815         (create_tinfo_types): Likewise.
8816         (emit_support_tinfos): Likewise.
8817         * tinfo.h (cxxabi.h): Include for new-abi.
8818         Move rtti class definitions to new header file.
8819         * tinfo.cc (abi): Use the namespace.
8820         (std): Move new abi rtti classes from here ...
8821         (__cxxabiv1): ... to here.
8822         * tinfo2.cc (cxxabi.h): Include for new-abi.
8823         Move rtti class definitions to new header file.
8824         (std): Move new abi rtti classes from here ...
8825         (__cxxabiv1): ... to here.
8826         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
8827         namespace.
8828
8829 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
8830             Jason Merrill  <jason@casey.cygnus.com>
8831
8832         * method.c (build_overload_int): Use host_integerp.
8833
8834 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
8835
8836         * init.c (build_offset_ref): Handle the case of a templated member
8837         function.
8838
8839 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
8840
8841         * except.c (expand_exception_blocks): Clear catch_clauses_last.
8842
8843 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
8844
8845         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
8846         * class.c (check_bitfield_decl): Turn illegal bitfields into
8847         non-bitfields.
8848         (dfs_propagate_binfo_offsets): Adjust for new size_binop
8849         semantics.
8850         (dfs_offset_for_unshared_vbases): Likewise.
8851         * cvt.c (cp_convert_to_pointer): Convert NULL to a
8852         pointer-to-member correctly under the new ABI.
8853         * expr.c (cplus_expand_constant): Don't use cp_convert when
8854         turning an offset into a pointer-to-member.
8855         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
8856         when dereferencing them under the new ABI.
8857         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
8858         of pointers-to-members under the new ABI.
8859
8860         * class.c (check_bitfield_decl): Remove restriction on really long
8861         bitfields.
8862         (layout_class_type): Implement new ABI handling of bitfields
8863         longer than their types.
8864
8865 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
8866
8867         * parse.y (extdefs): Call ggc_collect.
8868         * parse.c: Regenerated.
8869
8870 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
8871
8872         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
8873         (note_name_declared_in_class): Use OVL_CURRENT to get at a
8874         potential overload.
8875
8876 Fri Mar 17 08:09:14 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8877
8878         * class.c (build_vbase_path): Use integer_zerop.
8879         (build_vtable_entry): Use tree_low_cst.
8880         (get_vfield_offset): Use bit_position.
8881         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
8882         Use tree_low_cst.
8883         (check_bitfield_decl): Set DECL_SIZE using convert.
8884         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
8885         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
8886         Use tree_low_cst.
8887         (finish_struct_1): Use bit_position.
8888         (dump_class_hierarchy): Use tree_low_cst.
8889         * cp-tree.h (min_precision): Add declaration.
8890         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
8891         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
8892         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
8893         * expr.c (cplus_expand_constant): Use bit_position.
8894         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
8895         * rtti.c (get_base_offset): Use bit_position.
8896         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
8897         host_integerp, and tree_low_cst.
8898         (pointer_int_sum): Use integer_zerop.
8899         (build_component_addr): Use bit_position.
8900
8901 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
8902
8903         * typeck.c (require_complete_type): Don't assume size_zero_node.
8904         (complete_type_or_else): Likewise.
8905
8906 2000-03-16  Steven Grady <grady@digitaldeck.com>
8907             Jason Merrill  <jason@casey.cygnus.com>
8908
8909         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
8910
8911 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
8912
8913         * decl2.c (grokfield): Bail out if type is error_mark_node.
8914
8915 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
8916
8917         * tinfo2.cc (__ptr_to_member_data): Rename to ...
8918         (__pointer_to_member_data): ... here. Adjust.
8919         * rtti.c (create_tinfo_types): Adjust.
8920
8921 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
8922
8923         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
8924         * decl.c (ref_desc_type_node): Undocument.
8925         * rtti.c (ptr_ref_initializer): Rename to ...
8926         (ptr_initializer): ... here. Adjust comments.
8927         (ptmd_initializer): Fix comment thinko.
8928         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
8929         (create_tinfo_types): Remove ref_desc_type_node init.
8930         * tinfo2.cc (__reference_type_info): Remove.
8931
8932 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
8933
8934         * decl.c (cp_finish_decl): Remove obsolete comment.
8935
8936         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
8937
8938 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
8939
8940         * cp-tree.h: Tweak documentation.
8941         * class.c (build_vbase_pointer_fields): Layout the fields, too.
8942         (avoid_overlap): Remove.
8943         (get_binfo_offset_as_int): New function.
8944         (dfs_serach_base_offsets): Likewise.
8945         (layout_nonempty_base_or_field): Likewise.
8946         (build_base_field): Layout fields here.  Avoid placing two objects
8947         of the same type at the same address, under the new ABI.
8948         (build_base_fields): Adjust accordingly.
8949         (create_vtable_ptr): Return the new field, but don't attach it to
8950         TYPE_FIELDS.
8951         (remove_base_field): Remove.
8952         (remove_base_fields): Remove.
8953         (layout_basetypes): Adjust accordingly.
8954         (layout_class_type): Call layout_field for each field, rather than
8955         just making a wholesale call to layout_type.
8956
8957 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
8958
8959         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
8960
8961 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
8962
8963         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
8964
8965         * except.c (dtor_nothrow): New fn.
8966         (do_pop_exception): Use it.  Take type parm.
8967         (push_eh_cleanup): Take type parm.
8968         (expand_start_catch_block): Pass it.
8969         (build_eh_type_type_ref): Accept null type.
8970
8971 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
8972
8973         * cp-tree.h (revert_static_member_fn): Change prototype.
8974         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
8975         (grok_op_properties): Likewise.
8976         (start_function): Likewise.
8977         (revert_static_member_fn): Simplify.
8978         * pt.c (check_explicit_specialization): Adjust call to
8979         revert_static_member_fn.
8980
8981 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
8982
8983         * cp-tree.h (scope_kind): New type.
8984         (tmpl_spec_kind): Likewise.
8985         (declare_pseudo_global_level): Remove.
8986         (pseudo_global_level_p): Rename to template_parm_scope_p.
8987         (pushlevel): Remove declaration.
8988         (begin_scope): New function.
8989         (finish_scope): Likewise.
8990         (current_tmpl_spec_kind): Likewise.
8991         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
8992         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
8993         Add template_spec_p.
8994         (toplevel_bindings_p): Adjust.
8995         (declare_pseudo_global_level): Remove.
8996         (pseudo_global_level_p): Rename to template_parm_scope_p.
8997         (current_tmpl_spec_kind): New function.
8998         (begin_scope): Likewise.
8999         (finish_scope): Likewise.
9000         (maybe_push_to_top_level): Adjust.
9001         (maybe_process_template_type_declaration): Likewise.
9002         (pushtag): Likewise.
9003         (pushdecl_nonclass_level): Likewise.
9004         (lookup_tag): Likewise.
9005         (grokfndecl): Handle member template specializations.  Share
9006         constructor and non-constructor code.
9007         * decl2.c (check_classfn): Handle member template specializations.
9008         * pt.c (begin_template_parm_list): Use begin_scope.
9009         (begin_specialization): Likewise.
9010         (end_specialization): Likewise.
9011         (check_explicit_specialization): Use current_tmpl_spec_kind.
9012         Handle member template specializations.
9013         (end_template_decl): Use finish_scope.  Remove call to
9014         get_pending_sizes.
9015         (push_template_decl_real): Remove bogus error message.
9016         (tsubst_decl): Fix typo in code contained in comment.
9017         (instantiate_template): Handle member template specializations.
9018         (most_general_template): Likewise.
9019
9020 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
9021
9022         * lex.c (whitespace_cr): Compress consecutive calls to warning().
9023         (do_identifier): Ditto for error().
9024
9025         * pt.c (convert_nontype_argument): Ditto for cp_error().
9026         (convert_template_argument): Ditto for cp_pedwarn().
9027
9028 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
9029
9030         * exception.cc (__check_null_eh_spec): New fn.
9031         * except.c (expand_end_eh_spec): Call it if the spec is throw().
9032
9033 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
9034
9035         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
9036         * except.c (expand_end_eh_spec): Add the return type.
9037         * rtti.c (throw_bad_cast): Add the parmtypes.
9038         (throw_bad_typeid): Likewise.
9039
9040         * semantics.c (expand_stmt): Only leave out rtl for unused
9041         artificials, and set DECL_IGNORED_P on them as well.
9042         * decl.c (wrapup_globals_for_namespace): Likewise.
9043
9044 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
9045
9046         * decl.c (maybe_commonize_var): Skip all artificial decls.
9047         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
9048
9049 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
9050
9051         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
9052         * cp-tree.h: Declare flag_enforce_eh_specs.
9053         * decl.c (store_parm_decls, finish_function): Check it.
9054
9055         C library functions don't throw.
9056         * Makefile.in (cfns.h): New target.
9057         (except.o): Depend on it.
9058         * Make-lang.in (cc1plus): Depend on cfns.gperf.
9059         * cfns.gperf: New file.
9060         * cfns.h: Generated.
9061         * except.c: Include it.
9062         (nothrow_libfn_p): New fn.
9063         * decl.c (grokfndecl): Use it.
9064         * cp-tree.h: Declare it.
9065
9066         * decl.c (push_overloaded_decl_1, auto_function,
9067         define_function): Lose.
9068         (build_library_fn_1): New static fn.
9069         (builtin_function): Use it.
9070         (get_atexit_node): Use build_library_fn_ptr.
9071         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
9072         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
9073         push_void_library_fn, push_throw_library_fn): New fns.
9074         * cp-tree.h: Declare them.
9075         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
9076         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
9077         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
9078         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
9079         * rtti.c (build_runtime_decl): Lose.
9080         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
9081         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
9082         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
9083
9084         * call.c (build_call): Remove result_type parm.
9085         Call mark_used on unused artificial fns.
9086         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
9087
9088 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
9089
9090         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
9091         appropriate.
9092         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
9093         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
9094         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
9095         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
9096         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
9097         expand_generic_desc): Likewise.
9098
9099 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
9100
9101         * exception.cc (__cp_pop_exception): Cleanup the original object.
9102
9103 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
9104
9105         * decl.c (grok_op_properties): Merge conversion to void warning
9106         with other silly op warnings.
9107
9108 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
9109
9110         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
9111         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
9112
9113 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
9114
9115         * decl.c (cp_make_fname_decl): New function.
9116         (wrapup_globals_for_namespace): Don't emit unused static vars.
9117         (init_decl_processing): Remove comment about use of
9118         array_domain_type. Set make_fname_decl.
9119         (cp_finish_decl): Remove __FUNCTION__ nadgering.
9120         * semantics.c (begin_compound_stmt): Remove
9121         current_function_name_declared flagging.
9122         (expand_stmt): Don't emit unused local statics.
9123         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
9124         specially.
9125
9126 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
9127
9128         * typeck.c (convert_for_assignment): Don't look at array
9129         initializer.
9130         * call.c (convert_like_real): Likewise.
9131
9132 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
9133
9134         Add initial support for '\uNNNN' specifier.
9135         * lex.c (read_ucs): New fn.
9136         (readescape, skip_white_space): Call it.
9137         (is_extended_char, is_extended_char_1): New fns.
9138         (utf8_extend_token): New fn, #if 0'd out.
9139         (real_yylex): Treat extended chars like letters.
9140
9141         * search.c (note_debug_info_needed): Walk the bases even if we
9142         weren't deferring the type itself.
9143
9144 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9145
9146         * decl2.c (finish_objects): Constify a char*.
9147
9148         * method.c (emit_thunk): Likewise.
9149
9150 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
9151
9152         * typeck.c (dubious_conversion_warnings): Look through
9153         REFERENCE_TYPE.
9154
9155 Mon Mar  6 08:46:47 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9156
9157         * class.c (dfs_modify_vtables): I is now unsigned.
9158         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
9159         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
9160         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
9161         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
9162         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
9163         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
9164         Call integer_all_onesp.
9165         * typeck2.c (process_init_constructor): Use compare_tree_int.
9166
9167         * lang-specs.h (as): Don't call if -syntax-only.
9168
9169 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
9170
9171         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
9172         RTL_EXPR_HAS_NO_SCOPE after all.
9173
9174 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
9175
9176         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
9177         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
9178         RTL_EXPR_HAS_NO_SCOPE.
9179
9180         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
9181         later.
9182
9183         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
9184
9185 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
9186
9187         * call.c (convert_like): Macrofy.
9188         (convert_like_with_context): New macro.
9189         (convert_like_real): Renamed from convert_like.  Add calling
9190         context parameters, for diagnostics. Add recursive flag.  Call
9191         dubious_conversion_warnings for outer conversion.
9192         (build_user_type_conversion): Use convert_like_with_context.
9193         (build_over_call): Likewise. Don't warn about dubious
9194         conversions here. Adjust convert_default_arg calls.
9195         (convert_default_arg): Add context parameters for diagnostics.
9196         Pass through to convert_like_with_context.
9197         * cp-tree.h (convert_default_arg): Add context parameters.
9198         (dubious_conversion_warnings): Prototype new function.
9199         * typeck.c (convert_arguments): Adjust convert_default_arg call.
9200         (dubious_conversion_warnings): New function, broken
9201         out of convert_for_assignment.
9202         (convert_for_assignment): Adjust.
9203
9204 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
9205
9206         * decl2.c (key_method): Break out from...
9207         (import_export_vtable, import_export_class): ...here.
9208
9209         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
9210         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
9211
9212         * search.c (note_debug_info_needed, dfs_debug_mark,
9213         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
9214         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
9215
9216 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
9217
9218         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
9219         typos.
9220
9221 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
9222
9223         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
9224         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
9225         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
9226         (lang_type): Split gets_new into has_new and has_array_new.
9227         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
9228         (TYPE_GETS_NEW): Split into ...
9229         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
9230         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
9231         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
9232         (build_op_new_call): Don't declare.
9233         (build_new_1): Likewise.
9234         * call.c (build_op_new_call): Remove.
9235         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
9236         instead of TYPE_NEEDS_DESTRUCTOR.
9237         (finish_struct_bits): Likewise.
9238         (add_implicitly_declared_members): Likewise.
9239         (check_field_decl): Likewise.
9240         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
9241         correctly under the new ABI.
9242         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
9243         instead of TYPE_NEEDS_DESTRUCTOR.
9244         (initialize_local_var): Likewise.
9245         (destroy_local_var): Likewise.
9246         (cp_finish_decl): Likewise.
9247         (register_dtor_fn): Likewise.
9248         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
9249         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
9250         TYPE_VEC_DELETE_TAKES_SIZE here.
9251         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
9252         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
9253         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
9254         (finish_destructor_body): Likewise.
9255         (maybe_build_cleanup_1): Likewise.
9256         * decl2.c (do_static_destruction): Likewise.
9257         * init.c (build_new_1): Make it static.
9258         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
9259         (expand_cleanup_for_base): Likewise.
9260         (get_cookie_size): New function.
9261         (build_new_1): Handle array-new cookies correctly under the new
9262         ABI.
9263         (build_vec_delete_1): Likewise.
9264         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
9265         (build_delete): Likewise.
9266         (build_vec_delete): Handle array-new cookies correctly under the new
9267         ABI.
9268         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
9269         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
9270         TYPE_HAS_ARRAY_NEW_OPERATOR.
9271         * ptree.c (print_lang_type): Check them.
9272         * search.c (context_for_name_lookup): Fix typo in comment.
9273         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
9274         * tree.c (break_out_cleanups): Likewise.
9275         (build_cplus_array_test_1): Likewise.
9276         (cp_build_qualified_type_real): Likewise.
9277         * typeck.c (complete_type): Likewise.
9278
9279         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
9280         the command-line, not the end.
9281
9282 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
9283
9284         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
9285
9286 2000-03-02  Tom Tromey  <tromey@cygnus.com>
9287
9288         * cp-tree.h (build_java_class_ref): Declare.
9289         * init.c (build_java_class_ref): No longer static.
9290         * except.c (expand_throw): Generate a Java-style `throw' if the
9291         thrown object is a "Java" object.
9292         (initialize_handler_parm): Generate a Java-style lookup of
9293         exception info if the caught object is a "Java" object.
9294         (catch_language, catch_language_init): New globals.
9295         (decl_is_java_type): New function.
9296         (expand_start_catch_block): Don't call push_eh_info() or
9297         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
9298         class reference to build_catch_block.
9299
9300 Thu Mar  2 13:32:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9301
9302         * typeck.c (comptypes): Treat sizetype like its language equivalent.
9303
9304 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
9305
9306         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
9307         to merge reference/pointer code and fix incorrect warnings.
9308
9309 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
9310
9311         * search.c (protected_accessible_p): Use context_for_name_lookup.
9312
9313         * init.c (construct_virtual_bases): Fix thinko.
9314         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
9315
9316 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
9317
9318         * decl.c (current_function_decl): Move to toplev.c.
9319
9320 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
9321
9322         * pt.c (fn_type_unification): Unify return type, whenever
9323         provided.
9324         (get_bindings_real): Only pass return type when necessary.
9325         Remove explicit return type check.
9326         * class.c (resolve_address_of_overloaded_function): Pass desired
9327         return type to fn_type_unification.
9328
9329 Mon Feb 28 08:15:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9330
9331         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
9332         DECL_FIELD_SIZE.
9333         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
9334         DECL_FIELD_SIZE.
9335         * rtti.c (expand_class_desc): Likewise.
9336         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
9337         (THUNK_VCALL_OFFSET): Likewise.
9338         (THUNK_DELTA): Reflect changes in ../tree.h.
9339
9340 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
9341
9342         * search.c (protected_accessible_p): Also allow the access if
9343         the member is public in DERIVED.  Lose TYPE parm.
9344         (friend_accessible_p): Lose TYPE parm.
9345         (accessible_p): Adjust.
9346
9347 Sun Feb 27 16:40:33 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9348
9349         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
9350         on things that are not sizes; ssize_binop deleted.
9351         Call size_diffop when appropriate.
9352         (dfs_build_vcall_offset_vtbl_entries): Likewise.
9353         (build_primary_vtable, build_secondary_vtable): Likewise.
9354         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
9355         Variable I is HOST_WIDE_INT.
9356         (get_vfield_offset): Pass proper types to size_binop.
9357         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
9358         (finish_struct_1): Likewise.
9359         (skip_rtti_stuff): Arg N is now pointer to signed.
9360         (layout_class_type): Use size_zero_node.
9361         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
9362         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
9363         * decl.c (complete_arry_type): Pass proper types to size_binop.
9364         (xref_basetypes): BINFO_OFFSET is sizetype.
9365         * error.c (dump_expr): Don't use size_binop non-sizes.
9366         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
9367         * init.c (construct_virtual_bases): Fix type error.
9368         (build_vec_delete_1): Pass proper type to size_binop and don't
9369         fold result.
9370         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
9371         * rtti.c (get_base_offset): Pass proper type to size_binop.
9372         * search.c (dfs_find_vbases): Fix type error.
9373         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
9374         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
9375         * tree.c (debug_binfo): Variable N is signed.
9376         Use HOST_WIDE_INT_PRINT_DEC.
9377         * typeck.c (comptypes): sizetype is same as equivalent integer type.
9378         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
9379         size_one_node and size_zero_node.
9380         (c_alignof): Use size_one_node.
9381         (build_component_addr): Pass proper types to size_binop.
9382         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
9383
9384 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
9385
9386         Implement class scope using-declarations for functions.
9387         * class.c (handle_using_decl): Call add_method for used functions.
9388         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
9389         (add_method): Used functions are hidden by local functions.
9390         (check_bases_and_members): Handle using-decls before finalizing
9391         CLASSTYPE_METHOD_VEC.
9392         * call.c (add_function_candidate): Add ctype parm; if non-zero,
9393         override the type of 'this' accordingly.
9394         (add_template_candidate, add_template_candidate_real): Add ctype parm.
9395         (convert_class_to_reference, build_user_type_conversion_1,
9396         build_new_function_call, build_object_call, build_new_op,
9397         build_new_method_call): Pass ctype parm.
9398
9399         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
9400         the baselink.
9401         * call.c (convert_class_to_reference, build_user_type_conversion_1,
9402         build_new_function_call, build_object_call, build_new_op,
9403         build_new_method_call, build_op_delete_call): Don't get basetype_path
9404         from a baselink.
9405         * typeck.c (build_component_ref): Likewise.
9406         * init.c (build_offset_ref): Likewise.
9407         (resolve_offset_ref): Don't call enforce_access.
9408         Call build_scoped_ref.
9409         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
9410         would cause an error or if -pedantic.
9411         * class.c (alter_access): Lose binfo parm.
9412
9413 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
9414
9415         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
9416         types.
9417
9418 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
9419
9420         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
9421         pseudo_type_info creation into the std namespace
9422
9423 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
9424
9425         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
9426         (import_export_class): Remove declaration.
9427         * decl2.c (import_export_class): Make it static.
9428         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
9429         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
9430         EXPR_WITH_FILE_LOCATION.
9431         * lex.c (check_newline): Tweak filename/lineno setting.
9432         * semantics.c (begin_while_stmt): Fix typo in comment.
9433
9434 Sat Feb 26 19:50:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9435
9436         * lang-options.h (-fmessage-length=): Add missing option.
9437
9438         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
9439
9440 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
9441
9442         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
9443
9444 Fri Feb 25 14:52:33 2000  Jim Wilson  <wilson@cygnus.com>
9445
9446         * optimize.c (expand_call_inline): Emit the return label before
9447         evaluating the return value.
9448
9449 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
9450
9451         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
9452         than duplicating functionality here.
9453         * optimize.c: Include input.h.
9454         (expand_call_inline): Use push_srcloc and pop_srcloc.
9455         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
9456         * parse.c: Regenerated.
9457         * Makefile.in (lex.o): Depend on input.h.
9458         (optimize.o): Likewise.
9459
9460 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
9461
9462         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
9463         function type, rather than ICE.
9464
9465 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
9466
9467         * decl.c (grokdeclarator): Call decl_type_access_control.
9468         * parse.y (parse_end_decl): Don't call decl_type_access_control if
9469         decl is null.
9470
9471 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
9472
9473         * decl.c (decls_match): Remove obsolete static member nadgering.
9474
9475 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
9476
9477         * decl.c (grokdeclarator): Change ANSI to ISO.
9478         * lex.c (consume_string, readescape, do_identifier): Likewise.
9479         (parse_float, real_yylex): Likewise.
9480         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
9481         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
9482         new_type_id, maybe_label_decls, simple_stmt,
9483         for.init.statement): Likewise.
9484         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
9485         * semantics.c (finish_named_return_value): Likewise.
9486         * parse.c: Regenerate.
9487
9488 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
9489
9490         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
9491         (CPTI_CLASS_STAR_TYPE): Remove.
9492         (vtable_index_type): Likewise.
9493         (class_star_type_node): Remove.
9494         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
9495         (build_binary_op_nodefault): Remove.
9496         * call.c (build_new_op): Use build_binary_op instead of
9497         build_binary_op_nodefault.
9498         * decl.c (init_decl_processing): Remove class_star_type_node
9499         initialization.  Make delta_type_node ptrdiff_type_node under the
9500         new ABI.  Initialize vtable_index_type.
9501         (build_ptrmemfunc_type): Build different structures for the new
9502         ABI.
9503         (build_enumerator): Use build_binary_op instead of
9504         build_binary_op_nodefault.
9505         * method.c (build_overload_value): Mangle pointers-to-members
9506         appropriately under the new ABI.
9507         * typeck.c (build_array_ref): Use build_binary_op instead of
9508         build_binary_op_nodefault.
9509         (get_member_function_from_ptrfunc): Adjust for the new ABI.
9510         (build_binary_op_nodefault): Rename to ...
9511         (build_binary_op): ... this.  Remove old version.  Adjust for
9512         pointer-to-member comparisons under the new ABI.
9513         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
9514         (build_ptrmemfunc): Adjust for the new ABI.
9515         (expand_ptrmemfunc_cst): Likewise.
9516         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
9517         (pfn_from_ptrmemfunc): Adjust for the new ABI.
9518
9519 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
9520
9521         * call.c (build_object_call): Compress consecutive calls to
9522         cp_error.
9523         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
9524         (build_op_delete_call): Adjust message formatting.
9525
9526         * class.c (check_bases): Compress consecutive calls to
9527         cp_pedwarn.
9528         (finish_struct_anon): Say 'ISO C++'.
9529
9530         * decl.c (start_decl): Same here.
9531         (grok_reference_init): Likewise.
9532         (grokfndecl): Correct message formatting.
9533         (grokfndecl): Improve diagnostic.
9534         (check_static_variable_definition): Likewise. Say 'ISO C++'
9535         (compute_array_index_type): Say 'ISO C++'
9536         (create_array_type_for_decl): Compress consecutive calls to
9537         cp_error.
9538         (grokdeclarator): Say 'ISO C++'
9539         (grok_op_properties): Likewise.
9540
9541         * decl2.c (delete_sanity): Clairify diagnostic.
9542         (check_member_template): Same here.
9543         (grok_function_init): Use consistent terminology.
9544
9545         * expr.c (do_case): Say 'ISO C++'
9546
9547         * friend.c (do_friend): Compress consecutive calls to warning.
9548
9549 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
9550
9551         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
9552         * class.c (build_secondary_vtable): Reorganize.  Don't create a
9553         new vtable under the new ABI.
9554         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
9555         computing the size.
9556         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
9557         the initializing elements.
9558         (initialize_vtable): New function.
9559         (dfs_finish_vtbls): Use it.
9560         (dfs_accumulate_vtbl_inits): New function.
9561         (finish_vtbls): Merge primary and secondary vtables under the new
9562         ABI.
9563         (finish_struct_1): Remove redundant call to layout_vtable_decl.
9564         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
9565         aren't VAR_DECLs.
9566
9567         * class.c (build_vtable): New function, split out from ...
9568         (get_vtable_decl): ... here, and ...
9569         (build_secondary_vtable): ... here.
9570
9571         * pt.c (tsubst_decl): Fix formatting.
9572
9573 Sat Feb 19 18:43:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9574
9575         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
9576         (avoid_overlap, build_base_field): Likewise.
9577         (build_base_field, build_base_fields, is_empty_class):
9578         Test DECL_SIZE with integer_zero.
9579         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
9580         * cp-tree.h (struct lang_type): New field size_unit.
9581         (CLASSTYPE_SIZE_UNIT): New macro.
9582         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
9583         (cp_finish_decl): Delete -Wlarger-than processing.
9584         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
9585         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
9586         * tree.c (make_binfo): binfo vector is one entry longer.
9587         (walk_tree): Walk DECL_SIZE_UNIT.
9588
9589 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
9590
9591         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
9592         comment.
9593         (build_vtable_entry): Don't assume all vtable entries are
9594         functions.
9595         (build_vtbl_initializer): Adjust accordingly.
9596         (get_vtable_decl): Fix formatting.
9597
9598 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
9599
9600         * semantics.c (deferred_type_access_control): Walk the entire
9601         type_lookups list.
9602         (save_type_access_control): Rename from
9603         initial_deferred_type_access_control.  Just remember the value.
9604         (decl_type_access_control): New fn.
9605         (begin_function_definition): Use deferred_type_access_control, after
9606         we've started the function.  Set type_lookups to error_mark_node.
9607         * parse.y (frob_specs, fn.def1): Adjust.
9608         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
9609         (parse_end_decl, parse_bitfield0, parse_method): New fns.
9610         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
9611         (after_type_component_declarator0): Likewise.
9612         (after_type_component_declarator): Likewise.
9613         (notype_component_declarator): Likewise.
9614         * cp-tree.h: Adjust.
9615
9616         * decl.c (redeclaration_error_message): Allow redeclaration of
9617         namespace-scope decls.
9618
9619 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
9620
9621         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
9622
9623 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
9624
9625         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
9626         * decl2.c (grokclassfn): Likewise.
9627
9628         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
9629
9630         * decl2.c (lang_decode_option): Don't set default message length
9631         here.
9632         * lex.c (lang_init_options): Set it here.
9633
9634 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
9635
9636         Make DECL_CONTEXT mean the class in which a member function was
9637         declared, even for a virtual function.
9638         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
9639         (DECL_FRIEND_CONTEXT): New macro.
9640         (DECL_REAL_CONTEXT): Remove.
9641         (SET_DECL_FRIEND_CONTEXT): Likewise.
9642         (DECL_VIRTUAL_CONTEXT): Adjust.
9643         (DECL_CLASS_SCOPE_P): Use TYPE_P.
9644         (add_friends): Remove.
9645         (hack_decl_function_context): Likewise.
9646         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
9647         CP_DECL_CONTEXT.
9648         (build_over_call): Fix indentation.  Use DECL_CONTEXT
9649         instead of DECL_CLASS_CONTEXT.
9650         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
9651         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
9652         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
9653         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
9654         (build_base_field): Likewise.
9655         (finish_struct_1): Likewise.
9656         (build_self_reference): Likewise.
9657         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
9658         DECL_REAL_CONTEXT.
9659         (pushtag): Use decl_function_context, not
9660         hack_decl_function_context.
9661         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
9662         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
9663         (pushdecl): Remove bogus code.
9664         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
9665         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
9666         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
9667         Use decl_function_context, nothack_decl_function_context.
9668         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
9669         (grokdeclarator): Likewise.  Use decl_function_context, not
9670         hack_decl_function_context.
9671         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
9672         (start_function): Use DECL_FRIEND_CONTEXT, not
9673         DECL_CLASS_CONTEXT.  Use decl_function_context, not
9674         hack_decl_function_context.
9675         (finish_function): Use decl_function_context, not
9676         hack_decl_function_context.
9677         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
9678         DECL_CLASS_CONTEXT.
9679         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
9680         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
9681         (grokfield): Likewise.
9682         (finish_builtin_type): Likewise.
9683         (finish_vtable_vardec): Use decl_function_context, not
9684         hack_decl_function_context.
9685         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
9686         (start_static_initialization_or_destruction): Likewise.
9687         (finish_static_initialization_or_destruction): Likewise.
9688         (mark_used): Adjust logic for deciding when to synthesize methods.
9689         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
9690         DECL_REAL_CONTEXT.
9691         * error.c (dump_function_decl): Use DECL_CONTEXT, not
9692         DECL_CLASS_CONTEXT.
9693         * friend.c (is_friend): Likewise.
9694         (add_friends): Remove.
9695         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
9696         * lex.c (begin_definition_of_inclass_inline): Use
9697         decl_function_context, not hack_decl_function_context.
9698         (process_next_inline): Likewise.
9699         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
9700         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
9701         DECL_CLASSS_CONTEXT.
9702         (hack_identifier): Likewise.
9703         (synthesize_method):  Use decl_function_context, not
9704         hack_decl_function_context.
9705         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
9706         DECL_REAL_CONTEXT.
9707         (is_member_template): Use decl_function_context, not
9708         hack_decl_function_context.  Use DECL_CONTEXT, not
9709         DECL_CLASS_CONTEXT.
9710         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
9711         DECL_CLASS_CONTEXT.
9712         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
9713         DECL_REAL_CONTEXT.
9714         (push_template_decl_real): Likewise.
9715         (instantiate_class_template): Don't call add_friends.
9716         (tsubst_default_argument): Use DECL_CONTEXT, not
9717         DECL_REAL_CONTEXT.
9718         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
9719         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
9720         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
9721         DECL_CLASS_CONTEXT.
9722         * repo.c (repo_inline_used): Likewise.
9723         * search.c (current_scope): Adjust for new _CONTEXT macros.
9724         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
9725         DECL_REAL_CONTEXT.
9726         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
9727         (lookup_fnfields_here):Likewise.
9728         (check_final_overrider): Likewise.
9729         (init_vbase_pointers): Likewise.
9730         (virtual_context): Likewise.
9731         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
9732         (expand_body): Use decl_function_context, not
9733         hack_decl_function_context.
9734         * tree.c (hack_decl_function_context): Remove.
9735         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
9736         DECL_CLASS_CONTEXT.
9737         * typeck2.c (error_not_base_type): Likewise.
9738
9739 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
9740
9741         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
9742
9743 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9744
9745         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
9746
9747 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
9748
9749         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
9750
9751 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
9752
9753         * decl2.c (lang_decode_option): Enable automatic line wrapping.
9754
9755 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
9756
9757         * parse.y (frob_specs): Split out...
9758         (parse_decl): From here.
9759         (fn.def2): Call initial_deferred_type_access_control.
9760         (after_type_component_declarator0): Call frob_specs.
9761         (notype_component_declarator0): Likewise.
9762         * search.c (friend_accessible_p): Nested classes are friends of their
9763         enclosing classes.
9764
9765 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
9766
9767         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
9768         used to create an implicit temporary.
9769
9770         * class.c (dfs_modify_vtables): Tweak calculation of functions to
9771         override.
9772
9773 2000-02-08  Nathan Sidwell  <nathan@acm.org>
9774
9775         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
9776         strip array element qualifiers too.
9777
9778 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
9779
9780         * decl.c (store_parm_decls): Don't build cleanups for parameters
9781         while processing_template_decl.
9782
9783 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
9784
9785         * cp-tree.h (struct saved_scope): Add incomplete field.
9786         (namespace_scope_incomplete): New macro.
9787         * decl.c (pushdecl): Use it.
9788         (hack_incomplete_structures): Use it.  See through artificial
9789         binding levels.
9790         (mark_saved_scope): Mark it.
9791
9792         Implement access control for nested types.
9793         * search.c (type_access_control): New fn.
9794         (accessible_p): Now we do perform access control for types.
9795         * semantics.c (deferred_type_access_control): New fn.
9796         (initial_deferred_type_access_control): New fn.
9797         (begin_function_definition): Call it.  Add lookups parm.
9798         * decl.c (struct binding_level): Add this_class field.
9799         (pushlevel_class): Set it.
9800         (mark_binding_level): Mark it.
9801         (lookup_name_real): Use it.  Call type_access_control.
9802         (mark_saved_scope): Mark lookups field.
9803         * cp-tree.h (flagged_type_tree): Add lookups field.
9804         (struct saved_scope): Add lookups field.
9805         (type_lookups): New macro.
9806         * parse.y (declmods): Now <ftype>.
9807         (parse_decl): Add lookups parm.  Call
9808         initial_deferred_type_access_control.
9809         (lang_extdef): Clear type_lookups.
9810         (typed_declspecs, declmods, typespec): Set lookups field.
9811         (initdcl): Call deferred_type_access_control.
9812         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
9813         component_decl_1, named_parm): Adjust.
9814         * friend.c (is_friend): Nested classes are friends of their
9815         enclosing classes.
9816
9817         * class.c (currently_open_derived_class): New fn.
9818         * method.c (hack_identifier): Use it.
9819
9820         * lex.c (do_identifier): Remove obsolete code.
9821
9822         * parse.y (typed_typespecs): Propagate new_type_flag properly.
9823
9824 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
9825
9826         * tinfo.h: Remove apostrophes from C++ comment (xgettext
9827         thinks this file is plain C).
9828
9829 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9830
9831         * Makefile.in (call.o): Depend on $(EXPR_H).
9832
9833         * call.c: Include "expr.h".
9834
9835         * class.c (dump_class_hierarchy): Add prototype.
9836
9837         * search.c (dfs_get_pure_virtuals): Likewise.
9838
9839 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
9840
9841         * parse.y (simple_stmt): Allow :: token in asm parameter list.
9842         * parse.c: Rebuilt.
9843
9844 Mon Jan 31 15:35:29 2000  Jim Wilson  <wilson@cygnus.com>
9845
9846         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
9847         Store it in DECL_FCONTEXT.
9848         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
9849
9850 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
9851
9852         * tinfo.h (old abi): #include "tconfig.h".
9853         * tinfo.cc (convert_to_base): Move into old abi section.
9854
9855 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
9856
9857         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
9858         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
9859         (BINFO_PRIMARY_BINFO): New macro.
9860         (BF_DELTA): Rename to ...
9861         (BV_DELTA): ... this.
9862         (BF_VCALL_INDEX): Rename to ...
9863         (BV_VCALL_INDEX): ... this.
9864         (BF_FN): Rename to ...
9865         (BV_FN): ... this.
9866         * class.c (build_vbase_path): Adjust for changes to reverse_path.
9867         (set_rtti_entry): Rename BF_ macros to BV_ variants.
9868         (modify_vtable_entry): Simplify.
9869         (add_virtual_function): Rename BF_ macros to BV_ variants.
9870         (build_vtable_initializer): Likewise.
9871         (get_class_offset_1): Remove.
9872         (dfs_get_class_offset): Likewise.
9873         (get_class_offset): Likewise.
9874         (dfs_find_final_overrider): New function.
9875         (find_final_overrider): Likewise.
9876         (modify_one_vtable): Remove.
9877         (dfs_find_base): New function.
9878         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
9879         find_final_overrider.
9880         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
9881         virtuals.
9882         (dfs_fixup_vtable_deltas): Remove.
9883         (override_one_vtable): Remove.
9884         (merge_overrides): Likewise.
9885         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
9886         unreal chilren of virtual bases.
9887         (finish_struct_1): Don't use merge_overrides.  Don't use
9888         dfs_fixup_vtable_deltas.
9889         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
9890         BINFOs.
9891
9892 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
9893             Jason Merrill  <jason@yorick.cygnus.com>
9894
9895         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
9896
9897 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
9898
9899         * exception.cc (__throw_bad_typeid): Add missing std::.
9900
9901 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9902
9903         * cp-tree.h (make_thunk): PROTO -> PARAMS.
9904
9905 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
9906
9907         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
9908
9909         Runtime support for new-abi rtti.
9910         * inc/typeinfo (type_info::operator!=): Define in class.
9911         (type_info::before, type_info::name, type_info::operator==,
9912         type_info::operator!=): Define new ABI implementations.
9913         (type_info::is_pointer_p, type_info::is_function_p): Declare
9914         new virtual functions.
9915         (type_info::do_catch, type_info::do_upcast): Likewise.
9916
9917         * tinfo.h (__base_class_info): Define new class.
9918         (__class_type_info): Likewise.
9919         (__si_class_type_info): Likewise.
9920         (__vmi_class_type_info): Likewise.
9921         (__dynamic_cast): Prototype.
9922
9923         * tinfo.cc: Conditionalize old and new rtti mechanisms.
9924         (type_info::is_pointer_p): Define new function.
9925         (type_info::is_function_p): Likewise.
9926         (type_info::do_catch): Likewise.
9927         (type_info::do_upcast): Likewise.
9928         (vtable_prefix): New structure for vtable access.
9929         (adjust_pointer): Define new template function.
9930         (contained_p, public_p, virtual_p, contained_public_p,
9931         contained_nonpublic_p, contained_nonvirtual_p): Define new
9932         functions.
9933         (nonvirtual_base_type): New local variable.
9934         (__class_type_info::~__class_type_info): Define.
9935         (__si_class_type_info::~__si_class_type_info): Likewise.
9936         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
9937         (__class_type_info::do_catch): Define new function.
9938         (__class_type_info::do_upcast): Likewise.
9939         (__class_type_info::find_public_src): Likewise.
9940         (__class_type_info::do_find_public_src): Likewise.
9941         (__si_class_type_info::do_find_public_src): Likewise.
9942         (__vmi_class_type_info::do_find_public_src): Likewise.
9943         (__class_type_info::do_dyncast): Likewise.
9944         (__si_class_type_info::do_dyncast): Likewise.
9945         (__vmi_class_type_info::do_dyncast): Likewise.
9946         (__class_type_info::do_upcast): Likewise.
9947         (__si_class_type_info::do_upcast): Likewise.
9948         (__vmi_class_type_info::do_upcast): Likewise.
9949         (__dynamic_cast): Likewise.
9950
9951         * tinfo2.cc (__fundamental_type_info): Define new class.
9952         (__pointer_type_info): Likewise.
9953         (__reference_type_info): Likewise.
9954         (__array_type_info): Likewise.
9955         (__function_type_info): Likewise.
9956         (__enum_type_info): Likewise.
9957         (__ptr_to_member_type_info): Likewise.
9958         (__fundamental_type_info::~__fundamental_type_info): Define.
9959         (__pointer_type_info::~__pointer_type_info): Likewise.
9960         (__reference_type_info::~__reference_type_info): Likewise.
9961         (__array_type_info::~__array_type_info): Likewise.
9962         (__function_type_info::~__function_type_info): Likewise.
9963         (__enum_type_info::~__enum_type_info): Likewise.
9964         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
9965         (__pointer_type_info::do_catch): Define new function.
9966         (__ptr_to_member_type_info::do_catch): Define new function.
9967
9968         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
9969         (__is_pointer): Likewise.
9970
9971         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
9972
9973 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
9974
9975         * cp/class.c (build_vtable): Rename to build_primary_vtable.
9976         (prepare_fresh_vtable): Rename to build_secondary_vtable.
9977         (make_new_vtable): New function.
9978         (modify_vtable_entry): Handle generation of new vtables correctly.
9979         (modify_one_vtable): Remove unused parameter.
9980         (dfs_fixup_vtable_deltas): Likewise.
9981         (override_one_vtable): Use build_secondary_vtable.
9982         (finish_struct_1): Use build_primary_vtable and
9983         build_secondary_vtable.
9984
9985 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
9986
9987         * cp/decl.c: Adjust variable names, comments, help strings.
9988
9989 2000-01-29  Nathan Sidwell  <nathan@acm.org>
9990
9991         * new2.cc (operator delete[]): Use operator delete, don't assume
9992         implementation.
9993
9994 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
9995
9996         * class.c (build_vtbl_initializer): Add argument to
9997         build_vtable_entry call.
9998
9999 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
10000
10001         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
10002         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
10003         (BF_DELTA): New macro.
10004         (BF_VCALL_INDEX): Likewise.
10005         (BF_FN): Likewise.
10006         (THUNK_VCALL_OFFSET): Likewise.
10007         (make_thunk): Change prototype.
10008         * class.c (build_vtable_entry): Integrate
10009         build_vtable_entry_for_fn.  Handle vcall indices.
10010         (build_vtable_entry_for_fn): Remove.
10011         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
10012         BF_VCALL_INDEX, BF_FN.
10013         (modify_vtable_entry): Integrate common code from
10014         modify_one_vtable and dfs_fixup_vtable_deltas.
10015         (add_virtual_function): Set BF_VCALL_INDEX.
10016         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
10017         and BF_FN.
10018         (modify_one_vtable): Simplify.
10019         (dfs_fixup_vtable_deltas): Likewise.
10020         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
10021         * method.c (make_thunk): Handle vcall indices.
10022
10023 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
10024
10025         Compiler side new abi rtti (not enabled).
10026         * cp-tree.h (new_abi_rtti_p): New macro.
10027         (emit_support_tinfos): Prototype new function.
10028         (tinfo_decl_p): Likewise.
10029         (emit_tinfo_decl): Likwise.
10030         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
10031         macros.
10032         (doing_runtime): New local static.
10033         (init_rtti_processing): Add new-abi initializer.
10034         (get_tinfo_decl): Add new-abi logic.
10035         (tinfo_from_decl): Likewise.
10036         (build_dynamic_cast_1): Likewise.
10037         (qualifier_flags): New static function.
10038         (tinfo_base_init): Likewise.
10039         (generic_initializer): Likewise.
10040         (ptr_ref_initializer): Likewise.
10041         (ptmd_initializer): Likewise.
10042         (class_hint_flags): Likewise.
10043         (class_initializer): Likewise.
10044         (synthesize_tinfo_var): Likewise.
10045         (create_real_tinfo_var): Likewise.
10046         (create_pseudo_type_info): Likewise.
10047         (get_vmi_pseudo_type_info): Likewise.
10048         (create_tinfo_types): Likewise.
10049         (emit_support_tinfos): New global function.
10050         (tinfo_decl_p): New global predicate.
10051         (emit_tinfo_decl): New global function.
10052         * class.c (set_rtti_entry): Generalize for old and new rtti.
10053         (build_vtbl_initializer): Likewise.
10054         * decl2.c (finish_file): Likewise.
10055
10056 Thu Jan 27 20:53:36 2000  Jim Wilson  <wilson@cygnus.com>
10057
10058         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
10059         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
10060
10061 Thu Jan 27 13:54:12 2000  Mike Stump  <mrs@wrs.com>
10062
10063         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
10064         for scopes.
10065
10066 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
10067
10068         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
10069
10070 Wed Jan 26 22:19:14 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
10071
10072         * optimize.c (calls_setjmp_r): Supply new argument
10073         to special_function_p.
10074
10075 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10076
10077         * call.c: PROTO -> PARAMS.
10078         * class.c: Likewise.
10079         * cp-tree.h: Likewise.
10080         * cvt.c: Likewise.
10081         * decl.c: Likewise.
10082         * decl.h: Likewise.
10083         * decl2.c: Likewise.
10084         * dump.c: Likewise.
10085         * errfn.c: Likewise.
10086         * error.c: Likewise.
10087         * except.c: Likewise.
10088         * expr.c: Likewise.
10089         * init.c: Likewise.
10090         * input.c: Likewise.
10091         * lex.c: Likewise.
10092         * lex.h: Likewise.
10093         * method.c: Likewise.
10094         * optimize.c: Likewise.
10095         * parse.y: Likewise.
10096         * pt.c: Likewise.
10097         * repo.c: Likewise.
10098         * rtti.c: Likewise.
10099         * search.c: Likewise.
10100         * semantics.c: Likewise.
10101         * spew.c: Likewise.
10102         * tree.c: Likewise.
10103         * typeck.c: Likewise.
10104         * typeck2.c: Likewise.
10105         * xref.c: Likewise.
10106
10107 2000-01-25  Richard Henderson  <rth@cygnus.com>
10108
10109         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
10110
10111 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
10112
10113         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
10114         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
10115         (struct vcall_offset_data_s): New type.
10116         (dfs_vcall_offset_queue_p): New function.
10117         (dfs_build_vcall_offset_vtbl_entries): Likewise.
10118         (build_vcall_offset_vtbl_entries): Likewise.
10119         (layout_vtable_decl): Likewise.
10120         (num_vfun_entries): Likewise.
10121         (num_extra_vtbl_entries): Add the entries for vcall offsets.
10122         (build_vtbl_initializer): Likewise.
10123         (dfs_finish_vtabls): Use layout_vtable_decl.
10124         (modify_one_vtables): Always duplicate vtables under the new ABI.
10125         (finish_struct_1): Use layout_vtable_decl.
10126
10127 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10128
10129         * decl.c (member_function_or_else): Change third arg from a format
10130         specifier to an `enum overload_flags'.  Callers changed.
10131
10132 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
10133
10134         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
10135         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
10136         build_const_cast, get_delta_difference, check_return_expr): Avoid
10137         ANSI string concatenation usage.
10138
10139 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
10140
10141         * class.c (layout_class_type): Put the fields required to make a
10142         class non-empty at the end, not the beginning, of the TYPE_FIELDs
10143         list.
10144
10145 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
10146
10147         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
10148         template.
10149
10150         * decl2.c (mark_used): Do instantiate inlines that have been
10151         explicitly instantiated.
10152
10153 2000-01-24  Richard Henderson  <rth@cygnus.com>
10154
10155         * call.c (build_over_call): Use expand_tree_builtin.
10156         * typeck.c (build_function_call_real): Likewise.
10157         (build_binary_op_nodefault): Handle unordered compares.
10158
10159 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
10160
10161         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
10162         cp_tree_index values.
10163         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
10164         New global node #defines for them.
10165         * rtti.c (call_void_fn): Replace with ...
10166         (build_runtime_decl): ... new static function.
10167         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
10168         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
10169         (build_dynamic_cast_1): Always produce correctly typed result.
10170         Explicitly produce type_info addresses. Use dynamic_cast_node.
10171         * exception.cc (__throw_bad_cast): Return `void *'.
10172         (__throw_bad_typeid): Return `const type_info &'.
10173
10174 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
10175
10176         * cp-tree.h (get_vtable_decl): Prototype new function.
10177         * class.c (get_vtable_decl): New function. Broken out from ...
10178         (build_vtable): ... here. Use it.
10179         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
10180         by get_vtable_decl.
10181
10182 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
10183
10184         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
10185         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
10186         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
10187         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
10188         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
10189         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
10190         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
10191         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
10192         (CPTI_TINFO_VAR_ID): New enumeration.
10193         (__tp_desc_type_node, __access_mode_type_node,
10194         __bltn_desc_type_node, __user_desc_type_node,
10195         __class_desc_type_node, __ptr_desc_type_node,
10196         __attr_desc_type_node, __func_desc_type_node,
10197         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
10198         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
10199         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
10200         enum_desc_type_node, class_desc_type_node,
10201         si_class_desc_type_node, vmi_class_desc_type_node,
10202         ptmd_desc_type_node, base_desc_type_node): New #defines.
10203         (tinfo_fn_id, tinfo_fn_type): Rename to ...
10204         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
10205         (tinfo_var_id): New enumeration.
10206         (DECL_TINFO_FN_P): Augment comment.
10207         * decl.c (cp_global_trees): Adjust documentation.
10208         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
10209         tinfo_decl_type and tinfo_var_id.
10210         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
10211         (build_typeid): Remove unused variable.
10212         (get_tinfo_var): Use tinfo_var_id.
10213         (tinfo_name): New static function.
10214         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
10215         (tinfo_from_decl): Likewise.
10216         (get_base_offset): New static function, broken out of
10217         expand_class_desc.
10218         (expand_si_desc): Use tinfo_name.
10219         (expand_class_desc): Likewise. Lose local static variable.
10220         Use base_desc_type_node. Use get_base_offset.
10221         (expand_ptr_desc): Use tinfo_name.
10222         (expand_attr_desc): Likewise.
10223         (expand_generic_desc): Likewise.
10224
10225         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
10226         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
10227
10228 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
10229
10230         * cp-tree.h (__eprintf): Remove declaration.
10231         * tree.c (__eprintf): Remove definition.
10232
10233 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
10234             Mark Mitchell  <mark@codesourcery.com>
10235
10236         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
10237         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
10238
10239 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
10240
10241         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
10242
10243 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
10244
10245         * cp-tree.h (register_dtor_fn): New function.
10246         * decl.c (destroy_local_static): Rename to ...
10247         (register_dtor_fn): ... this.  Give it external linkage.
10248         (expand_static_init): Use it.
10249         * decl2.c (do_static_initialization): Likewise, if using
10250         __cxa_atexit.
10251         (do_static_destruction): Check that __cxa_atexit is not in use.
10252         (finish_file): Don't call do_static_destruction if using
10253         __cxa_atexit.
10254
10255         * typeck.c (convert_arguments): Restore two-message error
10256         reporting.
10257
10258 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
10259
10260         Remap dynamic cast hint values to be consistent across ABIs.
10261         * search.c (dynamic_cast_base_recurse): Remap generated value.
10262         (get_dynamic_cast_base_type): Adjust documentation.
10263         * tinfo.h (__user_type_info::dyncast): Likewise.
10264         (__user_type_info::find_public_subobj): Remap BOFF meaning.
10265         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
10266         (__class_type_info::do_dyncast): Likewise.
10267         (__class_type_info::do_find_public_subobj): Likewise.
10268         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
10269
10270 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
10271
10272         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
10273
10274         * typeck2.c (incomplete_type_error): Restore previous
10275         cp_error and cp_error_at call sequence.
10276
10277 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
10278
10279         * class.c (dump_class_hierarchy): Make format agree with argument;
10280         cast pointer to unsigned long and print with %lx.
10281
10282 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
10283
10284         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
10285
10286         * typeck.c (composite_pointer_type, common_type,
10287         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
10288         build_function_call_real, convert_arguments,
10289         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
10290         build_unary_op, mark_addressable, build_compound_expr,
10291         build_static_cast, build_reinterpret_cast, build_const_cast,
10292         build_c_cast, build_modify_expr, get_delta_difference,
10293         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
10294         'ISO C++'.  Fusion consecutive calls to diagnotic message routines
10295         into a single one.
10296         * typeck2.c (readonly_error, abstract_virtuals_error,
10297         process_init_constructor, check_for_new_type): Likewise.
10298
10299 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
10300
10301         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
10302         VAR_DECLs.
10303
10304 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
10305
10306         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
10307         (build_x_typeid): Likewise.
10308         (get_tinfo_fn): Likewise.
10309         (get_tinfo_fn_unused): Rename to ...
10310         (get_tinfo_decl): ... here.
10311         * rtti.c (build_headof): Replace logic error with assertion.
10312         (get_tinfo_fn_dynamic): Rename to ...
10313         (get_tinfo_decl_dynamic): ... here. Make static. Use
10314         complete_type_or_else.
10315         (build_x_typeid): Move into ...
10316         (build_typeid): ... here. Adjust call to
10317         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
10318         throw_bad_typeid expression.
10319         (get_tinfo_fn_unused): Rename to ...
10320         (get_tinfo_decl): ... here. Adjust comment.
10321         (get_tinfo_fn): Delete.
10322         (tinfo_from_decl): New static function.
10323         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
10324         (get_typeid): Use complete_type_or_else.
10325         (build_dynamic_cast_1): Adjust calls to
10326         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
10327         * parse.y (primary): Adjust call to build_typeid.
10328         * except.c (build_eh_type_type_ref): Adjust call to
10329         get_tinfo_decl. Mark as used.
10330         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
10331         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
10332         * parse.c: Regenerated.
10333
10334 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
10335
10336         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
10337         calling convention.
10338         (resolves_to_fixed_type_p): Document calling convention.
10339         * rtti.c (build_x_typeid): Initialize NONNULL.
10340
10341         * cp-tree.h (build_shared_int_cst): New function.
10342         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
10343         * class.c (modify_vtable_entry): Likewise.
10344         (add_virtual_function): Split out code to generated shared
10345         INTEGER_CSTs to build_share_int_cst.
10346         (modify_all_vtables): Handle all the overridden functions here.
10347         Add overridden functions from non-primary virtual bases to the
10348         primary vtable.
10349         (finish_struct_1): Adjust call to modify_all_vtables.  Add
10350         overridden functions from non-primary bases to the vtable.
10351         * tree.c (build_shared_int_cst): New function.
10352
10353         * cp-tree.h (scratchalloc): Remove.
10354         (build_scratch_list): Likewise.
10355         * call.c (convert_class_to_reference): Replace build_scratch_list
10356         and build_expr_list with build_tree_list.
10357         (add_candidate): Replace scratchalloc with expralloc.  Note memory
10358         leak.
10359         (build_user_type_conversion_1):  Replace build_scratch_list
10360         and build_expr_list with build_tree_list.
10361         (build_new_op): Likewise.
10362         (build_op_delete_call): Likewise.
10363         (convert_like): Likewise.
10364         * cvt.c (ocp_convert): Likewise.
10365         * decl.c (start_decl): Likewise.
10366         (start_function): Likewise.
10367         (finish_destructor_body): Likewise.
10368         (maybe_build_cleanup_1): Likewise.
10369         * decl2.c (reparse_decl_as_expr): Likewise.
10370         * init.c (perform_member_init): Likewise.
10371         (expand_cleanup_for_base): Likewise.
10372         (build_builtin_delete_call): Likewise.
10373         (build_new_1): Likewise.
10374         (build_delete): Likewise.
10375         * method.c (do_build_assign_ref): Likewise.
10376         * parse.y (already_scoped_stmt): Likewise.
10377         (nontrivial_exprlist): Likewise.
10378         (net_initializer): Likewise.
10379         (initlist): Likewise.
10380         * parse.c: Regenerated.
10381         * rtti.c (build_x_typeid): Likewise.
10382         (build_dynamic_cast_1): Likewise.
10383         * typeck.c (build_x_compound_expr): Likewise.
10384         (build_static_cast): Likewise.
10385         (build_modify_expr): Likewise.
10386
10387         * cp-tree.h (DECL_VINDEX): Add documentation.
10388         * class.c (build_vtable_entry): Likewise.
10389         (start_vtable): Add comment.
10390         (add_virtual_function): Replace pending_hard_virtuals with
10391         overridden_virtuals and pending_virtuals with new_virtuals.
10392         Replace redundant assignments with assertions.
10393         (check_for_override): Add comment.
10394         (check_bases_and_members): Replace pending_hard_virtuals with
10395         overridden_virtuals and pending_virtuals with new_virtuals.
10396         (create_vtbl_ptr): Likewise.
10397         (layout_class_type): Likewise.
10398         (finish_struct_1): Likewise.  Add comments.
10399
10400 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
10401
10402         * class.c (finish_struct_1): Replace redundant code with
10403         assertions.
10404
10405         * cp-tree.h (flag_new_abi): Move.
10406         (flag_use_cxa_atexit): Likewise.
10407         (flag_honor_std): Likewise.
10408         (flag_rtti): Likewise.
10409         (vbase_offsets_in_vtable_p): Define.
10410         (vptrs_present_everywhere_p): Likewise.
10411         (TYPE_CONTAINS_VPTR_P): Likewise.
10412         (dfs_walk_real): Declare.
10413         * class.c (build_vbase_pointer_fields): Check
10414         vbase_offsets_in_vtable_p.
10415         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
10416         BINFO_VPTR_FIELD.
10417         (build_vbase_offset_vtbl_entries): Simplify.
10418         (build_vbase_offset_vtbl_entries): Adjust.
10419         (build_vbase_pointer): Add ability to look up vbase offsets in
10420         vtable.
10421         (start_vtable): New function.
10422         (add_virtual_function): Use it.
10423         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
10424         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
10425         (build_vtbl_initializer): Take the type of the complete object as
10426         input.  Use it to correctly calculate vbase offsets.
10427         (dfs_finish_vtbls): Pass the complete type to
10428         build_vtbl_initializer.
10429         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
10430         (create_vtable_ptr): Create a vtable even if there are no
10431         new virtual functions, under the new ABI.
10432         (finish_struct_1): Likewise.
10433         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
10434         * decl.c (exapnd_static_init): Remove call to
10435         preserve_initializer.
10436         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
10437         vtables.
10438         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
10439         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
10440         (construct_virtual_bases): Don't initialize virtual base pointers
10441         under the new ABI.
10442         (build_aggr_init): Clean up comment.
10443         (expand_aggr_init_1): Likewise.
10444         * rtti.c (expand_class_desc): Store the virtual function table
10445         index where the vbase offset lives in the offset field.
10446         * search.c (dfs_walk_real): Make it global.
10447         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
10448         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
10449
10450         * tinfo.h (USItype): Make it signed under the new ABI.
10451         * tinfo.cc (convert_to_base): New function.  Encapsulate base
10452         conversion logic here.
10453         (__class_type_info::do_upcast): Use it.
10454         (__class_type_info::do_dyncast): Likewise.
10455         (__class_type_info::do_find_public_subobj): Likewise.
10456
10457         * init.c (construct_virtual_bases): Don't look up the addresses of
10458         virtual bases at run-time.
10459
10460         * class.c (build_vbase_pointer): Relocate.
10461         (build_vbase_pointer_fields): Likewise.
10462         (dfs_build_vbase_offset_vtbl_entries): Likewise.
10463         (build_vbase_offset_vtbl_entries): Likewise.
10464
10465         * decl.c (init_decl_processing): Complain if -fnew-abi
10466         -fno-vtable-thunks is used.
10467
10468         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
10469         flag_new_abi.
10470
10471 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
10472
10473         * cp-tree.h (num_extra_vtbl_entries): New function.
10474         (size_extra_vtbl_entries): Likewise.
10475         (dfs_vtable_path_unmark): Likewise.
10476         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
10477         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
10478         * class.c (num_extra_vtbl_entries): New function.
10479         (size_extra_vtbl_entries): Likewise.
10480         (dfs_build_vbase_offset_vtbl_entries): New function.
10481         (build_vbase_offset_vtbl_entries): Likewise.
10482         (build_vtbl_initializer): Use it.
10483         (finish_struct_1): Adjust vtable sizes (using
10484         num_extra_vtbl_entries).
10485         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
10486         THUNK_DECL is non-NULL before expanding it.
10487         * init.c (expand_virtual_init): Adjust the vtable pointer by
10488         size_extra_vtbl_entries before storing it.
10489         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
10490         Handle TREE_LIST parameters here, not in the dfs_* functions.
10491         (dfs_unmarked_real_bases_queue_p): Adjust.
10492         (dfs_marked_real_bases_queue_p): Likewise.
10493         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
10494         (dfs_vtable_path_marked_real_bases_queue_p): New function.
10495         (dfs_vtable_path_unmark): Likewise.
10496
10497 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
10498
10499         * optimize.c (copy_body_r): Clear the operand three of a
10500         TARGET_EXPR when copying it.
10501
10502 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
10503
10504         * method.c (build_decl_overload_real): Check whether we are in ::
10505         before returning __builtin_new/delete.
10506
10507 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
10508
10509         * pt.c (tsubst_friend_function): Improve comment.
10510         (instantiate_decl): Avoid crashing when a "nested" function is
10511         instantiated from the top level.
10512
10513         * dump.c (dqeueue_and_dump): Dump
10514         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
10515
10516 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10517
10518         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
10519
10520 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
10521
10522         * g++spec.c (lang_specific_driver): Add -fnew-abi if
10523         ENABLE_NEW_GXX_ABI defined.
10524         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
10525         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
10526         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
10527
10528 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
10529
10530         * decl.c (start_cleanup_fn): Call pushdecl.
10531
10532         * call.c (convert_class_to_reference): Fix typos.
10533         (build_conditional_expr): Handle errors gracefully.
10534         * class.c (push_nested_class): Likewise.
10535         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
10536         (DECL_THIS_EXTERN): Use it.
10537         (DECL_THIS_STATIC): Likewise.
10538         * cvt.c (convert_to_void): Handle errors gracefully.
10539         (build_expr_type_conversion): Likewise.
10540         * decl.c (maybe_push_decl): Likewise.
10541         (start_decl_1): Likewise.
10542         (require_complete_types_for_parms): Likewise.
10543         * parse.y (structsp): Likewise.
10544         (base_class): Likewise.
10545         * parse.c: Regenerated.
10546         * pt.c (finish_member_template_decl): Likewise.
10547         * typeck.c (decay_conversion): Likewise.
10548
10549         * cp-tree.h (dfs_skip_vbases): New function.
10550         (find_vbase_instance): Likewise.
10551         * class.c (determine_primary_base): Allow a nearly empty base to
10552         serve as a primary base class under the new ABI.
10553         (get_class_offset_1): Rename to ...
10554         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
10555         messages here.
10556         (get_class_offset): Use it.  Issue error messages here.
10557         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
10558         find the right copies of virtual bases.
10559         (fixup_vtable_deltas1): Rename to ...
10560         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
10561         bases as primary bases.
10562         (fixup_vtable_deltas): Remove.
10563         (override_one_vtable): Handle virtual bases as primary bases.
10564         (merge_overrides): Likewise.
10565         (finish_struct_1): Likewise.
10566         (dump_class_hierarchy): Dump primary-ness of bases as well.
10567         * search.c (mark_primary_bases): Use a pre-order traversal to
10568         handle primary virtual bases.
10569         (dfs_skip_vbases): New fiunction.
10570         (expand_upcast_fixups): Adjust to handle primary virtual bases.
10571         (fixup_virtual_upcast_offsets): Likewise.
10572         (fixup_all_virtual_upcast_offsets): Likewise.
10573         (dfs_find_vbase_instances): New function.
10574         (find_vbase_instance): Likewise.
10575
10576 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
10577
10578         * lex.c (DIR_SEPARATOR): Delete macro.
10579
10580 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
10581
10582        * decl2.c (lang_decode_option): Handle automatic line wrapping
10583        option.
10584
10585 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
10586
10587         * friend.c (do_friend): Don't resolve scopes when processing
10588         template declarations, even if the qualifying scope doesn't
10589         involve template parameters.
10590
10591 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
10592
10593         * class.c (dfs_modify_vtables_queue_p): Remove.
10594         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
10595         and dfs_marked_real_bases_queue_p instead of
10596         dfs_modify_vtables_queue_p.
10597
10598         * class.c (build_vbase_path): Simplify.
10599         (dfs_propagate_binfo_offsets): New function.
10600         (propagate_binfo_offsets): Use it.
10601         (remove_base_field): Simplify.
10602         (dfs_set_offset_for_vbases): Remove.
10603         (dfs_set_offset_for_shared_vbases): New function.
10604         (dfs_set_offset_for_unshared_vbases): Likewise.
10605         (layout_virtual_bases): Use them.
10606         (layout_basetypes): Don't call propagate_binfo_offsets.
10607         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
10608         for the vbases.
10609
10610         * class.c (build_base_field): New function, split out from ...
10611         (build_base_fields): ... here.  Use it.  Allocate primary bases
10612         first, under the new ABI.
10613         (get_vtable_entry): Remove.
10614         (remove_base_field): New function, split out from ...
10615         (remove_base_fields): ... here.  Adjust since primary bases come
10616         first under the new ABI.
10617
10618         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
10619         (initialize_vtbl_ptrs): New function.
10620         (expand_indirect_vtbls_init): Change prototype.
10621         (convert_pointer_to_vbase): Declare.
10622         * init.c (expand_direct_vtbls_init): Remove.
10623         (dfs_initialize_vtbl_ptrs): New function.
10624         (initialize_vtbl_ptrs): Likewise.
10625         (emit_base_init): Use initialize_vtbl_ptrs.
10626         * search.c (convert_pointer_to_vbase): Make it global.
10627         (expand_indirect_vtbls_init): Remove vtable initialization code.
10628         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
10629
10630         * class.c (dfs_finish_vtbls): New function.
10631         (finish_vtbls): Use it.
10632         (dump_class_hierarchy): New function.
10633
10634         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
10635         (BINFO_VBASE_PRIMARY_P): New macro.
10636         (BINFO_VIRTUALS): Add to documentation.
10637         (SET_BINFO_PRIMARY_MARKED_P): Remove.
10638         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
10639         (dfs_mark_primary_bases_queue_p): Likewise.
10640         (dfs_unmarked_real_bases_queue_p): New function.
10641         (dfs_marked_real_bases_queue_p): Likewise.
10642         * search.c (dfs_mark_primary_bases): Adjust.
10643         (mark_primary_bases): Likewise.
10644         (get_shared_vbase_if_not_primary): New function.
10645         (dfs_unmarked_real_bases_queue_p): Likewise.
10646         (dfs_marked_real_bases_queue_p): Likewise.
10647         (dfs_get_pure_virtuals): Simplify.
10648         (get_pure_virtuals): Likewise.
10649
10650 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10651
10652         * lex.c: Include tm_p.h.
10653
10654 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
10655
10656         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
10657
10658 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
10659
10660         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
10661         * pt.c (instantiate_decl): Defer comdat templates that might not be
10662         needed.
10663
10664         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
10665         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
10666         (finish_file): Likewise.
10667
10668         * decl2.c (import_export_class): Undo 12/14 change.
10669
10670         * error.c (dump_decl): operator new, not operatornew.
10671
10672         * class.c (field_decl_cmp): A nontype is "greater" than a type.
10673         * search.c (lookup_field_1): Look for the last field with the
10674         desired name.
10675
10676 2000-01-05  Nathan Sidwell  <nathan@acm.org>
10677
10678         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
10679         FUNCTION_DECL.
10680
10681 2000-01-05  Nathan Sidwell  <nathan@acm.org>
10682
10683         * typeck.c (build_static_cast): Don't strip target qualifiers
10684         when casting from a class.
10685
10686 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10687
10688         * class.c (warn_hidden): Initialize variable `fndecl'.
10689
10690 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
10691
10692         * decl.c (flag_isoc9x): New variable to be able to use code in
10693         c-common.c.  For now always zero.
10694
10695 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
10696
10697         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
10698         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
10699         or unshare_base_binfos for virtual bases here.
10700         * search.c (dfs_get_vbase_types): Do it here.
10701         (get_vbase_types): Adjust.
10702
10703 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
10704
10705         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
10706         (BINFO_PRIMARY_MARKED_P): Use flag 5.
10707         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
10708         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
10709         (unmark_primary_bases): Remove declaration.
10710         (unmarkedp): Declare.
10711         (dfs_vbase_unmark): Likewise.
10712         * class.c (determine_primary_base): Return immediately if there
10713         are no base classes.  Call mark_primary_bases here.
10714         (modify_all_direct_vtables): Remove.
10715         (modify_all_indirect_vtables): Remove.
10716         (dfs_modify_vtables_queue_p): New function.
10717         (dfs_modify_vtables): New function.
10718         (modify_all_vtables): Use them.
10719         (build_base_fields): Build FIELD_DECLs for primary virtual base
10720         classes.
10721         (create_vtable_ptr): Don't call determine_primary_base here.
10722         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
10723         (dfs_set_offset_for_vbases): ... this.
10724         (layout_virtual_bases): Use it.
10725         (layout_class_type): Call determine_primary_base here.
10726         * search.c (unmarkedp): Make it global.
10727         (shared_marked_p): Simplify.
10728         (shared_unmarked_p): Likewise.
10729         (dfs_primary_bases_queue_p): Remove.
10730         (dfs_unmark_primary_bases): Likewise.
10731         (unmark_primary_bases): Likewise.
10732         (mark_primary_bases): Simplify.
10733         (get_pure_virtuals): Don't call mark_primary_bases here.
10734         (dfs_vbase_unmark): New function.
10735         (get_vbase_types): Simplify.
10736
10737         * class.c (struct base_info): Remove.
10738         (determine_primary_base): Take has_virtual_p rather than a
10739         base_info as input.  Don't calculate max_has_virtual.
10740         (finish_struct_bits): Remove max_has_virtual argument.
10741         (create_vtable_ptr): Remove max_has_virtual_p argument.
10742         (layout_virtual_bases): Remove max argument.
10743         (layout_basetypes): Likewise.
10744         (layout_class_type): Remove max_has_virtual_p argument.
10745         (finish_struct_1): Remove max_has_virtual.
10746
10747         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
10748         (layout_basetypes): Remove.
10749         * class.c (propagate_binfo_offsets): Moved here from tree.c.
10750         Update to handle primary virtual bases.
10751         (remove_base_fields): New function, split out from
10752         layout_basetypes.
10753         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
10754         (layout_virtual_bases): New function, split out from
10755         layout_basetypes.  Update to handle primary virtual bases.
10756         (layout_basetypes): Moved here from tree.c.  Use
10757         remove_base_fields and layout_virtual_bases.
10758         * search.c (dfs_mark_primary_bases_queue_p): New function.
10759         (mark_primary_bases): Use it.
10760         * tree.c (CEIL): Remove.
10761         (propagate_binfo_offsets): Remove.
10762         (layout_basetypes): Remove.
10763
10764 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
10765
10766         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
10767         (BINFO_PRIMARY_MARKED_P): New macro.
10768         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
10769         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
10770         (mark_primary_bases): New function.
10771         (unmark_primary_bases): Likewise.
10772         * search.c (get_abstract_virtuals_1): Remove.
10773         (dfs_mark_primary_bases): New function.
10774         (mark_primary_bases): Likewise.
10775         (dfs_unmark_primary_bases): Likewise.
10776         (unmark_primary_bases): Likewise.
10777         (dfs_get_pure_virtuals): Likewise.
10778
10779 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
10780
10781         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
10782         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
10783         (modify_one_vtable): Adjust.
10784         (fixup_vtable_deltas1): Likewise.
10785         (override_one_vtable): Likewise.
10786         * search.c (get_abstract_virtuals_1): Likewise.
10787         (get_pure_virtuals): Likewise.
10788         (expand_upcast_fixups): Likewise.
10789         * tree.c (debug_binfo): Likewise.
10790
10791         * class.c (build_vtable): Don't return a value.  Don't rebuild
10792         vtables for bases that have already been handled.
10793         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
10794         already been handled.
10795         (modify_one_vtable): Adjust accordingly.
10796         (fixup_vtable_deltas1): Likewise.
10797         (finish_struct_1): Likewise.
10798
10799 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
10800
10801         * call.c (build_new_method_call): Also check destructors.