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