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