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